pynetdicom.dsutils.encode_element

pynetdicom.dsutils.encode_element(elem, is_implicit_vr=True, is_little_endian=True)[source]

Encode a pydicom DataElement elem.

Deprecated since version 1.5: Will be removed in version 2.0, use pydicom instead.

Parameters
  • elem (pydicom.dataelem.DataElement) – The element to encode.

  • is_implicit_vr (bool, optional) – The element encoding scheme the element will be encoded with, True for implicit VR (default), False for explicit VR.

  • is_little_endian (bool, optional) – The byte ordering the element will be encoded in, True for little endian (default), False for big endian.

Returns

The encoded element.

Return type

bytes