<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"><<a href="mailto:brennobr@gmail.com">brennobr@gmail.com</a>></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'm trying to build.<br><br>#include <vtkSmartPointer.h><br>#include <vtkImageViewer2.h><br>
#include <vtkDICOMImageReader.h><br>#include <vtkRenderWindow.h><br>#include <vtkRenderWindowInteractor.h><br>
#include <vtkRenderer.h><br><br>int main(int argc, char* argv[])<br>{<br> // Verify input arguments<br> if ( argc != 2 )<br> {<br> std::cout << "Usage: " << argv[0]<br> << " Filename(.jpeg)" << 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<vtkDICOMImageReader> reader =<br> vtkSmartPointer<vtkDICOMImageReader>::New();<br>
reader->SetDirectoryName(folder.c_str());<br> reader->Update();<br><br> // Visualize<br> vtkSmartPointer<vtkImageViewer2> imageViewer =<br> vtkSmartPointer<vtkImageViewer2>::New();<br> imageViewer->SetInputConnection(reader->GetOutputPort());<br>
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =<br> vtkSmartPointer<vtkRenderWindowInteractor>::New();<br> imageViewer->SetupInteractor(renderWindowInteractor);<br> imageViewer->Render();<br>
imageViewer->GetRenderer()->ResetCamera();<br> imageViewer->Render();<br><br> renderWindowInteractor->Start();*/<br><br> return EXIT_SUCCESS;<br>}<br><br><br>The following error occurs in these lines "undefined reference to" <br>
<br>vtkSmartPointer<vtkDICOMImageReader> reader = vtkSmartPointer<vtkDICOMImageReader>::New();<br>vtkSmartPointer<vtkImageViewer2> imageViewer = vtkSmartPointer<vtkImageViewer2>::New();<br>vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor = vtkSmartPointer<vtkRenderWindowInteractor>::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>