Skip to content

Commit d55716a

Browse files
committed
Add _format_arg overload to RegTools NiftyRegCommand
1 parent c2e9295 commit d55716a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

nipype/interfaces/niftyreg/regutils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,14 @@ class RegTools(NiftyRegCommand):
335335
output_spec = RegToolsOutputSpec
336336
_suffix = '_tools'
337337

338+
# Need this overload to properly constraint the interpolation type input
339+
def _format_arg(self, name, spec, value):
340+
if name == 'inter_val':
341+
inter_val = {'NN': 0, 'LIN': 1, 'CUB': 3, 'SINC': 5}
342+
return spec.argstr % inter_val[value]
343+
else:
344+
return super(RegTools, self)._format_arg(name, spec, value)
345+
338346

339347
class RegAverageInputSpec(NiftyRegCommandInputSpec):
340348
""" Input Spec for RegAverage. """

0 commit comments

Comments
 (0)