Skip to content

Add -newgrid option to Warp interface #1128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Next release
* FIX: SSHDataGrabber outputs now return full path to the grabbed/downloaded files. (https://github.com/nipy/nipype/pull/1086)
* FIX: Add QA output for TSNR to resting workflow (https://github.com/nipy/nipype/pull/1088)
* FIX: Change N4BiasFieldCorrection to use short tag for dimensionality (backward compatible) (https://github.com/nipy/nipype/pull/1096)
* ENH: Added -newgrid input to Warp in AFNI (3dWarp wrapper) (https://github.com/nipy/nipype/pull/1128)

Release 0.10.0 (October 10, 2014)
============
Expand Down
11 changes: 10 additions & 1 deletion nipype/interfaces/afni/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ class WarpInputSpec(AFNICommandInputSpec):
argstr="-gridset %s",
exists=True)

newgrid = traits.Float(desc="specify grid of this size (mm)",
argstr="-newgrid %f")

zpad = traits.Int(desc="pad input dataset with N planes" +
" of zero on all sides.",
argstr="-zpad %d")
Expand All @@ -254,7 +257,13 @@ class Warp(AFNICommand):
>>> warp.inputs.out_file = "trans.nii.gz"
>>> warp.cmdline
'3dWarp -deoblique -prefix trans.nii.gz structural.nii'
>>> res = warp.run() # doctest: +SKIP

>>> warp_2 = afni.Warp()
>>> warp_2.inputs.in_file = 'structural.nii'
>>> warp_2.inputs.newgrid = 1.0
>>> warp_2.inputs.out_file = "trans.nii.gz"
>>> warp_2.cmdline
'3dWarp -newgrid 1.000000 -prefix trans.nii.gz structural.nii'

"""

Expand Down
2 changes: 2 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_Warp.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def test_Warp_inputs():
),
mni2tta=dict(argstr='-mni2tta',
),
newgrid=dict(argstr='-newgrid %f',
),
out_file=dict(argstr='-prefix %s',
name_source='in_file',
name_template='%s_warp',
Expand Down