diff --git a/fsl/data/image.py b/fsl/data/image.py index 5e2a49195c57471374769772a7464b5faf8de3ce..c81acf89f8a22d6d3f66cbd504421b043eb0b466 100644 --- a/fsl/data/image.py +++ b/fsl/data/image.py @@ -26,6 +26,7 @@ and file names: looksLikeImage removeExt + splitExt addExt defaultExt loadIndexedImageFile @@ -799,6 +800,15 @@ def removeExt(filename): return fslpath.removeExt(filename, ALLOWED_EXTENSIONS) +def splitExt(filename): + """Splits the base name and extension for the given ``filename``. + + See :func:`~fsl.utils.path.splitExt`. + """ + + return fslpath.splitExt(filename, ALLOWED_EXTENSIONS) + + def addExt(prefix, mustExist=True): """Adds a file extension to the given file ``prefix``.