Dicom.Tag (Dicom v0.9.1)

Copy Markdown View Source

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"

Summary

Functions

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

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

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

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

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

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

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

Types

t()

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

Functions

accession_number()

bits_allocated()

bits_stored()

body_part_examined()

code_meaning()

code_value()

coding_scheme_designator()

coding_scheme_version()

columns()

completion_flag()

completion_flag_description()

concept_code_sequence()

concept_name_code_sequence()

content_date()

content_sequence()

content_template_sequence()

content_time()

continuity_of_content()

data_set_trailing_padding()

file_meta_information_group_length()

file_meta_information_version()

format(arg)

@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(keyword)

@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}}

graphic_data()

graphic_type()

group_length?(arg1)

@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()

mapping_resource()

measured_value_sequence()

measurement_units_code_sequence()

media_storage_sop_class_uid()

media_storage_sop_instance_uid()

modality()

name(tag)

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

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

number_of_frames()

numeric_value()

numeric_value_qualifier_code_sequence()

observation_date_time()

observation_uid()

parse(arg1)

@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()

person_name_value()

photometric_interpretation()

pixel_data()

pixel_representation()

planar_configuration()

private?(arg)

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

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

private_information()

private_information_creator_uid()

purpose_of_reference_code_sequence()

receiving_application_entity_title()

receiving_presentation_address()

referenced_datetime()

referenced_frame_number()

referenced_frame_numbers()

referenced_frame_of_reference_uid()

referenced_sample_positions()

referenced_segment_number()

referenced_sop_class_uid()

referenced_sop_instance_uid()

referenced_sop_sequence()

referenced_time_offsets()

referenced_waveform_channels()

referring_physician_name()

relationship_type()

repeating?(arg)

@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()

sr_date()

sr_datetime()

sr_time()

study_date()

study_description()

study_id()

study_instance_uid()

study_time()

template_identifier()

temporal_range_type()

text_value()

transfer_syntax_uid()

uid_value()

value_type()

verification_date_time()

verification_flag()

verifying_observer_name()

verifying_observer_sequence()