Thanks a lot Jeff,<br>It looks like I had several versions of VTK and this was causing problems.<br><br>Now I have another problem. I am trying to use minimum spanning tree programs. I first tried to use vtkBoostPrimMinimumSpanningTree but I am getting the following error message:<br>
<br>&quot;The Prim minimal spanning tree filter is still under development...&nbsp; Use at your own risk.&quot; <br><br>I checked where the error message is and then assumed that I was getting this message since the implementation is not complete yet. But should I still see some output on the screen?<br>
<br>I then tried to use vtkKruskalMinimumSpanningTree which looks like in better shape (whose output is a vtkSelectionAlgorithm). But I am failed to display its output since its output is not a tree but a forest whereas Prim&#39;s version produces a vtkTree . Then how can I display each subtree? One way of doing this probably is to cast the result to a graph and then display the resulting graph.<br>
<br>I will greatly appreciate if anyone shares his/her experiences.<br>Thanks a lot.<br><br>Here is a simplified piece of code I am trying to run:<br><br>&nbsp; vtkMutableUndirectedGraph* g=vtkMutableUndirectedGraph::New();<br>
&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; // This is used for finding minimum-spanning trees<br>&nbsp;&nbsp;&nbsp; vtkIntArray* edgeWeightsArr = vtkIntArray::New();<br>&nbsp;&nbsp;&nbsp; edgeWeightsArr-&gt;SetName(&quot;EdgeWeights&quot;);<br>&nbsp;&nbsp; <br>&nbsp; VTK_CREATE(vtkRenderer, ren);<br>
<br>&nbsp; VTK_CREATE(vtkPoints, pts);<br>&nbsp; g-&gt;AddVertex();<br>&nbsp; pts-&gt;InsertNextPoint(0, 1, 0);<br>&nbsp; g-&gt;AddVertex();<br>&nbsp; pts-&gt;InsertNextPoint(0.5, 1, 0);<br>&nbsp; g-&gt;AddVertex();<br>&nbsp; pts-&gt;InsertNextPoint(0.25, 0.5, 0);<br>
&nbsp; g-&gt;AddVertex();<br>&nbsp; pts-&gt;InsertNextPoint(0, 0, 0);<br>&nbsp; g-&gt;AddVertex();<br>&nbsp; pts-&gt;InsertNextPoint(0.5, 0, 0);<br>&nbsp; g-&gt;AddVertex();<br>&nbsp; pts-&gt;InsertNextPoint(1, 0, 0);<br>&nbsp; g-&gt;AddVertex();<br>&nbsp; pts-&gt;InsertNextPoint(0.75, 0.5, 0);<br>
&nbsp; g-&gt;SetPoints(pts);<br><br>&nbsp; g-&gt;AddEdge(0, 1);<br>&nbsp; edgeWeightsArr-&gt;InsertNextValue(1);<br>&nbsp; g-&gt;AddEdge(0, 2);<br>&nbsp; edgeWeightsArr-&gt;InsertNextValue(1);<br>&nbsp; g-&gt;AddEdge(1, 2);<br>&nbsp; edgeWeightsArr-&gt;InsertNextValue(1);<br>
&nbsp; g-&gt;AddEdge(2, 3);<br>&nbsp; edgeWeightsArr-&gt;InsertNextValue(1);<br>&nbsp; g-&gt;AddEdge(2, 4);<br>&nbsp; edgeWeightsArr-&gt;InsertNextValue(1);<br>&nbsp; g-&gt;AddEdge(3, 4);<br>&nbsp; edgeWeightsArr-&gt;InsertNextValue(1);<br><br>&nbsp; g-&gt;GetEdgeData()-&gt;AddArray(edgeWeightsArr);<br>
<br>&nbsp; //VTK_CREATE(vtkBoostPrimMinimumSpanningTree,mst);<br>&nbsp; VTK_CREATE(vtkBoostKruskalMinimumSpanningTree,mst);<br>&nbsp; mst-&gt;SetInput(g);<br>&nbsp; mst-&gt;SetEdgeWeightArrayName(&quot;EdgeWeights&quot;);<br>&nbsp; mst-&gt;Update();<br>
<br>&nbsp; // HOW TO DISPLAY<br><br><br><br><div class="gmail_quote">On Tue, Dec 23, 2008 at 3:14 PM, Jeff Baumes <span dir="ltr">&lt;<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">&gt; When I compile the sample file, I get the first error for the following<br>
&gt; line:<br>
&gt; &nbsp; VTK_CREATE(vtkBoostBiconnectedComponents, biconn);<br>
&gt;<br>
&gt; (On CMake, I had set VTK_USE_BOOST set to ON when building VTK)<br>
<br>
</div>First, make sure that your app is linking against vtkInfovis. If it<br>
is, it appears that the Boost algorithms are not being compiled into<br>
the vtkInfovis library you are using. Ensure that the vtkInfovis you<br>
are linking against is the one in the build where you turned<br>
VTK_USE_BOOST on. In Visual Studio, you can check your VTK build by<br>
looking at the source files under vtkInfovis. Make sure the vtkBoost*<br>
files are there.<br>
<font color="#888888"><br>
Jeff<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>My web page: <a href="http://www.cs.rpi.edu/~vargua">http://www.cs.rpi.edu/~vargua</a><br>