Commit 104a5cdea332368e602ca089aa681a310508f880
1 parent
0aca2ead
Exists in
master
and in
5 other branches
FIX: Problem import DICOM file in GUI in the Win 32
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
invesalius/reader/dicom.py
... | ... | @@ -1925,7 +1925,7 @@ class Image(object): |
1925 | 1925 | self.number = parser.GetImageNumber() |
1926 | 1926 | self.spacing = spacing = parser.GetPixelSpacing() |
1927 | 1927 | self.orientation_label = parser.GetImageOrientationLabel() |
1928 | - self.file = parser.filename | |
1928 | + self.file = str(parser.filename) #Necessary original is unicode | |
1929 | 1929 | self.time = parser.GetImageTime() |
1930 | 1930 | self.type = parser.GetImageType() |
1931 | 1931 | self.size = (parser.GetDimensionX(), parser.GetDimensionY()) | ... | ... |
invesalius/reader/dicom_reader.py
... | ... | @@ -103,7 +103,7 @@ class LoadDicom(threading.Thread): |
103 | 103 | break |
104 | 104 | |
105 | 105 | reader = gdcm.Reader() |
106 | - reader.SetFileName(filepath) | |
106 | + reader.SetFileName(str(filepath)) | |
107 | 107 | |
108 | 108 | if (reader.Read()): |
109 | 109 | |
... | ... | @@ -175,7 +175,7 @@ class LoadDicom(threading.Thread): |
175 | 175 | |
176 | 176 | |
177 | 177 | # ---------- Refactory -------------------------------------- |
178 | - data_dict['invesalius'] = {'orientation_label' : GetImageOrientationLabel(filepath)} | |
178 | + data_dict['invesalius'] = {'orientation_label' : GetImageOrientationLabel(str(filepath))} | |
179 | 179 | |
180 | 180 | # ------------------------------------------------------------- |
181 | 181 | dict_file[filepath] = data_dict | ... | ... |