View Source ExDicom.Parser (EX_DICOM v0.2.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

bei()

deflated()

jpeg_2000_lossless()

jpeg_2000_lossy()

jpeg_baseline()

jpeg_extended()

jpeg_lossless_1()

jpeg_ls_lossless()

lee()

lei()

parse_dicom(byte_array, opts \\ [])

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