[vtkusers] Error with VTK4.0 and python2.2: "ValueError: method requires a VTK object"

Scott X scott_01 at hotmail.com
Sun Apr 7 21:45:05 EDT 2002


I've built VTK4.x on a redhat 7.2 machine with python2.2 and I get this 
error when
I run CSpline.py from the old vtk31 release demos. CSpline.tcl in the new
Examples directory runs just fine and it seems to be a parallel of the 
python
version. Here's the error in its full glory:

Traceback (most recent call last):
  File "CSpline.py", line 41, in ?
    glyphPoints.SetInput(inputData)


Here's the offending code, although I'm sure most people on the list have a 
copy.

inputData = vtkPolyData()
inputData.SetPoints(inputPoints)

balls = vtkSphereSource()
balls.SetRadius(.01)
balls.SetPhiResolution(10)
balls.SetThetaResolution(10)

glyphPoints = vtkGlyph3D()
glyphPoints.SetInput(inputData) <- I get the error here
glyphPoints.SetSource(balls.GetOutput())

glyphMapper = vtkPolyDataMapper()
glyphMapper.SetInput(glyphPoints.GetOutput())

I also get this similar error from the bottle.py demo:

File "mybottle.py", line 58, in mylens
    extrude.SetInput(profile)
ValueError: method requires a VTK object

Where I'm trying to send a vtkPolyData() object to 
vtkRotationalExtrusionFilter
using the SetInput method.

Is this a bug, or am I missing something new in VTK4.0.

Thanks for the help/advice in advance!

-Scott

Scott Harris
scott_01 at hotmail.com


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com




More information about the vtkusers mailing list