From 857e255a775e96be5c6a074852b8117e9ad68f80 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Mon, 24 Jun 2019 18:58:48 +0930
Subject: [PATCH] RF: guesType is case insensitive

---
 fsl/data/utils.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fsl/data/utils.py b/fsl/data/utils.py
index bc2c1e334..690a1ac5f 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
-- 
GitLab