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">&lt;<a href="mailto:notinmyhead@gmail.com" target="_blank">notinmyhead@gmail.com</a>&gt;</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&#39;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&#39;re including too few libraries. As instance, while you&#39;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>
&gt; Hi Ale,<br>
&gt;<br>
&gt; Libs:  LIBS += -L/usr/local/lib/ \<br>
&gt;          -lITKCommon-4.2 \<br>
&gt;          -lITKDICOMParser-4.2<br>
&gt;<br>
&gt; In the source included headers:<br>
&gt; #include &quot;itkImage.h&quot;<br>
&gt; #include &quot;itkGDCMImageIO.h&quot;<br>
&gt; #include &quot;itkGDCMSeriesFileNames.h&quot;<br>
&gt; #include &quot;itkImageSeriesReader.h&quot;<br>
&gt; #include &quot;itkImageFileWriter.h&quot;<br>
&gt; (actually I just copied the example from here. )<br>
&gt;<br>
&gt; Thanks in advance,<br>
&gt; Fabiola.<br>
&gt;<br>
&gt; 2012/9/28 Alessandro &lt;<a href="mailto:notinmyhead@gmail.com">notinmyhead@gmail.com</a>&gt;<br>
&gt; could you post the complete set of libs you&#39;re trying to include in the project?<br>
&gt;<br>
&gt; Ale<br>
&gt;<br>
&gt; ps: please answer to the insight user list so it may be useful to all...<br>
&gt;<br>
&gt; Il giorno 27/set/2012, alle ore 16.55, Alessandro ha scritto:<br>
&gt;<br>
&gt; &gt; Since you&#39;re including 4.2 version of the include files, you need to change your library version to -lITKCommon-4.2 and so on<br>
&gt; &gt;<br>
&gt; &gt; Ale<br>
&gt; &gt;<br>
&gt; &gt; Il giorno 27/set/2012, alle ore 15.46, fabiola ha scritto:<br>
&gt; &gt;<br>
&gt; &gt;&gt; Hello,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I am sorry barging in with a silly question, but I am really stuck in the<br>
&gt; &gt;&gt; beginning: to compile an ITK example (DicomSeriesReadImageWrite2) in QT.<br>
&gt; &gt;&gt; I am using: Ubuntu 12.04, QT Creator 2.5.2 and ITK 4.2.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I added ITK libraries to .pro like I did before for VTK (and it worked):<br>
&gt; &gt;&gt; INCLUDEPATH += /usr/local/include/vtk-5.10 \<br>
&gt; &gt;&gt;              /usr/local/include/ITK-4.2<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; LIBS += -lvtkDICOMParser \<br>
&gt; &gt;&gt;       -lvtkRendering \<br>
&gt; &gt;&gt;       -lvtkCommon  \<br>
&gt; &gt;&gt;       -lvtkIO    \<br>
&gt; &gt;&gt;       -lvtkFiltering  \<br>
&gt; &gt;&gt;       -lQVTK \<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; LIBS += -L/usr/local/lib/ \<br>
&gt; &gt;&gt;        -lITKCommon-4.1 \<br>
&gt; &gt;&gt;        -lITKDICOMParser-4.1<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; QMAKE_CXXFLAGS += -Wno-deprecated<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; but unfortunately the compiler telling me that: &quot;cannot find<br>
&gt; &gt;&gt; -lITKCommon-4.1&quot; (I checked, the libraries are in my /usr/local/lib...)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Please help me out. I can&#39;t find any solution on the net, just seeing that<br>
&gt; &gt;&gt; the others had the same problem, but no solution...<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Thank you in advance,<br>
&gt; &gt;&gt; Fabiola.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; 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>
&gt; &gt;&gt; Sent from the ITK - Users mailing list archive at Nabble.com.<br>
&gt; &gt;&gt; _____________________________________<br>
&gt; &gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Visit other Kitware open-source projects at<br>
&gt; &gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; &gt;&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; &gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; &gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt; &gt;<br>
&gt;<br>
&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<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>