Print

Print


Hi,

Mike - I think you've taken the "Rotation and Translation Matrix" from Pradeep's decomposition as your starting matrix, rather than the actual matrix that Pradeep started with (since you have unity scales and no skews, whereas Pradeep has non-trivial values for both).

Pradeep - the value of the translation in the decomposition is arbitrary, as it depends on the choice of the centre of rotation.  Hence it is perfectly logical for you to see values that are not simply just what you consider to be translation.  If you see that the results when applied to an image are what you expect, then I would say that you have achieved what you want and doing this decomposition is probably just muddying the waters.

All the best,
Mark



On 30 Dec 2013, at 15:57, Michael Dwyer <[log in to unmask]<mailto:[log in to unmask]>> wrote:

Hi Pradeep, sorry for the delay -- busy for the holidays. Anyhow, something looks very strange there. With the matrix you're listing, that determinant doesn't make any sense. Can you post a little more context about what you're trying to do? Also, what version of FSL are you using? With that matrix, I get completely different output:

fsl5.0-avscale --allparams t.mat
Rotation & Translation Matrix:
0.999782 -0.000248 0.020861 14.988600
0.001702 0.997567 -0.069687 17.641600
-0.020793 0.069707 0.997351 29.881300
0.000000 0.000000 0.000000 1.000000

Rotation Angles (x,y,z) [rads] = -0.069758 -0.020863 -0.000249

Translations (x,y,z) [mm] = 14.988600 17.641600 29.881300

Scales (x,y,z) = 1.000000 1.000000 1.000000

Skews (xy,xz,yz) = -0.000001 -0.000000 0.000001

Average scaling = 1

Determinant = 0.999999
Left-Right orientation: preserved

Forward half transform =
0.999945 -0.000306 0.010429 7.418585
0.000670 0.999391 -0.034869 9.079558
-0.010412 0.034874 0.999338 14.825861
0.000000 0.000000 0.000000 1.000000

Backward half transform =
0.999946 0.000670 -0.010412 -7.269901
-0.000306 0.999392 0.034874 -9.588799
0.010429 -0.034869 0.999337 -14.576810
0.000000 0.000000 0.000000 1.000000


Maybe I'm missing something someone else sees?

Best,
Mike





On Thu, Dec 26, 2013 at 6:46 PM, Pradeep <[log in to unmask]<mailto:[log in to unmask]>> wrote:
Thanks a lot of the reply Mike!

I tried the avscale command that you suggested and I want to test it by moving the the image 20mm up and realign it to the original.
Visually the image matched well but the parameters does not say 20 mm or am I understanding this table totally wrong?

*******@*** 20mm]$ avscale --allparams test.txt
Rotation & Translation Matrix:
0.999782 -0.000249 0.020861 14.988600
0.001702 0.997567 -0.069686 17.641600
-0.020793 0.069707 0.997351 29.881300
0.000000 0.000000 0.000000 1.000000

Rotation Angles (x,y,z) [rads] = -0.069758 -0.020863 -0.000249

Translations (x,y,z) [mm] = 14.988600 17.641600 29.881300

Scales (x,y,z) = 0.822379 0.847364 0.678089

Skews (xy,xz,yz) = -0.001876 0.000530 0.029940

Average scaling = 0.782611

Determinant = 0.472529
Left-Right orientation: preserved

Forward half transform =
0.906802 -0.001145 0.008802 7.798785
0.000607 0.919963 -0.016393 9.311003
-0.009442 0.032111 0.823343 16.245956
0.000000 0.000000 0.000000 1.000000

Backward half transform =
1.102675 0.001730 -0.010535 -8.444473
-0.000714 1.086988 0.019132 -10.426204
0.013818 -0.046773 1.212749 -19.374533
0.000000 0.000000 0.000000 1.000000


Thanks,
Pradeep


On Mon, Dec 23, 2013 at 4:44 PM, Michael Dwyer <[log in to unmask]<mailto:[log in to unmask]>> wrote:
Hi Pradeep,

Try FSL's very nice avscale utility with the --allparams option. It will print out a decomposition for you. However, take a look at Mark Jenkinson's recent comment on the list (https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1311&L=fsl&F=&S=&P=403012) to better understand the caveats of "arbitrary" decomposition. As he mentioned, rmsdiff might be more meaningful.

Best,
Mike


On Mon, Dec 23, 2013 at 6:23 PM, Pradeep <[log in to unmask]<mailto:[log in to unmask]>> wrote:
Hello All,

We are trying to asses PET scan movement with in the subjects between two frames. I have used FLIRT linear registration to reorient the two images which realigned well. I am currently having troubles to understand the .mat file that was generated.

example *.mat file
    1.0000         0         0         0
         0    1.0000    0.0011   -0.0809
         0   -0.0011    1.0000    0.1129
         0         0         0    1.0000

It would be great if some one could point me towards a document which will explain linear and rotational parameters in this matrix and if there is a way to report the subject movement in mm or some thing that is easier to understand.

Thanks,
Pradeep





--
Michael G. Dwyer, Ph.D.
Assistant Professor of Neurology
Director of Technical Imaging Development
Buffalo Neuroimaging Analysis Center
University at Buffalo
100 High St. Buffalo NY 14203
[log in to unmask]<mailto:[log in to unmask]>
(716) 859-7065<tel:%28716%29%20859-7065>




--
Michael G. Dwyer, Ph.D.
Assistant Professor of Neurology
Director of Technical Imaging Development
Buffalo Neuroimaging Analysis Center
University at Buffalo
100 High St. Buffalo NY 14203
[log in to unmask]<mailto:[log in to unmask]>
(716) 859-7065