Reputation: 81
I'm trying to run this example: http://www.itk.org/Wiki/ITK/Examples/IO/ImageFileReader
But, get the following when I "configure" in CMake:
CMake Error at CMakeLists.txt:11 (find_package):
By not providing "FindItkVtkGlue.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ItkVtkGlue", but CMake did not find one.
Could not find a package configuration file provided by "ItkVtkGlue" with
any of the following names:
ItkVtkGlueConfig.cmake
itkvtkglue-config.cmake
Add the installation prefix of "ItkVtkGlue" to CMAKE_PREFIX_PATH or set
"ItkVtkGlue_DIR" to a directory containing one of the above files. If
"ItkVtkGlue" provides a separate development package or SDK, be sure it has
been installed.
It seems I need "ItkVtkGlue"? Where can I download it? And, what should I do to combine it with the program?
Upvotes: 2
Views: 1893
Reputation: 5669
VtkGlue
is a module within ITK
, which by default is not built. You need to enable this module with cmake when you build ITK
. Also, before you do this, you need to download and build VTK
(which is very similar to building ITK
). Assuming you are on a unix-like system, have VTK
installed, have a src
and bin
folder for ITK
, and are sitting in the bin
folder, I would do:
$ ccmake ../src -DModule_ItkVtkGlue=ON
The last option turns the ItkVtkGlue
module on by default. You can also do this in the curses GUI without passing this option: press t
to get the advanced options, use the arrow keys to scroll down to Module_ItkVtkGlue
, and, once there, use the enter key to toggle this option ON
. Finally, configure, configure, configure, generate as usual, and then:
$ make
$ sudo make install
Many of the examples on the ITK
Wiki use VtkGlue
. You can see how to format your CMakeLists.txt
file by looking at any of those.
Upvotes: 4