Import 2017-06-07 23:51:09: master 123de6d3

Author Committer Branch Timestamp Parent
msmolens msmolens master 2016-09-26 09:23:19 master fdb84b3a
Changeset

BUG: Force image slice actors to be treated as opaque

This commit fixes rendering of image slices in the 3D view with the VTK
OpenGL2 backend.

The OpenGL2 backend performs more thorough checks than the old backend
when determining whether to treat an actor as opaque or translucent.
Now, in certain cases, VTK determines that the slice texture contains
transparent elements and therefore should treat the actor as
translucent, i.e. rendered without writing to the depth buffer. [1][2]

This commit overrides that transparency-detection logic to force the
image slice actors to be treated as opaque.

Fixes http://www.na-mic.org/Bug/view.php?id=4253

[1] https://github.com/Kitware/VTK/blob/bace0bcf81dd6e8d334b78add2d77da37d71398f/Rendering/Core/vtkActor.cxx#L131-L133

[2] https://github.com/Kitware/VTK/blob/bace0bcf81dd6e8d334b78add2d77da37d71398f/Rendering/OpenGL2/vtkOpenGLActor.cxx#L59

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25394 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/MRML/DisplayableManager/vtkMRMLModelDisplayableManager.cxx Diff File