Commit 0185f8526777a931d299d1e661a9718dfb0f5111
Committed by
Thiago Franco de Moraes
1 parent
d8a4b121
Exists in
beta4
and in
1 other branch
FIX: problem with encoding on importing dicom, reported by the user p passant in InVesalius forum
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
invesalius/reader/dicom.py
@@ -1486,6 +1486,8 @@ class Parser(): | @@ -1486,6 +1486,8 @@ class Parser(): | ||
1486 | try: | 1486 | try: |
1487 | data = self.data_image[str(0x0008)][str(0x1030)] | 1487 | data = self.data_image[str(0x0008)][str(0x1030)] |
1488 | if (data): | 1488 | if (data): |
1489 | + if isinstance(data, unicode): | ||
1490 | + return data | ||
1489 | encoding = self.GetEncoding() | 1491 | encoding = self.GetEncoding() |
1490 | return data.decode(encoding) | 1492 | return data.decode(encoding) |
1491 | except(KeyError): | 1493 | except(KeyError): |