Skip to content

allow float as weight in afni's Allineate #2204

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 2 commits into from
Oct 4, 2017
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
8 changes: 8 additions & 0 deletions nipype/interfaces/afni/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,17 @@ class AllineateInputSpec(AFNICommandInputSpec):
weight_file = File(
argstr='-weight %s',
exists=True,
deprecated='1.0.0', new_name='weight',
desc='Set the weighting for each voxel in the base dataset; '
'larger weights mean that voxel count more in the cost function. '
'Must be defined on the same grid as the base dataset')
weight = traits.Either(
File(exists=True), traits.Float(),
argstr='-weight %s',
desc='Set the weighting for each voxel in the base dataset; '
'larger weights mean that voxel count more in the cost function. '
'If an image file is given, the volume must be defined on the '
'same grid as the base dataset')
out_weight_file = traits.File(
argstr='-wtprefix %s',
desc='Write the weight volume to disk as a dataset',
Expand Down
4 changes: 4 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_Allineate.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ def test_Allineate_inputs():
),
warpfreeze=dict(argstr='-warpfreeze',
),
weight=dict(argstr='-weight %s',
),
weight_file=dict(argstr='-weight %s',
deprecated='1.0.0',
new_name='weight',
),
zclip=dict(argstr='-zclip',
),
Expand Down