Skip to content

[BUG] ANTS InputSpec number_of_time_steps incorrect trait type #3117

Closed
@BenjaminMey

Description

@BenjaminMey

Summary

ANTSInputSpec has an incorrect trait type traits.Float, rather than traits.Int. I've tested this with ants v2.2.0, I believe the last for which ANTS was the expected registration call.

Actual behavior

My input parameters:

transformation_model = "SyN",
output_transform_prefix = "ANTS_OUT_",
dimension = 3,
metric = ["CC"],
metric_weight = [1.0],
number_of_iterations = [50, 50, 50, 50],
regularization = "Gauss",
regularization_gradient_field_sigma = 0,
regularization_deformation_field_sigma = 3,
gradient_step_length = 25,
number_of_time_steps = 3,
delta_time = 0.05,
radius = [5]

The command line generated was:
ANTS 3 --image-metric CC[ $fixed, $moving, 1, 5 ] --number-of-iterations 50x50x50x50 --output-naming ANTS_OUT_ --regularization Gauss[0.0,3.0] --transformation-model SyN[25.,3.0,0.050] --use-Histogram-Matching 1
After getting to the SyN transformation step, ANTS crashed with the following message:

Requested Transformation Model: SyN : Using
SyN diffeomorphic model for transformation.
Standard error:
Exception caught in ANTS:
/build/ants-x9F8a4/ants-2.2.0/Utilities/antsCommandLineParser.h:126:
itk::ERROR: CommandLineParser(0x5616707e9f80): ERROR: Parse error occured during command line argument processing
ERROR: Unable to convert '3.0' to type 'j' as unsigned int

Return code: 1

Expected behavior

ANTS conducts the SyN transformation with the following modified command:
ANTS 3 --image-metric CC[ $fixed, $moving, 1, 5 ] --number-of-iterations 50x50x50x50 --output-naming ANTS_OUT_ --regularization Gauss[0.0,3.0] --transformation-model SyN[25.,3,0.050] --use-Histogram-Matching 1

Platform details:

{'commit_hash': 'a0f756d1c',
 'commit_source': 'installation',
 'networkx_version': '1.11',
 'nibabel_version': '2.5.1',
 'nipype_version': '1.2.0',
 'numpy_version': '1.16.5',
 'pkg_path': '/usr/local/lib/python2.7/dist-packages/nipype',
 'scipy_version': '1.2.2',
 'sys_executable': '/usr/bin/python',
 'sys_platform': 'linux2',
 'sys_version': '2.7.17 (default, Nov  7 2019, 10:07:09) \n[GCC 7.4.0]',
 'traits_version': '4.6.0'}

Execution environment

Run inside a docker container with Ubuntu 18.04 with the versions above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions