Dicom.SOPClass (Dicom v0.5.1)

Copy Markdown View Source

DICOM SOP Class registry.

Provides compile-time lookup of all 232 DICOM SOP Classes (183 storage + 49 service/query/print/etc.).

Each SOP class has a struct with uid, name, type, modality, and retired status. All lookups are O(1) via compile-time maps and MapSets.

Generated via mix dicom.gen_sop_classes from:

  • priv/sops.json (innolitics/dicom-standard)
  • priv/service_sop_classes.exs (hand-maintained)

Reference: DICOM PS3.4.

Summary

Functions

Returns only active (non-retired) SOP classes.

Returns all registered SOP classes.

Returns storage SOP classes for the given DICOM modality code.

Returns SOP classes of the given type.

Returns the SOP class for the given UID.

Returns true if the UID is a known SOP class.

Returns the human-readable name of the SOP class.

Returns true if the UID is a retired SOP class.

Returns all storage SOP classes.

Returns true if the UID is a storage SOP class. O(1) MapSet lookup.

Types

sop_type()

@type sop_type() ::
  :storage
  | :query_retrieve
  | :verification
  | :print
  | :worklist
  | :media
  | :protocol
  | :service

t()

@type t() :: %Dicom.SOPClass{
  modality: String.t() | nil,
  name: String.t(),
  retired: boolean(),
  type: sop_type(),
  uid: String.t()
}

Functions

active()

@spec active() :: [t()]

Returns only active (non-retired) SOP classes.

all()

@spec all() :: [t()]

Returns all registered SOP classes.

by_modality(modality)

@spec by_modality(String.t()) :: [t()]

Returns storage SOP classes for the given DICOM modality code.

by_type(type)

@spec by_type(sop_type()) :: [t()]

Returns SOP classes of the given type.

from_uid(uid)

@spec from_uid(String.t()) :: {:ok, t()} | {:error, :unknown_sop_class}

Returns the SOP class for the given UID.

known?(uid)

@spec known?(String.t()) :: boolean()

Returns true if the UID is a known SOP class.

name(uid)

@spec name(String.t()) :: {:ok, String.t()} | {:error, :unknown_sop_class}

Returns the human-readable name of the SOP class.

retired?(uid)

@spec retired?(String.t()) :: boolean()

Returns true if the UID is a retired SOP class.

storage()

@spec storage() :: [t()]

Returns all storage SOP classes.

storage?(uid)

@spec storage?(String.t()) :: boolean()

Returns true if the UID is a storage SOP class. O(1) MapSet lookup.