Showing Multiple Scalar Volume Node Slices in 3D View


I am relatively new to Slicer and am trying to implement code that will display multiple scalar volume nodes’ slices in the 3D view. My initial thought was to replicate what clicking the eye icon in the Data Module subject hierarchy does; however, even this only allows one vtkMRMLScalarVolumeNode’s slices to be shown at a time in the 3D view. I think this has something to do with the slice views as when I change the layout to more windows and set particular volumes to particular slice views, I can achieve the effect I want as pictured below (i.e. I can see axial slices from both the MRI head sample volume and the added volume at the same time in the 3D view).

How can I achieve this through Python? Do I need to make 2D slice views of both volumes and then display those rather than trying to display the volume in its entirety? If so, how can I do this?