<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE>@page Section1 {size: 595.3pt 841.9pt; margin: 70.85pt 70.85pt 70.85pt 70.85pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.StyleCourrierlectronique17 {
        COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=FR vLink=purple link=blue bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi Sebastien</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>HTH</FONT></DIV>
<DIV><FONT face=Arial size=2>Malcolm</FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=maraux@ondim.fr href="mailto:maraux@ondim.fr">Sébastien MARAUX</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@vtk.org
href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, February 24, 2004 4:40
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [vtkusers] associating datra to
polydata</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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).</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">And keep the link between
information and what it is relevant to (points with their data, lines with
their data, general group data) ?</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Seb</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P></DIV></BLOCKQUOTE></BODY></HTML>