File Handling

The manager is used to handle files and make sure all components have access to the loaded ones.

General Image Handling

Loaded general images can be accessed through the general_images attribute of the manager. These are loaded in using Pillow, this means if Pillow can open the image then PumpIA should be able to as well. The Pillow Image object does is not stored anywhere.

DICOM File Handling

Loaded DICOMS can be accessed through the patients attribute of the manager. This provides a set of all patients loaded from DICOM files.

Four classes are used to group and handle DICOM files:

The DICOM file path and pydicom Dataset can be accessed through either Series or Instance. For Series these will be for the current instance defined by the current_slice attribute.

DICOM Tags

DICOM tag handling is different to pydicom to allow for the handling of classic and enhanced DICOM files. These are accessed through the get_tag method for a Series or Instance. The user must pass in a Tag, these represent DICOM tags. DICOM tags given in the DICOM standard are available through the dicom_tags module. These are available as class attributes for the following classes representing different modalities:

For example given an MRI instance mr_image the following would get the echo time tag value.

from pumpia.file_handling.dicom_tags import MRTags

echo_time = mr_image.get_tag(MRTags.EchoTime)

Contents