Skip to content

user_manual_QA

schtap edited this page Feb 3, 2023 · 9 revisions

Plan analysis using independent dose engine

The function functions\flashCaptain\fC_planValidator.m loads a ConformalFLASH treatment plan computed by the Raystation and computes the dose delivered to the target using the MCsquare dose engine, so as to provide a dose computation that is independent from the RayStation dose engine. It also computes the dose rate in the selected RT structures. Then, the function functions\flashCaptain\fC_ClinicalIndicators.m computes the specified clinical indicators (D95, V20,...) on the selected structures.

There is an example of script launching the computation in scripts\test\test_fC_planValidator.m.

In this section, we describe how to configure and run the script.

Configuration in JSON files

Create a JSON file with the information about the data. There is an example of JSON file in scripts\test\fC_planValidator.json.

Field Name Description
files
files / planFileName Path and file name of the DICOM RT ion treatment plan exported by the Raystation
files / rtstructFileName Path and file name of the DICOM RT structure used to create the plan
files / CTname Path and file name of the DICOM CT scan used to create the plan
files / output_path Path to the output folder where the computation results are saved
BeamProp
BeamProp / protonsBeamlet Number of protons used by MCsquare in the computation of the dose influence matrix of each individual beamlets
BeamProp / protonsFullDose Number of protons used by MCsquare in the computation of the dose in low resolution CT for the IMPT plan
BeamProp / protonsHighResDose Number of protons used by MCsquare in the computation of the dose in high resolution CT with CEM
RTstruct
RTstruct / selected_ROIs Name of the RT structs for which the dose rate is to be computed
RTstruct / DRCritical_ROIs Name of the RT structs to include in the trajectory optimization
RTstruct / TargetROI Name for target region of interest (ROI). This is typically the PTV.
RTstruct / ExternalROI Name for external ROI. This is the body contour.
DoseRate
DoseRate / Dref Dose (Gy) threshold. The median or average dose rate are computed using voxels receiving a dose larger than ‘Dref’.

Compute dose and dose rate

Once the JSON file is created, define the path and file name of the JSON file in the test script scripts\test\test_fC_planValidator.m. In Matlab, launch the test script scripts\test\test_fC_planValidator.m.

The plan, CT scan and RT struct are loaded. The dose is computed using the MCsquare dose engine. The dose rate maps are also computed. The results are saved as DICOM files in the folder defined by the field files / output_path. The content of the output folder is described here.

Compare dose maps and dose rate maps

The function functions \flashCaptain\fC_ClinicalIndicators.m compares the properties of the dose map and dose rate maps computed by two different dose engines. The comparison is based on:

  • Clinical indicators : The REGGUI function computing clinical indicators on the dose map and dose rate map is used. The clinical indicators are, for example, D95, V20,... If no JSON file defining indicators is provided, then no indicator is computed.
  • DVH : The dose volume histogram is computed for all the beams in the plan and all the RT structures set present in the RT strcut file
  • Gamma index : The gamma index between the test map and a reference map is computed for for all provided beams

There is an example of script launching the computation in scripts\test\test_fC_planValidator.m.

Configuration in JSON files

Create a JSON file with the information about the data. There is an exmaple of JSON file in scripts\test\fC_planValidator_indicators.json.

Several computations of indicator, gamma index and DVH can be done sequentially on different dose and dose rate maps. The fields "indicators" , "TESTMap" and "REFMap" are vectors with the same length. The computations are repeated sequentially using the corresponding elements in all these vectors.

Field Name Description
files
files / planFileName Path and file name of the DICOM RT ion treatment plan exported by the Raystation
files / rtstructFileName Path and file name of the DICOM RT structure used to create the plan
files / CTname Path and file name of the DICOM Ct scan used to create the plan
files / output_path Path to the output folder where the computation results are saved
indicators Vector with the paths and file names of JSON files defining the clinical indicators for the each computation set. The structure of the JSON file is described here. It is possible to skip the computation of indicator for one set by setting an empty string "" for the corresponding set.

