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
isTrue
then returnsDSdecimal
or alist
ofDSdecimal
, otherwise returnsDSfloat
or alist
ofDSfloat
.Return type: valuerep.DSfloat or valuerep.DSdecimal or list of DSfloat/DSdecimal