<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1256"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">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">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">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">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">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">nielsgerkien80@outlook.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 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 class="Apple-converted-space"> </span><a href="http://www.kitware.com/">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">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">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">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">http://www.itk.org/mailman/listinfo/insight-users</a></div></blockquote></div><br></div></body></html>