A function is called Data_tree_general.py is called every time the user click on a item in the data tree. This functions can be useful to underdant where the data is stored.
The software organizes and stores data following a hierarchical structure modeled after the DICOM standard, facilitating structured management of medical imaging data. The hierarchy is as follows:
Patient ID → Study → Modality and Series
Patient Level:
Data begins with a unique Patient ID, serving as the top-level key to segregate data belonging to individual patients.
Study Level:
Each patient contains one or multiple Studies identified by study keys. Each study represents a distinct imaging session or clinical evaluation event.
Modality and Series Level:
Under each study, data is organized by Modality (e.g., CT, MR, RTSTRUCT, RTPLAN, etc.). Each modality further contains one or multiple Series, uniquely identified either by dictionary keys or numerical indices within a list, depending on whether multiple identical series keys may exist.
Dictionary keys are used for straightforward, unique access.
List indices facilitate handling scenarios with repeated or duplicated series identifiers, enabling explicit access.
Within each Series, the following data elements are stored:
Full DICOM Header:
The original DICOM metadata is preserved intact, ensuring complete data provenance.
Extracted Essential Fields:
Frequently used fields such as Pixel Spacing, Image Position, and Image Date are extracted and duplicated into dedicated fields for efficient, simplified access throughout the software.
Contour Data:
If applicable contours delineating regions of interest or anatomical structures (binary masks and polygons) are stored at the series level alongside their associated image data. Contour data can be created withing AMIGOpy or importated (RTStructures are stored own its own, but masks created using RTSTRUCTS are stored with the corresponding images)
Example data structure for each series
Example on how acess the data
the keys: self.patientID - self.studyID - self.modality and self.series_index are defined whe the user click on the data tree.
self.series_index is an index (number) while the others are data keys.