问题描述
我的问题类似于 。我试图构建的itkImageToVTKImageFilter示例。我希望将其用于我计划应用于图像的高斯低通滤波器。我下载itkvtkglue,解压到一个文件夹,然后在Cmake中配置,我收到以下错误信息:
My question is similar to Emre's question. I am trying to build the itkImageToVTKImageFilter example from the wiki. I hope to use it for a Gaussian low pass filter that I plan to apply to an image. After I download the itkvtkglue, extract it to a folder, and then press configure in Cmake, I receive the following error message:
Check for working C compiler using: Visual Studio 9 2008
Check for working C compiler using: Visual Studio 9 2008 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 9 2008
Check for working CXX compiler using: Visual Studio 9 2008 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
CMake Error at F:/ITK/ItkVtkGlue/bin/UseItkVtkGlue.cmake:10 (include):
include could not find load file:
G:/VTK/UseVTK.cmake
Call Stack (most recent call first):
CMakeLists.txt:13 (include)
Configuring incomplete, errors occurred!
我不知道是什么原因导致错误,但我怀疑它与我的Windows系统路径。但是,它也似乎指向正确的文件夹(PATH转到F:驱动器)。
I was not sure what could be causing the error but I suspected that it had something to do with my Windows system path. However, it also seems to be pointing to the correct folder (PATH goes to F: drive). The error indicates that Cmake is looking within G: drive for some unknown reason.
这里是itkImageToVTKImageFilter的CMakeLists.txt:
Here is the CMakeLists.txt for itkImageToVTKImageFilter:
cmake_minimum_required(VERSION 2.8)
project(DiscreteGaussianImageFilter)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
if (ITKVtkGlue_LOADED)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
else()
find_package(ItkVtkGlue REQUIRED)
include(${ItkVtkGlue_USE_FILE})
set(Glue ItkVtkGlue)
endif()
add_executable(DiscreteGaussianImageFilter MACOSX_BUNDLE DiscreteGaussianImageFilter.cxx)
target_link_libraries(DiscreteGaussianImageFilter
${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES})
一个很常见的问题,但我不确定如何纠正它。任何帮助将非常感谢!我还是非常新的Stackoverflow,所以让我知道,如果我需要提供更多的信息。
I read that this was a very common problem but I am unsure how to correct it. Any help would be greatly appreciated! I am still very new to Stackoverflow so let me know if I need to provide more info.
推荐答案
我需要重建ITK与ITK_BUILD_ALL_MODULES,以及检查我以前没有做的Module_ITKVtkGlue。
Works now. I needed to rebuild ITK with ITK_BUILD_ALL_MODULES on as well as checking the Module_ITKVtkGlue which I didn't do before.
这篇关于配置itkvtkglue时出现CMake错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!