pynetdicom.dsutils.decode

pynetdicom.dsutils.decode(bytestring: BytesIO, is_implicit_vr: bool, is_little_endian: bool, deflated: bool = False) Dataset[source]

Decode bytestring to a pydicom Dataset.

Changed in version 1.5: Added deflated keyword parameter

Parameters:
  • byestring (io.BytesIO) – The encoded dataset in the DIMSE Message sent from the peer AE.

  • is_implicit_vr (bool) – The dataset is encoded as implicit (True) or explicit VR (False).

  • is_little_endian (bool) – The byte ordering of the encoded dataset, True for little endian, False for big endian.

  • deflated (bool, optional) – True if the dataset has been encoded using Deflated Explicit VR Little Endian transfer syntax (default False).

Returns:

The decoded dataset.

Return type:

pydicom.dataset.Dataset