Example of vector defining 3 computation sets:

   "indicators" : [
                 "path & file name to the indicator JSON file for the 1st computation set" ,
                 "path & file name to the indicator JSON file for the 2nd computation set",
                 "" It is possible to skip the computation of the indicator in one set by using an empty string. Only gamma index and DVH will be computed
                 ]
Field Name Description
TESTMap For each item of indicators, there must be a corresponding item defining the test map (dose or dose rate). If there are several beams in one set, then the file name of each beam is to be provided

Example of vector defining 3 computation sets:

   "TESTMap" : [
                 [ "path & file name to dose (rate) map of the 1st beam for the 1st computation set"
                 ],
                 [
                   "path & file name to dose (rate) map of the 1st beam for the 2nd computation set",
                   "path & file name to dose (rate) map of the 2nd beam for the 2nd computation set"
                 ],
                 [
                   "path & file name to dose (rate) map of the 1st beam for the 3rd computation set"
                 ]
              ]
Field Name Description
REFMap The reference dose map to use for the computation of the gamma index. If there are several beams in one set, then the file name of each beam is to be provided

Example of vector defining 3 computation sets:

   "REFMap" :  [
                 [
                   "path & file name to reference dose (rate) map of the 1st beam for the 1st computation set"
                 ],
                 [
                   "path & file name to reference dose (rate) map of the 1st beam for the 2nd computation set",
                   "path & file name to reference dose (rate) map of the 2nd beam for the 2nd computation set"
                 ],
                 [
                   "path & file name to reference dose (rate) map of the 1st beam for the 3rd computation set"
                 ]
               ]
Field Name Description
GammaIndex Parameters for the computation of the gamma index between the dose (rate) map and the reference dose (rate) map.
DistanceTolerance Distance tolerance of the gamma index (in mm)
DoseTolerance Dose tolerance of the gamma index (in %)

Log based analysis

The PROTEUS treatment machine generates irradiation logs during dose delivery. By analysis the content of these logs, it is possible to reconstruct by computation the delivered dose distribution.

The function :

  • Compares the distance between spots and the Monitoring units of two PBS treatment plans.
  • Computes the dose and dose rate maps using the MU recorded in the treatment logs and the planning CT scan

There is an example of script launching the computation in scripts\test\test_fC_planValidator.m.

Configuration in JSON files

Create a JSON file with the information about the data. There is an exmaple of JSON file in scripts\test\fC_logAnalysis.json.

Field Name Description
files
files / planFileName Path and file name of the DICOM RT ion treatment plan exported by the Raystation
files / rtstructFileName Path and file name of the DICOM RT structure used to create the plan
files / CTname Path and file name of the DICOM Ct scan used to create the plan
files / output_path Path to the output folder where the computation results are saved
files / RecordName Path and file name of machien log file
AggregatePaintings Toggles the aggregation of repainted spots into single spot value. 0 = do not aggregate spots. 1 = aggregate spots
ResultTXT Path and file name of the JSON file in which the comparison results will be saved.
BeamProp
BeamProp / protonsBeamlet Number of protons used by MCsquare in the computation of the dose influence matrix of each individual beamlets
BeamProp / protonsFullDose Number of protons used by MCsquare in the computation of the dose in low resolution CT for the IMPT plan
BeamProp / protonsHighResDose Number of protons used by MCsquare in the computation of the dose in high resolution CT with CEM
RTstruct
RTstruct / selected_ROIs Name of the RT structs for which the dose rate is to be computed
RTstruct / DRCritical_ROIs Name of the RT structs to include in the trajectory optimization
RTstruct / TargetROI Name for target region of interest (ROI). This is typically the PTV.
RTstruct / ExternalROI Name for external ROI. This is the body contour.
DoseRate
DoseRate / Dref Dose (Gy) threshold. The median or average dose rate are computed using voxels receiving a dose larger than ‘Dref’.