example: smartvolumemapper

Hello,

I’m doing this example: https://lorensen.github.io/VTKExamples/site/Cxx/VolumeRendering/SmartVolumeMapper/

however while trying to configure it on CMAKE this is the error I received:

how can I resolve this?

Thank you

Hi Tracy,

You’ll have to reconfigure/regenerate the VTK solution using a tool like CMake-GUI to add the modules that contains vtkImagingHybrid and vtkRenderingVolumeOpenGL2.

In CMake-GUI, use the search bar and ensure that “VTK_Group_Imaging” is checked (I don’t know if this is sufficient, check “Module_vtkImagingOpenGL2” too) and ensure that VTK_RENDERING_BACKEND 's value is set to OpenGL2.

then press “Configure” and “Generate”, don’t forget to specify the right build path in “Where to build the binaries”.

Rebuild VTK using Visual Studio, it shouldn’t take years I think. Then rebuild your example (under Windows, it’s always better to use CMake-Gui to build the examples).

Hope this helps !

Thanks for the response! After reconfigurating VTK itself to include those modules, the example was able to configure and generate properly.

However after rebuilding the example, and attempting to open executable via the command prompt i get the following errors:
image
image
image
image

In Visual Studio project parameters, you’ll have to indicate the path of VTK DLLs, I forgot how to do this (I code under Linux sorry), IIRC it’s in “debugging parameters” or something like this (google : visual studio DLL environement, maybe this can help https://stackoverflow.com/questions/2119539/how-do-i-set-the-path-to-a-dll-file-in-visual-studio).

Outside Visual Studio, add the VTK DLL directory (the output of VTK build in fact) to the environment variable $PATH so the programs that need them will know where to find them.

Maybe is better to compile VTK as not shared and use from VTK libraries, without DLLs.
I meant:

if you let unchecked that option you will not need those DLLs.