Hi Daniel,
Thank you!
I seem to have found an easy way to do the inversion:
As mentioned before, I got the deobliqued dataset using the code:
3dWarp -oblique2card -prefix card OriginalAnatomy+orig.
When I open the
card+orig.HEAD file now, I find two new attributes that are different from the attributes in
OriginalAnatomy+orig.HEAD:
type = float-attribute
name = WARPDRIVE_MATVEC_FOR_000000
count = 12
0.9955035 -0.03815642 0.08670011 1.430454 0.05067991
0.9878103 -0.1471824 -17.53901 -0.0800273 0.1509146
0.9853023 28.11709
type = float-attribute
name = WARPDRIVE_MATVEC_INV_000000
count = 12
0.9955035 0.05067991 -0.0800273 1.714989 -0.03815642
0.9878101 0.1509145 13.13652 0.08670011 -0.1471824
0.9853022 -30.40928
I think WARPDRIVE_MATVEC_INV_000000 is the attribute of inversion matrix.
And I can transform
card+orig back to match
OriginalAnatomy+orig using these codes:
cat_matvec card+orig::WARPDRIVE_MATVEC_INV_000000 > inverion.1D
3dAllineate -1Dmatrix_apply inversion.1D -prefix reoblique+orig -source card+orig -master OriginalAnatomy+orig
Unfortunately, the afni GUI say
reoblique+orig and
OriginalAnatomy+orig still have an angle difference of 9.835 degrees.
This warning makes me very sad !!
So I compare the matrix outputted by 3dWarp -verb and the matrix stored in
card+orig.HEAD for checking:
3dWarp -verb -oblique2card -prefix card OriginalAnatomy+orig. >forward_verb.1D
cat_matvec -ONELINE forward_verb.1D
0.995503 0.05068 -0.080027 1.71499 -0.038156 0.98781 0.150915 13.1365 0.0867 -0.147182 0.985302 -30.4093
cat_matvec -ONELINE card+orig::WARPDRIVE_MATVEC_FOR_000000
0.995503 -0.0381564 0.0867001 1.43045 0.0506799 0.98781 -0.147182 -17.539 -0.0800273 0.150915 0.985302 28.1171
cat_matvec -ONELINE card+orig::WARPDRIVE_MATVEC_INV_000000
0.995503 0.0506799 -0.0800273 1.71499 -0.0381564 0.98781 0.150915 13.1365 0.0867001 -0.147182 0.985302 -30.4093
This makes me very confused!
Because I thought the matrix outputted by 3dWarp -verb is the forward matrix. It is unexpectedly the same as the inversion matrix stored in the HEAD file now.
What do you think?
Yu
Edited 10 time(s). Last edit at 01/03/2019 07:13AM by Zhang Yu.