Skip to content

VolumeOpenGL2: Use alpha to calculate RGBA lighting

Jean-Christophe Fillion-Robin requested to merge jcfr/vtk:fix-rgba-gpu-vr into master

Implements the feature and fixes discussed in this thread:

https://discourse.slicer.org/t/volume-rendering-colorized-with-segmentation/26689/6

Basically allows RGBA volumes to be shaded according to their alpha component so that something like a CT or microCT can define an RGB value at spatial regions, while getting opacity and gradient information from the alpha channel (e.g. the Hounsfield unit).

Also always uses the 0 channel for defining the lighting parameters. This part is WIP since it may be more appropriate to set the alpha channel lighting parameters in this scenario. Currently, at least in 3D Slicer, only the 0 component's lighting parameters are being set, so they are being used here.

Merge request reports