Hi, <br>Thank you! That was it! It works! :)<br>Thank you sooooo much! :)<br><br>Fabiola.<br><br><div class="gmail_quote">2012/9/28 Alessandro <span dir="ltr"><<a href="mailto:notinmyhead@gmail.com" target="_blank">notinmyhead@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
your problem is quite common and easy to solve. Most ITK user resort to CMake because it automatically solves all library dependencies. It's very helpful when CLI applications have to be built but it is not so handful within QT (especially using QT Creator).<br>
<br>
Solution is open your Terminal, look for ITK library and, progressively, solve by hand your dependencies. You're including too few libraries. As instance, while you're including itkGDCMImageIO.h you need to add -lITKGDCM-4.2 to libs.<br>
<br>
To simplicity I tend to include more libs than needed (some can be missed since I use ITK with external GDCM library...). Yet it is a start:<br>
<br>
-lITKBiasCorrection-4.2 \<br>
-lITKBioCell-4.2 \<br>
-lITKCommon-4.2 \<br>
-lITKDeprecated-4.2 \<br>
-lITKDICOMParser-4.2 \<br>
-lITKEXPAT-4.2 \<br>
-lITKFEM-4.2 \<br>
-lITKgiftiio-4.2 \<br>
-litkhdf5-4.2 \<br>
-litkhdf5_cpp-4.2 \<br>
-lITKIOBioRad-4.2 \<br>
-lITKIOBMP-4.2 \<br>
-lITKIOCSV-4.2 \<br>
-lITKIOGDCM-4.2 \<br>
-lITKGDCM-4.2\<br>
-lITKIOGE-4.2 \<br>
-lITKIOGIPL-4.2 \<br>
-lITKIOHDF5-4.2 \<br>
-lITKIOImageBase-4.2 \<br>
-lITKIOIPL-4.2 \<br>
-lITKIOJPEG-4.2 \<br>
-lITKIOLSM-4.2 \<br>
-lITKIOMesh-4.2 \<br>
-lITKIOMeta-4.2 \<br>
-lITKIONIFTI-4.2 \<br>
-lITKIONRRD-4.2 \<br>
-lITKIOPNG-4.2 \<br>
-lITKIOSiemens-4.2 \<br>
-lITKIOSpatialObjects-4.2 \<br>
-lITKIOStimulate-4.2 \<br>
-lITKIOTIFF-4.2 \<br>
-lITKIOTransformBase-4.2 \<br>
-lITKIOTransformHDF5-4.2 \<br>
-lITKIOTransformInsightLegacy-4.2 \<br>
-lITKIOTransformMatlab-4.2 \<br>
-lITKIOVTK-4.2 \<br>
-lITKIOXML-4.2 \<br>
-litkjpeg-4.2 \<br>
-lITKKLMRegionGrowing-4.2 \<br>
-lITKLabelMap-4.2 \<br>
-lITKMesh-4.2 \<br>
-lITKMetaIO-4.2 \<br>
-litkNetlibSlatec-4.2 \<br>
-lITKniftiio-4.2 \<br>
-lITKNrrdIO-4.2 \<br>
# -litkopenjpeg-4.2 \<br>
-lITKOptimizers-4.2 \<br>
-lITKOptimizersv4-4.2 \<br>
-lITKPath-4.2 \<br>
-litkpng-4.2 \<br>
-lITKStatistics-4.2 \<br>
-lITKPolynomials-4.2 \<br>
-lITKQuadEdgeMesh-4.2 \<br>
-lITKReview-4.2 \<br>
-lITKSpatialObjects-4.2 \<br>
-lITKStatistics-4.2 \<br>
-litksys-4.2 \<br>
-litktiff-4.2 \<br>
-litkv3p_lsqr-4.2 \<br>
-litkv3p_netlib-4.2 \<br>
-litkvcl-4.2 \<br>
-lITKVideoCore-4.2 \<br>
-lITKVideoIO-4.2 \<br>
-litkvnl-4.2 \<br>
-lITKVNLInstantiation-4.2 \<br>
-litkvnl_algo-4.2 \<br>
-lITKVTK-4.2 \<br>
-lITKWatersheds-4.2 \<br>
-litkzlib-4.2 \<br>
-lITKznz-4.2<br>
<br>
Then follow the linker errors to include missing library.<br>
<br>
Hope it helps!<br>
Ale<br>
<br>
<br>
Il giorno 28/set/2012, alle ore 10.58, Fabiola Fischer ha scritto:<br>
<div class="HOEnZb"><div class="h5"><br>
> Hi Ale,<br>
><br>
> Libs: LIBS += -L/usr/local/lib/ \<br>
> -lITKCommon-4.2 \<br>
> -lITKDICOMParser-4.2<br>
><br>
> In the source included headers:<br>
> #include "itkImage.h"<br>
> #include "itkGDCMImageIO.h"<br>
> #include "itkGDCMSeriesFileNames.h"<br>
> #include "itkImageSeriesReader.h"<br>
> #include "itkImageFileWriter.h"<br>
> (actually I just copied the example from here. )<br>
><br>
> Thanks in advance,<br>
> Fabiola.<br>
><br>
> 2012/9/28 Alessandro <<a href="mailto:notinmyhead@gmail.com">notinmyhead@gmail.com</a>><br>
> could you post the complete set of libs you're trying to include in the project?<br>
><br>
> Ale<br>
><br>
> ps: please answer to the insight user list so it may be useful to all...<br>
><br>
> Il giorno 27/set/2012, alle ore 16.55, Alessandro ha scritto:<br>
><br>
> > Since you're including 4.2 version of the include files, you need to change your library version to -lITKCommon-4.2 and so on<br>
> ><br>
> > Ale<br>
> ><br>
> > Il giorno 27/set/2012, alle ore 15.46, fabiola ha scritto:<br>
> ><br>
> >> Hello,<br>
> >><br>
> >> I am sorry barging in with a silly question, but I am really stuck in the<br>
> >> beginning: to compile an ITK example (DicomSeriesReadImageWrite2) in QT.<br>
> >> I am using: Ubuntu 12.04, QT Creator 2.5.2 and ITK 4.2.<br>
> >><br>
> >> I added ITK libraries to .pro like I did before for VTK (and it worked):<br>
> >> INCLUDEPATH += /usr/local/include/vtk-5.10 \<br>
> >> /usr/local/include/ITK-4.2<br>
> >><br>
> >> LIBS += -lvtkDICOMParser \<br>
> >> -lvtkRendering \<br>
> >> -lvtkCommon \<br>
> >> -lvtkIO \<br>
> >> -lvtkFiltering \<br>
> >> -lQVTK \<br>
> >><br>
> >> LIBS += -L/usr/local/lib/ \<br>
> >> -lITKCommon-4.1 \<br>
> >> -lITKDICOMParser-4.1<br>
> >><br>
> >> QMAKE_CXXFLAGS += -Wno-deprecated<br>
> >><br>
> >> but unfortunately the compiler telling me that: "cannot find<br>
> >> -lITKCommon-4.1" (I checked, the libraries are in my /usr/local/lib...)<br>
> >><br>
> >> Please help me out. I can't find any solution on the net, just seeing that<br>
> >> the others had the same problem, but no solution...<br>
> >><br>
> >> Thank you in advance,<br>
> >> Fabiola.<br>
> >><br>
> >><br>
> >><br>
> >> --<br>
> >> View this message in context: <a href="http://itk-users.7.n7.nabble.com/ITK-QT-tp29470p29571.html" target="_blank">http://itk-users.7.n7.nabble.com/ITK-QT-tp29470p29571.html</a><br>
> >> Sent from the ITK - Users mailing list archive at Nabble.com.<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<br>
> >> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> >><br>
> >> Kitware offers ITK Training Courses, for more information visit:<br>
> >> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
> >><br>
> >> Please keep messages on-topic and check the ITK FAQ at:<br>
> >> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
> >><br>
> >> Follow this link to subscribe/unsubscribe:<br>
> >> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
> ><br>
><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<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
<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<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br>