[Insight-users] Extracting each connected component of a binary image
Pol Monsó
pol.monso+tools at gmail.com
Fri Sep 13 16:33:25 EDT 2013
Hi,
I've searching how to extract each connected component of a binary image
such as
http://blogs.mathworks.com/images/steve/2008/binary_indexed_vis_01.png
into a separate image through the ConnectedComponentFilter (or maybe the
labelmap?)
I've seen how to extract the largest one on the examples, but I couldn't
see how to iterate over the image to extract each one of them into a
separate image. I could iterate over the image checking pixelvalues, but
that does not seem efficient and I suspect there's another way to do this.
It looks that the ChangeLabelImageFilter should be able to do it but I
couldn't figure out how. A short example would be perfect, or a pointer to
how to iterate over the connected components.
Cheers,
Pol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130913/d2c0b240/attachment.htm>
More information about the Insight-users
mailing list