[vtkusers] Getting bounds of components obtained via a vtkConnectivityFilter

Jean-Marie Normand normand at lina.univ-nantes.fr
Fri Nov 12 11:17:10 EST 2004


Hi,
I'd like to know how can I get the correct bounds of components obtained
via a vtkConnectivityFilter.

I have a vtkImplicitBoolean which represents the difference or
interesection of some vtkImplicitFunctions, this boolean may be composed
of more thant one connected component. So I need to pass it trough a
vtkConnectivityFilter to get all the components. 

This works fine on my example of showing the difference of 2 cubes as
you can see on the following image:
http://jimounette.free.fr/vtk/connectivity3.png
Calling GetNumberOfExtractedRegions() tells me that there are 2
connected components, the problem is when I get those ones, their bounds
are not correct, I retrieve the bounds from the original
vtkImplicitBoolean which is not what I want.
The result is shown here :
http://jimounette.free.fr/vtk/connectivity2.png

I tried to call ComputeBounds on the extracted surface, but I doesn't
recompute the bounds. I'd like to know what I need to do to get the
proper bounding box of my extracted surface.

Thanks in advance.

Jim




More information about the vtkusers mailing list