diff --git a/invesalius/reader/dicom.py b/invesalius/reader/dicom.py index 17452ad..8f61ce4 100644 --- a/invesalius/reader/dicom.py +++ b/invesalius/reader/dicom.py @@ -1416,7 +1416,10 @@ class Parser(): return "" def __format_time(self,value): - if (len(value.split(".")) > 1): + + if (len(value.split(".")) == 1): + data = time.gmtime(float(value)) + elif (len(value.split(".")) > 1): data = time.strptime(value, "%H.%M.%S") elif(len(value.split(":")) > 1): data = time.strptime(value, "%H:%M:%S") @@ -1674,6 +1677,7 @@ if __name__ == "__main__": for i in xrange(1,total+1): filename = "..//data//"+str(i)+".dcm" + parser = Parser() if parser.SetFileName(filename): print "p:", parser.GetPatientName() diff --git a/invesalius/reader/dicom_grouper.py b/invesalius/reader/dicom_grouper.py index 6801d65..8c7d5a4 100644 --- a/invesalius/reader/dicom_grouper.py +++ b/invesalius/reader/dicom_grouper.py @@ -287,7 +287,7 @@ class DicomGroups: key = tmp1.keys()[m] information = tmp1[key] - new_key = (information.patient.name, None, x, information.image.orientation_label) + new_key = (information.patient.name, None, x, information.image.orientation_label, information.acquisition.time) list = [information] -- libgit2 0.21.2