Skip to content

Commit 3fde2fb

Browse files
authored
Merge pull request #2204 from salma1601/afni_allineate_weight
allow float as weight in afni's Allineate
2 parents 6e95b3c + 40b66be commit 3fde2fb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,17 @@ class AllineateInputSpec(AFNICommandInputSpec):
356356
weight_file = File(
357357
argstr='-weight %s',
358358
exists=True,
359+
deprecated='1.0.0', new_name='weight',
359360
desc='Set the weighting for each voxel in the base dataset; '
360361
'larger weights mean that voxel count more in the cost function. '
361362
'Must be defined on the same grid as the base dataset')
363+
weight = traits.Either(
364+
File(exists=True), traits.Float(),
365+
argstr='-weight %s',
366+
desc='Set the weighting for each voxel in the base dataset; '
367+
'larger weights mean that voxel count more in the cost function. '
368+
'If an image file is given, the volume must be defined on the '
369+
'same grid as the base dataset')
362370
out_weight_file = traits.File(
363371
argstr='-wtprefix %s',
364372
desc='Write the weight volume to disk as a dataset',

nipype/interfaces/afni/tests/test_auto_Allineate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ def test_Allineate_inputs():
117117
),
118118
warpfreeze=dict(argstr='-warpfreeze',
119119
),
120+
weight=dict(argstr='-weight %s',
121+
),
120122
weight_file=dict(argstr='-weight %s',
123+
deprecated='1.0.0',
124+
new_name='weight',
121125
),
122126
zclip=dict(argstr='-zclip',
123127
),

0 commit comments

Comments
 (0)