pydicom.values.convert_IS_string¶
-
pydicom.values.convert_IS_string(byte_string, is_little_endian, struct_format=None)¶ Return a decoded ‘IS’ value.
Changed in version 2.0: The option to return numpy values was added.
- Parameters
byte_string (bytes or str) – The encoded ‘IS’ element value.
is_little_endian (bool) –
Trueif the value is encoded as little endian,Falseotherwise.struct_format (str, optional) – Not used.
- Returns
If
use_IS_numpyisFalse(default), returns a singleISor a list of themIf
use_IS_numpyisTrue, returns a singlenumpy.int64or andarrayof them- Return type
ISor list of them, ornumpy.int64orndarrayof them- Raises
ValueError – If
use_IS_numpyisTrueand the string contains non-valid charactersImportError – If
use_IS_numpyisTrueand numpy is not available