AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
May 14, 2019 01:58AM
Hi Daniel,
Thanks for the suggestion!
a) It seems that when there is only rotation the upper and lower triangle (3x3 matrix) are symmetric aside from the sign flip.
1dApar2mat 0 0 0 -0.081944 -0.103117 -0.169312 1.000000 1 1.000 0 0 0
# mat44 1dApar2mat 0 0 0 -0.081944 -0.103117 -0.169312 1.000000 1 1.000 0 0 0 :
0.999995 -0.001425 0.002955 0.000000
0.001430 0.999997 -0.001800 0.000000
-0.002952 0.001804 0.999994 0.000000
Polar decomposition is the same:
0.999995 -0.00142484 0.00295479 0
0.00143016 0.999997 -0.00179989 0
-0.00295221 0.00180411 0.999994 0

b) If there is shearing only then this is only in the lower triangle:

1dApar2mat 0 0 0 0 0 0 1.000000 1 1.000000 -0.000783 0.02345 0.000108
# mat44 1dApar2mat 0 0 0 0 0 0 1.000000 1 1.000000 -0.000783 0.02345 0.000108 :
1.000000 0.000000 0.000000 0.000000
-0.000783 1.000000 0.000000 0.000000
0.023450 0.000108 1.000000 0.000000

Polar decomposition would be the following:
0.999931 0.000391157 -0.0117242 0
-0.00039179 1 -5.17014e-05 0
0.0117242 5.62912e-05 0.999931 0

c) If there is shearing and rotation you get the upper and lower triangles not matching:
1dApar2mat 0 0 0 -0.081944 -0.103117 -0.169312 1.000000 1 1.000000 -0.000783 0.02345 0.000108 > test1.txt
# mat44 1dApar2mat 0 0 0 -0.081944 -0.103117 -0.169312 1.000000 1 1.000000 -0.000783 0.02345 0.000108 :
0.999995 -0.001425 0.002955 0.000000
0.000647 0.999999 -0.001802 0.000000
0.020498 0.001879 1.000063 0.000000

Polar Decomposition would be the following:
cat_matvec test1.txt -P
0.999961 -0.00105473 -0.00877026 0
0.00103852 0.999998 -0.0018528 0
0.00877219 0.00184362 0.99996 0


So in general it seems that doing the polar decomposition and applying the 3x3 matrix would give the rotational components, whereas if you use the original full matrix then the upper triangle is the rotational component while the lower triangle is a mixture of shearing and rotation.


This definitely helps a lot, thanks for pointing that new tool out.
Thanks,
Ajay



Edited 2 time(s). Last edit at 05/14/2019 04:24PM by AjaySK.
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