Skip to main content

zeiss_utils

Handler classes for Zeiss Ophthalmology dicoms.

Module​

Functions​

czm_data_sanitization​

def czm_data_sanitization(    dataset: pydicom.dataset.Dataset, dataelement: pydicom.dataelem.DataElement,) ‑> None:

Callback sanitization function for CZM DICOMs.

Should be used with pydicom.Dataset.walk().

Arguments

  • dataset: the dataset being used in the callback.
  • dataelement: the individual DICOM element that is currently being inspected.

is_zeiss_manufacturer​

def is_zeiss_manufacturer(manufacturer: Any) ‑> bool:

Check if raw manufacturer string is Zeiss (Carl Zeiss Meditec).

Classes​

CZMError​

class CZMError(*args, **kwargs):

Errors related to processing of Zeiss DICOMs.

ImageName​

class ImageName(*args, **kwds):

Image types string enum.

Variables​

  • static CzmOctCube
  • static CzmOctEnface
  • static CzmOctFundus
  • static CzmOctHiDef
  • static CzmOctIris
  • static CzmOctMotion
  • static CzmOctNoise

ZeissCirrusBase​

class ZeissCirrusBase(    ds: pydicom.dataset.Dataset, filename: str, desired_image_type: str = 'CzmOctCube',):

Base class for extracting image data from the Zeiss CIRRUS.

Variables​

  • image_is_valid : bool - Image is valid if image type in dicom matches the intended type.

Methods​


get_data​

def get_data(    self, stop_before_pixels: bool = False,) ‑> dict[typing.Any, typing.Any] | None:

Return the pixel data of the OCT Cube scan.

If there are multiple OCT Cube scans in the file, the one with the most number of frames is returned. If there are no OCT Cube images, returns None.

ZeissCirrusDcm​

class ZeissCirrusDcm(    ds: pydicom.dataset.Dataset, filename: str, desired_image_type: str = 'CzmOctCube',):

Class for extracting OCT pixel data from the Zeiss CIRRUS .dcm file format.

Variables​

  • static VALID_SERIES_DESCRIPTIONS : tuple[str, ...]
  • image_is_valid : bool - Image is valid if image type in dicom matches the intended type.

Methods​


get_data​

def get_data(    self, stop_before_pixels: bool = False,) ‑> dict[typing.Any, typing.Any] | None:

Performs checks on data before reading data.

ZeissCirrusExdcm​

class ZeissCirrusExdcm(    ds: pydicom.dataset.Dataset, filename: str, desired_image_type: str = 'CzmOctCube',):

Class for extracting data from Zeiss's .EX.DCM file format.

Variables​

  • static VALID_SERIES_DESCRIPTIONS : tuple[str, ...]
  • image_is_valid : bool - Image is valid if image type in dicom matches the intended type.

Static methods​


get_scan_laterality​

def get_scan_laterality(ds: pydicom.dataset.FileDataset) ‑> str | None:

Get Scan Laterality from .EX.DCM file FileDataset.

This method is specifically for use in DicomOpthSource's _get_file_properties, where the file is accessed quickly to retrieve specific values to be cached.

Methods​


get_data​

def get_data(    self, stop_before_pixels: bool = False,) ‑> dict[typing.Any, typing.Any] | None:

Inherited from:

ZeissCirrusBase.get_data :

Return the pixel data of the OCT Cube scan.

If there are multiple OCT Cube scans in the file, the one with the most number of frames is returned. If there are no OCT Cube images, returns None.

ZeissDcmMisc​

class ZeissDcmMisc():

Misc definitions required for reading Zeiss Dcm files.

Variables​

  • static IMAGETAG_TO_IMAGENAME
  • static RETINAL_SERIES_DESCRIPTIONS

ZeissDcmTags​

class ZeissDcmTags():

Tag values for relevant elements of Zeiss Dcm.

Variables​

  • static CZM_OCT_CUBE
  • static CZM_OCT_ENFACE
  • static CZM_OCT_FUNDUS
  • static CZM_OCT_HIDEF
  • static CZM_OCT_IRIS
  • static CZM_OCT_MOTION
  • static CZM_OCT_NOISE
  • static FRAME
  • static IMAGE
  • static NUM_FRAMES
  • static PIXEL_SPACING_1
  • static PIXEL_SPACING_2
  • static PIXEL_SPACING_3
  • static PIXEL_X
  • static PIXEL_Y
  • static PRIVATE_IMAGE_NAMES

ZeissExdcmMisc​

class ZeissExdcmMisc():

Misc definitions required for reading Zeiss ExDcm files.

Variables​

  • static FALLBACK_SHAPE_TO_MODALITY : dict[tuple[int | None, int, int], str]
  • static MODEL_NAME_MAPPING
  • static OPTIC_DISC_SHAPE_TO_MODALITY : dict[tuple[int | None, int, int], str]
  • static SHAPE_TO_MODALITY : dict[str, dict[tuple[int | None, int, int], str]]

ZeissExdcmTags​

class ZeissExdcmTags(...):

Tag values for relevant elements of Zeiss ExDcm.

Variables​

  • static ACQUISITION_DATE_TIME
  • static COLUMNS
  • static LATERALITY
  • static MANUFACTURER
  • static MANUFACTURERS_MODEL_NAME
  • static NUMBER_OF_FRAMES
  • static PATIENTS_BIRTH_DATE
  • static PATIENTS_SEX
  • static PATIENT_NAME
  • static PHOTOMETRIC_INTERPRETATION
  • static PIXEL_SPACING
  • static ROWS
  • static SERIES_DESCRIPTION
  • static SPACING_BETWEEN_SLICES
  • static STUDY_DATE