<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello,<div><br></div><div>You should look into the LabelMap Module and framework[1]. The ITK LabelMap class hold a Run Length Encoded (RLE) labeled image, which can be converted from a binary[2], or label image[3]. Additionally, there can be statistics associated with each of these label objects.</div><div><br></div><div>More specifically the BinaryShapeOpeningImageFilter[4] will do exactly what you need if you set the attribute to NUMBER_OF_PIXELS and the Lambda to the threshold value. This filter will convert you binary image to an ITK label map, compute the required statistics, remove the label objects below the threshold and then create the binary image. It should do the same that as bwareaopening. The LabelMap module has a lot of very useful and specific filters for manipulating objects based of shape and attributes.</div><div><br></div><div>The LabelMap module was contributed through the Insight Journal by Gaetan Lehman[6].</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/group__ITKLabelMap.html">http://www.itk.org/Doxygen/html/group__ITKLabelMap.html</a></div><div>[2] <a href="http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToLabelMapFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1BinaryImageToLabelMapFilter.html</a></div><div>[3] <a href="http://www.itk.org/Doxygen/html/classitk_1_1LabelImageToLabelMapFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1LabelImageToLabelMapFilter.html</a></div><div>[4] <a href="http://www.itk.org/Doxygen/html/classitk_1_1BinaryShapeOpeningImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1BinaryShapeOpeningImageFilter.html</a></div><div>[5] <a href="http://www.itk.org/Doxygen/html/classitk_1_1ShapeLabelObject.html#ae0f49d30bbbe68d6d56d5192d7ace314">http://www.itk.org/Doxygen/html/classitk_1_1ShapeLabelObject.html#ae0f49d30bbbe68d6d56d5192d7ace314</a></div><div>[6] <span style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; line-height: 22px; background-color: rgb(255, 255, 255);"> </span><a href="http://hdl.handle.net/1926/584" style="color: rgb(70, 101, 162); text-decoration: none; font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; line-height: 22px; background-color: rgb(255, 255, 255);">http://hdl.handle.net/1926/584</a></div><div><br><div><div>On May 20, 2014, at 4:35 AM, Jon Haitz Legarreta <<a href="mailto:jhlegarreta@vicomtech.org">jhlegarreta@vicomtech.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div>Dear Ruturaj,<br></div><div>binary math morphology filters [1] will be of help for this task. The itk::BinaryOpeningByReconstructionImageFilter [2] is probably the filter you are looking for.<br><br></div>
<div>HTH,<br>JON HAITZ</div><div><br>[1] <a href="http://www.itk.org/Doxygen/html/group__ITKBinaryMathematicalMorphology.html">http://www.itk.org/Doxygen/html/group__ITKBinaryMathematicalMorphology.html</a><br>[2] <a href="http://www.itk.org/Doxygen/html/classitk_1_1BinaryOpeningByReconstructionImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1BinaryOpeningByReconstructionImageFilter.html</a><br>
</div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 20 May 2014 10:09, Girish, Gavaskar Ruturaj <span dir="ltr"><<a href="mailto:gavaskar.ruturaj.girish@philips.com" target="_blank">gavaskar.ruturaj.girish@philips.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div><p class="MsoNormal">Dear all,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Is there a class in ITK which provides functionality to remove small white objects in a binary image, similar to the function
<span style="font-family:"Courier New"">bwareaopen()</span> in MATLAB? If not, how can this be done?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks & Regards,<u></u><u></u></p><p class="MsoNormal">Ruturaj<u></u><u></u></p>
</div>
<br>
<hr>
<font color="Gray" face="Arial" size="1">The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified
 that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.<br>

</font>
</div>

<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></div></div>
_______________________________________________<br>Community mailing list<br><a href="mailto:Community@itk.org">Community@itk.org</a><br>http://public.kitware.com/cgi-bin/mailman/listinfo/community<br></blockquote></div><br></div></body></html>