[Insight-users] Labeled neighborhoods

Luis Ibanez luis.ibanez at kitware.com
Tue Aug 9 16:01:45 EDT 2005


Hi Daniel,

It seems that you can take advantage of the Voting filters.

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

You probably can create your filter by just modifying the
code of the Votingfilter, given that this one already computes
the counts of zero neighors,


    Regards,



        Luis



-----------
Einstein, Daniel R wrote:
> Hello,
> 
> I would like to label a 3D binary image by its neighborhood. In other 
> words, everywhere there is a "1" sandwiched between two "0's", I would 
> like to label it "1". Everywhere there are six "1's" sandwiched between 
> two "0's", they would be labeled "6", and so on. It seems like the 
> neighborhood iterators will probably be involved, but I not really sure 
> how. Seems like I would want to recursively reshape the iterators in a 
> for loop and test the image against them one by one. When there is a 
> match, I'd change the pixel value of the output image to the desired 
> label. Any advise on how to test the iterator against the image to fit a 
> neighborhood criterion?
> 
> Thanks
> Dan
> 
> Daniel R Einstein, PhD
> Biological Monitoring and Modeling
> Pacific Northwest National Laboratory
> P.O. Box 999; MSIN P7-59
> Richland, WA 99352
> Tel: 509/ 376-2924
> Fax: 509/376-9064
> _daniel.einstein at pnl.gov_ <mailto:daniel.einstein at pnl.gov>
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list