ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
625 stars 161 forks source link

'SynOnly' transform option is still performing an affine step in ANTsPy #466

Closed dontminchenit closed 1 year ago

dontminchenit commented 1 year ago

For AntsPy, running with the 'SyNOnly" transform option seems to still be performing an affine step, and the results are generating an additional affine matrix. From the description, this option should skip the affine step and go straight to deformable.

Commenting out the following lines: /ANTsPy/ants/registration/interface.py 651 "-r", 652 initx,

seems to fix the issue for me, but not sure if that's the best solution.

cookpa commented 1 year ago

It's falling back on a center of mass transform if an initial affine is not provided. If you include initial_transform="Identity", it should respect that. You'll still get an affine matrix output but it should be identity.

cookpa commented 1 year ago

I think we could make the documentation clearer on this, which I can have a go at later.

dontminchenit commented 1 year ago

Ah, I see. That makes sense. Thanks.

ntustison commented 1 year ago

Although resolved, for your specific case, you have the options type_of_transform="antsRegistrationSyN{Quick/Repro}[so]" and type_of_transform="antsRegistrationSyN{Quick/Repro}[bo]".

dontminchenit commented 1 year ago

Thanks, Nick. I'll keep those options in mind as well.