Overview Data Package#
The data package contains the data model for PyRaDiSe which will be used during loading
(see pyradise.fileio.loading module), processing (see pyradise.process package) and writing (see
pyradise.fileio.writing module). The goal of the data model design is to provide an simple, lightweight, and
extensible RT-oriented interface for the user to work with the data. First, simple because handling data with a
simple interface should be easy and intuitive. Second, lightweight because the data model should not add a lot of
overhead because processing of medical images typically requires large amounts of memory. Third, extensible because the
data model should be easily extendable to support new features and new data types such as for example DICOM Dose Plans.
The Subject is the top-level data holding container combining all necessary
subject-level information such as the subject’s name, the intensity and segmentation images and additional user
defined data in one common data structure. Typically, the Subject is created directly
by a SubjectLoader when loading data from disk. However, it can also be constructed
manually in order to render feasibility for working with other libraries such as MONAI.
The Subject comprises of a list of IntensityImage and
SegmentationImage images with each image possessing additional information about the
image content such as the Modality or the Organ
segmented. Furthermore, each image contains a TransformTape which is used to keep
track of all necessary physical property (i.e. origin, direction, spacing, size) changes during processing. The
TransformTape provides also functionality to revert the changes to the original
physical properties by playback the recorded changes. Each Image type posses
distinctive content-related information which are enlisted below:
Fig. 4 Schematic illustration of the subject and the images.#
Intensity Image#
In addition to the image data and the transform tape, an IntensityImage contains
information about the Modality. The Modality is used
to distinguish between different image modalities and their details such as CT, PET, or MR. The naming of the
different Modality instances is determined during the loading of
the Subject using either a modality configuration file or a
ModalityExtractor.
Segmentation Image#
Additionally to the image data and the transform tape, a SegmentationImage contains
information about the Organ segmented on the image and the
Annotator who generated the segmentations / contours. By design, each
SegmentationImage instance should contain a single organ / label to allow for simple
processing. As explained earlier this is not a hard constraint and can be circumvented in appropriate cases such as
for example if one needs to output multi-label segmentations.