diff --git a/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py b/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py index d17a13bd99..4dcf156964 100644 --- a/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py +++ b/nipype/interfaces/fsl/tests/test_auto_ImageMaths.py @@ -24,19 +24,20 @@ def test_ImageMaths_inputs(): argstr='%s', position=3, ), + mask_file=dict(argstr='-mas %s', ), op_string=dict( argstr='%s', position=2, ), out_data_type=dict( argstr='-odt %s', - position=5, + position=-1, ), out_file=dict( argstr='%s', genfile=True, hash_files=False, - position=4, + position=-2, ), output_type=dict(), suffix=dict(), diff --git a/nipype/interfaces/fsl/utils.py b/nipype/interfaces/fsl/utils.py index 7baec69256..53579a0927 100644 --- a/nipype/interfaces/fsl/utils.py +++ b/nipype/interfaces/fsl/utils.py @@ -500,7 +500,9 @@ def _list_outputs(self): class ImageMathsInputSpec(FSLCommandInputSpec): in_file = File(exists=True, argstr="%s", mandatory=True, position=1) in_file2 = File(exists=True, argstr="%s", position=3) - out_file = File(argstr="%s", position=4, genfile=True, hash_files=False) + mask_file = File(exists=True, argstr='-mas %s', + desc='use (following image>0) to mask current image') + out_file = File(argstr="%s", position=-2, genfile=True, hash_files=False) op_string = traits.Str( argstr="%s", position=2, @@ -514,7 +516,7 @@ class ImageMathsInputSpec(FSLCommandInputSpec): 'double', 'input', argstr="-odt %s", - position=5, + position=-1, desc=("output datatype, one of (char, short, " "int, float, double, input)"))