# Python: Programmatically set the Dimensions for ROI

**URL:** <https://discourse.slicer.org/t/python-programmatically-set-the-dimensions-for-roi/18817>\
**Category:** Development\
**Tags:** python, cropping\
**Created:** [July 20, 2021, 11:42am UTC](https://discourse.slicer.org/t/python-programmatically-set-the-dimensions-for-roi/18817 "2021-07-20T11:42:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [August 3, 2021, 5:42pm UTC](https://discourse.slicer.org/t/python-programmatically-set-the-dimensions-for-roi/18817/2 "2021-08-03T17:42:13Z")

</div>

You can set the Annotation ROI center and radius as shown [here](https://discourse.slicer.org/t/how-to-get-a-roi-to-fit-volume-in-the-volume-rendering-module-with-python/18793/7). I would recommend to switch to the Markups ROI node, as it is more powerful (e.g., it can represent an ROI with rotated axes) and it will completely replace Annotation ROIs in a year or two.

---

_[View the full topic](https://discourse.slicer.org/t/python-programmatically-set-the-dimensions-for-roi/18817)._
