[vtkusers] vtkBoostBreadthFirstSearch?

David Doria daviddoria+vtk at gmail.com
Sat Oct 24 21:07:37 EDT 2009


I created a tree and then gave it to this filter:

vtkSmartPointer<vtkTree> MyTree = .... // setup tree
vtkIdType root = MyTree->GetRoot();
vtkSmartPointer<vtkBoostBreadthFirstSearch> BFS =
vtkSmartPointer<vtkBoostBreadthFirstSearch>::New();
BFS->SetOriginVertex(root);
BFS->SetInput(MyTree);

I was expecting to use this like an iterator - it would continue
returning nodes to me that are children and grandchildren, etc of the
root node until it had traversed the entire tree. However, from the
documentation and tests, I did not see a way to do that. If you cannot
do that with this class, 1) how do you do that (without writing your
own tree traversal recursive functions) and 2) what does this class
do?

Thanks,

David



More information about the vtkusers mailing list