[vtkusers] Creating a polydata of edges (lines) from a vtkGraph
Jeff Baumes
jeff.baumes at kitware.com
Wed Nov 11 11:01:42 EST 2009
On Wed, Nov 11, 2009 at 10:41 AM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:
> Is there a way to either
> 1) associate a coordinate with each vertex in a graph/tree?
> or
> 2) create a polydata from a graph/tree where in the process a
> coordinate gets assigned a vertex?
>
> I would like to visualize a nearest neighbor graph on a set of 3d
> points. Can anyone point me to the right keywords/classes/functions to
> do such a thing?
>
vtkGraphLayout algorithm assigns points to a graph. You can also do this
manually by:
vtkPoints* pts = vtkPoints::New();
pts->SetNumberOfPoints(graph->GetNumberOfVertices());
// Fill in points here
graph->SetPoints(pts);
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091111/1b05dda6/attachment.htm>
More information about the vtkusers
mailing list