1
我的問題類似於Emre's question。我正在嘗試構建itkImageToVTKImageFilter example from the wiki。我希望將它用於我計劃應用於圖像的高斯低通濾波器。我下載itkvtkglue後,將其解壓縮到一個文件夾,然後按配置CMake的,我收到以下錯誤信息:配置itkvtkglue時CMake出錯
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:驅動器)。該錯誤表明Cmake正在尋找G:驅動器,原因不明。
這裏是對的CMakeLists.txt 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,所以讓我知道如果我需要提供更多的信息。
您在該位置構建二進制文件後,是否將VTK從G:/ VTK移出? – drescherjm 2013-05-08 13:08:31
@drescherjm我真的不確定,但當時我可能會連接多個外部硬盤驅動器,這就是爲什麼字母會轉移。源代碼位於C:/。在構建之後會有一種重定向的方法嗎? – poliu2s 2013-05-08 23:37:49
將cmake-gui中的VTK_DIR設置爲您構建vtk的文件夾。這不是源文件夾,而是生成文件夾。 – drescherjm 2013-05-09 11:16:24