pydicom.values.convert_DS_string

pydicom.values.convert_DS_string(byte_string, is_little_endian, struct_format=None)

Return a decoded ‘DS’ value.

Parameters:
  • byte_string (bytes or str) – The encoded ‘DS’ element value.
  • is_little_endian (bool) – True if the value is encoded as little endian, False otherwise.
  • struct_format (str, optional) – Not used.
Returns:

If use_DS_decimal is True then returns DSdecimal or a list of DSdecimal, otherwise returns DSfloat or a list of DSfloat.

Return type:

valuerep.DSfloat or valuerep.DSdecimal or list of DSfloat/DSdecimal