1

I am a begineer in VTK library and I have a problem with run this project:

http://web.mit.edu/16.225/dv/VTK/Examples/ImageProcessing/Cxx/

In CMakeLists there is 'if' condition:

IF(NOT VTK_USE_RENDERING) MESSAGE(FATAL_ERROR "Example ${PROJECT_NAME} requires VTK_USE_RENDERING.") ENDIF(NOT VTK_USE_RENDERING)

but during the configuration in CMake error apears:

CMake Error at CMakeLists.txt:6 (MESSAGE): Example ImageProcessing requires VTK_USE_RENDERING.

Proble is that there is no VTK_USE_RENDERING entry in CMake. So how I can solve this problem? Should I use QT?

I would be grateful for any response!

Thank you in advance!

8
  • It means when you compiled VTK from source you should have enabled VTK_USE_RENDERING . Reconfigure vtk with cmake-gui enabling VTK_USE_RENDERING then generate then rebuild vtk. Commented May 7, 2015 at 12:30
  • Thank you for reply. It is quite obvious but there is no VTK_USE_RENDERING entry in CMake 3.2.2 version. So how to enable this? Commented May 7, 2015 at 13:32
  • You will have to recompile vtk itself not your application. Did you look for VTK_USE_RENDERING when you configured vtk with cmake? Commented May 7, 2015 at 13:34
  • Should I use QT? I say probably yes but it has nothing to do with the error. Commented May 7, 2015 at 13:35
  • drescherjm - There is no VTK_USE_RENDERING like in attached photo from web: cs.uakron.edu/~xiao/visualization/… Maybe I should use earlier version of CMake [not 3.2.2] but I am afraid that it may cause another incompatibility errors. So how to do it in 3.2.2? I added VTK_USE_RENDERING entry manualy and set it to "TRUE" value but it doesnt't work - another errors appers. Commented May 7, 2015 at 13:41

1 Answer 1

1

Problem solved.

VTK greater or equal than 6.0 version should use this CMakeFile.txt :

cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR) project(ImageProcessing) find_package(VTK REQUIRED NO_MODULE) include(${VTK_USE_FILE}) add_executable(ImageSlicing ImageSlicing.cxx) target_link_libraries(ImageSlicing ${VTK_LIBRARIES}) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.