Commit 02043a6f54ee663a69076d6a89eb405ccc3c11f4
1 parent
45fcc00e
Exists in
master
and in
68 other branches
FIX: temporary fix latin caracters
Showing
2 changed files
with
6 additions
and
5 deletions
Show diff stats
invesalius/reader/dicom.py
... | ... | @@ -184,15 +184,16 @@ class Parser(): |
184 | 184 | """ |
185 | 185 | import os.path as path |
186 | 186 | |
187 | + | |
187 | 188 | filename = path.abspath(filename) |
188 | 189 | |
190 | + if (sys.platform == 'win32'): | |
191 | + filename = filename.encode('latin-1') | |
192 | + | |
189 | 193 | var_file = open("c:\\arquivo.txt","w") |
190 | 194 | var_file.write(filename) |
191 | 195 | var_file.close() |
192 | - #print type(filename) | |
193 | - #print filename | |
194 | - #print filename | |
195 | - #print "____________" | |
196 | + | |
196 | 197 | if path.isfile(filename): |
197 | 198 | # Several information can be acquired from DICOM using |
198 | 199 | # vtkgdcm.vtkGDCMImageReader.GetMedicalImageProperties() | ... | ... |
invesalius/reader/dicom_reader.py
... | ... | @@ -121,7 +121,7 @@ def yGetDicomGroups(directory, recursive=True, gui=True): |
121 | 121 | if recursive: |
122 | 122 | for dirpath, dirnames, filenames in os.walk(directory): |
123 | 123 | for name in filenames: |
124 | - filepath = os.path.join(dirpath, name).encode('latin-1') | |
124 | + filepath = os.path.join(dirpath, name) | |
125 | 125 | counter += 1 |
126 | 126 | if gui: |
127 | 127 | yield (counter,nfiles) | ... | ... |