我正在尝试运行以下示例: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”?我在哪里可以下载?而且,我应该怎么做才能将其与程序结合起来?
最佳答案
VtkGlue
是ITK
内的模块,默认情况下未构建。构建ITK
时,需要使用cmake启用此模块。另外,在执行此操作之前,您需要下载并构建VTK
(与构建ITK
非常相似)。假设您使用的是类unix的系统,安装了VTK
,为src
设置了bin
和ITK
文件夹,并且坐在bin
文件夹中,我将这样做:
$ ccmake ../src -DModule_ItkVtkGlue=ON
最后一个选项默认情况下打开
ItkVtkGlue
模块。您也可以在curses GUI中执行此操作而无需传递此选项:按t
获取高级选项,使用箭头键向下滚动至Module_ItkVtkGlue
,然后在其中使用Enter键切换此选项ON
。最后,像往常一样配置,配置,配置,生成,然后:$ make
$ sudo make install
许多examples on the
ITK
Wiki使用VtkGlue
。您可以通过查看任何一种格式来了解如何格式化CMakeLists.txt
文件。关于c++ - ItkVtkGlue的问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26632607/