diff --git a/fsl/wrappers/__init__.py b/fsl/wrappers/__init__.py index 23f45281a9f9978f9811411a6343122e33fd4a7e..5e1f61e89dda468017033e20b526712d70dda4c4 100644 --- a/fsl/wrappers/__init__.py +++ b/fsl/wrappers/__init__.py @@ -87,6 +87,7 @@ from .fsl_anat import (fsl_anat,) # noqa from .flirt import (flirt, # noqa invxfm, applyxfm, + applyxfm4D, concatxfm, mcflirt) from .fnirt import (fnirt, # noqa diff --git a/fsl/wrappers/flirt.py b/fsl/wrappers/flirt.py index 8b5d1d526dc6a893441204d788d58b7302d59260..df7eb2722b19954303ef36132f7d7f36365ac673 100644 --- a/fsl/wrappers/flirt.py +++ b/fsl/wrappers/flirt.py @@ -14,6 +14,7 @@ tools. flirt applyxfm + applyxfm4D invxfm concatxfm mcflirt @@ -70,6 +71,25 @@ def applyxfm(src, ref, mat, out, interp='spline', **kwargs): **kwargs) +@wutils.fileOrArray('mat') +@wutils.fileOrImage('src', 'ref', 'out') +@wutils.fslwrapper +def applyxfm4D(src, ref, out, mat, **kwargs): + """Wrapper for the ``applyxfm4D`` command. """ + + asrt.assertIsNifti(src, ref) + + valmap = { + 'singlematrix' : wutils.SHOW_IF_TRUE, + 'fourdigit' : wutils.SHOW_IF_TRUE, + } + + cmd = ['applyxfm4D', src, ref, out, mat] + cmd += wutils.applyArgStyle('-', valmap=valmap, **kwargs) + + return cmd + + @wutils.fileOrArray() @wutils.fslwrapper def invxfm(inmat, omat):