[Insight-users] Problems Building simple ITK example and ITK's modules
Delcypher
delcypher at gmail.com
Wed Feb 8 18:27:53 EST 2012
Hi,
I'm trying to build a simple ITK and VTK example here (
http://www.itk.org/Wiki/ITK/Examples/IO/ImageToVTKImageFilter ) and
I'm having quite a few problems.
I am building using...
* Arch Linux
* ITK from git tag v4.0.0 . This has been built but not installed
because I do not have root privileges. I have built with
BUILD_SHARED_LIBS and ITK_BUILD_ALL_MODULES. I also enabled
(Module_ITKVtkGlue and set VTK_DIR appropriately). I don't understand
why I have to enable ITKVtkGlue separately. Why does
ITK_BUILD_ALL_MODULES not do it? Is it something to do with the fact
that ITKVtkGlue is a bridge module?
* VTK from git tag v5.8.0 . This has been built but not installed for
same reason as for the ITK library.
What I really don't understand is how I'm supposed to work with ITK's
modules in the context of CMakeLists.txt files from my own projects.
In Qt you just do something like
find_package(Qt4 QtGui Qtsomething etc..)
include(${QT4_USE_FILE})
What am I supposed to do for ITK's modules (i.e. the ones listed in
binary_build/Modules/)?
For this example if I try (as in the example CMakeLists.txt file on
the wiki page)
find_package(ItkVtkGlue REQUIRED)
include(${ItkVtkGlue_USE_FILE})
this doesn't work during cmake configuration (cmake-gui or ccmake)
because there is no FindItkVtkGlue.cmake file. I tried various
directories in my ITK build tree, none of them worked.
If I try...
find_package(ITK REQUIRED ItkVtkGlue)
INCLUDE(${USE_ITK_FILE})
INCLUDE(${ItkVtkGlue_USE_FILE})
CMake configuration fails again because
CMake Error at /home/dan/binary-builds/simi-qt-bin/itk/src/ITK/CMake/ITKModuleAPI.cmake:50
(message):
No such module: "ItkVtkGlue"
What is the correct approach? The documentation seems a little sparse
on this issue.
Thanks,
Daniel Liew.
More information about the Insight-users
mailing list