<!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>@font-face {
        font-family: Tahoma;
}
@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
}
SPAN.StyleCourrierlectronique18 {
        COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=FR vLink=purple link=blue bgColor=white>
<DIV><FONT face=Arial size=2>Hi Sebastien</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I handled the polygons one by one as I was
using GLU tessellation and could not see a way of sorting out which
triangles belonged to which polygon if I passed more than one at a time. I
needed to know this in order to assign scalar values + id. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>With the current data-structures I don't see a way
to provide lookup capabilities other than propagating the original ids in
an extra array. Once the array is there, most of the
filters will continue this propagation for you, but when you
first create the polydata this would be your responsibility. You
mention</FONT><FONT face=Arial size=2> vtkTriangle filter, this should
copy the polygon cell-data to respective triangles but it has no way
of handling internal boundaries - or is that not an issue for
you?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>First prize would be a new cell-type comprising
multiple triangles (like a surface-patch), each triangle would have it's own
sub-id but also an id for the whole cell (or 'patch') -
vtkTrisolation or something like that. I think it would be fairly complicated to
implement as it would require handling of variable number of faces, in contrast
to current 3D cells which have fixed number of faces. This could be used for
glyphing as well as polygon decomposition and would allow direct mappings
from cell-id into external data. I think it would be useful
for importing CAD (polyface mesh etc.) as well as GIS. Maybe
there are reasons why this would not be practical.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards</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> ; <A
title=malcolm@geovision.co.za href="mailto:malcolm@geovision.co.za">'Malcolm
Drummond'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, March 09, 2004 4:08
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE : [vtkusers] associating data
to polydata</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hello, I am studying
the problem of associating data to vtkPolyData</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">What happens if, for
example, you call vtkTriangleFilter on a vtkPolyData composed of several
polygons, each being assigned an ID in the vtkPolyData “main” field data
array?</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Is it necessary to
handle the inheritance of those Ids to all the created triangles, which means
handling polygons one by one and recreating a vtkPolyData for input for each
of them.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">This issue occurs
with nearly all “complex” processing, and it is a big amount of work to
associate Ids with each new cells created (I am also thinking about banded
contours, etc)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Sebastien</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Message
d'origine-----<BR><B><SPAN style="FONT-WEIGHT: bold">De :</SPAN></B>
vtkusers-admin@vtk.org [mailto:vtkusers-admin@vtk.org] <B><SPAN
style="FONT-WEIGHT: bold">De la part de</SPAN></B> Malcolm
Drummond<BR><B><SPAN style="FONT-WEIGHT: bold">Envoyé :</SPAN></B>
mercredi 25 février 2004 15:33<BR><B><SPAN
style="FONT-WEIGHT: bold">À :</SPAN></B> vtkusers<BR><B><SPAN
style="FONT-WEIGHT: bold">Objet :</SPAN></B> Re: [vtkusers] associating
datra to polydata</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi
Sebastien</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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.</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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.</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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).</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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.</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">HTH</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Malcolm</SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">----- Original Message -----
</SPAN></FONT></P></DIV>
<BLOCKQUOTE
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; MARGIN: 5pt 0cm 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none">
<DIV style="font-color: black">
<P class=MsoNormal style="BACKGROUND: #e4e4e4; MARGIN-LEFT: 35.4pt"><B><FONT
face=Arial size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">From:</SPAN></FONT></B><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <A
title=maraux@ondim.fr href="mailto:maraux@ondim.fr">Sébastien MARAUX</A>
</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><B><FONT face=Arial
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">To:</SPAN></FONT></B><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <A
title=vtkusers@vtk.org href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A>
</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><B><FONT face=Arial
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">Sent:</SPAN></FONT></B><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
Tuesday, February 24, 2004 4:40 PM</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><B><FONT face=Arial
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">Subject:</SPAN></FONT></B><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
[vtkusers] associating datra to polydata</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello,</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><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 style="MARGIN-LEFT: 35.4pt"><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 style="MARGIN-LEFT: 35.4pt"><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 style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face=Arial size=2><SPAN
lang=EN-GB style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Seb</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 35.4pt"><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"></SPAN></FONT> </P></BLOCKQUOTE></DIV></BLOCKQUOTE></BODY></HTML>