Issue with ItkVtkGlue

Issue with ItkVtkGlue

本文关键字:ItkVtkGlue with Issue      更新时间:2023-10-16

我正在尝试运行此示例: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"?在哪里可以下载?那么,我应该怎么做才能将它与程序结合起来呢?

VtkGlueITK中的一个模块,默认情况下不会构建。在构建ITK时,您需要使用cmake启用此模块。此外,在执行此操作之前,您需要下载并构建VTK(这与构建ITK非常相似)。假设你在一个类似unix的系统上,安装了VTKITK有一个srcbin文件夹,并且位于bin文件夹中,我会这样做:

$ ccmake ../src -DModule_ItkVtkGlue=ON

最后一个选项默认打开ItkVtkGlue模块。您也可以在curses GUI中执行此操作,而无需传递此选项:按t获取高级选项,使用箭头键向下滚动到Module_ItkVtkGlue,然后使用回车键切换此选项ON。最后,像往常一样配置、配置、配置和生成,然后:

$ make
$ sudo make install

ITK Wiki上的许多示例都使用VtkGlue。您可以通过查看其中任何一个来了解如何格式化CMakeLists.txt文件。