pydicom.values.convert_IS_string¶
- pydicom.values.convert_IS_string(byte_string: bytes, is_little_endian: bool, struct_format: str | None = None) IS | MutableSequence[IS] | int64 | ndarray [source]¶
Return a decoded ‘IS’ value.
Changed in version 2.0: The option to return numpy values was added.
- Parameters:
- Returns:
If
use_IS_numpy
isFalse
(default), returns a singleIS
or a list of themIf
use_IS_numpy
isTrue
, returns a singlenumpy.int64
or andarray
of them- Return type:
- Raises:
ValueError – If
use_IS_numpy
isTrue
and the string contains non-valid charactersImportError – If
use_IS_numpy
isTrue
and numpy is not available