Skip to content

Commit a23d402

Browse files
committed
Merge pull request #1128 from blakedewey/master
Add -newgrid option to Warp interface
2 parents e497543 + a0aa398 commit a23d402

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Next release
5555
* FIX: SSHDataGrabber outputs now return full path to the grabbed/downloaded files. (https://github.com/nipy/nipype/pull/1086)
5656
* FIX: Add QA output for TSNR to resting workflow (https://github.com/nipy/nipype/pull/1088)
5757
* FIX: Change N4BiasFieldCorrection to use short tag for dimensionality (backward compatible) (https://github.com/nipy/nipype/pull/1096)
58+
* ENH: Added -newgrid input to Warp in AFNI (3dWarp wrapper) (https://github.com/nipy/nipype/pull/1128)
5859

5960
Release 0.10.0 (October 10, 2014)
6061
============

nipype/interfaces/afni/preprocess.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ class WarpInputSpec(AFNICommandInputSpec):
233233
argstr="-gridset %s",
234234
exists=True)
235235

236+
newgrid = traits.Float(desc="specify grid of this size (mm)",
237+
argstr="-newgrid %f")
238+
236239
zpad = traits.Int(desc="pad input dataset with N planes" +
237240
" of zero on all sides.",
238241
argstr="-zpad %d")
@@ -254,7 +257,13 @@ class Warp(AFNICommand):
254257
>>> warp.inputs.out_file = "trans.nii.gz"
255258
>>> warp.cmdline
256259
'3dWarp -deoblique -prefix trans.nii.gz structural.nii'
257-
>>> res = warp.run() # doctest: +SKIP
260+
261+
>>> warp_2 = afni.Warp()
262+
>>> warp_2.inputs.in_file = 'structural.nii'
263+
>>> warp_2.inputs.newgrid = 1.0
264+
>>> warp_2.inputs.out_file = "trans.nii.gz"
265+
>>> warp_2.cmdline
266+
'3dWarp -newgrid 1.000000 -prefix trans.nii.gz structural.nii'
258267
259268
"""
260269

nipype/interfaces/afni/tests/test_auto_Warp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def test_Warp_inputs():
2626
),
2727
mni2tta=dict(argstr='-mni2tta',
2828
),
29+
newgrid=dict(argstr='-newgrid %f',
30+
),
2931
out_file=dict(argstr='-prefix %s',
3032
name_source='in_file',
3133
name_template='%s_warp',

0 commit comments

Comments
 (0)