Question

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!

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.

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

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top