View Source ExDicom.Parser (EX_DICOM v0.1.0)
Parses a DICOM P10 byte array and returns a DataSet object with the parsed elements.
Summary
Functions
Parses a DICOM P10 byte array and returns a DataSet object with the parsed elements. If the options argument contains the :until_tag property, parsing will stop once that tag is encountered.
Functions
@spec parse_dicom( binary(), keyword() ) :: {:ok, ExDicom.DataSet.t()} | {:error, String.t()}
Parses a DICOM P10 byte array and returns a DataSet object with the parsed elements. If the options argument contains the :until_tag property, parsing will stop once that tag is encountered.
Parameters
- byte_array - The binary containing DICOM data
- opts - Options to control parsing behavior (optional)
- :until_tag - Stop parsing when this tag is encountered
- :inflater - Function to handle deflated transfer syntax
Returns
{:ok, dataset}
- Successfully parsed DICOM data{:error, reason}
- Error occurred during parsing
Examples
iex> Parser.parse_dicom(<<...>>)
{:ok, %DataSet{...}}