Transformation order in ANTSpy
See original GitHub issueThis might be related to the issue I raised but I am still having issue getting my head around how the transformation concatenations and orderings are handled in ANTSpy.
So, if I perform a registration in ANTS (the usual SyN), I get the following list as my forward transformations an example:
'/tmp/tmpdddnbjk41Warp.nii.gz', '/tmp/tmpdddnbjk40GenericAffine.mat']
So the first entry is the non linear deformation field and the second one is the initial affine map.
Now, I can use apply_transforms to apply the map. However, what I know about antsApplyTransform
, the transforms are applied in the order in which they are encountered on the command line and I think ANTSpy passes them on by simply going through the list.
My question is would this not result in the non linear warp being applied before the affine?
Also, on a related note if I combone two transformation list as:
final = t1 + t2
and use this in apply_transforms
would the resulting transformation be t2(t1(x))
where x are the spatial coordinates i.e. t1 first and then t2?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
there will be discussions of this in various places here https://github.com/ANTsX/ANTs/wiki and in the papers https://github.com/ANTsX/ANTs#boilerplate-ants as well as in
ants*pdf
documentation.the core reasons are mathematical, statistical and practical :
mathematical: we use
Diff_0
which requires fixed boundary conditions. as such, images are mapped to the fixed space by an affine transformation. within the fixed domain, we compute the diffemorphism, member ofDiff_0
.statistical: we want the tail of the deformation fields to be in common (template) space to allow group comparisons
practical: transformations are only dense under pull back not push forward
edit: 3rd reason