diff --git a/fsl/data/utils.py b/fsl/data/utils.py index bc2c1e334fc66f2b25bed22d49fafc72595ee1e5..690a1ac5f7be488ba09eec913b09d5ee88148c75 100644 --- a/fsl/data/utils.py +++ b/fsl/data/utils.py @@ -49,15 +49,15 @@ def guessType(path): if op.isfile(path): # Some types are easy - just check the extensions - if fslpath.hasExt(path, fslvtk.ALLOWED_EXTENSIONS): + if fslpath.hasExt(path.lower(), fslvtk.ALLOWED_EXTENSIONS): return fslvtk.VTKMesh, path - elif fslpath.hasExt(path, fslgifti.ALLOWED_EXTENSIONS): + elif fslpath.hasExt(path.lower(), fslgifti.ALLOWED_EXTENSIONS): return fslgifti.GiftiMesh, path elif fslfs.isGeometryFile(path): return fslfs.FreesurferMesh, path - elif fslpath.hasExt(path, fslmgh.ALLOWED_EXTENSIONS): + elif fslpath.hasExt(path.lower(), fslmgh.ALLOWED_EXTENSIONS): return fslmgh.MGHImage, path - elif fslpath.hasExt(path, fslbmp.BITMAP_EXTENSIONS): + elif fslpath.hasExt(path.lower(), fslbmp.BITMAP_EXTENSIONS): return fslbmp.Bitmap, path # Other specialised image types