Module vtkRenderingNone not built even with VTK_RENDERING_BACKEND=None

Hi.

When trying to compile a minimal VTK to use with ITKVtkGlue=ON (https://github.com/romangrothausmann/ITK-VTK_CLIs/blob/0add37a5d4a91eb7bbafdf0b66096f83a755958f/Dockerfile#L50), ITK cmake stops with:

Requested modules not available:

    vtkRenderingNone

see https://gitlab.com/romangrothausmann/itk-vtk-clis/-/jobs/181739680

Following
https://vtk.org/pipermail/vtkusers/2015-October/092615.html
it seems that VTK has no vtkRenderingNone (find lists nothing
see, Step 6/10 : RUN find /vtk /VTK_build /opt/vtk -name ‘vtkRenderingNone’)
even though VTK_RENDERING_BACKEND=None should enable that: https://gitlab.kitware.com/vtk/vtk/blob/v7.1.1/CMake/vtkBackends.cmake#L59-65 for VTK-7.

What could be the reason that the module vtkRenderingNone is not build with this DF?
Instruction for VTK-8 would be welcome too.

Thanks for any help or hints.

What version of VTK is this using (I guess 8.2 based on the error message, but would like to be sure)? VTK_RENDERING_BACKEND is gone on master at least. This might be something to fix for 8.2.1. @Dave_DeMarle

Thanks @ben.boeckel for taking a look.
Currently VTK-7.1.1 and ITK-4.12.2 is used. Once, because I could not find VTK_RENDERING_BACKEND in master (at least CMake/vtkBackends.cmake was moved) and also because SplineDrivenImageSlicer is at most usable with VTK-8.0.1 so far (https://github.com/djelouze/SplineDrivenImageSlicer/pull/5).
So, if a minimal VTK for ITKVtkGlue is only possible with VTK-8.2, I would start adjusting SplineDrivenImageSlicer for VTK-8.2.

Would there be any interest in including SplineDrivenImageSlicer in VTK such that it is kept up-to-date with new releases?

7.1.1

I’d expect VTK_RENDERING_BACKEND to work here. However, note that if it is None, no rendering stuff is supposed to be requested (not even vtkRendering${VTK_RENDERING_BACKEND}. I think something else is wrong here.

Would there be any interest in including SplineDrivenImageSlicer in VTK such that it is kept up-to-date with new releases?

If it is actively maintained, I don’t see any reason why not. I’m not sure who is best to review such code for inclusion into VTK though.

no rendering stuff is supposed to be requested

But isn’t https://gitlab.kitware.com/vtk/vtk/blob/v7.1.1/CMake/vtkBackends.cmake#L59-65 enabling e.g. module vtkRenderingNone (which ITK then tries to find)?

It makes dummy modules. I don’t know if those get exported into the build/install trees.

I don’t know if those get exported into the build/install trees.

Since find does not even find these dummy modules in the build tree, I guess they do not even get exported into the build tree.
Is there a workaround to get those installed?

@thewtex @dzenanz If those are not meant for install, would it be more appropriate to remove the dependency of the ITKVtkGlue?
At least, the absence of an OpenGL lib seems not to matter during execution, because the execution of the ITK-VIT_CLIs from the final image works without any installation of an OpenGL lib.
Basically, so far I just need to install OpenGL to satisfy the expectations of ITK on VTK for the ITKVtkGlue.
(In contrast, I do need to provide an OpenGL lib in the final DI for e.g. my VTK-CLIs, either from the distro or from source.)

Is there a workaround to get those installed?

Well, they’re not really modules. I don’t know why they’re there, but probably just for some internal reason related to expecting vtkRendering${VTK_RENDERING_BACKEND} to be something (comments would have been nice). None modules certainly should not be “dependencies” of anything since they’re not real. If something really needs the None “backend” for some reason, just assert after find_package(VTK) that VTK_RENDERING_BACKEND STREQUAL "None".

1 Like

ITKVtkGlue has an image conversion class and a rendering class. Of course, image conversion does not require OpenGL, but I think that rendering class does.

1 Like

We could add a CMake option to ITKVtkGlue, which defaults to OFF if VTK_RENDERING_BACKEND is None. Then only add dependencies that require rendering when it is available. The most commonly used classes are the filters that bridge ITK and VTK pipelines, but they do not require rendering support.

1 Like

ITKVtkGlue is in need of maintenance. I had trouble to get its rendering component to work in recent years. If anyone wants to undertake that task, I can provide more information.

Many thanks for all your feedback.
As I understand @ben.boeckel there is no workaround that could be used to satisfy the expectations of the ITKVtkGlue config, so the only way would be to adjust the config as @thewtex suggested. I fear, I won’t find the time for a proper maintenance check of ITKVtkGlue in the near future, but I could open an issue for that for ITK-5 if wanted.

1 Like

Following up, ITKVtkGlue in ITK 5.0 RC 2 will have support for connecting pipelines when VTK_RENDERING_BACKEND=None.

ITK 5.0 RC 2 also builds against build system changes from recent VTK Git master.

1 Like