aramis-lab / clinica

Software platform for clinical neuroimaging studies
http://www.clinica.run/
Other
218 stars 72 forks source link

Delete `clinica.utils.mri_registration` module #1137

Closed NicolasGensollen closed 2 months ago

NicolasGensollen commented 2 months ago

Description

The module clinica.utils.mri_registration only contains a single function convert_flirt_transformation_to_mrtrix_transformation which is only used in a single place in the code base:

https://github.com/aramis-lab/clinica/blob/7d2819a9db4a7e06d829e606a1714c854ef912fb/clinica/pipelines/dwi/connectome/pipeline.py#L353

Steps

Hints for the unit testing: The function is basically doing a subprocess call, so we could refactor a bit to have a helper function building and returning the command that should be run (that would be easy to test). Then, by monkey patching check_software and os.system we could test the behavior of the function without running the underlying MRTrix command.