Commit ad2c27e804f877156bfac60663e859d3f381eacc
1 parent
b94711ad
Exists in
master
and in
67 other branches
FIX: Fix problem unicode
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
invesalius/reader/dicom.py
... | ... | @@ -1926,7 +1926,7 @@ class Image(object): |
1926 | 1926 | self.number = parser.GetImageNumber() |
1927 | 1927 | self.spacing = spacing = parser.GetPixelSpacing() |
1928 | 1928 | self.orientation_label = parser.GetImageOrientationLabel() |
1929 | - self.file = parser.filename.encode(utils.get_system_encoding()) | |
1929 | + self.file = parser.filename | |
1930 | 1930 | self.time = parser.GetImageTime() |
1931 | 1931 | self.type = parser.GetImageType() |
1932 | 1932 | self.size = (parser.GetDimensionX(), parser.GetDimensionY()) | ... | ... |
invesalius/reader/dicom_reader.py
... | ... | @@ -104,8 +104,8 @@ class LoadDicom:#(threading.Thread): |
104 | 104 | # break |
105 | 105 | |
106 | 106 | reader = gdcm.Reader() |
107 | - reader.SetFileName(self.filepath.encode(utils.get_system_encoding())) | |
108 | - | |
107 | + reader.SetFileName(self.filepath) | |
108 | + | |
109 | 109 | if (reader.Read()): |
110 | 110 | file = reader.GetFile() |
111 | 111 | |
... | ... | @@ -176,7 +176,7 @@ class LoadDicom:#(threading.Thread): |
176 | 176 | |
177 | 177 | # -------------- To Create DICOM Thumbnail ----------- |
178 | 178 | rvtk = vtkgdcm.vtkGDCMImageReader() |
179 | - rvtk.SetFileName(self.filepath.encode(utils.get_system_encoding())) | |
179 | + rvtk.SetFileName(self.filepath) | |
180 | 180 | rvtk.Update() |
181 | 181 | |
182 | 182 | try: |
... | ... | @@ -210,7 +210,7 @@ class LoadDicom:#(threading.Thread): |
210 | 210 | write_png.Write() |
211 | 211 | |
212 | 212 | # ---------- Refactory -------------------------------------- |
213 | - data_dict['invesalius'] = {'orientation_label' : GetImageOrientationLabel(self.filepath.encode(utils.get_system_encoding()))} | |
213 | + data_dict['invesalius'] = {'orientation_label' : GetImageOrientationLabel(self.filepath)} | |
214 | 214 | |
215 | 215 | # ------------------------------------------------------------- |
216 | 216 | dict_file[self.filepath] = data_dict | ... | ... |