[vtkusers] Accessing vtkPolyData scalars with Python

bberkowi benjamin-berkowitz at uiowa.edu
Wed Feb 15 11:38:43 EST 2012


OK, so if anyone can just help in general, it doesn't have to be with Python
syntax (but it would be helpful).  This is what I have so far, and it's not
working:

    distanceMapper.Surface.GetPointData().SetActiveScalars('Scalars_')
    distanceArray = distanceMapper.Surface.GetPointData().GetScalars()

    #print 'DISTANCE SURFACE:',  distanceMapper.Surface

    print 'DISTANCE ARRAY:',  distanceArray
    tuple = []
    tuple = distanceArray.GetTuple(0)
    print tuple

and GetTuple() doesn't work.  It returns an error, "Traceback (most recent
call last):
  File "VTK_testing.py", line 80, in <module>
    tuple = distanceArray.GetTuple(0)
AttributeError: GetTuple"

--
View this message in context: http://vtk.1045678.n5.nabble.com/Accessing-vtkPolyData-scalars-with-Python-tp5470807p5486620.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list