View Issue Details

IDProjectCategoryView StatusLast Update
0004598Slicer4Core: Renderingpublic2018-09-12 23:02
Reporterjcfr Assigned Tojcfr  
PriorityurgentSeverityblockReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version 
Target VersionSlicer 4.9.0Fixed in VersionSlicer 4.9.0 
Summary0004598: VTK OpenGL2 Backend: Enabling Volume Rendering module breaks viewers

After updating to the latest VTK (584314a736 from August 10), switching to the Volume Rendering module turns all viewers into gray making them unusable. This also happens after cherry-picking the changes associated with MR 0004568

TagsNo tags attached.




2018-08-13 10:03




2018-08-13 10:04

administrator   ~0015960

It shouldn't be related to the reported issue.

Indeed, while trying to identify the fix introducing the regression, I can tell it was introduced before VTK/VTK@982ec1c and not by 5e629b8 (use shared noise texture and cleanup tests)



2018-08-21 03:09

administrator   ~0015974

git bisect revealed the following:

45704131ffbe9360adec747a8299312c07cfab41 is the first bad commit
commit 45704131ffbe9360adec747a8299312c07cfab41
Author: Lucas Gandel <>
Date:   Fri Jan 12 11:43:42 2018 +0100

    Improve QVTKOpenGLWidget and add QVTKOpenGLWindow class based on QOpenGLWindow

    Fixing stereo support with Qt5.
    Commit 139f787a was introducing QVTKOpenGLWidget to couple a vtkRenderWindow with a QOpenGLWidget.
    However, both QVTKOpenGLWidget and its superclass QOpenGLWidget manage a single frame buffer.

    QVTKOpenGLWindow derives the QOpenGLWindow class to benefit from an OpenGL context managing multiple frame buffers.
    It can be used as a QWidget by calling QWidget::createWindowContainer() on your QVTKOpenGLWindow instance.
    QVTKOpenGLWidget has been reimplemented to use thes QVTKOpenGLWindow directly has a widget.
    It is recommended to do so.

    The old QVTKOpenGLWidget is been moved into QVTKOpenGLSimpleWidget and should not be removed as it support being a native widget,
    wich the new implementation does not.

    There is a new QVTKOpenGLWidget::isValid() method to check that the widget is ready to render.

    It is to be noted that there is a specific implementation of
    event handling in order to work around QTBUG-61836.
    The Qt::WindowTransparentForInputFlag has no effect on Mac. Thus events
    are not being passed to the widget. We let the window grabbing all events
    and then forward them to the widget.
    We also take care for providing a method to forward back events to the
    window if events were explicitely triggered on the widget instance. This
    is the case for some paraview testing logic that should now use the provided
    testingEvent() method instead of notifying the widget with events.

    It is to be noted that, on OSX, the widget is always resized to its internal vtkRenderWindow
    size to ensure that the viewport is correct.
    This is necessary only on MacOS when HiDPI is supported. Enabling HiDPI
    has the side effect that Cocoa will start overriding any glViewport calls
    in application code. For reference, see QCocoaWindow::initialize().

    This also improve tests and examples using the QVTKOpenGLWidget


4261c9b33f good
e389382716 bad
c660228609 bad
02f949cb13 bad
98a3dea9cd bad
2e593f8b03 good
74437a9b3a good
bc362f710b good
4a20a3df63 bad
45704131ff bad


2018-08-22 00:36

administrator   ~0015975

After applying this fix addressing a crash in vtkRenderer::PickProp, and after switching to CPU rendering technique and then back to GPU render technique , the 2D and 3D viewer seems to be normal.

Worth noting that enabling/disabling surface smoothing in the volume rendering shows/hide the volume ... this is not the expected behavior.



2018-08-22 00:49

administrator   ~0015976

Updating CTK by switching all instances of QVTKOpenGLWidget with QVTKOpenGLSimpleWidget lead to the content of the application to be completely black after selecting the volume rendering module ...



2018-08-23 14:50

administrator   ~0015980

The commit causing the entire application to turn black when using only QVTKOpenGLSimpleWidget and enabling the volume rendering module is this one:

commit 1eb083a805b9ed11859d5c7851d91f2bc3d6f496
Author: Ken Martin <>
Date:   Thu Jul 12 16:31:02 2018 -0400

    use hardwareselector to perform picking

    We used to have two implementations for picking. The
    hardware selector and the PickProp code. This topic implements
    PickProp by using the selector. That way we have fewer paths
    of code to maintain.


git bisect start
git bisect good 4a20a3df63
git bisect bad f20cfc83b4

e5eb6d9a1c good
b58a17f066 bad
550f374285 good
637d4e2832 bad
d0c5c8ea10 good
ad3bca3257 bad
e853430c12 bad
d283706b50 good
200888e78d bad
1eb083a805 crash


2018-09-12 23:02

administrator   ~0015998

Fixed in r27405

Issue History

Date Modified Username Field Change
2018-08-13 10:02 jcfr New Issue
2018-08-13 10:02 jcfr Status new => assigned
2018-08-13 10:02 jcfr Assigned To => jcfr
2018-08-13 10:02 jcfr Target Version => Slicer 4.9.0
2018-08-13 10:03 jcfr File Added: slicer-vtk-584314a736-august10-volume-rendering-break-viewers.png
2018-08-13 10:04 jcfr Note Added: 0015960
2018-08-21 03:09 jcfr Note Added: 0015974
2018-08-22 00:36 jcfr Note Added: 0015975
2018-08-22 00:49 jcfr Note Added: 0015976
2018-08-22 12:22 jcfr Priority normal => urgent
2018-08-22 12:22 jcfr Severity minor => block
2018-08-23 14:50 jcfr Note Added: 0015980
2018-09-12 23:02 jcfr Status assigned => resolved
2018-09-12 23:02 jcfr Resolution open => fixed
2018-09-12 23:02 jcfr Fixed in Version => Slicer 4.9.0
2018-09-12 23:02 jcfr Note Added: 0015998