[vtkusers] Casting output of vtkExtractSelection

David Doria daviddoria+vtk at gmail.com
Wed Apr 21 14:38:41 EDT 2010


> Actually, no. A vtkTree is a "rooted" tree, where there is a root
> vertex with directed edges pointing to child vertices. In general, MST
> returns a "unrooted" tree, which is simply a graph with no cycles;
> there is no specific root. Because of how it's implemented, Prim's
> algorithm takes a starting vertex as input, so that algorithm creates
> a vtkTree rooted at that vertex. Kruskal's algorithm does not use a
> starting vertex, which is why the output is not a vtkTree, but a
> selection containing the selected edges in the spanning tree. After
> vtkExtractSelectedGraph, you should have a graph with no cycles, so it
> is a tree in the graph theoretic sense, but it is not a rooted
> vtkTree.
>
> Jeff

Got it.

Thanks for the help, Jeff.

David



More information about the vtkusers mailing list