pyrot.ro_interface#

Interface for communicating with the RayStation API.

Functions#

load_current_patient()

Load the current patient associated with the active examination.

load_current_structureset()

Load the current StructureSet associated with the active examination.

load_eyemodel(structure_set, eyemodelnr)

Load geometry generators and eye model parameters from a structure set.

load_pois(structure_set[, poi_type, poi_name_contains])

Load POIs (Points of Interest) from a structure set, optionally filtering by type or name substring.

load_rois(structure_set[, roi_type, roi_name_contains])

Load ROIs (Regions of Interest) from a structure set, optionally filtering by type or name substring.

update_eye_model(eye_model_generators, new_values)

Update the eye model parameters with new values.

Module Contents#

pyrot.ro_interface.load_current_patient()#

Load the current patient associated with the active examination.

Returns#

Patient

The patient object corresponding to the current case

pyrot.ro_interface.load_current_structureset()#

Load the current StructureSet associated with the active examination.

Returns#

StructureSet

The StructureSet object corresponding to the current examination.

pyrot.ro_interface.load_eyemodel(structure_set, eyemodelnr)#

Load geometry generators and eye model parameters from a structure set.

Parameters#

structure_setobject

The structure set containing geometry generators and eye model parameters.

eyemodelnrint

The index of the eye model to load from the structure set.

Returns#

geometry_generatorsobject

The geometry generators for the specified eye model.

eye_model_parametersobject

The eye model parameters for the specified eye model.

pyrot.ro_interface.load_pois(structure_set, poi_type: str | None = None, poi_name_contains: str | None = None)#

Load POIs (Points of Interest) from a structure set, optionally filtering by type or name substring.

Parameters#

structure_setobject

The structure set containing POI geometries.

poi_typestr, optional

The type of POI to filter by. If provided, only POIs of this type are returned.

poi_name_containsstr, optional

A substring to search for in POI names. If provided, only POIs whose names contain this substring are returned.

Returns#

list

A list of POI geometries matching the specified criteria.

pyrot.ro_interface.load_rois(structure_set, roi_type: str | None = None, roi_name_contains: str | None = None)#

Load ROIs (Regions of Interest) from a structure set, optionally filtering by type or name substring.

Parameters#

structure_setobject

The structure set containing ROI geometries. Must have a RoiGeometries attribute.

roi_typestr, optional

The type of ROI to filter by. If provided, only ROIs of this type are returned.

roi_name_containsstr, optional

A substring to filter ROI names. If provided, only ROIs whose names contain this substring are returned.

Returns#

list

A list of ROI geometries matching the specified filters.

pyrot.ro_interface.update_eye_model(eye_model_generators, new_values)#

Update the eye model parameters with new values.

Parameters#

eye_model_generatorsobject

Object providing access to eye model parameter editing functionality.

new_valuesdict

Dictionary containing the new parameter values to update the eye model with.