vtk has no attribute 'vtk Volume Ray Cast Composite Function'

Hi. I got an error module ‘vtk’ has no attribute ‘vtkVolumeRayCastCompositeFunction’. Can you help me to resolve this? Thanks

Either your VTK is built without volume rendering support or your VTK is newer than 8.1.0 which removed the deprecated class.

1 Like

Thanks, Ben. I have VTK 9.2, So what do you prefer to work with, 8.1 or 9.2??
And what class is replaced by “vtkVolumeRayCastCompositeFunction” in 9.8?

I’m not quite sure what replaces it. @sankhesh

But the latest release is recommended.

@RoseSuiteMadule The different composite functions like vtkVolumeRayCastCompositeFunction, vtkVolumeRayCastMIPFunction, etc. from VTK < 8 were consolidated into the BlendMode flag on the vtkGPUVolumeRayCastMapper. So for composite blending, call mapper->SetBlendModeToComposte(), for maximum intensity, SetBlendModeToMaximumIntensity(), and so on.