I am trying to iterate through different masks using vtkGPUVolumeRayCastMapper->SetMaskInput() but its only working with the first iteration. The second time I call the function with a different maskImage does not produce any visual effect. I am calling Update() and Modified() but that doesnt seem to work.
vtkGPUVolumeRayCastMapper::SafeDownCast(volumeMapper)->SetMaskInput(maskImage.GetPointer());
vtkGPUVolumeRayCastMapper::SafeDownCast(volumeMapper)->SetMaskTypeToBinary();
vtkGPUVolumeRayCastMapper::SafeDownCast(volumeMapper)->Update();
vtkGPUVolumeRayCastMapper::SafeDownCast(volumeMapper)->Modified();