Thanks for the lead Luis. Worked like a charm!<div><br><div class="gmail_quote">On Sat, May 21, 2011 at 4:11 PM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Robert,<br>
<br>
I don't think such class exists yet in the toolkit.<br>
<br>
It may be easy to build such filter<br>
by starting from the code of the:<br>
<br>
itkVotingBinaryImageFilter<br>
<br>
<a href="http://www.itk.org/Doxygen/html/classitk_1_1VotingBinaryImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1VotingBinaryImageFilter.html</a><br>
<br>
<br>
Since this filter already computes such count internally.<br>
<br>
by line 140 of<br>
<br>
itkVotingBinaryImageFilter.txx<br>
<br>
You may just need to remove lines 144-168<br>
and replace them with<br>
<br>
it.Set( count );<br>
<br>
<br>
It will be great if you contribute this filter to ITK<br>
by posting a technical report to the Insight Journal :-)<br>
<br>
<a href="http://www.insight-journal.org" target="_blank">http://www.insight-journal.org</a><br>
<br>
<br>
<br>
Luis<br>
<br>
<br>
--------------------------------------<br>
<div><div></div><div class="h5">On Thu, May 12, 2011 at 3:39 PM, robert tamburo<br>
<<a href="mailto:robert.tamburo@gmail.com">robert.tamburo@gmail.com</a>> wrote:<br>
> I'm looking for a class that takes a binary image as input and outputs the<br>
> number of foreground pixels connected to each pixel. Checking to see if such<br>
> a filter exists before implementing one. Thanks!<br>
</div></div>> _____________________________________<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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>
</blockquote></div><br></div>