# Instantiated AnnotationROI node positioning

**URL:** <https://discourse.slicer.org/t/instantiated-annotationroi-node-positioning/10340>\
**Category:** Development\
**Created:** [February 18, 2020, 5:32pm UTC](https://discourse.slicer.org/t/instantiated-annotationroi-node-positioning/10340 "2020-02-18T17:32:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adelmo](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@adelmo](https://discourse.slicer.org/u/adelmo)\
**Post date:** [February 18, 2020, 5:32pm UTC](https://discourse.slicer.org/t/instantiated-annotationroi-node-positioning/10340/1 "2020-02-18T17:32:40Z")

</div>

Hello,

I would like to instantiate, via Python code, an AnnotationROI node and I would like to automatically position the generated bounding box to enclose exactly a volume node.  
I am sure it is a super simple operation but I can’t manage to do it using the SetXYZ and the SetRadiusXYZ methods.  
Could somebody help me?

Thank you,  
AD

---

<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:** [February 18, 2020, 5:44pm UTC](https://discourse.slicer.org/t/instantiated-annotationroi-node-positioning/10340/2 "2020-02-18T17:44:07Z")

</div>

You can use `slicer.modules.cropvolume.logic().FitROIToInputVolume()` method to fit a ROI node to a volume.
