Instantiated AnnotationROI node positioning


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,

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

1 Like