fc13240 / dicompyler

Automatically exported from code.google.com/p/dicompyler
0 stars 0 forks source link

Files with .DCM extension not read on case sensitive OS's such as Linux (.dcm OK) #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. On Linux, set extension to .DCM on Dicom-RT file
2. Select directory with patient selection dialog
3. Dicom-RT is not seen.

What is the expected output? What do you see instead?
File should be read as it is a valid Dicom(-RT) file.

What version of the product are you using? On what operating system?
The latest code as of 18 Nov. 2009 on Ubuntu 9.04.

The fix is simple. Python's file name matching function defaults to
case-sensitivity on case-sensitive operating systems. One fix is to
explicitly lowercase the file extension to see if it matches.

Here is the output of diff for my patch and the original dicomgui.py file:

169c169
<                 if (os.path.isfile(dcmfile) and
fnmatch.fnmatch(dcmfile.lower(), '*.dcm')):

---
>                 if (os.path.isfile(dcmfile) and fnmatch.fnmatch(dcmfile,
'*.dcm')):

Original issue reported on code.google.com by roy.coding@gmail.com on 18 Nov 2009 at 9:41

Attachments:

GoogleCodeExporter commented 9 years ago
Issue was replicated on Mac OS X 10.6 and Windows XP SP3.

Original comment by bastula on 18 Nov 2009 at 11:07

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 91d42816f4.

Original comment by bastula on 18 Nov 2009 at 11:16