<div dir="ltr"><div>Hi Neils,<br><br></div>Some ideas, I would start from this class that seams to take a label map and the gray level images to compute the statistics you need [1]<br>Otherwise a generic statistics filter[2], but you should provide it the masked regions I guess<br>
[1] <a href="http://www.itk.org/Doxygen45/html/classitk_1_1StatisticsLabelMapFilter.html">http://www.itk.org/Doxygen45/html/classitk_1_1StatisticsLabelMapFilter.html</a><br>[2] <a href="http://www.itk.org/Doxygen45/html/classitk_1_1StatisticsImageFilter.html">http://www.itk.org/Doxygen45/html/classitk_1_1StatisticsImageFilter.html</a><br>
<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">Nicolás Gallego-Ortiz<br>Université catholique de Louvain, Belgium<br></div></div>
<br><br><div class="gmail_quote">2014-05-22 15:24 GMT+02:00 Niels Gerkien <span dir="ltr"><<a href="mailto:nielsgerkien80@outlook.com" target="_blank">nielsgerkien80@outlook.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div dir="ltr">Hi guys,<div><br></div><div>I managed to get the 4-neighbors pixels following Bradley tips, using a BinaryDilateImageFilter with a cross structuring element and subtracting the binary image from the <span style="font-size:12pt">image resulting from the dilation. Now I would need your help for another task. Now that I know where my different sets of 4-neighbors and their contours are, I need to extract the minimum intensity value of each contours and the mean value of each set from the original image. What is the best way to do so? Sorry for all these questions, but I just started studying these things!!</span></div>
<div><span style="font-size:12pt"><br></span></div><div><span style="font-size:12pt">Thanks a lot,</span></div><div><span style="font-size:12pt">Niels </span></div><div><br><div><hr>From: <a href="mailto:nielsgerkien80@outlook.com" target="_blank">nielsgerkien80@outlook.com</a><br>
To: <a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a><br>Date: Wed, 21 May 2014 16:18:33 +0000<br>CC: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><div><div class="h5">
<br>Subject: Re: [ITK-users] Finding 4 neighbors of a label object‏<br><br>


<div dir="ltr">Thank you very much Brad!!<br><br><div><hr>Subject: Re: [ITK-users] Finding 4 neighbors of a label object‏<br>From: <a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a><br>Date: Wed, 21 May 2014 08:12:41 -0400<br>
CC: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>To: <a href="mailto:nielsgerkien80@outlook.com" target="_blank">nielsgerkien80@outlook.com</a><br><br>Hello,<div><br></div><div>I would look into using the BinaryDilateImageFilter[1] and the BinaryErodeImageFilter[2] with a Cross Flat structuring element[3].</div>
<div><br></div><div>And then there is the BinaryMorphologicalOpeningImageFilter[4] which could be used to remove these unwanted voxel.</div><div><br></div><div>I'd recommend trying to uses the filters in an interactive environment such an SimpleITK with ipython to explore the parameters and understand what they do.</div>
<div><br></div><div>Hope that helps,</div><div>Brad</div><div><br></div><div>[1] <a href="http://www.itk.org/Doxygen/html/classitk_1_1BinaryDilateImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1BinaryDilateImageFilter.html</a></div>
<div>[2] <a href="http://www.itk.org/Doxygen/html/classitk_1_1BinaryErodeImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1BinaryErodeImageFilter.html</a></div><div>[3] <a href="http://www.itk.org/Doxygen/html/classitk_1_1FlatStructuringElement.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1FlatStructuringElement.html</a></div>
<div>[4] <a href="http://www.itk.org/Doxygen/html/classitk_1_1BinaryMorphologicalOpeningImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1BinaryMorphologicalOpeningImageFilter.html</a><br><div>
<div>On May 21, 2014, at 8:01 AM, Niels Gerkien <<a href="mailto:nielsgerkien80@outlook.com" target="_blank">nielsgerkien80@outlook.com</a>> wrote:</div><br><blockquote><div style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div dir="ltr"><div dir="ltr"><span style="color:rgb(68,68,68);font-size:15px;line-height:21.299999237060547px;background-color:rgb(255,255,255)">Hello everybody,</span><div style="line-height:21.299999237060547px;color:rgb(68,68,68);font-size:15px;background-color:rgb(255,255,255)">
<br></div><div style="line-height:21.299999237060547px;color:rgb(68,68,68);font-size:15px;background-color:rgb(255,255,255)">I would need your help on one thing. I have a 3D binary image coming from a binary thresholding. Now, considering the set of four-connected voxels, I need to find all the voxels that do not belong to these sets, but are 4-neighbors of a voxel belonging to this set. I also need to do it for different images obtained using different thresholds in the binary thresholding. Do you know if there is a fast way to do so? I tried creating a label map and then looking for all the voxels that do not belong to a label object and are next to a label voxel, but it takes a really long time. Especially for thresholds that give me many label objects.</div>
<div style="line-height:21.299999237060547px;color:rgb(68,68,68);font-size:15px;background-color:rgb(255,255,255)"><br></div><div style="line-height:21.299999237060547px;color:rgb(68,68,68);font-size:15px;background-color:rgb(255,255,255)">
I really appreciate your help!!</div><div style="line-height:21.299999237060547px;color:rgb(68,68,68);font-size:15px;background-color:rgb(255,255,255)"><br></div><div style="line-height:21.299999237060547px;color:rgb(68,68,68);font-size:15px;background-color:rgb(255,255,255)">
Niels</div></div></div>_____________________________________<br>Powered by<span> </span><a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a></div>
</blockquote></div><br></div></div>                                         </div>
<br>_____________________________________
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Kitware offers ITK Training Courses, for more information visit:
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a>

Please keep messages on-topic and check the ITK FAQ at:
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a></div></div></div></div>                                         </div></div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
<br></blockquote></div><br></div>