[vtkusers] vtkPolyDataConnectivityFilter() doesn't filter data when passed to out

Peter Halverson halverson at byu.edu
Thu May 14 10:52:02 EDT 2009


I'm having some difficulty with vtkPolyDataConnectivityFilter().  VTK is
able to visualize it but I can't get the data out of it.  I've written a
program that works as follows

1. Uses vtkDICOMImageReader() to read in a CT image and pass that to
2. vtkContourfilter() to reduce that image and pass that to
3. vtkPolyDataConnectivityFilter() to get the largest connected region and
pass that to
4. vtkPolyDataNormals() which passes it to
5. vtkPolyDataMapper() and then to
6. vtkActor() which is able to render only the largest connected region (the
skin in this case)

When I pass the data to python using
vtk_ar=vtk_to_numpy(skinactor.GetMapper().GetInput().GetPoints().GetData())
I get the output from step 2 which includes the disconnected regions.  I've
searched the vtk mail archives and the books but can't find out how to get
the data after the ConnectivityFilter is called. I'm new to vtk, any help
would be appreciated.

Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090514/d4cd0b35/attachment.htm>


More information about the vtkusers mailing list