History of AFNI updates  

|
May 13, 2019 06:28PM
Hi Daniel,
I have a follow up question of how the affine matrix is organized based on the documentation below:

----------------------------------------------
DEFINITION OF AFFINE TRANSFORMATION PARAMETERS
----------------------------------------------
The 3x3 spatial transformation matrix is calculated as [S][D],
where [S] is the shear matrix,
[D] is the scaling matrix, and
is the rotation (proper orthogonal) matrix.
Thes matrices are specified in DICOM-ordered (x=-R+L,y=-A+P,z=-I+S)
coordinates as:

= [Rotate_y(param#6)] [Rotate_x(param#5)] [Rotate_z(param #4)]
(angles are in degrees)

[D] = diag( param#7 , param#8 , param#9 )

[ 1 0 0 ] [ 1 param#10 param#11 ]
[S] = [ param#10 1 0 ] OR [ 0 1 param#12 ]
[ param#11 param#12 1 ] [ 0 0 1 ]

The shift vector comprises parameters #1, #2, and #3.

1) In looking at this documentation, if there is only a rigid registration is it correct to say that for the 3x3 matrix (excluding translational components), that the lower diagonal is shearing terms (not present in rigid registration), the diagonal is the scaling term (should be 1), and then upper triangle are rotational terms (going from RAI to RAI).

2) If there is shearing/scaling terms and rotation, then there is an interaction such that the shearing/scaling and rotation cannot be separated accurately. However, it is still organized such that shearing terms are in the lower triangle and scaling in the diagonal, and rotation iin the upper triangle. This would suggest that most of the rotational components are in the upper triangle and shearing in lower triangle, while one still must account for interactions in order to be precise.

3)
When looking at cat_matvec there is a polar decomposition option:

-P = Do a polar decomposition on the 3x3 matrix part
of the mfile. This would result in an orthogonal
matrix (rotation only, no scaling) Q that is closest,
in the Frobenius distance sense, to the input matrix A.
Note: if A = R * S * E, where R, S and E are the Rotation,
Scale, and shEar matrices, respctively, Q does not
necessarily equal R because of interaction; Each of R,
S and E affects most of the columns in matrix A.



If looking at the affine matrix from the description above is it accurate to say the lower triangle of the resulting 3x3 matrix after -P are shearing terms, the diagonal is scaling terms (set to 1) and the upper triangle is rotational components after doing polar decomposition, even if this does not exactly equal the input matrix? The part that confused me is that the last sentence says R, S and E affects most of the columns in A so I am not 100% sure if the SDU are organized as columns or upper/lower triangle and diagonal (I am assuming the latter).



Thanks,
Ajay
Subject Author Posted

3dNwarpApply or 3dAllineate with affine transforms for different grid sizes

AjaySK February 15, 2019 03:33PM

Re: 3dNwarpApply or 3dAllineate with affine transforms for different grid sizes

Daniel Glen February 15, 2019 04:23PM

Re: 3dNwarpApply or 3dAllineate with affine transforms for different grid sizes

AjaySK February 17, 2019 03:56PM

Re: 3dNwarpApply or 3dAllineate with affine transforms for different grid sizes

Daniel Glen February 19, 2019 12:13PM

Re: 3dNwarpApply or 3dAllineate with affine transforms for different grid sizes

AjaySK May 13, 2019 06:28PM

Re: 3dNwarpApply or 3dAllineate with affine transforms for different grid sizes

Daniel Glen May 13, 2019 06:36PM

Re: 3dNwarpApply or 3dAllineate with affine transforms for different grid sizes

AjaySK May 14, 2019 01:58AM