In python you may have to explicitly import like this:
from vtkmodules.vtkRenderingVolumeOpenGL2 import vtkOpenGLGPUVolumeRayCastMapper
Also I think AddShaderReplacement(..) has to be called on the volumeprops and not the mapper itself.
In python you may have to explicitly import like this:
from vtkmodules.vtkRenderingVolumeOpenGL2 import vtkOpenGLGPUVolumeRayCastMapper
Also I think AddShaderReplacement(..) has to be called on the volumeprops and not the mapper itself.