[vtkusers] Please help --> vtkConnectivityFilter

Michnay Balázs michnay at freemail.hu
Wed Nov 10 09:03:23 EST 2004


Dear VTK Users,
I've been trying to find out how vtkConnectivityFilter really works but 
I'm stuck at one point and my code doesn't do what I expect.

What my code does:
- I instantiate an object from vtkConnectivityFilter class
- I set its input (which is a vtkImageData that was an output of a 
threshold filter)
- Extraction mode: SetExtractionModeToAllRegions()
- I call the Update method to perform operation
- After the process ended I use GetNumberOfExtractedRegions() to 
check how many regions it extracted but it always returns 1.

The (binary) image has 7 components, which I'd like to extract.
How can I individually handle one extracted region? My final goal is to 
build a volume from these extracted regions.

Please let me know what the problem is.
thanks for your help in advance,
wishing you all the best,

MB



More information about the vtkusers mailing list