[Insight-users] Bls: how to Include itk library in QT Desainer: Use Flat ITK Installation
Luis Ibanez
luis.ibanez at kitware.com
Thu Mar 18 11:03:17 EDT 2010
Hi Sutrisno,
1) If you are new to C- programming, you will benefit
a lot from learning more about CMake before further
exploring ITK and QT.
Here is a basic CMake tutorial:
http://www.cmake.org/cmake/help/cmake_tutorial.html
Here is the official CMake Guide:
http://www.kitware.com/products/books/CMakeBook.html
You should also read the ITK Tutorials
http://www.itk.org/ITK/help/tutorials.html
In particular:
http://www.itk.org/CourseWare/Training/GettingStarted-I.pdf
2) Your current error message indicates that you are now
missing to include the Qt headers.
3) Again, you are trying to do this the hard way... :-(
If you use CMake for configuring the project you
would have finished this in just a couple of hours.
You may want to read from this link:
http://qtnode.net/wiki/Qt_with_cmake
Regards,
Luis
-----------------------------------------------------------------------------------------
On Wed, Mar 17, 2010 at 6:33 AM, SUTRISNO SUTRISNO
<sutrisno_link at yahoo.com> wrote:
>
>
> Hi Luis,
>
> Thanks for your helps, I got a lot of experience with your explanation.
> But there are still many problems in my project.
>
> for your option:
> A)".. Please note that QtDesigner is not a build system.
> You could still use CMake for configuring your project,.."
>
> you are right.but I don't understand configure my project with Cmake
> (?),because I just new in programing with C.
>
> B) ".. In order to use this feature you should get a fresh
> checkout of the CVS repository..."
>
> OK . I wil try.
>
> C) "..If you don't use this INSTALL option,
> here is the list of paths that you should add to your
> compiler command line:.."
>
> OK, These are my itk paths:
>
> root at sutrisno-pc:/# prefix=/usr/local/include
> root at sutrisno-pc:/# find ${prefix}/InsightToolkit -type d -exec echo '-L{}'
> \;
> -L/usr/local/include/InsightToolkit
> -L/usr/local/include/InsightToolkit/Common
> -L/usr/local/include/InsightToolkit/BasicFilters
> -L/usr/local/include/InsightToolkit/SpatialObject
> -L/usr/local/include/InsightToolkit/Numerics
> -L/usr/local/include/InsightToolkit/Numerics/NeuralNetworks
> -L/usr/local/include/InsightToolkit/Numerics/Statistics
> -L/usr/local/include/InsightToolkit/Numerics/FEM
> -L/usr/local/include/InsightToolkit/IO
> -L/usr/local/include/InsightToolkit/Review
> -L/usr/local/include/InsightToolkit/gdcm
> -L/usr/local/include/InsightToolkit/gdcm/src
> -L/usr/local/include/InsightToolkit/gdcm/Dicts
> -L/usr/local/include/InsightToolkit/Utilities
> -L/usr/local/include/InsightToolkit/Utilities/MetaIO
> -L/usr/local/include/InsightToolkit/Utilities/vxl
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/gcc-libstdcxx-v3
> -L/usr/local/include/InsightT oolkit/Utilities/vxl/vcl/gcc-295
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/borland56
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/borland55
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/gcc
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/stlport
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/sunpro
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/emulation
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/sgi
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/egcs
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/generic
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/win32-vc70
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/mwerks
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/vcl_sys
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/iso
> -L/usr/local/include/InsightToolkit/Utilities/vxl/vcl/win32-vc60
> -L/usr/local/include/Insig htToolkit/Utilities/vxl/v3p
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/sparse
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/toms
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/eispack
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/opt
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/linpack
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/blas
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/complex16
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/single
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/double
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/util
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/napack
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/datapac
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/linalg
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/mathews
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/laso
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/temperton
> -L/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/minpack
> -L/usr/local/include/InsightToolkit/Utilities/vxl/core
> -L/usr/local/include/InsightToolkit/Utilities/vxl/core/vnl
> -L/usr/local/include/InsightToolkit/Utilities/vxl/core/vnl/algo
> -L/usr/local/include/InsightToolkit/Utilities/itkExtHdrs
> -L/usr/local/include/InsightToolkit/Utilities/itktiff
> -L/usr/local/include/InsightToolkit/Utilities/itkpng
> -L/usr/local/include/InsightToolkit/Utilities/itksys
> -L/usr/local/include/InsightToolkit/Utilities/itksys/stl
> -L/usr/local/include/InsightToolkit/Utilities/itksys/ios& lt;
> br>-L/usr/local/include/InsightToolkit/Utilities/expat
> -L/usr/local/include/InsightToolkit/Utilities/itkzlib
> -L/usr/local/include/InsightToolkit/Utilities/NrrdIO
> -L/usr/local/include/InsightToolkit/Algorithms
> root at sutrisno-pc:/#
>
> When I added all these paths, there were still error (maybe like that You
> said "avoid the unecessarily painful experience of having to manually set
> up all these paths." ).
> the error like this:
> ......
> root at sutrisno-pc:~/project-sut/project11# qmake
> root at sutrisno-pc:~/project-sut/project11# make
> /usr/share/qt3/bin/uic form1.ui -o .ui/form1.h
> g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
> -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I.
> -I/usr/include/vtk-5.0 -I/usr/local/include/InsightToolkit
> -I/usr/local/include/InsightToolkit/Common
> -I/usr/local/include/InsightToolkit/BasicFilters
> -I/usr/local/include/InsightToolkit/SpatialObject
> -I/usr/local/include/InsightToolkit/Numerics
> -I/usr/local/include/InsightToolkit/Numerics/NeuralNetworks
> -I/usr/local/include/InsightToolkit/Numerics/Statistics
> -I/usr/local/include/InsightToolkit/Numerics/FEM
> -I/usr/local/include/InsightToolkit/IO
> -I/usr/local/include/InsightToolkit/Review
> -I/usr/local/include/InsightToolkit/gdcm
> -I/usr/local/include/InsightToolkit/gdcm/src
> -I/usr/local/include/InsightToolkit/gdcm/Dicts
> -I/usr/local/include/InsightToolkit/Utilities
> -I/usr/local/include/InsightToolkit/Utilities/MetaIO
> -I/usr/local/include/InsightToolkit/Utilities/vxl
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/gcc-libstdcxx-v3
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/gcc-295
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/borland56
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/borland55
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/gcc
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/stlport
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/sunpro
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/emulation
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/sgi
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/egcs
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/generic
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/win32-vc70
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/mwerks
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/vcl_sys
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/iso
> -I/usr/local/include/InsightToolkit/Utilities/vxl/vcl/win32-vc60
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/sparse
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/toms
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/eispack
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/opt
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/linpack
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/blas
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/complex16
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/single
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/double
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/util
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/napack
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/datapac
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/linalg
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/mathews
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/laso
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/temperton
> -I/usr/local/include/InsightToolkit/Utilities/vxl/v3p/netlib/minpack
> -I/usr/local/include/InsightToolkit/Utilities/vxl/core
> -I/usr/local/include/InsightToolkit/Utilities/vxl/core/vnl
> -I/usr/local/include/InsightToolkit/Utilities/vxl/core/vnl/algo
> -I/usr/local/include/InsightToolkit/Utilities/itkExtHdrs
> -I/usr/local/include/InsightToolkit/Utilities/itktiff
> -I/usr/local/include/InsightToolkit/Utilities/itkpng
> -I/usr/local/include/InsightToolkit/Utilities/itksys
> -I/usr/local/include/InsightToolkit/Utilities/itksys/stl
> -I/usr/local/include/InsightToolkit/Utilities/itksys/ios
> -I/usr/local/include/InsightToolkit/Utilities/expat
> -I/usr/local/include/InsightToolkit/Utilities/itkzlib
> -I/usr/local/include/InsightToolkit/Utilities/NrrdIO
> -I/usr/local/include/InsightToolkit/Algorithms -I/usr/include/qt3 -I.ui/ -I.
> -I.moc/ -o .obj/main.o main.cpp
> In file included from /usr/include/qt3/qwindowdefs.h:47,
> from /usr/include/qt3/qwidget.h:45,
> from /usr/include/qt3/qdesktopwidget.h:43,
> from /usr/include/qt3/qapplication.h:45,
> from main.cpp:1:
> /usr/include/qt3/qstring.h:412: error: expected unqualified-id before ‘&’
> token
> /usr/include/qt3/qstring.h:412: error: expected ‘,’ or ‘...’ before ‘&’
> token
> /usr/include/qt3/qstring.h:412: error: ‘QString::QString()’ cannot be
> overloaded
> /usr/include/qt3/qstring.h:403: error: with ‘QString::QString()’
> /usr/include/qt3/qstring.h:419: error: expected unqualified-id before ‘&’
> token
> /usr/include/qt3/qstring.h:419: error: expected ‘,’ or ‘...’ before ‘&’
> token
> /usr/include/qt3/qstring.h:419: error: ‘QString& QString::operator=()’ must
> take exactly one argument
> /usr/include/qt3/qstring.h:538: error: expected unqualified-id before ‘&’
> token
> /usr/include/qt3/qstring.h:538: error: expected ‘,’ or ‘...’ before ‘&’
> token
> ......
>
>
> OK.now, my current problem is how to add all itk paths to my project in Qt
> Desainer.Can we set up it automatically ?or how to configure my project with
> cmake ?FYI: I attached my project file
>
> Thanks for your helps,
> Best,
> Sutrisno
>
> Dari: Luis Ibanez <luis.ibanez at kitware.com>
> Kepada: SUTRISNO SUTRISNO <sutrisno_link at yahoo.com>
> Cc: itk <Insight-users at itk.org>
> Terkirim: Sen, 15 Maret, 2010 23:28:43
> Judul: Re: how to Include itk library in QT Desainer: Use Flat ITK
> Installation
>
> Hi Sutrisno,
>
>
> A) My apologies for the confusion with Eclipse.
> Thanks for restating that you are using Qt Designer.
>
> Please note that QtDesigner is not a build system.
> You could still use CMake for configuring your project,
> and avoid the unecessarily painful experience of having
> to manually set up all these paths.
>
>
>
> B) The CMake option:
>
> ITK_USE_FLAT_DIRECTORY_INSTALL
>
> was not available in ITK 3.16.
>
> This option was added after that release,
> more precisely it was added on October 22nd 2009:
>
> http://www.itk.org/cgi-bin/viewcvs.cgi/CMakeLists.txt?root=Insight&r1=1.354&r2=1.355
>
> In order to use this feature you should get a fresh
> checkout of the CVS repository.
>
>
>
> C) If you don't use this INSTALL option,
> here is the list of paths that you should add to your
> compiler command line:
>
> ./include
> ./include/InsightToolkit
> ./include/InsightToolkit/IO
> ./include/InsightToolkit/gdcm
> ./include/InsightToolkit/gdcm/src
> ./include/InsightToolkit/gdcm/Dicts
> ./include/InsightToolkit/Common
> ./include/InsightToolkit/Patented
> ./include/InsightToolkit/Review
> ./include/InsightToolkit/Algorithms
> ./include/InsightToolkit/Numerics
> ./include/InsightToolkit/Numerics/FEM
> ./include/InsightToolkit/Numerics/Statistics
> ./include/InsightToolkit/Numerics/NeuralNetworks
> ./include/InsightToolkit/Utilities
> ./include/InsightToolkit/Utilities/vxl
> ./include/InsightToolkit/Utilities/vxl/v3p
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/opt
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/datapac
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/blas
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/laso
> ./include/InsightToolkit/Utilities/ vxl/v3p/netlib/eispack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/linpack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/mathews
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/minpack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/util
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/complex16
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/double
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/single
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/linalg
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/napack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/sparse
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/temperton
> ./include/InsightToolkit/Utilities/vxl/vcl
> ./include/InsightToolkit/Utilities/vxl/vcl/gcc
> ./include/InsightToolkit/Utilities/vxl/vcl/iso
> ./include/InsightToolkit/Utilities/vxl/v cl/sgi
> ./include/InsightToolkit/Utilities/vxl/vcl/egcs
> ./include/InsightToolkit/Utilities/vxl/vcl/emulation
> ./include/InsightToolkit/Utilities/vxl/vcl/borland55
> ./include/InsightToolkit/Utilities/vxl/vcl/borland56
> ./include/InsightToolkit/Utilities/vxl/vcl/stlport
> ./include/InsightToolkit/Utilities/vxl/vcl/gcc-295
> ./include/InsightToolkit/Utilities/vxl/vcl/generic
> ./include/InsightToolkit/Utilities/vxl/vcl/mwerks
> ./include/InsightToolkit/Utilities/vxl/vcl/vcl_sys
> ./include/InsightToolkit/Utilities/vxl/vcl/sunpro
> ./include/InsightToolkit/Utilities/vxl/vcl/win32-vc60
> ./include/InsightToolkit/Utilities/vxl/vcl/win32-vc70
> ./include/InsightToolkit/Utilities/vxl/vcl/gcc-libstdcxx-v3
> ./include/InsightToolkit/Utilities/vxl/core
> ./include/InsightToolkit/Utilities/vxl/core/vnl
> ./include/InsightToolkit/Utilities/vxl/core/vnl/algo
> ./include/InsightToolkit/Utilities/expat
> ./include/InsightToolkit/Utilities/MetaIO
> ./include/InsightToolkit/Utilities/NrrdIO
> ./include/InsightToolkit/Utilities/itkExtHdrs
> ./include/InsightToolkit/Utilities/itkpng
> ./include/InsightToolkit/Utilities/itksys
> ./include/InsightToolkit/Utilities/itksys/ios
> ./include/InsightToolkit/Utilities/itksys/stl
> ./include/InsightToolkit/Utilities/itktiff
> ./include/InsightToolkit/Utilities/itkzlib
> ./include/InsightToolkit/SpatialObject
> ./include/InsightToolkit/BasicFilters
>
> As you can see there are a lot of directories to include.
>
>
> C) If you use this INSTALL option,
> here is the list of paths that you should add to your
> compiler command line:
>
> ./include/InsightToolkit
> ./include/InsightToolkit/gdcm
> ./include/InsightToolkit/gdcm/src
> ./include/InsightToolkit/gdcm/Dicts
> ./include/InsightToolkit/Utilities
> ./include/InsightToolkit/Utilities/MetaIO
> ./include/InsightToolkit/Utilities/itksys
> ./include/InsightToolkit/Utilities/itksys/stl
> ./include/InsightToolkit/Utilities/itksys/ios
> ./include/InsightToolkit/Utilities/vxl
> ./include/InsightToolkit/Utilities/vxl/vcl
> ./include/InsightToolkit/Utilities/vxl/vcl/mwerks
> ./include/InsightToolkit/Utilities/vxl/vcl/sgi
> ./include/InsightToolkit/Utilities/vxl/vcl/gcc
> ./include/InsightToolkit/Utilities/vxl/vcl/iso
> ./include/InsightToolkit/Utilities/vxl/vcl/gcc-libstdcxx-v3
> ./include/InsightToolkit/Utilities/vxl/vcl/win32-vc60
> ./include/InsightToolkit/Utilities/vxl/vcl/sunpro
> ./include/InsightToolkit/Utilities/vxl/vcl/generic
> ./include/InsightToolkit/Utilities/vxl/vcl/stlport
> ./include/InsightT oolkit/Utilities/vxl/vcl/emulation
> ./include/InsightToolkit/Utilities/vxl/vcl/borland55
> ./include/InsightToolkit/Utilities/vxl/vcl/egcs
> ./include/InsightToolkit/Utilities/vxl/vcl/win32-vc70
> ./include/InsightToolkit/Utilities/vxl/vcl/gcc-295
> ./include/InsightToolkit/Utilities/vxl/vcl/vcl_sys
> ./include/InsightToolkit/Utilities/vxl/vcl/borland56
> ./include/InsightToolkit/Utilities/vxl/core
> ./include/InsightToolkit/Utilities/vxl/core/vnl
> ./include/InsightToolkit/Utilities/vxl/core/vnl/algo
> ./include/InsightToolkit/Utilities/vxl/v3p
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/laso
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/sparse
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/util
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/double
> ./include/InsightToolkit/Utilities/vxl /v3p/netlib/lapack/complex16
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/lapack/single
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/linpack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/datapac
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/blas
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/napack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/opt
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/temperton
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/minpack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/eispack
> ./include/InsightToolkit/Utilities/vxl/v3p/netlib/mathews
>
>
> There are still a lot of directories, but now all ITK headers
> are copied in the directory
>
> ./include/InsightToolkit
>
> and the remaining directories are for third party libraries,
> most notably: vxl.
>
>
>
> Regards,
>
>
> Luis
>
>
>
> ------------------------------------------------------------------------------
> On Sun, Mar 14, 2010 at 10:08 AM, SUTRISNO SUTRISNO
> <sutrisno_link at yahoo.com> wrote:
>> Hi Luis,
>>
>> Thanks for your suggestion, but I'm still confuse with my problem.
>> for your option:
>> A) Configure your Eclipse application with CMake,
>> I didn't use Eclipse but used QT Desainer. And I didn't understand how to
>> configure with Cmake.
>> when I add /usr/local/include/InsightToolkit/Common in includepath, there
>> were error :
>> g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG
>> -DQT_THREAD_SUPPORT
>> -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I.
>> -I/usr/include/vtk-5.0 -I/usr/local/include/InsightToolkit
>> -I/usr/local/include/InsightToolkit/Common -I/usr/include/qt3 -I.ui/ -I.
>> -I.moc/ -o .obj/form1.o .ui/form1.cpp
>> In file included from
>> /usr/local/include/InsightToolkit/Common/itkTimeStamp.h:23,
>> from
>> /usr/local/include/InsightToolkit/Common/itkLightObject.h:21,
>> from
>> /usr/local/include/InsightToolkit/Common/itkObject.h:23,
>> from
>> /usr/local/include/InsightToolkit/Common/itkDataObject.h:23,
>> from
>> /usr/local/include/InsightToolkit/Common/itkImageBase.h:23,
>> from
>> /usr/local/include/InsightToolkit/Common/itkImage.h:20,
>> from .ui/../form1.ui.h:1,
>> from .ui/form1.cpp:19:
>> /usr/local/include/InsightToolkit/Common/itkMacro.h:42:26: error:
>> vnl/vnl_math.h: No such file or directory
>> In file included from
>>
>> /usr/local/include/InsightToolkit/Common/itkNumericTraitsFixedArrayPixel.h:20,
>> from
>> /usr/local/include/InsightToolkit/Common/itkFixedArray.txx:21,
>> from
>> /usr/local/include/InsightToolkit/Common/itkFixedArray.h:261,
>> from
>> /usr/local/include/InsightToolkit/Common/itkIndex.h:23,
>> from
>> /usr/local/include/InsightToolkit/Common/itkImageRegion.h:25,
>> from
>> /usr/local/include/InsightToolkit/Common/itkImageBase.h:25,
>> from
>> /usr/local/include/InsightToolkit/Common/itkImage.h:20,
>> from .ui/../form1.ui.h:1,
>> from .ui/form1.cpp:19:
>> ..............
>> ..............
>> ff
>>
>> is itk different with vtk?why vtk header can be included but itk cann't be
>> included in my project?
>>
>> B) Install ITK using the "Flat" option
>> I use InsightToolkit-3.16.0. When I run ccmake to reconfigure my ITK build
>> there wasn't option ITK_USE_FLAT_DIRECTORY_INSTALL.
>> There were only options:
>> ITK_USE_CENTERED_PIXEL_COORDIN
>> ON
>> ITK_USE_CONCEPT_CHECKING
>> ON
>> ITK_USE_CONSOLIDATED_MORPHOLOG
>> OFF
>> ITK_USE_DEPRECATED_LEVELSET_IN
>> OFF
>> ITK_USE_KWSTYLE
>> OFF
>> ITK_USE_LIBXML2 OFF
>> ITK_USE_MINC2
>> OFF
>> ITK_USE_OPTIMIZED_REGISTRATION
>> OFF
>> ITK_USE_ORIENTED_IMAGE_DIRECTI
>> ON
>> ITK_USE_PATENTED
>> OFF
>> ITK_USE_REGION_VALIDATION_IN_I
>> ON
>> ITK_USE_REVIEW
>> ON
>> ITK_USE_REVIEW_STATISTICS
>> OFF
>> ITK_USE_STRICT_CONCEPT_CHECKIN
>> OFF
>> ITK_USE_SYSTEM_GDCM
>> OFF
>> ITK_USE_SYSTEM_LIBXML2
>> OFF
>> ITK_USE_SYSTEM_PNG
>> OFF
>> ITK_USE_SYSTEM_TIFF
>> OFF
>> ITK_USE_SYSTEM_VXL
>> OFF
>> ITK_USE_SYSTEM_ZLIB
>> OFF
>> ITK_USE_TEMPLATE_META_PROGRAMM
>> ON
>> ITK_USE_TRANSFORM_IO_FACTORIES OFF
>>
>> Regards,
>>
>> ________________________________
>> Dari: Luis Ibanez <luis.ibanez at kitware.com>
>> Kepada: SUTRISNO SUTRISNO <sutrisno_link at yahoo.com>
>> Cc: itk <Insight-users at itk.org>
>> Terkirim: Sab, 13 Maret, 2010 02:06:35
>> Judul: Re: how to Include itk library in QT Desainer: Use Flat ITK
>> Installation
>>
>> Hi Sutrisno,
>>
>>
>> When you install ITK, it doesn't install by default all the
>> header files in a single directory.
>>
>> Therefore passing only the directory
>>
>> /usr/local/include/InsightToolkit
>>
>> to your linker is not enough.
>>
>>
>> You need to pass all the subdirectories of that directory as well.
>>
>> There are two options for making this process easier:
>>
>>
>>
>> A) Configure your Eclipse application with CMake, or
>> B) Install ITK using the "Flat" option
>>
>>
>> Option (A) is self-explanatory, so let me just describe a bit
>> the process for Option (B):
>>
>>
>> What you should do is to reconfigure your ITK build with
>> CMake and turn ON the option:
>>
>> ITK_USE_FLAT_DIRECTORY_INSTALL
>>
>> Then, do
>>
>> make install
>>
>>
>> Once you do this, ITK will install its headers in a smaller set
>> of subdirectories (still is not a single directory, but at least
>> they will be a smaller set).
>>
>> At that point, in your application that uses ITK you MUST add
>> the -I options for ALL the sub directories that you will see in
>> the InsightToolkit/include directory.
>>
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>>
>> ------------------------------------------------------------------------------------------------------
>> On Thu, Mar 11, 2010 at 2:56 AM, SUTRISNO SUTRISNO
>> <sutrisno_link at yahoo.com> wrote:
>>> Hi luis,
>>> I'm a student of Electrical Eng. ITS Indonesia , my final Project is
>>> about
>>> Medical Image.
>>> I am new in ITK and I just installed the program and run some itk
>>> examples
>>> with Cmake, it run successfully.
>>>
>>> But when I use QT Desainer , and try to uses itk&vtk header: (see in my
>>> attachment file)
>>> #include "itkImage.h"
>>> #include "itkImageFileReader.h"
>>> #include "itkGradientMagnitudeImageFilter.h"
>>>
>>> #include "vtkRenderer.h"
>>> #include "vtkRenderWindow.h"
>>> #include "vtkRenderWindowInteractor.h"
>>> #include "vtkPolyDataMapper.h"
>>>
>>> libs path : -L/usr/lib/vtk-5.0 -L/usr/local/lib/InsightToolkit
>>> includepath : /usr/include/vtk-5.0 /usr/local/include/InsightToolkit
>>>
>>> I don't understand why when I run the qmake command the output is that:
>>>
>>> sutrisno at sutrisno-pc:~/project-sut/project11$ qmake
>>> sutrisno at sutrisno-pc:~/project-sut/project11$ make
>>> /usr/share/qt3/bin/uic form1.ui -o .ui/form1.h
>>> g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG
>>> -DQT_THREAD_SUPPORT
>>> -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I.
>>> -I/usr/include/vtk-5.0 -I/usr/local/include/InsightToolkit
>>> -I/usr/include/qt3 -I.ui/ -I. -I.moc/ -o .obj/main.o main.cpp
>>> /usr/share/qt3/bin/uic form1.ui -i form1.h -o .ui/form1.cpp
>>> g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG
>>> -DQT_THREAD_SUPPORT
>>> -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I.
>>> -I/usr/include/vtk-5.0 -I/usr/local/include/InsightToolkit
>>> -I/usr/include/qt3 -I.ui/ -I. -I.moc/ -o .obj/form1.o .ui/form1.cpp
>>> In file included from .ui/form1.cpp:19:
>>> .ui/../form1.ui.h:1:22: error: itkImage.h: No such file or directory
>>> .ui/../form1.ui.h:2:32: error: itkImageFileReader.h: No such file or
>>> directory
>>> .ui/../form1.ui.h:3:45: error: itkGradientMagnitudeImageFilter.h: No such
>>> file or directory
>>> In file included from /usr/include/c++/4.3/backward/strstream:51,
>>> from /usr/include/vtk-5.0/vtkIOStream.h:36,
>>> from /usr/include/vtk-5.0/vtkSystemIncludes.h:40,
>>> from /usr/include/vtk-5.0/vtkIndent.h:24,
>>> from /usr/include/vtk-5.0/vtkObjectBase.h:43,
>>> from /usr/include/vtk-5.0/vtkObject.h:41,
>>> from /usr/include/vtk-5.0/vtkViewport.h:32,
>>> from /usr/include/vtk-5.0/vtkRenderer.h:32,
>>> from .ui/../form1.ui.h:6,
>>> from .ui/form1.cpp:19:
>>> /usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning
>>> This file includes at least one deprecated or antiquated header which may
>>> be
>>> removed without further notice at a future date. Please use a
>>> non-deprecated
>>> interface with equivalent functionality instead. For a listing of
>>> replacement headers and interfaces, consult the file backward_warning.h.
>>> To
>>> disable this warning use -Wno-deprecated.
>>> In file included from .ui/form1.cpp:16:
>>> /usr/include/qt3/qimage.h: In member function ‘bool
>>> QImageTextKeyLang::operator<(const QImageTextKeyLang&) const’:
>>> /usr/include/qt3/qimage.h:61: warning: suggest parentheses around &&
>>> within
>>> ||
>>> make: *** [.obj/form1.o] Error 1
>>>
>>> Best regards,
>>> Sutrisno
>>>
>>>
>>>
>>> ________________________________
>>> Menambah banyak teman sangatlah mudah dan cepat.
>>> Undang teman dari Hotmail, Gmail ke Yahoo! Messenger sekarang!
>>
>> ________________________________
>> Coba Yahoo! Mail baru yang LEBIH CEPAT. Rasakan bedanya sekarang!
>
> ________________________________
> Akses email lebih cepat.
> Yahoo! menyarankan Anda meng-upgrade browser ke Internet Explorer 8 baru
> yang dioptimalkan untuk Yahoo! Dapatkan di sini! (Gratis)
More information about the Insight-users
mailing list