<div><div class="gmail_quote">On Wed, Nov 11, 2009 at 10:41 AM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@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;">
Is there a way to either<br>
1) associate a coordinate with each vertex in a graph/tree?<br>
or<br>
2) create a polydata from a graph/tree where in the process a<br>
coordinate gets assigned a vertex?<br>
<br>
I would like to visualize a nearest neighbor graph on a set of 3d<br>
points. Can anyone point me to the right keywords/classes/functions to<br>
do such a thing?<br></blockquote><div><br></div><div> </div></div>vtkGraphLayout algorithm assigns points to a graph. You can also do this manually by:<div><br></div><div>vtkPoints* pts = vtkPoints::New();</div><div>pts-&gt;SetNumberOfPoints(graph-&gt;GetNumberOfVertices());</div>
<div>// Fill in points here</div><div>graph-&gt;SetPoints(pts);</div><div><br></div><div>Jeff<br><br></div>
</div>