[vtkusers] Extract contours's features in 2D images

Luis Ibanez luis.ibanez at kitware.com
Tue Feb 9 13:28:02 EST 2010


Hi Frederic,

If you are interested in the metrics of the contours,
more than the contours themselves you could use
Label classes described in the Insight Journal paper:

http://www.insight-journal.org/browse/publication/176
"Label object representation and manipulation with ITK"
Lehmann G., INRA


In particular,
you may want to look at the ShapeLabelObject
and its associated filters.


These classes are now in the directory:

               Insight/Code/Review



Note however, that contours do not create a natural
association of parent-child relationship.



Regards,


      Luis


----------------------------------------------------------------------------------
2010/2/8 frédéric salvador <frederic.salvador at gmail.com>:
> Dear all,
>
> I want to detect contours from 2D binary images.
> More specifically, once the contours are detected, I would like to get their
> perimeters, areas, and parents->children relationships.
>
> I tried some itk filters which extract contours pretty well, such as
> "itkSimpleContourImageFilter". But the features of the detected contours
> (perimeters, areas,...) cant be extracted from these filters.
>
> So I moved to the "itkContourExtractor2DImageFilter", that I implement this
> way:
>
> typedef itk::ContourExtractor2DImageFilter <Image2D> ExtractorType;
> ExtractorType::Pointer Extractor = ExtractorType::New();
> Extractor->SetInput(reader->GetOutput());
> Extractor->SetContourValue(255.0);
> Extractor->Update();
>
> But this filter didnt detect any contours...
>
> Someone could help with this?
> Thanks a lot in advance for this.
>
> Fred
>



More information about the vtkusers mailing list