[vtkusers] memory acces violation with python wrapper
Julien Gout
julien.gout at helmholtz-berlin.de
Thu Mar 4 09:07:55 EST 2010
Hi,
I am getting a memory acces violation for the following code I translated
from a tcl example
(http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Hybrid/Testing/Tcl/TestImageStencilWithPolydata.tcl?root=VTK&content-type=text/plain).
I am new to vtk and I have absolutely no idea where this error is comming
from. Any hints?
import vtk
print "create sphere."
sg = vtk.vtkSphereSource()
sg.SetRadius(60)
sg.SetCenter(102, 102, 0)
sg.SetPhiResolution(12)
sg.SetThetaResolution(12)
sg.Update()
print "triangle filter."
triangle = vtk.vtkTriangleFilter()
triangle.SetInput(sg.GetOutput())
triangle.Update()
print "stripper."
stripper = vtk.vtkStripper()
stripper.SetInput(triangle.GetOutput())
stripper.Update()
print "PolyDataToImageStencil."
polyToStencilFilter = vtk.vtkPolyDataToImageStencil()
polyToStencilFilter.SetInput(stripper.GetOutput())
polyToStencilFilter.SetOutputSpacing(0.8, 0.8, 1.5)
polyToStencilFilter.SetOutputOrigin(0.0, 0.0, 0.0)
polyToStencilFilter.Update()
More information about the vtkusers
mailing list