# Volume Rendering Cropping "ON"

**URL:** <https://discourse.slicer.org/t/volume-rendering-cropping-on/21353>\
**Category:** Support\
**Created:** [January 7, 2022, 2:44pm UTC](https://discourse.slicer.org/t/volume-rendering-cropping-on/21353 "2022-01-07T14:44:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fluvio\_Lobo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fluvio_lobo/32/81262_2.png) [@Fluvio\_Lobo](https://discourse.slicer.org/u/Fluvio_Lobo)\
**Post date:** [January 7, 2022, 2:44pm UTC](https://discourse.slicer.org/t/volume-rendering-cropping-on/21353/1 "2022-01-07T14:44:08Z")

</div>

I was implementing the volume rendering module using python and I could not get the ROI volume cropping as shown [here](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#limit-volume-rendering-to-a-specific-region-of-the-volume);

```auto
displayNode.SetAndObserveROINodeID(roiNode.GetID())
displayNode.CroppingEnabled = True

```

But I did get it working using this version of the call;

```auto
roiNode.GetDisplayNode().SetVisibility(True)
displayNode.SetAndObserveROINodeID( roiNode.GetID() )
displayNode.CroppingEnabledOn()

```

I also had to set the ROI to visible for these to apply.

Perhaps the script repo. is outdated?  
I saw a few posts on volume rendering but no questions on enabling cropping, so I thought I would share.
