我正在尝试运行此示例:http://www.itk.org/Wiki/ITK/Examples/IO/ImageFileReader
但是,当我在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.
好像我需要“ItkVtkGlue”?我在哪里可以下载?而且,我该怎么做才能将它与程序结合起来?
答案 0 :(得分:3)
VtkGlue
是ITK
中的一个模块,默认情况下不会构建。您需要在构建ITK
时使用cmake启用此模块。此外,在执行此操作之前,您需要下载并构建VTK
(这与构建ITK
非常相似)。假设您使用类似unix的系统,安装VTK
,为src
设置bin
和ITK
文件夹,并且位于bin
文件夹中,我会这样做:
$ ccmake ../src -DModule_ItkVtkGlue=ON
最后一个选项默认启用ItkVtkGlue
模块。您也可以在curses GUI中执行此操作而不传递此选项:按t
以获取高级选项,使用箭头键向下滚动到Module_ItkVtkGlue
,然后在那里使用回车键切换此选项ON
。最后,配置,配置,配置,照常生成,然后:
$ make
$ sudo make install
许多examples on the ITK
Wiki使用VtkGlue
。您可以通过查看其中的任何文件来了解如何格式化CMakeLists.txt
文件。