[vtkusers] How to get points from VtkPolyData
kmorel at sandia.gov
Mon Feb 14 14:05:26 EST 2005
Did you call the Update method on the filter? The poly data mapper will do that before the first render, but if you otherwise want to inspect the data, you need to make sure the output data is up-to-date by calling Update.
**** Kenneth Moreland
*** Sandia National Laboratories
*** *** *** email: kmorel at sandia.gov
** *** ** phone: (505) 844-8919
*** fax: (505) 845-0833
> -----Original Message-----
> From: vtkusers-bounces at vtk.org
> [mailto:vtkusers-bounces at vtk.org] On Behalf Of Alejandro Galindo Mateo
> Sent: Monday, February 14, 2005 11:59 AM
> To: vtkusers at vtk.org
> Subject: [vtkusers] How to get points from VtkPolyData
> Hello VTK users,
> I have a vtkPolyData with points, polygons and scalars and I
> only want the points with the scalars. I tried with:
> vtkPolyData data
> data SetPoints [[Filter GetOutput] GetPoints]
> for the points and:
> [data GetPointData] SetScalars [[[Filter GetOutput]
> GetPointData] GetScalars]
> for the scalars. [Filter GetOutput] is a vtkPolyData and it´s
> not empy because I can render it with a mapper and the data
> is represented correctly.
> But the result is that the vtkPolyData data is empty. I
> would like to know if I need to do another thing to copy the points.
> Thanks for all,
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ Follow this link to
More information about the vtkusers