[vtkusers] Strange results with MST filter

Jeff Baumes jeff.baumes at kitware.com
Wed Apr 14 08:23:25 EDT 2010


On Tue, Apr 13, 2010 at 5:33 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> I have made a simple demo graph here:
> http://rpi.edu/~doriad/VTK_List/MinimumSpanningTree/WeightedGraph.graph
>
> It is points shaped like an "L". The weights are the euclidean
> distance between the points. The graph looks like this:
> http://rpi.edu/~doriad/VTK_List/MinimumSpanningTree/Lgraph.jpg
>
> (produced with
> http://rpi.edu/~doriad/VTK_List/MinimumSpanningTree/ReadAndDisplay3DGraph.cxx
> )
>
> I checked out the edge weights in Paraview and they look correct.
>
> Then I made the EMST by finding the MST of that graph using this:
> http://rpi.edu/~doriad/VTK_List/MinimumSpanningTree/Demo.cxx
>
> The result is here:
> http://rpi.edu/~doriad/VTK_List/MinimumSpanningTree/Lmst.jpg
>
> This doesn't look like the EMST to me. I would expect the resulting
> graph to be a single line in the shape of the L. Is this expectation
> incorrect? Or is there a bug? Or have I done something wrong?

As long as all the edges between adjacent points on the L are indeed
connected with an edge of appropriate weight, then yes the MST should
be the L. Are you sure that the weight array is correctly set up and
used by the Boost MST filter?

Jeff



More information about the vtkusers mailing list