diff --git a/fsl/wrappers/flirt.py b/fsl/wrappers/flirt.py index df7eb2722b19954303ef36132f7d7f36365ac673..eaee2d0ac10daa5e43743c071d23ca316f5c254f 100644 --- a/fsl/wrappers/flirt.py +++ b/fsl/wrappers/flirt.py @@ -98,19 +98,26 @@ def invxfm(inmat, omat): return ['convert_xfm', '-omat', omat, '-inverse', inmat] -@wutils.fileOrArray('inmat1', 'inmat2', 'outmat') +@wutils.fileOrArray('atob', 'atoc', 'btoc') @wutils.fslwrapper -def concatxfm(inmat1, inmat2, outmat): - """Use ``convert_xfm`` to concatenate two affines.""" +def concatxfm(atob, btoc, atoc): + """Use ``convert_xfm`` to concatenate two affines. Note that the + order of the input matrices is the opposite of the order expected + by ``convert_xfm``. + + :arg atob: Input matrix, transforming from "A" to "B". + :arg btoc: Input matrix, transforming from "B" to "C". + :arg atoc: Output matrix, transforming from "A" to "C". + """ - asrt.assertFileExists(inmat1, inmat2) + asrt.assertFileExists(atob, btoc) cmd = ['convert_xfm', '-omat', - outmat, + atoc, '-concat', - inmat2, - inmat1] + btoc, + atob] return cmd