Errors on a very simple ITK+VTK+Qt program

I am new to ITK/VTK programming.
I have written a very simple program using ITK,VTK and Qt, inspired from VTK examples (mainly Examples/GUI/Qt/FourPaneViewer). It simply allows to visualize a 3D image, loaded via ITK.

I would like to be able to load the image via an “open file” menu entry for example and thus build/show the VTK/Qt machinery without having an image yet.
But if I do not load an image at construction, I get the errors:

ERROR: In /home/mansenca/tools/VTK-8.2.0/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, line 709
vtkCompositeDataPipeline (0x55f5b43cfc50): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x55f5b4361d40) has 0 connections but is not optional.

I have a repository that reproduces my problem here:

If I execute this program without an image as parameter, I get these errors.
If I pass a valid 3D image as parameter, I don’t get these errors.

Tested with:
Ubuntu 18.04.3
gcc 7.4.0
cmake 3.13.4
InsightToolkit 5.0.1
VTK 8.2.0
Qt 5.9.5

What’s wrong with my code ?

I have found several (very old) threads on the old mailing list with the same problems, but they do not give the solution.