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

DICOM Tag constants and utilities.

Tags are `{group, element}` tuples identifying DICOM attributes.
This module provides constants for commonly used tags and lookup
functions for the full PS3.6 data dictionary.

## Examples

    iex> Dicom.Tag.patient_name()
    {0x0010, 0x0010}

    iex> Dicom.Tag.name({0x0010, 0x0010})
    "PatientName"

# `t`

```elixir
@type t() :: {non_neg_integer(), non_neg_integer()}
```

# `accession_number`

# `bits_allocated`

# `bits_stored`

# `body_part_examined`

# `columns`

# `data_set_trailing_padding`

# `file_meta_information_group_length`

# `file_meta_information_version`

# `format`

```elixir
@spec format(t()) :: String.t()
```

Formats a tag as a `(GGGG,EEEE)` hex string.

## Examples

    iex> Dicom.Tag.format({0x0010, 0x0010})
    "(0010,0010)"

# `from_keyword`

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

Finds a tag by its DICOM keyword (e.g., "PatientName").

Delegates to `Dicom.Dictionary.Registry.find_by_keyword/1`.

## Examples

    iex> Dicom.Tag.from_keyword("PatientName")
    {:ok, {0x0010, 0x0010}}

# `group_length?`

```elixir
@spec group_length?(t()) :: boolean()
```

Returns true if the tag is a group length tag (element 0000).

# `high_bit`

# `implementation_class_uid`

# `implementation_version_name`

# `instance_creation_date`

# `instance_creation_time`

# `instance_number`

# `item`

# `item_delimitation`

# `media_storage_sop_class_uid`

# `media_storage_sop_instance_uid`

# `modality`

# `name`

```elixir
@spec name(t()) :: String.t()
```

Returns the human-readable name for a tag, or a hex string if unknown.

# `number_of_frames`

# `parse`

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

Parses a tag string in "(GGGG,EEEE)" or "GGGGEEEE" format.

## Examples

    iex> Dicom.Tag.parse("(0010,0010)")
    {:ok, {0x0010, 0x0010}}

    iex> Dicom.Tag.parse("00100010")
    {:ok, {0x0010, 0x0010}}

    iex> Dicom.Tag.parse("invalid")
    {:error, :invalid_tag_format}

# `patient_age`

# `patient_birth_date`

# `patient_id`

# `patient_name`

# `patient_sex`

# `photometric_interpretation`

# `pixel_data`

# `pixel_representation`

# `private?`

```elixir
@spec private?(t()) :: boolean()
```

Returns true if the tag is a private tag (odd group number).

# `private_information`

# `private_information_creator_uid`

# `receiving_application_entity_title`

# `receiving_presentation_address`

# `referring_physician_name`

# `repeating?`

```elixir
@spec repeating?(t()) :: boolean()
```

Returns true if the tag belongs to a repeating group (50XX, 60XX, 7FXX).

## Examples

    iex> Dicom.Tag.repeating?({0x5000, 0x0010})
    true

    iex> Dicom.Tag.repeating?({0x0010, 0x0010})
    false

# `rows`

# `samples_per_pixel`

# `sending_application_entity_title`

# `sending_presentation_address`

# `sequence_delimitation`

# `series_description`

# `series_instance_uid`

# `series_number`

# `sop_class_uid`

# `sop_instance_uid`

# `source_application_entity_title`

# `source_presentation_address`

# `study_date`

# `study_description`

# `study_id`

# `study_instance_uid`

# `study_time`

# `transfer_syntax_uid`

---

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