<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<p style="font-family:Calibri,Arial,Helvetica,sans-serif">Hi, </p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif">I need to get the list of points, edges and cells of an itk mesh to file. I have to write the points, the edges as a reference of two points' indexes and the faces as three edges' indexes. </p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif">So far I only managed to get the points from a mesh, using a point iterator and writing its value and indexes. I still haven't figure it out how to get the linking indexes of the edges and faces. </p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif">For illustration purposes, say I have a mesh containing a single triangle, defined this: </p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Consolas,monospace"><span style="font-family:Consolas,monospace">0,1 - 2 </span><span style="font-family:Consolas,monospace">- 1,1</span></span><br>
<span style="font-family:Consolas,monospace"></span></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Consolas,monospace"><span style="font-family:Consolas,monospace"> | /</span></span></p>
<span style="font-family:Consolas,monospace"></span>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Consolas,monospace"><span style="font-family:Consolas,monospace; font-size:16px"> | /</span></span></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Consolas,monospace"><span style="font-family:Consolas,monospace; font-size:16px"><span style="font-family:Consolas,monospace; font-size:16px"> | 1 /</span><br>
</span></span></p>
<p><font face="Consolas, monospace"> 1 3</font></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Consolas,monospace"><span style="font-family:Consolas,monospace; font-size:16px"><span style="font-family:Consolas,monospace; font-size:16px"><span style="font-family:Consolas,monospace; font-size:16px"> |
/ </span><br>
</span></span></span></p>
<span style="font-family:Consolas,monospace"></span>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Consolas,monospace"> | /</span></p>
<p><font face="Consolas, monospace"> | /</font></p>
<span style="font-family:Consolas,monospace"></span>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Consolas,monospace">0,0 </span></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"></p>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">The structure would be like this:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">Points:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">1: 0,0</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">2: 0,1</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">3: 1,1</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">Edges:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">1: 1 2 (Point 1 to Point 2)</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">2: 2 3</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">3: 3 1</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">Faces:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">1: 1 2 3 (Edge 1, to Edge 2 and Edge 3)</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">This is a rather simplistic example, but there is no difference for the case of more than one triangle. But they might share some of the same indexes when neighbours. </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif">Any help would be much appreciated!<br>
</div>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif">Thanks,</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif">Rodolfo</p>
</div>
</body>
</html>