Commit 4957d7da authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Clean up looksLikeImage

parent d6e4554a
......@@ -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):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment