# Module vtkRenderingNone not built even with VTK\_RENDERING\_BACKEND=None

**URL:** https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585
**Category:** Development
**Created:** [March 21, 2019, 2:43pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585 "2019-03-21T14:43:12Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![romangrothausmann](https://discourse.vtk.org/user_avatar/discourse.vtk.org/romangrothausmann/32/57_2.png) [@romangrothausmann](https://discourse.vtk.org/u/romangrothausmann)
#### Post date: [March 21, 2019, 2:43pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/1 "2019-03-21T14:43:12Z")

</div>

Hi.

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

```auto
Requested modules not available:

    vtkRenderingNone

```

see [https://gitlab.com/romangrothausmann/itk-vtk-clis/-/jobs/181739680](https://gitlab.com/romangrothausmann/itk-vtk-clis/-/jobs/181739680)

Following  
[https://vtk.org/pipermail/vtkusers/2015-October/092615.html](https://vtk.org/pipermail/vtkusers/2015-October/092615.html)  
it seems that VTK has no `vtkRenderingNone` ([find](https://github.com/romangrothausmann/ITK-VTK_CLIs/blob/0add37a5d4a91eb7bbafdf0b66096f83a755958f/Dockerfile#L37) lists nothing  
see, [Step 6/10 : RUN find /vtk /VTK\_build /opt/vtk -name ‘_vtkRenderingNone_’](https://gitlab.com/romangrothausmann/itk-vtk-clis/-/jobs/181739680/raw))  
even though `VTK_RENDERING_BACKEND=None` should enable that: [https://gitlab.kitware.com/vtk/vtk/blob/v7.1.1/CMake/vtkBackends.cmake#L59-65](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](https://github.com/romangrothausmann/ITK-VTK_CLIs/blob/0add37a5d4a91eb7bbafdf0b66096f83a755958f/Dockerfile)?  
Instruction for VTK-8 would be welcome too.

Thanks for any help or hints.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [March 21, 2019, 8:31pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/2 "2019-03-21T20:31:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![romangrothausmann](https://discourse.vtk.org/user_avatar/discourse.vtk.org/romangrothausmann/32/57_2.png) [@romangrothausmann](https://discourse.vtk.org/u/romangrothausmann)
#### Post date: [March 22, 2019, 7:38am UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/3 "2019-03-22T07:38:49Z")

</div>

Thanks @ben.boeckel for taking a look.  
Currently [VTK-7.1.1](https://github.com/romangrothausmann/ITK-VTK_CLIs/blob/0add37a5d4a91eb7bbafdf0b66096f83a755958f/Dockerfile#L19) and [ITK-4.12.2](https://github.com/romangrothausmann/ITK-VTK_CLIs/blob/0add37a5d4a91eb7bbafdf0b66096f83a755958f/Dockerfile#L40) 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](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?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [March 25, 2019, 12:27pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/4 "2019-03-25T12:27:00Z")

</div>

> 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.

---

<div class="post-metadata">

### Author: ![romangrothausmann](https://discourse.vtk.org/user_avatar/discourse.vtk.org/romangrothausmann/32/57_2.png) [@romangrothausmann](https://discourse.vtk.org/u/romangrothausmann)
#### Post date: [March 25, 2019, 1:29pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/5 "2019-03-25T13:29:50Z")

</div>

> _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](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)?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [March 25, 2019, 5:01pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/6 "2019-03-25T17:01:28Z")

</div>

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

---

<div class="post-metadata">

### Author: ![romangrothausmann](https://discourse.vtk.org/user_avatar/discourse.vtk.org/romangrothausmann/32/57_2.png) [@romangrothausmann](https://discourse.vtk.org/u/romangrothausmann)
#### Post date: [March 26, 2019, 8:38am UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/7 "2019-03-26T08:38:00Z")

</div>

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

Since [find](https://github.com/romangrothausmann/ITK-VTK_CLIs/blob/b4dfe7d68dd7022e66d5d1ea686715334631ef46/Dockerfile#L37) 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](https://github.com/InsightSoftwareConsortium/ITK/blob/v4.13.2/Modules/Bridge/VtkGlue/CMakeLists.txt#L39)?  
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](https://github.com/romangrothausmann/ITK-VTK_CLIs/blob/b4dfe7d68dd7022e66d5d1ea686715334631ef46/Dockerfile#L70-L84) image [works](https://gitlab.com/romangrothausmann/itk-vtk-clis/-/jobs/182258439) 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](https://github.com/romangrothausmann/VTK-CLIs/blob/574791752b00f766584211a57903c4a935349bb1/Dockerfile#L67) or [from source](https://github.com/romangrothausmann/VTK-CLIs/blob/a4221554a7daeb878f7aa66083b4a885b81fe543/Dockerfile#L93).)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [March 26, 2019, 2:19pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/8 "2019-03-26T14:19:58Z")

</div>

> 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"`.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dzenanz/32/212_2.png) [@dzenanz](https://discourse.vtk.org/u/dzenanz)
#### Post date: [March 26, 2019, 2:32pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/9 "2019-03-26T14:32:32Z")

</div>

> [@romangrothausmann](#):
>
> I just need to install OpenGL to satisfy the expectations of ITK on VTK for the ITKVtkGlue.

`ITKVtkGlue` has an [image conversion](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h) class and a [rendering](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Bridge/VtkGlue/include/itkViewImage.h) class. Of course, image conversion does not require OpenGL, but I think that rendering class does.

---

<div class="post-metadata">

### Author: ![thewtex](https://discourse.vtk.org/user_avatar/discourse.vtk.org/thewtex/32/55_2.png) [@thewtex](https://discourse.vtk.org/u/thewtex)
#### Post date: [March 26, 2019, 5:59pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/10 "2019-03-26T17:59:56Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dzenanz/32/212_2.png) [@dzenanz](https://discourse.vtk.org/u/dzenanz)
#### Post date: [March 26, 2019, 6:08pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/11 "2019-03-26T18:08:37Z")

</div>

`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.

---

<div class="post-metadata">

### Author: ![romangrothausmann](https://discourse.vtk.org/user_avatar/discourse.vtk.org/romangrothausmann/32/57_2.png) [@romangrothausmann](https://discourse.vtk.org/u/romangrothausmann)
#### Post date: [April 2, 2019, 10:07am UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/12 "2019-04-02T10:07:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![thewtex](https://discourse.vtk.org/user_avatar/discourse.vtk.org/thewtex/32/55_2.png) [@thewtex](https://discourse.vtk.org/u/thewtex)
#### Post date: [April 25, 2019, 5:42pm UTC](https://discourse.vtk.org/t/module-vtkrenderingnone-not-built-even-with-vtk-rendering-backend-none/585/13 "2019-04-25T17:42:19Z")

</div>

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`.
