[Insight-users] Watersheds Labelling
Luis Ibanez
luis.ibanez at kitware.com
Tue Jul 7 17:21:18 EDT 2009
Hi Marco,
Please read the documentation of the WatershedImageFilter,
and look more carefully at the Example.
You will find a description of this example in the ITK
Software Guide:
http://www.itk.org/ItkSoftwareGuide.pdf
The output of the WaterShedImage filter is *already* an
image of labels, encoded as pixel type "unsigned long".
This output is colored by the "colormaper" object (in that
Example), which is a filter that produces a color image
from the labeled image.
If you want an image of labels, you can simply take the
output of the watershed filter directly and skip the
color encoding step.
Regards,
Luis
-------------------------
marco giordano wrote:
> Hi all,
>
> I am using the watersheds segmentation WatershedSegmentation1.cxx in
> order to segment my image into quasi-homogeneous regions.
> However what I get in the end is a color coded representation of the
> regions, that if i understand right codes each label using 3 byte, one
> for each color.
>
> I would like to label the regions more simply by just assigning an "int"
> or a "float" to each region. In few woords I would like my output to be
> an Image of intergers or
> floating point numbers.
>
> Is there an easy way to do this in the ITK code?
>
> Thank you.
>
>
>
> --
> Marco G.
>
>
> ------------------------------------------------------------------------
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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