[vtk-developers] BoostPrimMinimumSpanningTree doesn't copy Points to output

Jeff Baumes jeff.baumes at kitware.com
Mon May 3 12:10:19 EDT 2010


On Sun, May 2, 2010 at 4:33 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> The number of output points (output->GetPoints()->GetNumberOfPoints()
> ) is correct, but it seems like all of the points are (0,0,0).
>
> Here is an example:
>
> http://www.rpi.edu/~doriad/VTK_List/vtkBoostPrimMinimumSpanningTree/BoostPrimMinimumSpanningTree.cxx
>
> The output is:
>
> Number of vertices: 3
> Number of edges: 3
> Number of points: 3
> p: 1 0 0
> Number of vertices: 3
> Number of edges: 2
> Number of points: 3
> p: 0 0 0
>
> where the last "p: 0 0 0" should be "p: 1 0 0" (like the first one).
>
> By adding:
>
> output->SetPoints(input->GetPoints());
>
> after line 264 (at the very end of RequestData), this problem is fixed.
>
> Anyone care to verify and commit?

Thanks for the catch. I've committed the fix:

commit 6f402c3cd6f8c7d1900fa43b9d871226225578bc
Author: Jeffrey Baumes <jeff.baumes at kitware.com>
Date:   Mon May 3 12:07:54 2010 -0400

    Passing points through in Prim's MST.

Jeff



More information about the vtk-developers mailing list