<div><br></div><div>Something like this bash script may help to list all the paths for the linker (adapt the prefix and library path to your installation):</div><div><br></div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-style-span" style="font-size: large;"><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="font-size: small;"><br>
</span></font></span></font></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace; font-size: large; ">#!/bin/bash</span></div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-style-span" style="font-size: large;">prefix=/opt/local/include</span></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-style-span" style="font-size: large;">find ${prefix}/InsightToolkit-3.16 -type d -exec echo '-L{}' \;</span></font></div>
<div><br></div><div><br></div><div>Regards,</div><div>Darren</div><div><br></div><br><br><div class="gmail_quote">On Mon, Mar 15, 2010 at 9:28 AM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Sutrisno,<br>
<br>
<br>
A) My apologies for the confusion with Eclipse.<br>
Thanks for restating that you are using Qt Designer.<br>
<br>
Please note that QtDesigner is not a build system.<br>
You could still use CMake for configuring your project,<br>
and avoid the unecessarily painful experience of having<br>
to manually set up all these paths.<br>
<br>
<br>
<br>
B) The CMake option:<br>
<div class="im"><br>
ITK_USE_FLAT_DIRECTORY_INSTALL<br>
<br>
</div> was not available in ITK 3.16.<br>
<br>
This option was added after that release,<br>
more precisely it was added on October 22nd 2009:<br>
<br>
<a href="http://www.itk.org/cgi-bin/viewcvs.cgi/CMakeLists.txt?root=Insight&r1=1.354&r2=1.355" target="_blank">http://www.itk.org/cgi-bin/viewcvs.cgi/CMakeLists.txt?root=Insight&r1=1.354&r2=1.355</a><br>
<br>
In order to use this feature you should get a fresh<br>
checkout of the CVS repository.<br>
<br>
<br>
<br>
C) If you don't use this INSTALL option,<br>
here is the list of paths that you should add to your<br>
compiler command line:<br>
<br>
./include<br>
./include/InsightToolkit<br>
./include/InsightToolkit/IO<br>
./include/InsightToolkit/gdcm<br>
./include/InsightToolkit/gdcm/src<br>
./include/InsightToolkit/gdcm/Dicts<br>
./include/InsightToolkit/Common<br>
./include/InsightToolkit/Patented<br>
./include/InsightToolkit/Review<br>
./include/InsightToolkit/Algorithms<br>
./include/InsightToolkit/Numerics<br>
./include/InsightToolkit/Numerics/FEM<br>
./include/InsightToolkit/Numerics/Statistics<br>
./include/InsightToolkit/Numerics/NeuralNetworks<br>
./include/InsightToolkit/Utilities<br>
./include/InsightToolkit/Utilities/vxl<br>
./include/InsightToolkit/Utilities/vxl/v3p<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/opt<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/datapac<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/blas<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/laso<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/eispack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/linpack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/mathews<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/minpack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/util<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/complex16<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/double<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/single<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/linalg<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/napack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/sparse<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/temperton<br>
./include/InsightToolkit/Utilities/vxl/vcl<br>
./include/InsightToolkit/Utilities/vxl/vcl/gcc<br>
./include/InsightToolkit/Utilities/vxl/vcl/iso<br>
./include/InsightToolkit/Utilities/vxl/vcl/sgi<br>
./include/InsightToolkit/Utilities/vxl/vcl/egcs<br>
./include/InsightToolkit/Utilities/vxl/vcl/emulation<br>
./include/InsightToolkit/Utilities/vxl/vcl/borland55<br>
./include/InsightToolkit/Utilities/vxl/vcl/borland56<br>
./include/InsightToolkit/Utilities/vxl/vcl/stlport<br>
./include/InsightToolkit/Utilities/vxl/vcl/gcc-295<br>
./include/InsightToolkit/Utilities/vxl/vcl/generic<br>
./include/InsightToolkit/Utilities/vxl/vcl/mwerks<br>
./include/InsightToolkit/Utilities/vxl/vcl/vcl_sys<br>
./include/InsightToolkit/Utilities/vxl/vcl/sunpro<br>
./include/InsightToolkit/Utilities/vxl/vcl/win32-vc60<br>
./include/InsightToolkit/Utilities/vxl/vcl/win32-vc70<br>
./include/InsightToolkit/Utilities/vxl/vcl/gcc-libstdcxx-v3<br>
./include/InsightToolkit/Utilities/vxl/core<br>
./include/InsightToolkit/Utilities/vxl/core/vnl<br>
./include/InsightToolkit/Utilities/vxl/core/vnl/algo<br>
./include/InsightToolkit/Utilities/expat<br>
./include/InsightToolkit/Utilities/MetaIO<br>
./include/InsightToolkit/Utilities/NrrdIO<br>
./include/InsightToolkit/Utilities/itkExtHdrs<br>
./include/InsightToolkit/Utilities/itkpng<br>
./include/InsightToolkit/Utilities/itksys<br>
./include/InsightToolkit/Utilities/itksys/ios<br>
./include/InsightToolkit/Utilities/itksys/stl<br>
./include/InsightToolkit/Utilities/itktiff<br>
./include/InsightToolkit/Utilities/itkzlib<br>
./include/InsightToolkit/SpatialObject<br>
./include/InsightToolkit/BasicFilters<br>
<br>
As you can see there are a lot of directories to include.<br>
<br>
<br>
C) If you use this INSTALL option,<br>
here is the list of paths that you should add to your<br>
compiler command line:<br>
<br>
./include/InsightToolkit<br>
./include/InsightToolkit/gdcm<br>
./include/InsightToolkit/gdcm/src<br>
./include/InsightToolkit/gdcm/Dicts<br>
./include/InsightToolkit/Utilities<br>
./include/InsightToolkit/Utilities/MetaIO<br>
./include/InsightToolkit/Utilities/itksys<br>
./include/InsightToolkit/Utilities/itksys/stl<br>
./include/InsightToolkit/Utilities/itksys/ios<br>
./include/InsightToolkit/Utilities/vxl<br>
./include/InsightToolkit/Utilities/vxl/vcl<br>
./include/InsightToolkit/Utilities/vxl/vcl/mwerks<br>
./include/InsightToolkit/Utilities/vxl/vcl/sgi<br>
./include/InsightToolkit/Utilities/vxl/vcl/gcc<br>
./include/InsightToolkit/Utilities/vxl/vcl/iso<br>
./include/InsightToolkit/Utilities/vxl/vcl/gcc-libstdcxx-v3<br>
./include/InsightToolkit/Utilities/vxl/vcl/win32-vc60<br>
./include/InsightToolkit/Utilities/vxl/vcl/sunpro<br>
./include/InsightToolkit/Utilities/vxl/vcl/generic<br>
./include/InsightToolkit/Utilities/vxl/vcl/stlport<br>
./include/InsightToolkit/Utilities/vxl/vcl/emulation<br>
./include/InsightToolkit/Utilities/vxl/vcl/borland55<br>
./include/InsightToolkit/Utilities/vxl/vcl/egcs<br>
./include/InsightToolkit/Utilities/vxl/vcl/win32-vc70<br>
./include/InsightToolkit/Utilities/vxl/vcl/gcc-295<br>
./include/InsightToolkit/Utilities/vxl/vcl/vcl_sys<br>
./include/InsightToolkit/Utilities/vxl/vcl/borland56<br>
./include/InsightToolkit/Utilities/vxl/core<br>
./include/InsightToolkit/Utilities/vxl/core/vnl<br>
./include/InsightToolkit/Utilities/vxl/core/vnl/algo<br>
./include/InsightToolkit/Utilities/vxl/v3p<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/laso<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/sparse<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/util<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/double<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/complex16<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/single<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/linpack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/datapac<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/blas<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/napack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/opt<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/temperton<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/minpack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/eispack<br>
./include/InsightToolkit/Utilities/vxl/v3p/netlib/mathews<br>
<br>
<br>
There are still a lot of directories, but now all ITK headers<br>
are copied in the directory<br>
<br>
./include/InsightToolkit<br>
<br>
and the remaining directories are for third party libraries,<br>
most notably: vxl.<br>
<br>
<br>
<br>
Regards,<br>
<br>
<br>
Luis<br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
On Sun, Mar 14, 2010 at 10:08 AM, SUTRISNO SUTRISNO<br>
<div class="im"><<a href="mailto:sutrisno_link@yahoo.com">sutrisno_link@yahoo.com</a>> wrote:<br>
</div>> Hi Luis,<br>
><br>
> Thanks for your suggestion, but I'm still confuse with my problem.<br>
> for your option:<br>
<div class="im">> A) Configure your Eclipse application with CMake,<br>
</div>> I didn't use Eclipse but used QT Desainer. And I didn't understand how to<br>
> configure with Cmake.<br>
> when I add /usr/local/include/InsightToolkit/Common in includepath, there<br>
> were error :<br>
<div class="im">> g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT<br>
> -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I.<br>
> -I/usr/include/vtk-5.0 -I/usr/local/include/InsightToolkit<br>
</div>> -I/usr/local/include/InsightToolkit/Common -I/usr/include/qt3 -I.ui/ -I.<br>
<div class="im">> -I.moc/ -o .obj/form1.o .ui/form1.cpp<br>
> In file included from<br>
</div>> /usr/local/include/InsightToolkit/Common/itkTimeStamp.h:23,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkLightObject.h:21,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkObject.h:23,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkDataObject.h:23,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkImageBase.h:23,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkImage.h:20,<br>
> from .ui/../form1.ui.h:1,<br>
<div class="im">> from .ui/form1.cpp:19:<br>
</div>> /usr/local/include/InsightToolkit/Common/itkMacro.h:42:26: error:<br>
> vnl/vnl_math.h: No such file or directory<br>
> In file included from<br>
> /usr/local/include/InsightToolkit/Common/itkNumericTraitsFixedArrayPixel.h:20,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkFixedArray.txx:21,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkFixedArray.h:261,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkIndex.h:23,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkImageRegion.h:25,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkImageBase.h:25,<br>
> from<br>
> /usr/local/include/InsightToolkit/Common/itkImage.h:20,<br>
> from .ui/../form1.ui.h:1,<br>
<div class="im">> from .ui/form1.cpp:19:<br>
</div>> ..............<br>
> ..............<br>
> ff<br>
><br>
> is itk different with vtk?why vtk header can be included but itk cann't be<br>
> included in my project?<br>
<div class="im">><br>
> B) Install ITK using the "Flat" option<br>
</div>> I use InsightToolkit-3.16.0. When I run ccmake to reconfigure my ITK build<br>
> there wasn't option ITK_USE_FLAT_DIRECTORY_INSTALL.<br>
> There were only options:<br>
> ITK_USE_CENTERED_PIXEL_COORDIN<br>
> ON<br>
> ITK_USE_CONCEPT_CHECKING<br>
> ON<br>
> ITK_USE_CONSOLIDATED_MORPHOLOG<br>
> OFF<br>
> ITK_USE_DEPRECATED_LEVELSET_IN<br>
> OFF<br>
> ITK_USE_KWSTYLE<br>
> OFF<br>
> ITK_USE_LIBXML2 OFF<br>
> ITK_USE_MINC2<br>
> OFF<br>
> ITK_USE_OPTIMIZED_REGISTRATION<br>
> OFF<br>
> ITK_USE_ORIENTED_IMAGE_DIRECTI<br>
> ON<br>
> ITK_USE_PATENTED<br>
> OFF<br>
> ITK_USE_REGION_VALIDATION_IN_I<br>
> ON<br>
> ITK_USE_REVIEW<br>
> ON<br>
> ITK_USE_REVIEW_STATISTICS<br>
> OFF<br>
> ITK_USE_STRICT_CONCEPT_CHECKIN<br>
> OFF<br>
> ITK_USE_SYSTEM_GDCM<br>
> OFF<br>
> ITK_USE_SYSTEM_LIBXML2<br>
> OFF<br>
> ITK_USE_SYSTEM_PNG<br>
> OFF<br>
> ITK_USE_SYSTEM_TIFF<br>
> OFF<br>
> ITK_USE_SYSTEM_VXL<br>
> OFF<br>
> ITK_USE_SYSTEM_ZLIB<br>
> OFF<br>
> ITK_USE_TEMPLATE_META_PROGRAMM<br>
> ON<br>
> ITK_USE_TRANSFORM_IO_FACTORIES OFF<br>
><br>
> Regards,<br>
><br>
> ________________________________<br>
> Dari: Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>><br>
> Kepada: SUTRISNO SUTRISNO <<a href="mailto:sutrisno_link@yahoo.com">sutrisno_link@yahoo.com</a>><br>
> Cc: itk <<a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>><br>
> Terkirim: Sab, 13 Maret, 2010 02:06:35<br>
> Judul: Re: how to Include itk library in QT Desainer: Use Flat ITK<br>
> Installation<br>
<div><div></div><div class="h5">><br>
> Hi Sutrisno,<br>
><br>
><br>
> When you install ITK, it doesn't install by default all the<br>
> header files in a single directory.<br>
><br>
> Therefore passing only the directory<br>
><br>
> /usr/local/include/InsightToolkit<br>
><br>
> to your linker is not enough.<br>
><br>
><br>
> You need to pass all the subdirectories of that directory as well.<br>
><br>
> There are two options for making this process easier:<br>
><br>
><br>
><br>
> A) Configure your Eclipse application with CMake, or<br>
> B) Install ITK using the "Flat" option<br>
><br>
><br>
> Option (A) is self-explanatory, so let me just describe a bit<br>
> the process for Option (B):<br>
><br>
><br>
> What you should do is to reconfigure your ITK build with<br>
> CMake and turn ON the option:<br>
><br>
> ITK_USE_FLAT_DIRECTORY_INSTALL<br>
><br>
> Then, do<br>
><br>
> make install<br>
><br>
><br>
> Once you do this, ITK will install its headers in a smaller set<br>
> of subdirectories (still is not a single directory, but at least<br>
> they will be a smaller set).<br>
><br>
> At that point, in your application that uses ITK you MUST add<br>
> the -I options for ALL the sub directories that you will see in<br>
> the InsightToolkit/include directory.<br>
><br>
><br>
><br>
> Regards,<br>
><br>
><br>
> Luis<br>
><br>
><br>
> ------------------------------------------------------------------------------------------------------<br>
> On Thu, Mar 11, 2010 at 2:56 AM, SUTRISNO SUTRISNO<br>
> <<a href="mailto:sutrisno_link@yahoo.com">sutrisno_link@yahoo.com</a>> wrote:<br>
>> Hi luis,<br>
>> I'm a student of Electrical Eng. ITS Indonesia , my final Project is about<br>
>> Medical Image.<br>
>> I am new in ITK and I just installed the program and run some itk examples<br>
>> with Cmake, it run successfully.<br>
>><br>
>> But when I use QT Desainer , and try to uses itk&vtk header: (see in my<br>
>> attachment file)<br>
>> #include "itkImage.h"<br>
>> #include "itkImageFileReader.h"<br>
>> #include "itkGradientMagnitudeImageFilter.h"<br>
>><br>
>> #include "vtkRenderer.h"<br>
>> #include "vtkRenderWindow.h"<br>
>> #include "vtkRenderWindowInteractor.h"<br>
>> #include "vtkPolyDataMapper.h"<br>
>><br>
>> libs path : -L/usr/lib/vtk-5.0 -L/usr/local/lib/InsightToolkit<br>
>> includepath : /usr/include/vtk-5.0 /usr/local/include/InsightToolkit<br>
>><br>
>> I don't understand why when I run the qmake command the output is that:<br>
>><br>
>> sutrisno@sutrisno-pc:~/project-sut/project11$ qmake<br>
>> sutrisno@sutrisno-pc:~/project-sut/project11$ make<br>
>> /usr/share/qt3/bin/uic form1.ui -o .ui/form1.h<br>
>> g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG<br>
>> -DQT_THREAD_SUPPORT<br>
>> -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I.<br>
>> -I/usr/include/vtk-5.0 -I/usr/local/include/InsightToolkit<br>
>> -I/usr/include/qt3 -I.ui/ -I. -I.moc/ -o .obj/main.o main.cpp<br>
>> /usr/share/qt3/bin/uic form1.ui -i form1.h -o .ui/form1.cpp<br>
>> g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG<br>
>> -DQT_THREAD_SUPPORT<br>
>> -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I.<br>
>> -I/usr/include/vtk-5.0 -I/usr/local/include/InsightToolkit<br>
>> -I/usr/include/qt3 -I.ui/ -I. -I.moc/ -o .obj/form1.o .ui/form1.cpp<br>
>> In file included from .ui/form1.cpp:19:<br>
>> .ui/../form1.ui.h:1:22: error: itkImage.h: No such file or directory<br>
>> .ui/../form1.ui.h:2:32: error: itkImageFileReader.h: No such file or<br>
>> directory<br>
>> .ui/../form1.ui.h:3:45: error: itkGradientMagnitudeImageFilter.h: No such<br>
>> file or directory<br>
>> In file included from /usr/include/c++/4.3/backward/strstream:51,<br>
>> from /usr/include/vtk-5.0/vtkIOStream.h:36,<br>
>> from /usr/include/vtk-5.0/vtkSystemIncludes.h:40,<br>
>> from /usr/include/vtk-5.0/vtkIndent.h:24,<br>
>> from /usr/include/vtk-5.0/vtkObjectBase.h:43,<br>
>> from /usr/include/vtk-5.0/vtkObject.h:41,<br>
>> from /usr/include/vtk-5.0/vtkViewport.h:32,<br>
>> from /usr/include/vtk-5.0/vtkRenderer.h:32,<br>
>> from .ui/../form1.ui.h:6,<br>
>> from .ui/form1.cpp:19:<br>
>> /usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning<br>
>> This file includes at least one deprecated or antiquated header which may<br>
>> be<br>
>> removed without further notice at a future date. Please use a<br>
>> non-deprecated<br>
>> interface with equivalent functionality instead. For a listing of<br>
>> replacement headers and interfaces, consult the file backward_warning.h.<br>
>> To<br>
>> disable this warning use -Wno-deprecated.<br>
>> In file included from .ui/form1.cpp:16:<br>
>> /usr/include/qt3/qimage.h: In member function ‘bool<br>
>> QImageTextKeyLang::operator<(const QImageTextKeyLang&) const’:<br>
>> /usr/include/qt3/qimage.h:61: warning: suggest parentheses around &&<br>
>> within<br>
>> ||<br>
>> make: *** [.obj/form1.o] Error 1<br>
>><br>
>> Best regards,<br>
>> Sutrisno<br>
>><br>
>><br>
>><br>
>> ________________________________<br>
>> Menambah banyak teman sangatlah mudah dan cepat.<br>
>> Undang teman dari Hotmail, Gmail ke Yahoo! Messenger sekarang!<br>
><br>
> ________________________________<br>
</div></div>> Coba Yahoo! Mail baru yang LEBIH CEPAT. Rasakan bedanya sekarang!<br>
<div><div></div><div class="h5">_____________________________________<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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>