opentps.core.data.plan package
Module contents
- class Enum(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
objectCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- class ObjectivesList
Bases:
objectThis class is used to store the objectives of a plan. A plan can have multiple objectives. An objective can be a Fidelity Objective or an Exotic Objective.
- Variables:
objectivesList (Sequence[BaseFunc]) – list of all objectives (Robust and non-robust)
nonRobustObjList (Sequence[BaseFunc]) – list of non-robust objectives
robustObjList (Sequence[BaseFunc]) – list of robust objectives
targetName (str) – name of the target
targetPrescription (float) – prescription dose of the target
targetMask (ROIMask) – mask of the target
- addObjective(function: BaseFunc)
Add an Exotic Objective to the list.
- Parameters:
weight (float) – weight of the objective
obj (ExoticObjective) – objective to append
- setTarget(roiName, roiMask, prescription)
Set the targets name and prescription doses (primary + secondary).
- Parameters:
roiName (str) – name of the target
roiMask (ROIMask) – mask of the target
prescription (float) – prescription dose of the target
- class PhotonPlan(name='PhotonPlan', patient=None)
Bases:
RTPlanClass for storing the data of a single PhotonPlan. Inherits from RTPlan.
- Variables:
SAD_mm (float) – Source to axis distance in mm.
numberOfBeamlets (int) – Total number of beamlets in the plan.
numberOfSegments (int) – Total number of segments in the plan.
beamletsAngle_rad (list) – List of beamlet angles in radians.
beamSegments (list) – List of all beam segments in the plan.
beamlets (list) – List of all beamlets in the plan.
beamletMUs (np.ndarray) – Array of beamlet monitor units.
xBeamletSpacing_mm (float) – Spacing between beamlets in x direction in mm.
yBeamletSpacing_mm (float) – Spacing between beamlets in y direction in mm.
beamletsXY (np.ndarray) – Array of beamlet x,y coordinates.
cumulativeMeterset (float) – Total cumulative meterset of the plan.
beamCumulativeMetersetWeight (np.ndarray) – Array of cumulative meterset weights for each beam.
beamSegmentCumulativeMetersetWeight (np.ndarray) – Array of cumulative meterset weights for each beam segment.
numberOfFractionsPlanned (int) – Number of fractions planned for the plan.
- property beamCumulativeMetersetWeight: ndarray
- property beamSegmentCumulativeMetersetWeight: ndarray
- property beamSegments: Sequence[PlanPhotonSegment]
- property beamletMUs: ndarray
- property beamlets: Sequence[PlanPhotonSegment]
- property beamletsAngle_rad
- property beamletsXY: ndarray
- copy()
- createBeamletsFromSegments()
- createEmptyPlanWithSameMetaData()
- property cumulativeMeterset: float
- property numberOfBeamlets: int
- property numberOfFractionsPlanned: int
- property numberOfSegments
- removeBeam(beam: PlanPhotonBeam)
- simplify(threshold: float = 0.0, gantryAngleTolerance: float = 0.01)
- property xBeamletSpacing
- property xBeamletSpacing_mm
- property yBeamletSpacing
- property yBeamletSpacing_mm
- class PhotonPlanDesign
Bases:
RTPlanDesignThis class is used to store the plan design. It inherits from PatientData.
- Variables:
xBeamletSpacing_mm (float) – Spacing between beamlets in x direction in mm.
yBeamletSpacing_mm (float) – Spacing between beamlets in y direction in mm.
isocenterPosition_mm (list) – Isocenter position in mm.
ROI_cropping (bool) – Whether to crop the ROI.
robustness (RobustnessPhoton) – Robustness settings for photon plans.
robustnessEval (RobustnessEvalPhoton) – Robustness evaluation settings for photon plans.
SAD_mm (float) – Source to axis distance in mm.
scoringVoxelSpacing (list) – Voxel spacing for scoring grid in mm.
scoringGridSize (list) – Grid size for scoring grid.
- buildPlan()
Builds a plan from the plan design
- Returns:
plan
- Return type:
- createBeams(plan)
Creates the beams of the plan
- Parameters:
plan (PhotonPlan) – plan
- initializeBeams(plan)
Initializes the beams of the plan
- Parameters:
plan (RTPlan) – plan
- property scoringGridSize
- property scoringVoxelSpacing: Sequence[float]
- class PlanPhotonBeam
Bases:
objectThis class is used to store the information of a photon beam.
- Variables:
name (str) – Name of the beam.
isocenterPosition_mm (list) – Isocenter position in mm.
gantryAngle_degree (float) – Gantry angle in degree.
couchAngle_degree (float) – Couch angle in degree.
id (int) – Beam ID.
scalingFactor (float) – Scaling factor for the beam.
seriesInstanceUID (str) – Series instance UID.
beamType (str) – Type of the beam (e.g., Static, Arc).
xBeamletSpacing_mm (float) – Spacing between beamlets in x direction in mm.
yBeamletSpacing_mm (float) – Spacing between beamlets in y direction in mm.
SAD_mm (float) – Source to axis distance in mm.
- appendBeamSegment(segment: PlanPhotonSegment)
Append a segment to the list of segment.
- Parameters:
segment (PlanPhotonSegment) – segment to append
- property beamSegments: Sequence[PlanPhotonSegment]
- property beamletMUs
- property beamletsXY_mm: ndarray
- convertInPureSegments()
- copy()
- createBeamSegment()
- createBeamletsFromSegments()
- createEmptyBeamWithSameMetaData()
- isInList(list, key, angle, tolerance)
- property meterset: float
- property numberOfBeamlets: float
- property numberOfSpots: int
- removeBeamSegment(beamSegment: PlanPhotonSegment | Sequence[PlanPhotonSegment])
Remove a segment from the list of segments.
- Parameters:
beamSegment (PlanIonLayer or list of PlanPhotonSegment) – segment to remove
- reorderControlPointNumber()
- setXBeamletSpacing_mm(xSpacing)
- setYBeamletSpacing_mm(ySpacing)
- simplify(threshold: float = 0.0, gantryAngleTolerance: float = 0.01)
Simplify the segments by removing beamlets with a weight below the given threshold.
- Parameters:
threshold (float (default: 0.0)) – threshold below which spots are removed
- class PlanPhotonSegment
Bases:
objectClass for storing the segment data of a photonBeam.
- Variables:
x_jaw_mm (list of float) – List of the x jaw positions in mm
y_jaw_mm (list of float) – List of the y jaw positions in mm
Xmlc_mm (list of float) – List of the x MLC positions in mm
Ymlc_mm (list of float) – List of the y MLC positions in mm
mu (float) – Monitor units
seriesInstanceUID (str) – Series instance UID
isocenterPosition_mm (list of float) – Isocenter position in mm
gantryAngle_degree (float) – Gantry angle in degree
couchAngle_degree (float) – Couch angle in degree
beamLimitingDeviceAngle_degree (float) – Beam limiting device angle in degree
xBeamletSpacing_mm (float) – Spacing between the x beamlets in mm
yBeamletSpacing_mm (float) – Spacing between the y beamlets in mm
_beamlets (list of Beamlet) – List of beamlets
scalingFactor (float) – Scaling factor
controlPointIndex (int) – Control point index
- property Ymax: Sequence[Beamlet]
Retun MLC max position in Y direction.
- property Ymin: Sequence[Beamlet]
Retun MLC min position in Y direction.
- appendBeamlet(x, y, mu)
- appendBeamlets(matrixRepresentation)
- property area_mm
- property beamletMUs
- beamletMatrixRepresentation()
- property beamletWeights: ndarray
- property beamlets: Sequence[Beamlet]
- property beamletsXY_mm: ndarray
- copy()
- createBeamletsFromSegments()
- createEmptyBeamSegmentWithSameMetaData()
- isPure()
- property meterset: float
- removeBeamlet(beamlet: Beamlet | Sequence[Beamlet])
- removeZeroMUSpots(threshold)
- simplify(threshold: float = 0.0)
- class PlanProtonBeam
Bases:
objectThis class is used to store the information of a proton beam.
- Variables:
layers (list of PlanIonLayer) – list of layers
name (str) – name of the beam
isocenterPosition (list of float (default: [0, 0, 0])) – isocenter position of the beam
mcsquareIsocenter (list of float (default: [0, 0, 0])) – isocenter position of the beam for MCSquare
gantryAngle (float (default: 0.0)) – gantry angle of the beam
couchAngle (float (default: 0.0)) – couch angle of the beam
id (int (default: 0)) – id of the beam
rangeShifter (RangeShifter (optional)) – range shifter of the beam
seriesInstanceUID (str) – series instance UID of the beam
spotMUs (list of float) – list of spot MUs
spotIrradiationTimes (list of float) – list of spot irradiation times
spotXY (np.ndarray) – array of spot XY positions
spotTimes (np.ndarray) – array of spot times
numberSpots (int) – number of spots
meterset (float) – meterset of the beam
- appendLayer(layer: PlanProtonLayer)
Append a layer to the list of layers.
- Parameters:
layer (PlanIonLayer) – layer to append
- copy()
- createEmptyBeamWithSameMetaData()
Create an empty beam with the same metadata (gantry angle, couch angle, etc.).
- property layers: Sequence[PlanProtonLayer]
- property meterset: float
- property numberOfSpots: int
- removeLayer(layer: PlanProtonLayer | Sequence[PlanProtonLayer])
Remove a layer from the list of layers.
- Parameters:
layer (PlanIonLayer or list of PlanIonLayer) – layer to remove
- reorderLayers(order: str | Sequence[int] | None = 'decreasing')
Reorder the layers.
- Parameters:
order (str or list of int (default: ‘decreasing’)) – order of the layers. If ‘decreasing’ or ‘scanAlgo’, the layers are ordered by decreasing nominal energy. If a list of int, the layers are ordered according to the list.
- simplify(threshold: float = 0.0)
Simplify the layers by removing spots with a weight below the given threshold.
- Parameters:
threshold (float (default: 0.0)) – threshold below which spots are removed
- property spotIrradiationDurations
- property spotMUs
- property spotTimings
- property spotXY: ndarray
- class PlanProtonLayer(nominalEnergy: float = 0.0)
Bases:
objectThis class is used to store the layer of a ionBeam.
- Variables:
nominalEnergy (float (default: 0.0)) – nominal energy of the layer
spots (list of PlanIonSpot) – list of spots
spotX (np.ndarray) – x coordinates of the spots
spotY (np.ndarray) – y coordinates of the spots
spotXY (np.ndarray) – x and y coordinates of the spots
spotMUs (np.ndarray) – MUs of the spots
spotWeights (np.ndarray) – weights of the spots
spotTimings (np.ndarray) – timings of the spots
spotIrradiationDurations (np.ndarray) – irradiation durations of the spots
meterset – meterset of the layer
numberOfSpots (int) – number of spots
numberOfPaintings (int (default: 1)) – number of paintings
rangeShifterSettings (RangeShifterSettings) – range shifter settings
seriesInstanceUID (str) – series instance UID
spotsPeakPosInDcmCoords (list of np.ndarray) – peak positions of the spots in DICOM coordinates
spotsPeakPosInTargetSystem (list of np.ndarray) – peak positions of the spots in target system coordinates
- addToSpot(x: float | Sequence[float], y: float | Sequence[float], mu: float | Sequence[float], startTime: float | Sequence[float] | None = None, irradiationDuration: float | Sequence[float] | None = None)
Adds MU to a spot or multiple spots.
- Parameters:
x (float or Sequence[float]) – x coordinate of the spot(s)
y (float or Sequence[float]) – y coordinate of the spot(s)
mu (float or Sequence[float]) – MU of the spot(s)
startTime (float or Sequence[float] (optional)) – start time of the spot(s)
irradiationDuration (float or Sequence[float] (optional)) – irradiation duration of the spot(s)
- appendSpot(x: float | Sequence[float], y: float | Sequence[float], mu: float | Sequence[float], startTime: float | Sequence[float] | None = None, irradiationDuration: float | Sequence[float] | None = None)
Appends a spot or multiple spots to the layer.
- Parameters:
x (float or Sequence[float]) – x coordinate of the spot(s)
y (float or Sequence[float]) – y coordinate of the spot(s)
mu (float or Sequence[float]) – MU of the spot(s)
startTime (float or Sequence[float] (optional)) – start time of the spot(s)
irradiationDuration (float or Sequence[float] (optional)) – irradiation duration of the spot(s)
- copy()
- createEmptyLayerWithSameMetaData()
Creates an empty layer with the same metadata (e.g. range shifter settings) as the current layer.
- property meterset: float
- property numberOfSpots: int
- removeSpot(x: float | Sequence[float], y: float | Sequence[float])
Removes a spot or multiple spots from the layer.
- Parameters:
x (float or Sequence[float]) – x coordinate of the spot(s)
y (float or Sequence[float]) – y coordinate of the spot(s)
- removeZeroMUSpots(threshold)
Removes spots with a mu below a threshold.
- Parameters:
threshold (float) – the threshold below which spots are removed
- reorderSpots(order: str | Sequence[int] = 'scanAlgo')
Reorders the spots in the layer.
- Parameters:
order (str or Sequence[int]) – the way the spots are sorted. If str, the following options are available:
‘scanAlgo’: the way scanAlgo sort spots in a serpentine fashion
‘timing’: sort according to the start time of the spots
If Sequence[int], the spots a reordered according to the order of the indices
- Raises:
ValueError – if the order is not recognized:
- setSpot(x: float | Sequence[float], y: float | Sequence[float], mu: float | Sequence[float], startTime: float | Sequence[float] | None = None, irradiationDuration: float | Sequence[float] | None = None)
Sets a spot or multiple spots to the layer.
- Parameters:
x (float or Sequence[float]) – x coordinate of the spot(s)
y (float or Sequence[float]) – y coordinate of the spot(s)
mu (float or Sequence[float]) – MU of the spot(s)
startTime (float or Sequence[float] (optional)) – start time of the spot(s)
irradiationDuration (float or Sequence[float] (optional)) – irradiation duration of the spot(s)
- simplify(threshold: float = 0.0)
Simplifies the layer by merging duplicate spots and removing spots with a mu below a threshold.
- Parameters:
threshold (float (default: 0.0)) – the threshold below which spots are removed
- spotDefinedInXY(x: float | Sequence[float], y: float | Sequence[float]) Tuple[bool, int]
Checks if a spot or multiple spots are defined in the layer.
- Parameters:
x (float or Sequence[float]) – x coordinate of the spot(s)
y (float or Sequence[float]) – y coordinate of the spot(s)
- Returns:
exist – True if the spot(s) exist in the layer, False otherwise
- Return type:
bool or Sequence[bool]
- property spotIrradiationDurations: ndarray
- property spotMUs: ndarray
- property spotTimings: ndarray
- property spotWeights: ndarray
- property spotX: Sequence[float]
- property spotXY: Iterable[Tuple[float, float]]
- property spotY: Sequence[float]
- property spots
- class PlanProtonSpot
Bases:
objectA single ion spot in a layer of a beam.
- Variables:
spotXY (list) – List of x,y coordinates of the spot in the beam’s coordinate system.
id (int) – Spot ID.
beamID (int (default 0)) – Beam ID.
layerID (int (default 0)) – Layer ID.
voxels (list) – List of voxels that are hit by the spot.
energy (float (default 0.0)) – Energy of the spot.
peakPosInDicomCoords (list) – Peak position of the spot in the DICOM coordinate system.
peakPosInTargetSystem (list) – Peak position of the spot in the target coordinate system.
spotWeight (int (default 0)) – Spot weight.
spotTiming (int (default 0)) – Spot timing.
- class ProtonPlan(*args, **kwargs)
Bases:
RTPlanClass for storing the data of a single IonPlan. Inherits from RTPlan.
- Variables:
deliveredProtons (float) – Number of protons delivered in the plan.
layers (list of PlanIonLayer) – List of layers in the plan.
spotMUs (np.ndarray) – Array of spot monitor units.
spotTimings (np.ndarray) – Array of spot timings.
spotIrradiationDurations (np.ndarray) – Array of spot irradiation durations.
spotXY (np.ndarray) – Array of spot XY coordinates.
meterset (float) – Total number of monitor units in the plan.
beamCumulativeMetersetWeight (np.ndarray) – Array of beam cumulative meterset weights.
layerCumulativeMetersetWeight (np.ndarray) – Array of layer cumulative meterset weights.
meterset – Total number of monitor units in the plan.
numberOfSpots (int) – Number of spots in the plan.
rangeShifter (list) – List of range shifters used in the plan.
- appendLayer(beam: PlanProtonBeam, layer: PlanProtonLayer)
Assign a particular layer (beam, layer) to plan
- Parameters:
beam (PlanIonBeam) – The beam of the layer to assign
layer (PlanIonLayer) – The layer to assign
- appendSpot(beam: PlanProtonBeam, layer: PlanProtonLayer, spot_index: int)
Assign a particular spot (beam, layer, spot_index) to plan
- Parameters:
beam (PlanIonBeam) – The beam of the spot to assign
layer (PlanIonLayer) – The layer of the spot to assign
spot_index (int) – The index of the spot to assign
- property beamCumulativeMetersetWeight: ndarray
- copy()
- createEmptyPlanWithSameMetaData()
Create an empty plan with the same metadata as the current plan
- property layerCumulativeMetersetWeight: ndarray
- property layers: Sequence[PlanProtonLayer]
- property meterset: float
- property numberOfSpots: int
- reorderPlan(order_layers='decreasing', order_spots='scanAlgo')
Reorder the plan by reordering each beam
- Parameters:
order_layers (str or list of int (default: ‘decreasing’)) – order of the layers. If ‘decreasing’ or ‘scanAlgo’, the layers are ordered by decreasing nominal energy. If a list of int, the layers are ordered according to the list.
order_spots (str or Sequence[int] (default: ‘scanAlgo’)) –
- the way the spots are sorted.
- If str, the following options are available:
‘scanAlgo’: the way scanAlgo sort spots in a serpentine fashion
‘timing’: sort according to the start time of the spots
If Sequence[int], the spots a reordered according to the order of the indices
- simplify(threshold: float = 0.0)
Simplify the plan by removing duplicate beams and simplifying each beam
- Parameters:
threshold (float (default 0.0)) – The threshold to use for simplifying each beam
- property spotIrradiationDurations: ndarray
- property spotMUs: ndarray
- property spotTimings: ndarray
- property spotXY: ndarray
- class ProtonPlanDesign
Bases:
RTPlanDesignThis class is used to store the plan design. It inherits from PatientData.
- Variables:
spotSpacing (float (default: 5.0)) – spacing between spots in mm
layerSpacing (float (default: 5.0)) – spacing between layers in mm
scoringVoxelSpacing (float or list of float) – spacing of the scoring grid in mm
proximalLayers (int (default: 1)) – number of proximal layers
distalLayers (int (default: 1)) – number of distal layers
layersToSpacingAlignment (bool (default: False)) – if True, the spacing between layers is aligned with the scoring grid
rangeShifters (list of RangeShifter) – list of range shifters
beamletsLET (list of Beamlet) – list of beamlets with LET
- buildPlan()
Builds a plan from the plan design
- Returns:
plan
- Return type:
- createBeams(plan)
Creates the beams of the plan
- Parameters:
plan (RTPlan) – plan
- initializeBeams(plan)
Initializes the beams of the plan
- Parameters:
plan (RTPlan) – plan
- class RTPlan(name='RTPlan', patient=None)
Bases:
PatientDataClass for storing the data of a single RTPlan. Inherits from PatientData.
- Variables:
name (str (default: "RTPlan")) – Name of the RTPlan.
patient (Patient) – Patient object to which the RTPlan belongs.
beams (list of PlanIonBeam or PlanPhotonBeam) – List of beams in the plan.
numberOffractionsPlanned (int (default: 1)) – Number of fractions planned.
seriesInstanceUID (str) – Series instance UID.
sopInstanceUID (str) – SOP instance UID.
modality (str) – Modality of the plan.
radiationType (str) – Type of radiation (e.g., “PHOTON”, “ION”).
scanMode (str (default: "MODULATED")) – Scan mode of the plan.
treatmentMachineName (str) – Name of the treatment machine.
rtPlanName (str) – Name of the RT plan.
originalDicomDataset (list) – Original DICOM dataset.
planDesign (ProtonPlanDesign or PhotonPlanDesign) – Design of the plan.
- appendBeam(beam: PlanProtonBeam | PlanPhotonBeam)
- property beams: Sequence[PlanProtonBeam | PlanPhotonBeam]
- static createPlan(radiationType)
- property numberOfFractionsPlanned: int
- removeBeam(beam: PlanProtonBeam | PlanPhotonBeam)
- class RTPlanDesign
Bases:
PatientDataThis class is used to store the plan design. It inherits from PatientData.
- Variables:
targetMargin (float (default: 5.0)) – margin around the target in mm
targetMask (ROIMask) – mask of the target
calibration (AbstractCTCalibration) – calibration of the CT for stopping power conversion
ct (CTImage (default: None)) – CT image
beamNames (list of str) – list of beam names
gantryAngles (list of float) – list of gantry angles
couchAngles (list of float) – list of couch angles
objectives (ObjectivesList) – list of objectives
beamlets (list of Beamlet) – list of beamlets
robustness (Robustness) – robustness evaluation
- buildPlan()
Builds a plan from the plan design
- createBeams()
Creates the beams of the plan
- defineTargetMaskAndPrescription(target: ROIMask | ROIContour | Sequence[ROIMask | ROIContour], targetPrescription: float | Sequence[float])
Defines the target mask and the prescription with given parameters (primary and secondary tumors mask) Works even if no objectives have been set (at the plan design stage) Call required before spot placement.
- initializeBeams()
Initializes the beams of the plan
- mergeBinaryMask(roi: Sequence[ROIMask | ROIContour], ct: CTImage)
- property scoringGridSize
- property scoringOrigin
- property scoringVoxelSpacing: Sequence[float]
- setScoringParameters(scoringGridSize: Sequence[int] | None = None, scoringSpacing: Sequence[float] | None = None, scoringOrigin: Sequence[int] | None = None, adapt_gridSize_to_new_spacing=False)
Sets the scoring parameters
- Parameters:
scoringGridSize (Sequence[int]) – scoring grid size
scoringSpacing (Sequence[float]) – scoring spacing
scoringOrigin (Sequence[float]) – scoring origin
adapt_gridSize_to_new_spacing (bool) – If True, automatically adapt the gridSize to the new spacing
- class RangeShifter(material='PMMA', density=1.0, WET=40.0, type='binary')
Bases:
objectRangeShifter class
- Variables:
ID (str) – RangeShifter ID.
type (str (default 'binary')) – RangeShifter type.
material (str (default 'PMMA')) – RangeShifter material for MCsquare.
density (float (default 1.0)) – RangeShifter density for MCsquare.
WET (float (default 40.0)) – RangeShifter water equivalent thickness for MCsquare.
- mcsquareFormatted(materials) str
String representation of the RangeShifter for MCsquare.
- Parameters:
materials (dict) – List of materials for MCsquare.
- Returns:
s – String representation of the RangeShifter for MCsquare.
- Return type:
str
- class RobustScenario(sse=None, sre=None)
Bases:
SparseBeamlets- printInfo()
- toTxt(path)
- class Robustness
Bases:
objectThis class is used to compute the robustness of a plan (optimization).
- Variables:
selectionStrategy (str) – The selection strategy used to select the scenarios. It can be “REDUCED_SET” or “ALL” or “RANDOM” or “DISABLED”.
setupSystematicError (list (default = [1.6, 1.6, 1.6]) (mm)) – The setup systematic error in mm.
setupRandomError (list (default = [1.4, 1.4, 1.4]) (mm, sigma)) – The setup random error in mm.
rangeSystematicError (float (default = 1.6) (%)) – The range systematic error in %.
scenarios (list) – The list of scenarios.
numScenarios (int) – The number of scenarios generated
- class RobustnessPhoton
Bases:
RobustnessThis class creates an object that stores the robustness parameters of a photon plan and generates robust scenarios through sampling(optimization).
- Variables:
scenariosConfig (list) – The list of scenarios configurations.
- generateAllErrorSpaceScenarios()
- generateRandomScenarios()
- generateReducedErrorSpacecenarios()
- generateRobustScenarios()
- sampleScenario()
- class RobustnessProton
Bases:
RobustnessThis class creates an object that stores the robustness parameters of an ion plan and robust scenarios (optimization).
- Variables:
rangeSystematicError (float (default = 1.6) (%)) – The range systematic error in %.
- class ScanAlgoPlan(plan: RTPlan, Gantry: str, beamID=0, sort_spots='true', spotTuneId=None)
Bases:
objectClass to create a plan with Proteus Plus or Proteus One accelerator from IBA
- Parameters:
Gantry (str) – Gantry angle of the accelerator. Can be “PPlus” or “POne”
- getLayers(plan, Gantry, beamID)
Function to get the layers of the plan
- Parameters:
plan (RTPlan) – Plan to be converted
Gantry (str) – Gantry angle of the accelerator. Can be “PPlus” or “POne” for Protheus Plus or Protheus One accelerator from IBA.
beamID (int) – ID of the beam to be converted
- Returns:
beamDict – Dictionary with the layers of the plan
- Return type:
dict
- load(file_path)
Function to load a plan from a json file
- Parameters:
file_path (str) – Path to load the plan
- save(file_path)
Function to save the plan in a json file
- Parameters:
file_path (str) – Path to save the plan