[vtkusers] generating isopoints with vtkContourFilter -- segmentation fault

Greg Whittier greg at thewhittiers.com
Sun Jan 18 20:58:48 EST 2004


I'm new to VTK, so I apologize if I'm doing something wrong here.  I
would like to use vtkContourFilter with vtkPolyData to get a set of
isopoints from a set of lines.  The vtkContourFilter docs say you can
generate isopoints from 1D or 0D cell data, but I can't find any
examples.  Is this really possible?  When I try, I get a segmentation
fault.

Here is some sample code that generates a seg fault.

import vtk
 
reader = vtk.vtkPolyDataReader()
reader.SetFileName("/usr/share/doc/vtk-data-4.5.0/Data/track1.binary.vtk")

 
cfilter = vtk.vtkContourFilter()
cfilter.SetValue(0,5.0)
cfilter.SetInput(reader.GetOutput())
 
writer = vtk.vtkPolyDataWriter()
writer.SetFileName('test.vtk')
writer.SetInput(cfilter.GetOutput())
writer.Write()

Opening track1.binary.vtk with mayavi and selecting isosurface also
generates a seg fault.

I'm running Red Hat Linux 9 and using using the 20040118 rpms from
http://creatis-www.insa-lyon.fr/vtk/.

Any help would be appreciated.  Thanks for such a great piece of
software.

Greg





More information about the vtkusers mailing list