Describe the bug
I have affinely registered images that I want to further register using SyN - the output I am looking for is the warped image and the corresponding displacement field in .nii.gz.
For type_of_transform I chose SyNOnly, because, according to the documentation
“SyNOnly” [...] no initial transformation [...] Assumes images are aligned by an initial transformation
However, when I run the registration, the resulting .mat is not an identity, it has a non-zero translation component.
To reproduce
I uploaded the two .nii.gz images that I was using and the resulting affine and displacement field to dropbox.
Expected behavior
The documentation suggests that the images should be already aligned, so I would expect the translation component to be 0 (and the entire .mat to be identity).
Screenshots
ANTsPy installation (please complete the following information):
Hardware [Lenovo ThinkPad X1]
OS: [Ubuntu 22.04.4 LTS]
System details [Linux 6.5.0-28-generic x86_64]
Sub-system: [None]
ANTsPy version: [0.4.2]
Installation type: [pip]
Python version: [3.10.14]
Additional context
My goal is to get a .nii.gz displacement field - so I would also be content with a way of transforming the composite .h5 transform (with write_composite_transform=True to .nii.gz)
Describe the bug I have affinely registered images that I want to further register using SyN - the output I am looking for is the warped image and the corresponding displacement field in .nii.gz.
For
type_of_transform
I choseSyNOnly
, because, according to the documentationHowever, when I run the registration, the resulting .mat is not an identity, it has a non-zero translation component.
To reproduce I uploaded the two .nii.gz images that I was using and the resulting affine and displacement field to dropbox.
This is the snippet to run the registration:
Expected behavior The documentation suggests that the images should be already aligned, so I would expect the translation component to be 0 (and the entire .mat to be identity).
Screenshots
ANTsPy installation (please complete the following information):
OS: [Ubuntu 22.04.4 LTS]
Additional context My goal is to get a .nii.gz displacement field - so I would also be content with a way of transforming the composite .h5 transform (with
write_composite_transform=True
to .nii.gz)