简体   繁体   English

配置itkvtkglue时CMake错误

[英]CMake error when configuring itkvtkglue

My question is similar to Emre's question . 我的问题类似于埃姆雷的问题 I am trying to build the itkImageToVTKImageFilter example from the wiki . 我正在尝试从wiki构建itkImageToVTKImageFilter示例 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: 下载itkvtkglue,将其解压缩到一个文件夹后,然后在Cmake中按configure,我收到以下错误消息:

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!

I was not sure what could be causing the error but I suspected that it had something to do with my Windows system path. 我不确定是什么原因导致该错误,但我怀疑这与Windows系统路径有关。 However, it also seems to be pointing to the correct folder (PATH goes to F: drive). 但是,它似乎也指向正确的文件夹(PATH转到F:驱动器)。 The error indicates that Cmake is looking within G: drive for some unknown reason. 该错误表明Cmake正在出于某些未知原因在G:驱动器中查找。

Here is the CMakeLists.txt for itkImageToVTKImageFilter: 这是itkImageToVTKImageFilter的CMakeLists.txt:

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})

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. 我对Stackoverflow还是很陌生,所以请告诉我是否需要提供更多信息。

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. 我需要用ITK_BUILD_ALL_MODULES重建ITK并检查以前没有做过的Module_ITKVtkGlue。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM