diff --git a/nipype/interfaces/spm/tests/test_auto_ApplyInverseDeformation.py b/nipype/interfaces/spm/tests/test_auto_ApplyInverseDeformation.py index c652bd7e12..5ebc80e804 100644 --- a/nipype/interfaces/spm/tests/test_auto_ApplyInverseDeformation.py +++ b/nipype/interfaces/spm/tests/test_auto_ApplyInverseDeformation.py @@ -18,11 +18,11 @@ def test_ApplyInverseDeformation_inputs(): xor=["deformation"], ), in_files=dict( - field="fnames", + field="out{1}.pull.fnames", mandatory=True, ), interpolation=dict( - field="interp", + field="out{1}.pull.interp", ), matlab_cmd=dict(), mfile=dict( diff --git a/nipype/interfaces/spm/utils.py b/nipype/interfaces/spm/utils.py index 543a0d3024..0b18e34a79 100644 --- a/nipype/interfaces/spm/utils.py +++ b/nipype/interfaces/spm/utils.py @@ -262,12 +262,13 @@ class ApplyInverseDeformationInput(SPMCommandInputSpec): in_files = InputMultiPath( File(exists=True), mandatory=True, - field="fnames", + field="out{1}.pull.fnames", desc="Files on which deformation is applied", ) target = File( exists=True, field="comp{1}.inv.space", desc="File defining target space" ) + deformation = File( exists=True, field="comp{1}.inv.comp{1}.sn2def.matname", @@ -281,7 +282,10 @@ class ApplyInverseDeformationInput(SPMCommandInputSpec): xor=["deformation"], ) interpolation = traits.Range( - low=0, high=7, field="interp", desc="degree of b-spline used for interpolation" + low=0, + high=7, + field="out{1}.pull.interp", + desc="degree of b-spline used for interpolation", ) bounding_box = traits.List( @@ -328,9 +332,11 @@ class ApplyInverseDeformation(SPMCommand): def _format_arg(self, opt, spec, val): """Convert input to appropriate format for spm""" if opt == "in_files": - return scans_for_fnames(ensure_list(val)) + return np.array([simplify_list(val)], dtype=object) + # return scans_for_fnames(ensure_list(val)) if opt == "target": - return scans_for_fname(ensure_list(val)) + return np.array([simplify_list(val)], dtype=object) + # return scans_for_fname(ensure_list(val)) if opt == "deformation": return np.array([simplify_list(val)], dtype=object) if opt == "deformation_field":