Skip to main content

Rocky PrePost scripting 2025 R1

RARegionsOfInterestCollection

Last update: 17.07.2025

class RARegionsOfInterestCollection

Rocky PrePost Scripting wrapper for the collection of Regions of Interest in a project.

This wrapper corresponds to the “Regions Of Interest” item in the project’s data tree. To retrieve the RARegionsOfInterestCollection from a RAStudy, use:

> roi_collection = study.GetRegionsOfInterestCollection()

Instances of the RARegionsOfInterestCollection class act as regular Python lists, and can be iterated on, accessed via index, etc:

Methods:

Name Description
AddCube([name]) Add a new Cube.
AddCylinder([name]) Add a new Cylinder.
Clear() Remove all items from the list.
New() Add a new item.
Remove(item) Remove an item from the list.

AddCube(name: str | None = None)

Add a new Cube. Returns the newly created item.

AddCylinder(name: str | None = None)

Add a new Cylinder. Returns the newly created item.

Clear()

Remove all items from the list.

New()

Add a new item. Returns the newly created item.

Remove(item: T)

Remove an item from the list.

Connect with Ansys