Slice cropped as volume

Hi all,

I have a 3D volume and I would like to display the ‘Red’ slice view.
In python, it is working using :
red = slicer.util.getNode(‘vtkMRMLSliceNodeRed’)
red.SetSliceVisible(1)

Nevertheless the slice is extended to the all volume FOV. How can I display the slice inside the roi node defined by the user ?

Thank you

After you cropped the volume, select the cropped volume as background in the slice view. You can use slicer.util.setSliceViewerLayers for this.