dicom_parser.utils.sequence_detector package — dicom_parser 0.0.1 documentation

# dicom_parser.utils.sequence_detector package

## Submodules

## dicom_parser.utils.sequence_detector.exceptions module

Messages to be used by the `SequenceDetector` class.

## dicom_parser.utils.sequence_detector.sequence_detector module

Definition of the `SequenceDetector` class.

class `dicom_parser.utils.sequence_detector.sequence_detector.` `SequenceDetector`(sequences: dict = None)

  Bases: `object`

  `check_definition`(definition, values: dict) → bool

    Checks whether the specified header information values satisfy the provided definition.

    Parameters

      - definition (dict or list) – The imaging sequence definition, as a dict or list of dict instances.

      - values (dict) – Header information provided for the comparison.

    Returns

      Whether the given header information fits the definition.

    Return type

      bool

    Raises

      TypeError – Encountered a definition of an invalid type.

  `detect`(modality: str, values: dict) → str

    Tries to detect the imaging sequence according to the modality and provided header information.

    Parameters

      - modality (str) – The imaging modality as described in the DICOM header.

      - values (dict) – Sequence identifying header elements.

    Returns

      The detected sequence name or None.

    Return type

      str

  `get_known_modality_sequences`(modality: str) → dict

    Returns a dictionary of imaging sequence definitions.

    Parameters

      modality (str) – The modality for which to return imaging sequence defitions.

    Returns

      Imaging sequence definitions.

    Return type

      dict

    Raises

      NotImplementedError – The sequences dictionary does not include the provided modality.

## dicom_parser.utils.sequence_detector.sequences module

Known sequences defined by the expected (parsed) data element values from the header.

## Module contents