Python example DecompressImage.py returning type error
Cross-platform DICOM implementation
Brought to you by:
malat
Good afternoon, I'm trying to run a simple image decompression operation using the gdcm python example, and I am SetByteStringValue() is returning:
TypeError: in method 'DataElement_SetByteStringValue', argument 2 expected byte string.
please let me know how I can address this
I believe you need to cast to byte in python3.x
data_fixed = bytes(data, encoding= 'utf-8')