nipy / nipype

Workflows and interfaces for neuroimaging packages
https://nipype.readthedocs.org/en/latest/
Other
751 stars 530 forks source link

antsRegistration not working anymore with recent versions of ANTS #3618

Closed enzo-bonnot closed 11 months ago

enzo-bonnot commented 11 months ago

Summary

When running the function run() from the Registration class of nipype.interfaces.ants.registration I get an error saying that the file containing the transformation matrix was not found. This is caused by the use of the option use-estimate-learning-rate-once when running the command antsRegistration. This option has been removed in recent versions of ANTS. This is the output.nipype that I get when running the registration :

ERROR:  Invalid flag provided use-estimate-learning-rate-once
ERROR:  Invalid flag provided use-estimate-learning-rate-once
ERROR:  Invalid command line flags found! Aborting execution.

Would it be possible to have a fix for this or at least some information about which version of ANTS is compatible with which version of nipype. Maybe there is already this compatibility information somewhere but I did not find it yet.

How to replicate the behavior

Running the registration from nipype.interfaces.ants.registration with a version of ANTS => 2.4.1. Still need to test from which version this option got removed.

Platform details:

{'commit_hash': '<not found>',
 'commit_source': '(none found)',
 'networkx_version': '3.0',
 'nibabel_version': '5.0.1',
 'nipype_version': '1.8.6',
 'numpy_version': '1.24.2',
 'pkg_path': '/home/imag2/miniconda3/lib/python3.9/site-packages/nipype',
 'scipy_version': '1.10.1',
 'sys_executable': '/home/imag2/miniconda3/bin/python',
 'sys_platform': 'linux',
 'sys_version': '3.9.16 | packaged by conda-forge | (main, Feb  1 2023, '
                '21:39:03) \n'
                '[GCC 11.3.0]',
 'traits_version': '6.3.2'}
effigies commented 11 months ago

The use_estimate_learning_rate_once flag is optional. If you do not set it, it should not be added to the command.

effigies commented 11 months ago

In any case, we could set max_ver on that input, so at least there will be an error if someone tries to use it.

enzo-bonnot commented 11 months ago

Well, sorry, completly my fault here it was coming from a config file of the package I am using that I did not see. Thanks for your answer.