Input and output data

Algorithms computing the gamma index take two images with radiation dose distributions and return a single image with gamma index values.

Input data

The input data for the gamma index calculation algorithm consists of two-dimensional or three-dimensional images containing a spatial distribution of radiation dose. Two images are needed for comparison: a reference image and an evaluated image. Typically, the reference image is a measured image, which is obtained from measurements of an actual radiation dose by appropriate detectors. Meanwhile, the evaluated image is usually a calculated/planned image, which is an image generated by a treatment planning system (TPS).

Example of a reference image

A simple 3D reference image with a spatial distribution of radiation dose visualized in the 3D Slicer program.

Such data is stored in various file formats. These include, among others, DICOM (.dcm), ITK MetaImage (.mha, .mhd, .raw), and DOSXYZnrc 3D dose (.3ddose).

YAGIT is able to read DICOM files with radiation dose data (Modality = RTDOSE) and MetaImage files.

Key elements of input data

The algorithm calculating the gamma index requires the following information from the input files:

  • radiation dose values.

  • size – number of frames, rows, and columns.

  • offset/position – the position of the first voxel in the image, expressed in millimeters. Each axis has its own offset value.

  • spacing – the spacing between voxels expressed in millimeters. Each axis has its own spacing value.

In particular, it is not necessary for the reference and evaluated images to have the same sizes, offsets, or spacings.

Output data

The algorithm outputs an image with gamma index values for each point of the reference image. The resulting image has the same size, offset, and spacing as the reference image.

Example of a gamma index image

The image with gamma index values calculated for the parameters 3%L/3mm visualized in the 3D Slicer program. The black areas contain NaN values.

In YAGIT, the gamma index for reference points with a value below the dose cutoff value is set to NaN. The same value is also assigned in the case of local normalization when the algorithm encounters a zero dose value at a reference point, to avoid division by zero when calculating the gamma function.

Due to the possibility of the resulting image containing NaN values, a suitable file format for storing the gamma index image is MetaImage. This is because MetaImage saves images directly in binary format for both integers and floating-point numbers (including special values such as NaN and infinity). DICOM, on the other hand, only stores integers as binary data. If the image contains floating-point numbers, it needs to convert values before saving and determine appropriate coefficients that will allow for the reconstruction of the original values, but this prevents the storage of NaN values and infinity. The only exception is DICOM Parametric Map, which allows for the direct storage of floating-point numbers, but YAGIT doesn’t support it.