View Source ExDicom.Reader.FindItemDelimitationItem (EX_DICOM v0.2.0)
Internal helper functions for parsing DICOM elements
Summary
Functions
Reads from the byte stream until it finds the magic numbers for the item delimitation item and then sets the length of the element.
Functions
@spec find_item_delimitation_item_and_set_element_length( ExDicom.ByteStream.t() | nil, map() ) :: {:ok, map(), ExDicom.ByteStream.t()} | {:error, String.t()}
Reads from the byte stream until it finds the magic numbers for the item delimitation item and then sets the length of the element.
Parameters
- byte_stream: ByteStream struct
- element: Map containing element data with :tag and :data_offset fields
Returns
{:ok, element, new_stream}
with updated element length and stream position{:error, reason}
if byte_stream is nil or if reading fails