pydicom.values.convert_UR_string

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

Return encoded ‘UR’ value.

Elements with VR of ‘UR’ may not be multi-valued and trailing spaces are non-significant.

Parameters
  • byte_string (bytes or str) – The encoded ‘UR’ element value.

  • is_little_endian (bool) – True if the value is encoded as little endian, False otherwise.

  • struct_format (str, optional) – Not used.

Returns

The encoded ‘UR’ element value without any trailing spaces.

Return type

bytes or str