I am still having a problem with the minimum spanning tree claiming that it is a forest. I wrote a big function to connect the graph so now (according to my code, which I suppose could have a bug) every vertex can be reached from any vertex - but the MST still claims it is a forest...<br>
<br>I then tried to write out the graph so I could visualize it and see if there are any apparent disconnected regions. I did the following:<br><br>  vtkSmartPointer&lt;vtkCircularLayoutStrategy&gt; circular = vtkSmartPointer&lt;vtkCircularLayoutStrategy&gt;::New();<br>
  <br>  vtkSmartPointer&lt;vtkGraphLayout&gt; GraphLayout = vtkSmartPointer&lt;vtkGraphLayout&gt;::New();<br>  GraphLayout-&gt;SetInput(G);<br>  GraphLayout-&gt;SetLayoutStrategy(circular);<br>  GraphLayout-&gt;Update();<br>
      <br>  vtkSmartPointer&lt;vtkGraphToPolyData&gt; GraphToPolyData = vtkSmartPointer&lt;vtkGraphToPolyData&gt;::New();<br>  GraphToPolyData-&gt;SetInput(GraphLayout-&gt;GetOutput());<br>  GraphToPolyData-&gt;Update();<br>
  <br>  vtkSmartPointer&lt;vtkXMLPolyDataWriter&gt; Writer = vtkSmartPointer&lt;vtkXMLPolyDataWriter&gt;::New();<br>  Writer-&gt;SetInput(GraphToPolyData-&gt;GetOutput());<br>  Writer-&gt;SetFileName(&quot;SphereGraph.vtp&quot;);<br>
  Writer-&gt;Write();<br><br>This produces this file:<br><a href="http://www.rpi.edu/~doriad/VTK_List/SphereGraph/SphereGraph.vtp">http://www.rpi.edu/~doriad/VTK_List/SphereGraph/SphereGraph.vtp</a><br><br>That doesn&#39;t look particularly helpful to me... is there supposed to be a way to interpret this? I&#39;m not sure what GraphLayout does, the docs said that GraphToPolyData needed the points to be added by vtkGraphLayout. I actually already have a point for each graph node - is there a way I can add the actual points so the graph looks like the input point set that I created the graph from?<br>
<br clear="all">Thanks,<br><br>David<br>