From a71f4599e7d0fdd3a153d4584261ea43d49c8afd Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Thu, 11 Mar 2010 12:46:11 +0000 Subject: [PATCH] FIX: Bug reported by Pedro Noritomi, 11 march 2010, at CTI. It occured while importing DICOM files acquired at FMVZ of UNESP, in Botucatu. FIX #230 --- invesalius/reader/dicom.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/invesalius/reader/dicom.py b/invesalius/reader/dicom.py index 24695cc..5b8eaec 100644 --- a/invesalius/reader/dicom.py +++ b/invesalius/reader/dicom.py @@ -1142,6 +1142,7 @@ class Parser(): """ data = self.vtkgdcm_reader.GetMedicalImageProperties()\ .GetPatientName() + if (data): name = data.strip() encoding = self.GetEncoding() @@ -1510,7 +1511,12 @@ class Parser(): ds = self.gdcm_reader.GetFile().GetDataSet() if ds.FindDataElement(tag): encoding = str(ds.GetDataElement(tag).GetValue()) - if encoding != None: + + print '_'+encoding+'_' + print type(encoding) + + if encoding != None and encoding != "None": + print 'ENTROU......' #Problem with 0051 anonymized if (encoding.split(":"))[0] == "Loaded": return 'ISO_IR 100' -- libgit2 0.21.2