MGH_only - topasmc/dicom-interface GitHub Wiki

History

This note is prepared to describe MGH's DICOM interface for TOPAS.

Table of contents

  1. Introduction

  2. RT-Ion interface

  3. TOPAS

  4. TODO

  5. miscellaneous

1. Introduction

We have multiple MC interfaces to run IMPT simulation for TOPAS:

  • MCAUTO_matlab : matlab based, support DS and IMPT (plan only).
  • MCAUTO_DICOM : python based, tested only with MDACC plan.
  • MCAUTO_ASTROID: python based, used Astroid V1, supporting applications of plan/plan4D/QA/conversion. This interface is mainly used for IMPT.
  • MCAUTO for ASTROID V2 (on-going project): needs to support those plan/plan4D/QA with RTIBTR in addition to RTIP. Besides, for both Burr and Lunder their DICOM implementation may be slightly different. Astroid DICOM implementation has been also evolving.

Adding MC-DICOM interface for ASTROID-V2 into MCUATO_ASTROID got too compliacated to account variations of application types, RT-Ion types, use of DICOM attributes, BeamName/BeamNumber issues, etc. Basically too many 'if-else' conditions were required in many different places to account variation of With my python skills, these variations cannot be handled efficiently. TOPAS aperture doesn't handle multiple holes and this requires an alternative way to define.

2.1 Required DICOM files for MC applications

*files are the input to a DICOM communication script that will download other neccessary files for MC applications.

Table 1. Plan dose calculation

Files Usage
RT-Ion Plan* Geometries (SAD, gantry, couch, isocenter, snout position, apeture, range shifter, etc), Beam structure & dose, Fraction group, etc
RT-Dose Dose-grid setup
CT Patient geometry
Tramp (Burr only) To simulate with deliverable spot weight
RT-structure (optional) research purpose

Table 2. QA dose calculation

Files Usage
RT-Ion Plan* Geometries (SAD, gantry, couch, snout position, apeture, range shifter, etc), Beam structure & dose, Fraction group, etc
XML (Burr only) Range shifter thickness, measurement positions
Tramp (Burr only) To simulate with deliverable spot weight
XML? (Lunder) measurement depths

Table 3. Patient dose calculation with treatment log (Lunder only)

Files Usage
RT-Ion Beam treatment Record (RTIBTR) * Fluence map, Geometries (SAD, gantry, couch, snout position, apeture, range shifter, etc), etc
RT-Ion Plan SAD, isocenter, planed gantry angle, planned couch angle, snout position, apeture, range shifter, etc), Beam structure & dose
CT Patient geometry
RT-Dose Dose-grid setup
RT-structure (optional) research purpose

Table 4. QA dose calculation with treatment log (Lunder only)

Files Usage
RT-Ion Beam treatment Record (RTIBTR) * Fluence map, Geometries (SAD, gantry, couch, snout position, apeture, range shifter, etc), etc
RT-Ion Plan SAD, isocenter, planed gantry angle, planned couch angle, snout position, apeture, range shifter, etc), Beam structure & dose
XML? Measurement depths

Table 3. Patient dose calculation with treatment log (Lunder only)

Files Usage
RT-Ion Beam treatment Record (RTIBTR) * Fluence map, Geometries (SAD, gantry, couch, snout position, apeture, range shifter, etc), etc
RT-Ion Plan SAD, isocenter, planed gantry angle, planned couch angle, snout position, apeture, range shifter, etc), Beam structure & dose
CT Patient geometry
RT-Dose Dose-grid setup
RT-structure (optional) research purpose

The important points or issues with RT-Dose grid implementation are: -ImagePositionPatient: V2 doesn't export RT-Dose. We need to convert .dose with plastimatch. But plastimatch seems to shift ImagePositionPatient by 1/4 pixel size. May15,2018

The important points or issues with fluence implementation are:

  • sampling: Histories can be sampled randomly or sequentially under multithread operation. Source can pass either distribution functions to a generator (thread) or queue of histories. Can be adapted to gPMC.
  • RTIP vs RTIBTR: Handling different DICOM attributes in RTIP and RTIBTR for phase-space generations as shown in Table 3.1 and Table 3.2.
  • SETUP fields: 'SETUP' fields are skipped if any. Fraction group sequence includes 'SETUP' fields as well as 'TREATMENT' fields.
  • zero BeamDose in V2: BeamDose is also zero for 'TREATMENT' fields but BeamDose has been used to normalize # of histories by prescription dose (Gy). It seems that this applies the plans done until mid of April. Now we have prescription points.
  • BeamName: Conventionally we assgiend beam name as '180C1' meaning Gantry angle, alpabetical order of the beam in fraction group, and fraction group number. V2 BeamName uses as "G0 C0; 25 cm; 30 mm;." It seems that this applies only the plans done until mid of April too. BeamName and Beam specification is swapped (May8).
  • 4D control: this feature is not yet implemented but will be.
  • Machine name: TreatmentMachine name is used to instantiate a beam. But it is stored differently in RTIBTR and RTIP. For example, Protom RTIBTR stored it under TreatmentMachineSequence as (300a,00b2) SH [R330_01]. But Astroid v2 and Eclipse seems not to have TreatmentMachineSequence. Alternatively we can use Institution name and SpotTuneID to instantiate a beam.

Table 3.1. Attributes comparisons of Ion control sequence from RTIP and RTIBTR

item RTIP RTIBTR comments
NominalBeamEnergy Y Y
ScanSpotTuneID Y Y
ScanningSpotSize Y Y RTIBTR seems to copy these values from plan. nan/nan values for empty spot
ScanSpotPositionMap Y Y
ScanSpotMetersetWeights Y N
ScanSpotMetersetsDelivered N Y

Table 3.2. Attributes comparisons of Beam sequence from RTIP and RTIBTR

item RTIP RTIBTR comments
SAD Y N For RTIBTR, we need download rtplan or implement values in beam.
BeamNumber Y N BeamNumber must be defiend
BeamName Y Y optional, this was used for uniquness in V1 and now V2 (May9)
BeamDescription Y N optional
(a) MGH RTIP (b) MGH RTIP (c) MGH RTIBTR (d) MDACC
Figure Figure Figure Figure

Figure . Plans with beam. For test, 'trasnportation' physics is on.

Successfully tested with 4 different plans as shown in Figure 1. The figures were taken by just replacing 'Ge/RTION/File' above in TOPAS parameter file.

(a) MGH RTIP (b) MGH RTIP (c) MGH RTIBTR (d) MDACC
Figure Figure Figure Figure

Figure 4. (a) MGH Burr plan of two-hole aperture & range shifter, (b) MGH Burr plan with rangeshifter only, (c) MGH Lunder beam treatment record, and (d) MDACC plan.

⚠️ **GitHub.com Fallback** ⚠️