Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DICOM RT Dose

DICOM RT Dose

A introduction for DICOM RT Dose data

Avatar for Tsung-Yung Lu

Tsung-Yung Lu

July 21, 2025
Tweet

More Decks by Tsung-Yung Lu

Other Decks in Programming

Transcript

  1. Proper Noun (1) RT : radiation therapy TPS : treatment

    planning systems TCS : treatment control system GTV : gross tumor volume CTV : clinical tumor volume PTV : planning tumor volume OAR : organ at risk VOI : volume of interest Tx : Treatment MC : Monte Carlo
  2. Proper Noun (2) DVH : dose volume histogram LUT :

    look up table MV : megavoltage Gy : Gray (Absorbed dose unit) CDs : cumulative doses Dxx : the minimum dose received by xx% of volume BED : biologically effective dose IVD : in vivo dosimetry SSD : source to skin distance PDD: percentage depth dose OAR : off-axis ratio Dx : Diagnosis Rx : Radiation treatment fxs : fractions ( : also organ at risk)
  3. Proper Noun (3) TG-xxx : AAPM TG-xxx report AAPM: The

    American Association of Physicists in Medicine EPID : electronic portal imaging device BEV : beam eye view CBCT : cone beam computed tomography IGRT : image-guided radiotherapy IMRT : intensity modulation radiation therapy VMAT : volumetric modulated arc therapy BP : back-projection FP : forward-projection
  4. DICOM – RT Intro. • RT structure set contour data

    from CT image • RT plan gantry setting for treatment from TPS • RT dose dose data from TPS • RT image BEV image form gantry • RT beams treatment record record from gantry Beams record
  5. DICOM – RT Relationship CT image – Structure – Plan

    Plan – Dose Plan – RT image Plan – Record
  6. Required General Tags Tag Keyword 0010,0010 PatientName 0010,0020 PatientID 0010,0030

    PatientBirthDate 0010,0040 PatientSex 0008,0020 StudyDate 0008,0030 StudyTime 0008,0050 AccessionNumber 0008,0090 ReferringPhysicianName 0020,000D StudyInstanceUID 0020,0010 StudyID Tag Keyword 0008,0060 Modality 0008,103E SeriesDescription 0008,1070 OperatorsName 0020,000E SeriesInstanceUID 0020,0011 SeriesNumber 0020,0052 FrameOfReferenceUID 0020,1040 PositionReferenceIndicator 0008,0070 Manufacturer
  7. Dose Required Tags Tag Keyword 0020,0013 InstanceNumber 0018,0050 SliceThickness 0020,0032

    ImagePositionPatient 0020,0037 ImageOrientationPatient 0028,0030 PixelSpacing Tag Keyword 0028,0002 SamplesPerPixel 0028,0004 PhotometricInterpretation 0028,0010 Rows 0028,0011 Columns 0028,0100 BitsAllocated 0028,0101 BitsStored 0028,0102 HighBit 0028,0103 PixelRepresentation 7FE0,0010 PixelData 0020,0052 FrameOfReferenceUID 0020,1040 PositionReferenceIndicator 0008,0070 Manufacturer
  8. Dose from Plan Required Tags Tag Keyword 0028,0008 NumberOfFrames 0028,0009

    FrameIncrementPointer Tag Keyword 3004,0002 DoseUnits 3004,0004 DoseType 3004,000A DoseSummationType 3004,000C GridFrameOffsetVector slice spacing 3004,000E DoseGridScaling array factor 300C,0002 ReferencedRTPlanSequence 0008,1150 ReferencedSOPClassUID 0008,1155 ReferencedSOPInstanceUID
  9. DoseSummationType Type Description Scope / Target PLAN Dose calculated for

    the entire delivery of all Fraction Groups in a single RT Plan Entire RT Plan MULTI_PLAN Dose calculated for the entire delivery of 2 or more RT Plans Multiple RT Plans PLAN_OVERVIEW Dose calculated with respect to plan overview parameters (not necessarily for actual treatment) Planning Overview FRACTION Dose calculated for the complete delivery of a single Fraction Group within an RT Plan One Fraction Group BEAM Dose calculated for the entire delivery of one or more Beams within an RT Plan One or more Beams BRACHY Dose calculated for the entire delivery of one or more Brachytherapy Application Setups Brachy Application Setups FRACTION_SESSION Dose calculated for a single session (fraction) of a single Fraction Group within an RT Plan One session of one Fraction Group BEAM_SESSION Dose calculated for a single session (fraction) of one or more Beams within an RT Plan One session involving Beams
  10. GridFrameOffsetVector An array that contains the dose image plane offsets

    (in mm) of the dose image frames in a multi-frame dose. GridFrameOffsetVector = [2, 2, 2, 2]
  11. DoseGridScaling 𝐷𝑜𝑠𝑒(𝐺𝑦) = 𝑃𝑖𝑥𝑒𝑙𝐷𝑎𝑡𝑎 × 𝐷𝑜𝑠𝑒𝐺𝑟𝑖𝑑𝑆𝑐𝑎𝑙𝑖𝑛𝑔 Scaling factor that when

    multiplied by the dose grid data found in Pixel Data Attribute of the Image Pixel Module, yields grid doses in the dose units as specified by Dose Units
  12. CT / MR Image CIOD (or other Image IODs) ImagePositionPatient

    ImageOrientationPatient PixelSpacing Space Information FrameOfReferenceUID Reference Information
  13. Application CT + RT Structure Set + Dose → DVH

    CT + RT Structure Set + Plan → Dose, BEV, … Dose → contour map of dose (CT + RS + Dose + REG)1 + (CT + RS + Dose + REG)2 + … → cumulative doses
  14. Read – get dose space info def get_dose_array_spacing(dose_ds): x_spacing, y_spacing

    = dose_ds.PixelSpacing frame_offset_vector_list = dose_ds.GridFrameOffsetVector frame_distance_list = [np.linalg.norm(frame_offset_vector_list[i + 1] - frame_offset_vector_list[i]) for i in range(len(frame_offset_vector_list) - 1)] z_spacing = np.mean(frame_distance_list) std_distance = np.std(frame_distance_list) if std_distance > 0.001: print("Warning: dose array spacing is not uniform") return [x_spacing, y_spacing, z_spacing] def get_dose_direction(dose_ds): ori = dose_ds.ImageOrientationPatient row = ori[:3] col = ori[3:] cross = np.cross(row, col) dose_direction = np.asarray([row, col, cross]).T return dose_direction.ravel()
  15. Write – file meta data def get_file_meta() -> FileMetaDataset: file_meta

    = FileMetaDataset() file_meta.FileMetaInformationGroupLength = 190 file_meta.FileMetaInformationVersion = b"\x00\x01" file_meta.TransferSyntaxUID = ImplicitVRLittleEndian file_meta.MediaStorageSOPClassUID = "1.2.840.10008.5.1.4.1.1.481.2" file_meta.MediaStorageSOPInstanceUID = ( generate_uid(prefix=DICOM_UID_PREFIX) ) file_meta.ImplementationClassUID = DICOM_UID_PREFIX + "1" return file_meta
  16. Write – dose data scaling = 1e-7 ds.SamplesPerPixel = 1

    ds.PhotometricInterpretation = "MONOCHROME2" ds.BitsAllocated = 32 ds.BitsStored = 32 ds.HighBit = 31 ds.PixelRepresentation = True ds.DoseUnits = "GY" ds.DoseType = "EFFECTIVE" ds.DoseSummationType = "PLAN" ds.NumberOfFrames = size[2] ds.FrameIncrementPointer = Tag(0x3004, 0x000C) ds.ImagePositionPatient = origin ds.ImageOrientationPatient = direction ds.PixelSpacing = spacing[0:2] ds.SliceThickness = spacing[2] ds.Columns = size[0] ds.Rows = size[1] ds.GridFrameOffsetVector = [ov * spacing[2] for ov in range(size[2])] ds.DoseGridScaling = scaling ds.PixelData = (array // scaling).astype(np.uint32).tobytes() Note: origin, direction, spacing, size are dose volume info
  17. • CMGM Oliveira, DICOM-RT standard in Radiotherapy Information Systems https://repositorio-aberto.up.pt/bitstream/10216/62158/2/TeseCeleste%20Oliveira.pdf

    • DICOM IN RADIOTHERAPY https://dicom.nema.org/dicom/geninfo/brochure/rtaapm.htm • RT Dose CIOD https://dicom.innolitics.com/ciods/rt-dose Ref.