Hi david,<div><br></div><div>Thanks for your interest in Meshes implementations in ITK. SOrry to take so long to answer, I will be more responsive now.</div><div><br></div><div>You can find a little bit more information on QE here:</div>
<div><a href="http://www.itk.org/Wiki/Proposals:New_Mesh_Class">http://www.itk.org/Wiki/Proposals:New_Mesh_Class</a></div><div><br></div><div>You also have TONS of inspiration in the tests. Here is a short list to begin with that implements the kind of basic operation you&#39;re struggling with now (bad documentation, my bad), other tests are more advanced:</div>
<div>/Insight/Testing/Code/Review/</div><div><div>itkGeometricalQuadEdgeTest1.cxx</div><div>itkQuadEdgeMeshAddFaceTest1.cxx</div><div>itkQuadEdgeMeshAddFaceTest2.cxx</div><div>itkQuadEdgeMeshBasicLayerTest.cxx</div><div>itkQuadEdgeMeshCellInterfaceTest.cxx</div>
<div>itkQuadEdgeMeshCountingCellsTest.cxx</div><div>itkQuadEdgeMeshDeleteEdgeTest.cxx</div><div>itkQuadEdgeMeshDeletePointAndReorderIDsTest.cxx</div><div>itkQuadEdgeMeshFrontIteratorTest.cxx</div><div>itkQuadEdgeMeshIteratorTest.cxx</div>
<div>itkQuadEdgeMeshPointTest1.cxx</div><div>itkQuadEdgeMeshPolygonCellTest.cxx</div><div>itkQuadEdgeMeshTest1.cxx</div><div>itkQuadEdgeMeshTest2.cxx</div><div>itkQuadEdgeMeshTest3.cxx</div><div>itkQuadEdgeTest1.cxx</div>
</div><div><br></div><div>when you do a Mesh-&gt;GetEdge()  without arguments, you get the first edge in the cell container (well, the first edge in the edge container, as QEMesh has two cells containers). Some algorithms on surface just need one edge, any edge and that s why we provide this argument-less flavor of GetEdge().</div>
<div><br></div><div>Send me your code, I ll troubleshot it.</div><div><br></div><div>alex.</div><div><br></div><div><br></div><div><div class="gmail_quote">On Tue, Sep 15, 2009 at 8:09 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria%2Bitk@gmail.com">daviddoria+itk@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Consider a mesh like this:<br>MeshType::PointType p0,....<br>    p0[0]= -1.0; p0[1]= -1.0; p0[2]= 0.0; // first  point ( -1, -1, 0 )<br>
....<br>    mesh-&gt;SetPoint( 0, p0 );<br>.....<br><br>Then I add lines connecting these points. Then I get an edge:<br>
<br>    MeshType::QEPrimal* edge = mesh-&gt;GetEdge(); //not sure which edge this is getting?<br>    <br>And the indices of the points that make up this edge:<br>    MeshType::CoordRepType origin = edge-&gt;GetOrigin();<br>

    MeshType::CoordRepType destination = edge-&gt;GetDestination();<br>    std::cout &lt;&lt; &quot;origin: &quot; &lt;&lt; origin &lt;&lt; std::endl;<br>    std::cout &lt;&lt; &quot;Destination: &quot; &lt;&lt; destination &lt;&lt; std::endl;<br>

    <br>Now I want to get back my original coordinate (-1, -1, 0). This compiles, but segfaults (the output of origin and destination was 3, 2, respectively, so these are valid point indices on the mesh):<br>    MeshType::PointType* p;<br>

    mesh-&gt;GetPoint(origin, p );<br>    std::cout &lt;&lt; &quot;p: &quot; &lt;&lt; p[0] &lt;&lt; &quot; &quot; &lt;&lt; p[1] &lt;&lt; &quot; &quot; &lt;&lt; p[2] &lt;&lt; std::endl;<br><br>The bottom line is: how do I get the coordinate of a point (and potentially other attached information) by it&#39;s mesh index?<br>

<br clear="all">Thanks,<br><font color="#888888"><br>David<br>
</font><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>