[vtkusers] Accessing Cutter Point Values

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Jun 13 13:58:49 EDT 2002


>>>>> "CB" == Christopher Bayley <bayley at me.queensu.ca> writes:

    CB> Hello all VTK Users; I am having alot of difficulty trying to
    CB> get the numeric values of points within vtkpolydata and in
    CB> particular vtkcutter. In my application I am cutting a simple
    CB> 3D surface with a plane which results in a line.  I am able to
    CB> view the line, but can't figure out how to get the data values
    CB> for each of the points along that line.

    CB> Could someone show me how to access the xyz coordinate
    CB> information of the line I have created using vtkcutter.

Couldnt you do something like this?

cutter = vtkCutter() # or whatever.
# ... setup pipeline ...

o = cutter.GetOutput()
p = o.GetPoints()
pd = o.GetPointData()
s = pd.GetScalars()
for i in range(s.GetNumberOfTuples()):
  print p.GetValue(i), s.GetValue(i)


prabhu



More information about the vtkusers mailing list