<div dir="ltr">It works on my computer, there must be some problem with the path to your headers.<br><br>Jothy<br><br><div class="gmail_quote">On Mon, Feb 27, 2012 at 1:13 PM, Brenno Ribeiro <span dir="ltr">&lt;<a href="mailto:brennobr@gmail.com">brennobr@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here is the full code i&#39;m trying to build.<br><br>#include &lt;vtkSmartPointer.h&gt;<br>#include &lt;vtkImageViewer2.h&gt;<br>
#include &lt;vtkDICOMImageReader.h&gt;<br>#include &lt;vtkRenderWindow.h&gt;<br>#include &lt;vtkRenderWindowInteractor.h&gt;<br>
#include &lt;vtkRenderer.h&gt;<br><br>int main(int argc, char* argv[])<br>{<br>  // Verify input arguments<br>  if ( argc != 2 )<br>    {<br>    std::cout &lt;&lt; &quot;Usage: &quot; &lt;&lt; argv[0]<br>              &lt;&lt; &quot; Filename(.jpeg)&quot; &lt;&lt; std::endl;<br>

    return EXIT_FAILURE;<br>    }<br><br>  std::string folder = argv[1];<br><br>  // Read all the DICOM files in the specified directory.<br>  vtkSmartPointer&lt;vtkDICOMImageReader&gt; reader =<br>    vtkSmartPointer&lt;vtkDICOMImageReader&gt;::New();<br>

  reader-&gt;SetDirectoryName(folder.c_str());<br>  reader-&gt;Update();<br><br>  // Visualize<br>  vtkSmartPointer&lt;vtkImageViewer2&gt; imageViewer =<br>    vtkSmartPointer&lt;vtkImageViewer2&gt;::New();<br>  imageViewer-&gt;SetInputConnection(reader-&gt;GetOutputPort());<br>

  vtkSmartPointer&lt;vtkRenderWindowInteractor&gt; renderWindowInteractor =<br>    vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();<br>  imageViewer-&gt;SetupInteractor(renderWindowInteractor);<br>  imageViewer-&gt;Render();<br>

  imageViewer-&gt;GetRenderer()-&gt;ResetCamera();<br>  imageViewer-&gt;Render();<br><br>  renderWindowInteractor-&gt;Start();*/<br><br>  return EXIT_SUCCESS;<br>}<br><br><br>The following error occurs in these lines &quot;undefined reference to&quot; <br>

<br>vtkSmartPointer&lt;vtkDICOMImageReader&gt; reader = vtkSmartPointer&lt;vtkDICOMImageReader&gt;::New();<br>vtkSmartPointer&lt;vtkImageViewer2&gt; imageViewer = vtkSmartPointer&lt;vtkImageViewer2&gt;::New();<br>vtkSmartPointer&lt;vtkRenderWindowInteractor&gt; renderWindowInteractor = vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();<br>
<font color="#888888">
<br><br>-- <br><div>Brenno Bernardes Ribeiro<br><br>Engenharia da Computação</div><div>
Universidade Federal do Pará</div><div style="padding:0px;overflow:hidden;margin-left:0px;margin-top:0px;color:black;font-size:10px;text-align:left;line-height:130%"></div><br>
</font><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>