Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
4957d7da
Commit
4957d7da
authored
Feb 08, 2018
by
Paul McCarthy
🚵
Browse files
Clean up looksLikeImage
parent
d6e4554a
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/data/image.py
View file @
4957d7da
...
...
@@ -1332,12 +1332,10 @@ def looksLikeImage(filename, allowedExts=None):
extensions - defaults to :attr:`ALLOWED_EXTENSIONS`.
"""
if
allowedExts
is
None
:
allowedExts
=
ALLOWED_EXTENSIONS
if
allowedExts
is
None
:
allowedExts
=
ALLOWED_EXTENSIONS
# TODO A much more robust approach would be
# to try loading the file using nibabel.
return
any
([
filename
.
endswith
(
ext
)
for
ext
in
allowedExts
])
return
fslpath
.
hasExt
(
filename
,
allowedExts
)
def
addExt
(
prefix
,
mustExist
=
True
,
unambiguous
=
True
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment