Skip to content

Commit 1ae9eb8

Browse files
committed
add allineate option inside Qwarp
1 parent 37c9db6 commit 1ae9eb8

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2929,6 +2929,17 @@ class QwarpInputSpec(AFNICommandInputSpec):
29292929
'* You CAN use -resample with these 3dQwarp options:'
29302930
'-plusminus -inilev -iniwarp -duplo',
29312931
argstr='-resample')
2932+
allineate = traits.Bool(
2933+
desc='This option will make 3dQwarp run 3dAllineate first, to align '
2934+
'the source dataset to the base with an affine transformation. '
2935+
'It will then use that alignment as a starting point for the '
2936+
'nonlinear warping.',
2937+
argstr='-allineate')
2938+
allineate_opts = traits.Str(
2939+
desc='add extra options to the 3dAllineate command to be run by '
2940+
'3dQwarp.',
2941+
argstr='-allineate_opts %s',
2942+
xand=['allineate'])
29322943
nowarp = traits.Bool(
29332944
desc='Do not save the _WARP file.',
29342945
argstr='-nowarp')
@@ -3465,7 +3476,15 @@ class Qwarp(AFNICommand):
34653476
>>> qwarp2.cmdline # doctest: +ALLOW_UNICODE
34663477
'3dQwarp -base mni.nii -blur 0.0 2.0 -source structural.nii -inilev 7 -iniwarp Q25_warp+tlrc.HEAD -prefix Q11'
34673478
>>> res2 = qwarp2.run() # doctest: +SKIP
3468-
"""
3479+
>>> res2 = qwarp2.run() # doctest: +SKIP
3480+
>>> qwarp3 = afni.Qwarp()
3481+
>>> qwarp3.inputs.in_file = 'structural.nii'
3482+
>>> qwarp3.inputs.base_file = 'mni.nii'
3483+
>>> qwarp3.inputs.allineate = True
3484+
>>> qwarp3.inputs.allineate_opts = '-cose lpa -verb'
3485+
>>> qwarp3.cmdline # doctest: +ALLOW_UNICODE
3486+
"3dQwarp -base mni.nii -allineate -allineate_opts '-cost lpa -verb'"
3487+
>>> res3 = qwarp3.run() # doctest: +SKIP """
34693488
_cmd = '3dQwarp'
34703489
input_spec = QwarpInputSpec
34713490
output_spec = QwarpOutputSpec

0 commit comments

Comments
 (0)