[vtkusers] associating datra to polydata

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Tue Feb 24 15:46:45 EST 2004


Hi Seb,
   vtkPolyData supports cells of type: vertex (vtkVertex vtkPolyVertex)
line (vtkLine vtkPolyLine) polygon (vtkTriangle vtkQuad vtkPolygon) and
triangle strip (vtkTriangleStrip) .
It sounds like you should store your information as cell data, and rather
than simple scalar data (vtkScalars) you want vtkFieldData.
It seems you can also associate vtkFieldData at the dataset level
(polydata->SetFieldData)

So it looks like vtk can do everything you need...
You would create a vtkPolyData using 3D points at the lowest level, then
create cells (points, lines or polygons), then store your data as cell
field data, and dataset field data.

   Dave P



                                                                                                               
                      Sébastien MARAUX                                                                         
                      <maraux at ondim.fr>        To:       <vtkusers at vtk.org>                                    
                      Sent by:                 cc:                                                             
                      vtkusers-admin at vt        Subject:  [vtkusers] associating datra to polydata              
                      k.org                                                                                    
                                                                                                               
                                                                                                               
                      25/02/2004 03:40                                                                         
                                                                                                               
                                                                                                               




Hello,

I am working in GIS field, where many polygons/lines or points groups are
associated with data (data for points, for lines, for polygons, and for
general group information).
What is the simpliest way of keeping my associated information (which can
be float, double, string arrays) when I convert a GIS format into a
vtkPolyData + ???(for associated information)
And keep the link between information and what it is relevant to (points
with their data, lines with their data, general group data) ?

Seb











More information about the vtkusers mailing list