From 4ea485337f1ac71c571897c28975cea3a9f490b5 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Thu, 17 Nov 2016 13:33:14 +0000 Subject: [PATCH] splitExt wrapper in image module. --- fsl/data/image.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fsl/data/image.py b/fsl/data/image.py index 5e2a49195..c81acf89f 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``. -- GitLab