[Insight-users] Number of Neighbors Connected to a Pixel

Luis Ibanez luis.ibanez at kitware.com
Sat May 21 16:11:51 EDT 2011


Hi Robert,

I don't think such class exists yet in the toolkit.

It may be easy to build such filter
by starting from the code of the:

              itkVotingBinaryImageFilter

http://www.itk.org/Doxygen/html/classitk_1_1VotingBinaryImageFilter.html


Since this filter already computes such count internally.

by line 140 of

              itkVotingBinaryImageFilter.txx

You may just need to remove lines 144-168
and replace them with

                     it.Set( count );


It will be great if you contribute this filter to ITK
by posting a technical report to the Insight Journal    :-)

            http://www.insight-journal.org



    Luis


--------------------------------------
On Thu, May 12, 2011 at 3:39 PM, robert tamburo
<robert.tamburo at gmail.com> wrote:
> I'm looking for a class that takes a binary image as input and outputs the
> number of foreground pixels connected to each pixel. Checking to see if such
> a filter exists before implementing one. Thanks!
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list