[vtkusers] Accessing vtkPolyData scalars with Python
bberkowi
benjamin-berkowitz at uiowa.edu
Fri Feb 17 11:50:31 EST 2012
I was able to access the scalars for my surface by using
distanceArray =
distanceMapper.Surface.GetPointData().GetScalars('Distances')
distanceArray.GetValue(i)
and then used that in a 'for' loop to get the scalar IDs that are in the
range that I want. I'm assuming that the point IDs will correspond with the
scalar IDs (ie distanceArray.GetValue(1) will correspond with the scalar
value at the point ID 1). Now that I have the point IDs, I want to create a
list of the associated cells using the 'GetPointCells()' class of
vtkPolyData. I'm getting an error when I try that though - I'm assuming
it's just syntax. Any ideas? Here is the line (i is an integer, and
pointCellIds is a pre-defined list):
distanceMapper.Surface.GetPointCells(i, pointCellIds)
Thanks!
--
View this message in context: http://vtk.1045678.n5.nabble.com/Accessing-vtkPolyData-scalars-with-Python-tp5470807p5493167.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list