# `Dicom.SOPClass`
[🔗](https://github.com/Balneario-de-Cofrentes/dicom/blob/v0.5.1/lib/dicom/sop_class.ex#L1)

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.

# `sop_type`

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

# `t`

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

# `active`

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

Returns only active (non-retired) SOP classes.

# `all`

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

Returns all registered SOP classes.

# `by_modality`

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

Returns storage SOP classes for the given DICOM modality code.

# `by_type`

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

Returns SOP classes of the given type.

# `from_uid`

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

Returns the SOP class for the given UID.

# `known?`

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

Returns true if the UID is a known SOP class.

# `name`

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

Returns the human-readable name of the SOP class.

# `retired?`

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

Returns true if the UID is a retired SOP class.

# `storage`

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

Returns all storage SOP classes.

# `storage?`

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
