View Source ExDicom.DataSet (EX_DICOM v0.2.0)
Encapsulates a collection of DICOM Elements and provides various functions to access the data.
Rules for handling padded spaces:
- DS = Strip leading and trailing spaces
- DT = Strip trailing spaces
- IS = Strip leading and trailing spaces
- PN = Strip trailing spaces
- TM = Strip trailing spaces
- AE = Strip leading and trailing spaces
- CS = Strip leading and trailing spaces
- SH = Strip leading and trailing spaces
- LO = Strip leading and trailing spaces
- LT = Strip trailing spaces
- ST = Strip trailing spaces
- UT = Strip trailing spaces
Summary
Functions
Parses an element tag according to the 'AT' VR definition.
Finds the element for tag and returns a 64-bit float if it exists and has data.
Finds the element for tag and returns a 32-bit float if it exists and has data.
Parses a string to a float for the specified index in a multi-valued element.
Finds the element for tag and returns a signed int 16 if it exists and has data.
Finds the element for tag and returns a signed int 32 if it exists and has data.
Parses a string to an integer for the specified index in a multi-valued element.
Creates a new DicomDataset struct.
Returns the number of string values for the element.
Returns a string for the element. For VR types of AE, CS, SH and LO. If index is provided, returns the component at that index in a multi-valued string.
Returns a string with leading spaces preserved and trailing spaces removed. For VRs of type UT, ST and LT.
Finds the element for tag and returns an unsigned int 16 if it exists and has data.
Finds the element for tag and returns an unsigned int 32 if it exists and has data.
Types
@type byte_array() :: binary()
@type element() :: %{ data_offset: non_neg_integer(), length: non_neg_integer(), parser: parser() | nil, Value: any() | nil }
@type index() :: non_neg_integer()
@type parser() :: module()
@type t() :: %ExDicom.DataSet{ byte_array: byte_array(), byte_array_parser: parser(), elements: elements(), position: term(), warnings: term() }
@type tag() :: String.t()
Functions
Parses an element tag according to the 'AT' VR definition.
Finds the element for tag and returns a 64-bit float if it exists and has data.
Finds the element for tag and returns a 32-bit float if it exists and has data.
Parses a string to a float for the specified index in a multi-valued element.
Finds the element for tag and returns a signed int 16 if it exists and has data.
Finds the element for tag and returns a signed int 32 if it exists and has data.
Parses a string to an integer for the specified index in a multi-valued element.
@spec new(parser(), byte_array(), elements()) :: t()
Creates a new DicomDataset struct.
Returns the number of string values for the element.
Returns a string for the element. For VR types of AE, CS, SH and LO. If index is provided, returns the component at that index in a multi-valued string.
Returns a string with leading spaces preserved and trailing spaces removed. For VRs of type UT, ST and LT.
Finds the element for tag and returns an unsigned int 16 if it exists and has data.
Finds the element for tag and returns an unsigned int 32 if it exists and has data.