[vtkusers] associating datra to polydata

Malcolm Drummond malcolm at geovision.co.za
Wed Feb 25 09:32:34 EST 2004


Hi Sebastien

There is the issue of  'compound' objects: ie when you glyph data associated with points or when you tesselate or otherwise decompose concave polygons and/or polygons with internal boundaries into simpler primitives. In both cases, to avoid a massive duplication of data, I append an array that just stores indexes into the original cell-ids or data (which I usually keep out of the pipeline). When a pick takes place, the cell-id is used as an index into the stored indexes - and so on to the original data.

I visualize a lot of mining layouts that use an arc/node model similar to many GIS. In my reader I build the polygon boundaries (internal and external) and then tessellate, after which I add the triangular cells to the polydata. I have two arrays in the cell-data, one for the scalar value of interest and the other for the original polygon id, which are also updated as the triangles are added. I've also used this approach to visualize polygon data from shapefiles and associated dBase tables.

I've used a similar technique glyphing seismic events from an access database. I wrote my own glyph filter but I see there is an option in vtkGlyph3D to store ids in the point data (which you could still get at using vtkPolyData::GetCellPoints if you used a cell picker).

I think the most efficient approach is to only put data relevant to the visualization into the pipelines (plus one array for indexes if required) - keep additional data upstream or out of the pipeline and use indexing to get it when required.

HTH
Malcolm 

----- Original Message ----- 
  From: Sébastien MARAUX 
  To: vtkusers at vtk.org 
  Sent: Tuesday, February 24, 2004 4:40 PM
  Subject: [vtkusers] associating datra to polydata


  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








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040225/415a5d4b/attachment.htm>


More information about the vtkusers mailing list