[vtkusers] Extracting parts of a vtkImageData - Help needed

Michnay Balázs michnay at freemail.hu
Tue Nov 30 09:57:21 EST 2004


Dear VTK Users,
This question has already been posted but my question seemed to be 
ambiguous since I still can't find a way to do it.
I have a vtkImageData which has some regions that should be 
extracted.

Please take a look at the following image to see how the actual image 
looks like:
http://www.inf.u-szeged.hu/~michnay/mask.jpg

What I'd like to do is to get all the circle-shaped objects extracted from 
this image (so I'd like to get 7 independent images)

I tried vtkContourFilter along with vtkPolyDataConnectivityFilter which 
returns the right number of extracted regions (7), but I don't know how 
to actually extract them. What I think is that shouldn't use 
ContourFilter, because generating isolines won't help me to extract 
these regions (however, it's useful to get the number of extracted 
regions).
I also tried vtkExtracgGrid but that doesn't accept vtkImageData as 
input.

Please let me know how I can solve this.

Thanks in advance,

All the best,

 MB



More information about the vtkusers mailing list