gpt4 book ai didi

c++ - ItkVtkGlue 问题

转载 作者:搜寻专家 更新时间:2023-10-31 01:02:45 26 4
gpt4 key购买 nike

我正在尝试运行这个例子: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 系统上,安装了 VTK,有一个 srcbin 文件夹用于 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com