Skip to content

Commit 7b55585

Browse files
ShotgunosineDylan
authored andcommitted
[ENH] Add interpolation options to Volreg interface
1 parent ec85fc0 commit 7b55585

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,6 +2491,10 @@ class VolregInputSpec(AFNICommandInputSpec):
24912491
argstr='-1Dmatrix_save %s',
24922492
keep_extension=True,
24932493
name_source='in_file')
2494+
interp = traits.Enum(
2495+
('Fourier', 'cubic', 'heptic', 'quintic','linear'),
2496+
desc='spatial interpolation methods [default = heptic]',
2497+
argstr='-%s')
24942498

24952499

24962500
class VolregOutputSpec(TraitedSpec):
@@ -2527,6 +2531,20 @@ class Volreg(AFNICommand):
25272531
'3dvolreg -Fourier -twopass -1Dfile functional.1D -1Dmatrix_save functional.aff12.1D -prefix functional_volreg.nii -zpad 4 -maxdisp1D functional_md.1D functional.nii'
25282532
>>> res = volreg.run() # doctest: +SKIP
25292533
2534+
>>> from nipype.interfaces import afni
2535+
>>> volreg = afni.Volreg()
2536+
>>> volreg.inputs.in_file = 'functional.nii'
2537+
>>> volreg.inputs.interp = 'cubic'
2538+
>>> volreg.inputs.verbose = True
2539+
>>> volreg.inputs.zpad = 1
2540+
>>> volreg.inputs.basefile = 'functional.nii'
2541+
>>> volreg.inputs.out_file = 'rm.epi.volreg.r1'
2542+
>>> volreg.inputs.oned_file = 'dfile.r1.1D'
2543+
>>> volreg.inputs.oned_matrix_save = 'mat.r1.tshift+orig.1D'
2544+
>>> volreg.cmdline
2545+
'3dvolreg -cubic -1Dfile dfile.r1.1D -1Dmatrix_save mat.r1.tshift+orig.1D -prefix rm.epi.volreg.r1 -verbose -base functional.nii -zpad 1 -maxdisp1D functional_md.1D functional.nii'
2546+
>>> res = volreg.run() # doctest: +SKIP
2547+
25302548
"""
25312549

25322550
_cmd = '3dvolreg'

0 commit comments

Comments
 (0)