[Insight-users] Labeled neighborhoods

Einstein, Daniel R daniel.einstein at pnl.gov
Mon Aug 8 20:58:42 EDT 2005


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050808/caf88564/attachment-0001.html


More information about the Insight-users mailing list