[vtkusers] Setting specific colors to vtkPolyData

David Doria daviddoria at gmail.com
Sun Jan 8 14:44:57 EST 2012


On Sun, Jan 8, 2012 at 2:15 PM, Miri Trope <miritrope at gmail.com> wrote:
> Hi Again,
>
> In addition,
> I'd like to ask about vtkPolyDataWriter:
> I set scalars on vtkPolyData and would like to save both the vtkPolyData
> with his scalars (it means that I'd like to save the colored surface).
>
> How should I do this?

You should probably be using vtkXMLPolyDataWriter to write a .vtp
file. Use Paraview (paraview.org) to inspect the result - the
PointData, CellData, and FieldData
(http://www.vtk.org/Wiki/VTK/Tutorials/DataStorage) should
automatically be saved to the file.

David



More information about the vtkusers mailing list