Commit fe6a94e1db7531cbf7bf611ecd7bbff3851de6a8

Authored by tfmoraes
1 parent 847232db

Merging improvement from dicom branch to master

invesalius/reader/dicom.py
... ... @@ -1580,8 +1580,9 @@ class Parser():
1580 1580 except(KeyError):
1581 1581 return 'ISO_IR_100'
1582 1582  
1583   - if encoding != None and encoding != "None":
1584   -
  1583 + if encoding is None or encoding == "None" or not encoding.strip():
  1584 + return 'ISO_IR 100'
  1585 + else:
1585 1586 #Problem with 0051 anonymized
1586 1587 if (encoding.split(":"))[0] == "Loaded":
1587 1588 return 'ISO_IR 100'
... ...
invesalius/reader/dicom_reader.py
... ... @@ -121,7 +121,7 @@ class LoadDicom:
121 121 ds = reader.GetFile().GetDataSet()
122 122 if ds.FindDataElement(tag):
123 123 encoding = str(ds.GetDataElement(tag).GetValue())
124   - if not(encoding != None and encoding != "None" and encoding != "Loaded"):
  124 + if encoding is None or encoding == "None" or encoding.startswith("Loaded"):
125 125 encoding = "ISO_IR 100"
126 126 else:
127 127 encoding = "ISO_IR_100"
... ...