Skip to content

[Descriptor Issue]: antsApplyTransforms bspline interpolation #263

@kaitj

Description

@kaitj

Package

ANTs

Tool Name

antsApplyTransforms

Problem Description

When calling antsApplyTransforms with bspline interpolation, the order needs to be passed as well, but only the integer value. Currently it passes the full parameter value.

From calling the following:

ants.ants_apply_transforms(
    input_image="T1w.nii', 
    reference_image="ref.nii", 
    output=ants.ants_apply_transforms_warped_output_params("output.nii"),
    interpolation=ants.ants_apply_transforms_bspline_params(order=3)
)

currently (from dry-running and printing last_cargs):

['antsApplyTransforms', '--input', 'T1w.nii', '--reference-image', 'ref.nii', '--output', 'output.nii', '--interpolation', 'BSpline[order=3]']

vs what it should be:

['antsApplyTransforms', '--input', 'T1w.nii', '--reference-image', 'ref.nii', '--output', 'output.nii', '--interpolation', 'BSpline[3]']

Also, the interpolation argument should not be wrapped in quotes as it throws a Literal error (e.g. should be --interpolation BSpline[3]).

cc: @tamsinrogers

Steps to Reproduce

Run antsApplyTransforms with b-spline interpolation.

Logs

ERROR    styx_local_runner:local_runner.py:77 
ERROR: Unable to convert 'order=3' to type 'j' as unsigned int

Sub-issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions