2014-10-29 23 views
1

我試圖運行這個例子:http://www.itk.org/Wiki/ITK/Examples/IO/ImageFileReader問題與ItkVtkGlue

但是,讓我在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」?我可以在哪裏下載它?而且,我應該怎麼做才能將其與該計劃結合使用?

回答

2

VtkGlueITK中的一個模塊,默認情況下不會生成。當您構建ITK時,您需要使用cmake啓用該模塊。另外,在你這樣做之前,你需要下載並編譯VTK(這與建築物ITK非常相似)。假設你是一個類Unix系統上,已經安裝VTK,有一個srcbin文件夾ITK,並坐在bin文件夾,我會做:

$ ccmake ../src -DModule_ItkVtkGlue=ON 

的最後一個選項打開的ItkVtkGlue模塊默認。您也可以在curses GUI中執行此操作,而不通過此選項:按t以獲取高級選項,使用箭頭鍵向下滾動至Module_ItkVtkGlue,然後使用回車鍵切換此選項ON。最後,配置,配置,配置,生成像往常一樣,然後:

$ make 
$ sudo make install 

許多examples on the ITK Wiki使用VtkGlue的。您可以通過查看任何這些文件來了解如何格式化您的CMakeLists.txt文件。