Skip to content

Commit c0ebefd

Browse files
committed
ENH: Override _format_arg, make specs
1 parent 90fcfaf commit c0ebefd

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,6 +2581,11 @@ class Volreg(AFNICommand):
25812581
input_spec = VolregInputSpec
25822582
output_spec = VolregOutputSpec
25832583

2584+
def _format_arg(self, name, trait_spec, value):
2585+
if name == 'in_weight_volume' and not isinstance(value, Tuple):
2586+
value = (value, 0)
2587+
return super(Volreg, self)._format_arg(name, trait_spec, value)
2588+
25842589

25852590
class WarpInputSpec(AFNICommandInputSpec):
25862591
in_file = File(

nipype/interfaces/afni/tests/test_auto_Volreg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def test_Volreg_inputs():
2626
mandatory=True,
2727
position=-1,
2828
),
29+
in_weight_volume=dict(argstr="-weight '%s[%d]'", ),
2930
interp=dict(argstr='-%s', ),
3031
md1d_file=dict(
3132
argstr='-maxdisp1D %s',

0 commit comments

Comments
 (0)