pytomography.io.shared#

Shared functionality between different imaging modalities.

Submodules#

Package Contents#

Functions#

create_ds(reference_ds, SOP_instance_UID, ...)

Creates a new DICOM dataset based on a reference dataset with all required headers. Because this is potentially used to save images corresponding to different modalities, the UIDs must be input arguments to this function. In addition, since some modalities require saving multiple slices whereby SOP_instance_UIDs may use some convention to specify slice number, these are also input arguments.

pytomography.io.shared.create_ds(reference_ds, SOP_instance_UID, SOP_class_UID, modality)[source]#

Creates a new DICOM dataset based on a reference dataset with all required headers. Because this is potentially used to save images corresponding to different modalities, the UIDs must be input arguments to this function. In addition, since some modalities require saving multiple slices whereby SOP_instance_UIDs may use some convention to specify slice number, these are also input arguments.

Parameters:
  • reference_ds (FileDataset) – Dataset from which to copy all important headers such as patient information and study UID.

  • SOP_instance_UID (str) – Unique identifier for the particular instance (this is different for every DICOM file created)

  • SOP_class_UID (str) – Unique identifier for the imaging modality

  • modality (str) – String specifying imaging modality

Returns:

_description_

Return type:

_type_