[Insight-users] to label continuous parts

Ivan Macia imacia at vicomtech.es
Wed, 14 Apr 2004 10:15:50 +0200


Hi David,

If what you have is a binary image where you have to distinguish several
connected objects itkConnectedComponentImageFilter seems the right filter to
use. I didn't try it myself but it seems straightforward but you won't have
consecutive numbers for the labels. itkRelabelComponentImageFilter
transforms these label numbers in continuous labels. I don't know if with
"gray" you are referring to a binary or grayscale image here. In the first
case, someone correct me if im wrong, I don't think you will find anything
easier to use. You just have to allocate memory for the filter, connect it
to the output of another filter or an image an update.

The Watershed filter is a well-known segmentation method in the literature.
In a few words is a segmentation filter that takes a grayscale image as
input, segments it and produces a labelled image as output, the number of
different labels you get depending on the parameters you set to the filter.

Hope that helps

Iván

________________________________

Iván Macía Oliver
Ing. Industrial
Ing. en Automática y Electrónica
Asociación VICOMTech
http://www.vicomtech.es
Paseo Mikeletegi 57, bajo
20.009 Donostia-San Sebastián
(Gipuzkoa) SPAIN
Tlfno: (00 34) 943 30 92 30
Fax: (00 34) 943 30 93 93
e-mail: imacia at vicomtech.es <mailto:imacia at vicomtech.es>

**Member of INI-GraphicsNet**
http://www.inigraphics.net

VICOMTech is an ISO 9001:2000
certified institute
______________________________




-----Mensaje original-----
De: insight-users-admin at itk.org [mailto:insight-users-admin at itk.org]En
nombre de David Llanos
Enviado el: martes, 13 de abril de 2004 17:45
Para: insight-users at itk.org
Asunto: [Insight-users] to label continuous parts


> Hi all,
>
> I have to label the different continuous parts of an gray image, for later
to be able to process them and to differentiate them for blocks.
>
> I am studying the class "watershed", itkRelabelComponentImageFilter and
itkConnectedComponentImageFilter of ITK, but I think that the code examples
are too intricate for what I look for. I need only a simple labeled.
>
> would you be able to help me with an example but simple or concise?
>
> Thanks in advange and regards,
>
> David.