# Slice cropped as volume

**URL:** <https://discourse.slicer.org/t/slice-cropped-as-volume/12194>\
**Category:** Development\
**Created:** [June 24, 2020, 9:40am UTC](https://discourse.slicer.org/t/slice-cropped-as-volume/12194 "2020-06-24T09:40:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ada](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ada/32/15944_2.png) [@ada](https://discourse.slicer.org/u/ada)\
**Post date:** [June 24, 2020, 9:40am UTC](https://discourse.slicer.org/t/slice-cropped-as-volume/12194/1 "2020-06-24T09:40:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 25, 2020, 9:22pm UTC](https://discourse.slicer.org/t/slice-cropped-as-volume/12194/2 "2020-06-25T21:22:02Z")

</div>

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