Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
857e255a
Commit
857e255a
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
RF: guesType is case insensitive
parent
9dfd2a7c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/utils.py
+4
-4
4 additions, 4 deletions
fsl/data/utils.py
with
4 additions
and
4 deletions
fsl/data/utils.py
+
4
−
4
View file @
857e255a
...
@@ -49,15 +49,15 @@ def guessType(path):
...
@@ -49,15 +49,15 @@ def guessType(path):
if
op
.
isfile
(
path
):
if
op
.
isfile
(
path
):
# Some types are easy - just check the extensions
# 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
return
fslvtk
.
VTKMesh
,
path
elif
fslpath
.
hasExt
(
path
,
fslgifti
.
ALLOWED_EXTENSIONS
):
elif
fslpath
.
hasExt
(
path
.
lower
()
,
fslgifti
.
ALLOWED_EXTENSIONS
):
return
fslgifti
.
GiftiMesh
,
path
return
fslgifti
.
GiftiMesh
,
path
elif
fslfs
.
isGeometryFile
(
path
):
elif
fslfs
.
isGeometryFile
(
path
):
return
fslfs
.
FreesurferMesh
,
path
return
fslfs
.
FreesurferMesh
,
path
elif
fslpath
.
hasExt
(
path
,
fslmgh
.
ALLOWED_EXTENSIONS
):
elif
fslpath
.
hasExt
(
path
.
lower
()
,
fslmgh
.
ALLOWED_EXTENSIONS
):
return
fslmgh
.
MGHImage
,
path
return
fslmgh
.
MGHImage
,
path
elif
fslpath
.
hasExt
(
path
,
fslbmp
.
BITMAP_EXTENSIONS
):
elif
fslpath
.
hasExt
(
path
.
lower
()
,
fslbmp
.
BITMAP_EXTENSIONS
):
return
fslbmp
.
Bitmap
,
path
return
fslbmp
.
Bitmap
,
path
# Other specialised image types
# Other specialised image types
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment