Class PlanSetup
Represents a treatment plan. See the definition of a DICOM RT Plan for more information.
Inheritance
Implements
Inherited Members
Namespace: VMS.TPS.Common.Model.API
Assembly: VMS.TPS.Common.Model.API.dll
Syntax
public class PlanSetup : PlanningItem, IXmlSerializable
Properties
ApplicationScriptLogs
The log entries of the script executions that have modified the plan.
Declaration
public IEnumerable<ApplicationScriptLog> ApplicationScriptLogs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ApplicationScriptLog> |
ApprovalHistory
Returns the approval history of the plan setup.
Declaration
public IEnumerable<ApprovalHistoryEntry> ApprovalHistory { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ApprovalHistoryEntry> |
ApprovalStatus
The approval status.
Declaration
public PlanSetupApprovalStatus ApprovalStatus { get; }
Property Value
Type | Description |
---|---|
PlanSetupApprovalStatus |
BaseDosePlanningItem
BaseDose for the optimization, can be either plan or plan sum.
Declaration
public PlanningItem BaseDosePlanningItem { get; set; }
Property Value
Type | Description |
---|---|
PlanningItem |
Beams
A collection of all the beams in the plan (including setup beams). Returns an empty collection if not applicable for the plan, for example, if the plan is a brachytherapy plan.
Declaration
public IEnumerable<Beam> Beams { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Beam> |
Comment
[Availability of this property depends on your Eclipse Scripting API license] A comment about the Plan.
Declaration
public string Comment { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CreationUserName
The name of the user who saved the plan for the first time.
Declaration
public string CreationUserName { get; }
Property Value
Type | Description |
---|---|
System.String |
DosePerFraction
The dose per fraction.
Declaration
public DoseValue DosePerFraction { get; }
Property Value
Type | Description |
---|---|
DoseValue |
DosePerFractionInPrimaryRefPoint
The calculated fraction dose in the primary reference point.
Declaration
[Obsolete("Use PlannedDosePerFraction instead")]
public DoseValue DosePerFractionInPrimaryRefPoint { get; }
Property Value
Type | Description |
---|---|
DoseValue |
DVHEstimates
Returns a list of DVH estimate objects for this plan
Declaration
public IEnumerable<EstimatedDVH> DVHEstimates { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EstimatedDVH> |
ElectronCalculationModel
The name of the electron calculation model. Not applicable to brachytherapy plans.
Declaration
public string ElectronCalculationModel { get; }
Property Value
Type | Description |
---|---|
System.String |
ElectronCalculationOptions
The electron calculation options. Not applicable to brachytherapy plans.
Declaration
public Dictionary<string, string> ElectronCalculationOptions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> |
Id
[Availability of this property depends on your Eclipse Scripting API license] The identifier of the PlanSetup.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IntegrityHash
Returns the plan's integrity hash. Returns null if the plan's integrity hash has not been set.
Declaration
public string IntegrityHash { get; }
Property Value
Type | Description |
---|---|
System.String |
IsDoseValid
Returns the value true if the plan dose is valid. This implies that the dose object returned from the dose property is not null and can therefore be used to query dose values.
Declaration
public bool IsDoseValid { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsTreated
Checks if the treatment plan has been delivered.
Declaration
public bool IsTreated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
[Availability of this property depends on your Eclipse Scripting API license] The name of the Plan.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
NumberOfFractions
The number of fractions.
Declaration
public int? NumberOfFractions { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
OptimizationSetup
Provides access to optimization objectives and parameters.
Declaration
public OptimizationSetup OptimizationSetup { get; }
Property Value
Type | Description |
---|---|
OptimizationSetup |
PatientSupportDevice
Patient support device.
Declaration
public PatientSupportDevice PatientSupportDevice { get; }
Property Value
Type | Description |
---|---|
PatientSupportDevice |
PhotonCalculationModel
The name of the photon calculation model. Not applicable to brachytherapy plans.
Declaration
public string PhotonCalculationModel { get; }
Property Value
Type | Description |
---|---|
System.String |
PhotonCalculationOptions
The photon calculation options. Not applicable to brachytherapy plans.
Declaration
public Dictionary<string, string> PhotonCalculationOptions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> |
PlanIntent
The plan intent as in DICOM, or an empty string. The defined terms are "CURATIVE", "PALLIATIVE", "PROPHYLACTIC", "VERIFICATION", "MACHINE_QA", "RESEARCH" and "SERVICE", but the value can be different for imported plans.
Declaration
public string PlanIntent { get; }
Property Value
Type | Description |
---|---|
System.String |
PlannedDosePerFraction
The calculated fraction dose in the primary reference point.
Declaration
public DoseValue PlannedDosePerFraction { get; }
Property Value
Type | Description |
---|---|
DoseValue |
PlanningApprovalDate
The date when the plan was approved for planning.
Declaration
public string PlanningApprovalDate { get; }
Property Value
Type | Description |
---|---|
System.String |
PlanningApprover
The identifier of the user who approved the plan for planning.
Declaration
public string PlanningApprover { get; }
Property Value
Type | Description |
---|---|
System.String |
PlanningApproverDisplayName
The display name of the user who approved the plan for planning.
Declaration
public string PlanningApproverDisplayName { get; }
Property Value
Type | Description |
---|---|
System.String |
PlanNormalizationMethod
The user interface name for the current normalization method.
Declaration
public string PlanNormalizationMethod { get; }
Property Value
Type | Description |
---|---|
System.String |
PlanNormalizationPoint
The plan normalization point.
Declaration
public VVector PlanNormalizationPoint { get; }
Property Value
Type | Description |
---|---|
VVector |
PlanNormalizationValue
[Availability of this property depends on your Eclipse Scripting API license] The plan normalization value in percentage. The plan is normalized according to the plan
normalization value, for instance, 200%.
The value is Double.NaN if it is not defined.
Declaration
public double PlanNormalizationValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
PlanObjectiveStructures
The list of structure IDs that are present in the plan objectives (prescriptions and indices).
Declaration
public IEnumerable<string> PlanObjectiveStructures { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
PlanType
The plan type.
Declaration
public PlanType PlanType { get; }
Property Value
Type | Description |
---|---|
PlanType |
PlanUncertainties
Plan uncertainties defined for the plan.
Declaration
public IEnumerable<PlanUncertainty> PlanUncertainties { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PlanUncertainty> |
PredecessorPlan
The prior revision of the plan
Declaration
public PlanSetup PredecessorPlan { get; }
Property Value
Type | Description |
---|---|
PlanSetup |
PredecessorPlanUID
The UID of the predecessor plan.
Declaration
public string PredecessorPlanUID { get; }
Property Value
Type | Description |
---|---|
System.String |
PrescribedDosePerFraction
The prescribed fraction dose.
Declaration
[Obsolete("Use DosePerFraction instead")]
public DoseValue PrescribedDosePerFraction { get; }
Property Value
Type | Description |
---|---|
DoseValue |
PrescribedPercentage
The prescribed dose percentage as a decimal number. For example, if the prescribed dose percentage shown in the Eclipse user interface is 80 %, returns 0.8
Declaration
[Obsolete("Use TreatmentPercentage instead")]
public double PrescribedPercentage { get; }
Property Value
Type | Description |
---|---|
System.Double |
PrimaryReferencePoint
The primary reference point.
Declaration
public ReferencePoint PrimaryReferencePoint { get; }
Property Value
Type | Description |
---|---|
ReferencePoint |
ProtocolID
The protocol identifier.
Declaration
public string ProtocolID { get; }
Property Value
Type | Description |
---|---|
System.String |
ProtocolPhaseID
The protocol phase identifier.
Declaration
public string ProtocolPhaseID { get; }
Property Value
Type | Description |
---|---|
System.String |
ProtonCalculationModel
The name of the proton calculation model. Not applicable to brachytherapy plans.
Declaration
public string ProtonCalculationModel { get; }
Property Value
Type | Description |
---|---|
System.String |
ProtonCalculationOptions
The proton calculation options. Not applicable to brachytherapy plans.
Declaration
public Dictionary<string, string> ProtonCalculationOptions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> |
ReferencePoints
Collection of reference points in the plan.
Declaration
public IEnumerable<ReferencePoint> ReferencePoints { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ReferencePoint> |
RTPrescription
Used for navigating to the linked prescription.
Declaration
public RTPrescription RTPrescription { get; }
Property Value
Type | Description |
---|---|
RTPrescription |
Series
The series that contains this plan. Null if the plan is not connected to a series.
Declaration
public Series Series { get; }
Property Value
Type | Description |
---|---|
Series |
SeriesUID
The DICOM UID of the series that contains this plan. Empty string if the plan is not connected to a series.
Declaration
public string SeriesUID { get; }
Property Value
Type | Description |
---|---|
System.String |
TargetVolumeID
The target volume identifier.
Declaration
public string TargetVolumeID { get; }
Property Value
Type | Description |
---|---|
System.String |
TotalDose
Planned total dose.
Declaration
public DoseValue TotalDose { get; }
Property Value
Type | Description |
---|---|
DoseValue |
TotalPrescribedDose
The total prescribed dose.
Declaration
[Obsolete("Use TotalDose instead")]
public DoseValue TotalPrescribedDose { get; }
Property Value
Type | Description |
---|---|
DoseValue |
TreatmentApprovalDate
The date when the plan was approved for treatment.
Declaration
public string TreatmentApprovalDate { get; }
Property Value
Type | Description |
---|---|
System.String |
TreatmentApprover
The identifier of the user who approved the plan for treatment.
Declaration
public string TreatmentApprover { get; }
Property Value
Type | Description |
---|---|
System.String |
TreatmentApproverDisplayName
The display name of the user who approved the plan for treatment.
Declaration
public string TreatmentApproverDisplayName { get; }
Property Value
Type | Description |
---|---|
System.String |
TreatmentOrientation
The orientation of the treatment.
Declaration
public PatientOrientation TreatmentOrientation { get; }
Property Value
Type | Description |
---|---|
PatientOrientation |
TreatmentPercentage
The treatment percentage as a decimal number. For example, if the treatment percentage shown in the Eclipse user interface is 80%, returns 0.8.
Declaration
public double TreatmentPercentage { get; }
Property Value
Type | Description |
---|---|
System.Double |
TreatmentSessions
Treatment sessions for the plan, either scheduled sessions or treated sessions.
Declaration
public IEnumerable<PlanTreatmentSession> TreatmentSessions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PlanTreatmentSession> |
UID
The DICOM UID of the plan.
Declaration
public string UID { get; }
Property Value
Type | Description |
---|---|
System.String |
UseGating
Boolean to mark if gating is used in the plan.
Declaration
public bool UseGating { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
VerifiedPlan
Returns the verified plan if this is a verification plan, otherwise returns null. The verified plan is the clinical plan that was used to create the verification plan.
Declaration
public PlanSetup VerifiedPlan { get; }
Property Value
Type | Description |
---|---|
PlanSetup |
Remarks
Always returns null if the plan has multiple fractionations.
Methods
AddReferencePoint(Boolean, Nullable<VVector>, String)
[Availability of this method depends on your Eclipse Scripting API license] Creates a new reference point and links it to the plan.
Declaration
public ReferencePoint AddReferencePoint(bool target, VVector? location, string id)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | target | Indicates whether the reference point tracks treatment target (true) or organ at risk (false). |
System.Nullable<VVector> | location | Reference point location in mm. |
System.String | id | Reference point ID. |
Returns
Type | Description |
---|---|
ReferencePoint | Newly created reference point. |
ClearCalculationModel(CalculationType)
[Availability of this method depends on your Eclipse Scripting API license] Clears the calculation model for the given calculation type.
Declaration
public void ClearCalculationModel(CalculationType calculationType)
Parameters
Type | Name | Description |
---|---|---|
CalculationType | calculationType | The type of calculation. |
GetCalculationModel(CalculationType)
Returns the selected calculation model for the given calculation type. Returns null if no model has been selected.
Declaration
public string GetCalculationModel(CalculationType calculationType)
Parameters
Type | Name | Description |
---|---|---|
CalculationType | calculationType | The type of calculation. |
Returns
Type | Description |
---|---|
System.String | Returns the selected calculation model for the given calculation type. Returns null if no model has been selected. |
GetCalculationOption(String, String, out String)
Gets the given calculation option value.
Declaration
public bool GetCalculationOption(string calculationModel, string optionName, out string optionValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | calculationModel | The name of the calculation model. |
System.String | optionName | The XPath or name of the option to set. |
System.String | optionValue | The value of the given option. |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if the method cannot find the given option. |
Remarks
Available options are stored in the schema files of the calculation model located on the Distributed Calculation Framework (DCF) server.
GetCalculationOptions(String)
Gets all the calculation options and their values for the given calculation model.
Declaration
public Dictionary<string, string> GetCalculationOptions(string calculationModel)
Parameters
Type | Name | Description |
---|---|---|
System.String | calculationModel | The name of the calculation model. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | A list of key-value pairs where the key is the XPath of the option and the value is the option value. |
GetDvhEstimationModelName()
Retrieves the name of DVH Estimation Model.
Declaration
public string GetDvhEstimationModelName()
Returns
Type | Description |
---|---|
System.String |
GetProtocolPrescriptionsAndMeasures(ref List<ProtocolPhasePrescription>, ref List<ProtocolPhaseMeasure>)
Gets the prescriptions and measures in the protocol that is associated with this plan setup.
Declaration
public void GetProtocolPrescriptionsAndMeasures(ref List<ProtocolPhasePrescription> prescriptions, ref List<ProtocolPhaseMeasure> measures)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<ProtocolPhasePrescription> | prescriptions | Returned list of prescriptions (plan objectives). |
System.Collections.Generic.List<ProtocolPhaseMeasure> | measures | Returned list of plan measures (quality indices). |
IsValidForPlanApproval(out List<PlanValidationResultEsapiDetail>)
Check if plan approval status is valid.
Declaration
public bool IsValidForPlanApproval(out List<PlanValidationResultEsapiDetail> validationResults)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<PlanValidationResultEsapiDetail> | validationResults | Validation results which contain detailed warning and error messages. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if no errors are found. |
Remarks
This function will return true even if there were warnings found during validation.
SetCalculationModel(CalculationType, String)
[Availability of this method depends on your Eclipse Scripting API license] Sets the calculation model for the given calculation type.
Declaration
public void SetCalculationModel(CalculationType calculationType, string model)
Parameters
Type | Name | Description |
---|---|---|
CalculationType | calculationType | The type of calculation. |
System.String | model | The name of the calculation model. |
SetCalculationOption(String, String, String)
[Availability of this method depends on your Eclipse Scripting API license] Sets the given calculation option to the given value. Before setting the options for the model, set the calculation model. See SetCalculationModel(CalculationType, String).
Declaration
public bool SetCalculationOption(string calculationModel, string optionName, string optionValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | calculationModel | The name of the calculation model. |
System.String | optionName | The XPath or name of the option to set. If this is not an XPath, the method sets the first attribute that matches the name. Example 1: CalculationGridSizeInCM in the Anisotropic Analytical Algorithm (AAA) sets the option /AAACalculationOptions/@CalculationGridSizeInCM. Example 2: MaximalDrillDepthInCM in the Proton Convolution Superposition (PCS) algorithm sets the option /ProtonCalculationOptions/ScatteringUniformScanning/CompensatorConversion/Drilling1/@MaximalDrillDepthInCM. To set the values, for example, for the Drilling2 settings, you have to specify the entire XPath /ProtonCalculationOptions/ScatteringUniformScanning/CompensatorConversion/Drilling2/@MaximalDrillDepthInCM. |
System.String | optionValue | The value to set. |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if the method cannot find the given option. |
Remarks
Available options are stored in the schema files of the calculation model located on the Distributed Calculation Framework (DCF) server.
SetPrescription(Int32, DoseValue, Double)
[Availability of this method depends on your Eclipse Scripting API license] Sets and validates the number of fractions and dose per fraction.
Declaration
public void SetPrescription(int numberOfFractions, DoseValue dosePerFraction, double treatmentPercentage)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numberOfFractions | The number of fractions. |
DoseValue | dosePerFraction | The dose per fraction. |
System.Double | treatmentPercentage | The treatment percentage as a decimal number. For example, if the treatment percentage shown in the user interface is 80%, use 0.8. |
SetTargetStructureIfNoDose(Structure, StringBuilder)
[Availability of this method depends on your Eclipse Scripting API license] Sets or changes target structure if valid dose is not affected by the change.
Declaration
public bool SetTargetStructureIfNoDose(Structure newTargetStructure, StringBuilder errorHint)
Parameters
Type | Name | Description |
---|---|---|
Structure | newTargetStructure | New target structure. |
System.Text.StringBuilder | errorHint | Holder for error message. |
Returns
Type | Description |
---|---|
System.Boolean | Boolean value indicating success (true) or failure (false). |
WriteXml(XmlWriter)
Converts an object into its XML representation. For more information on how to serialize an object into an XML document, see System.Xml.Serialization.XmlSerializer.
Declaration
public override void WriteXml(XmlWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | The System.Xml.XmlWriter stream, to which the object is serialized. |