Print

Print


Many thanks gentlemen,

Now it is perfectly clear. When I first saw Mark's 2007 email, I thought different combinations of Rx, Ry, and Rz would lead to the same combined affine transformation matrix. Logically, one can go from point A to point B on the surface of a sphere tracing many different paths. But as you explained, as long as one knows in which order the translation and rotation matrices are multiplied to get the combined transformation matrix, then the decomposition will produce unique solution. There are enough entries in the final matrix to solve for 6 unknowns...

best regards,

Tugan


> Hi
> I think rotate_bvecs uses the whole matrix, not the angles.

> Saad.


On 27 Oct 2011, at 09:11, Mark Jenkinson wrote:

> Dear Tugan,
> 
> The problem is that there are many different *definitions* of rotation angles.
> It isn't that our tool might give different answers when run different times, it
> is that it uses a convention which might not be the same as other software
> or the conventions that you are expecting.  For instance, we decompose the
> rotation matrix as: R = Rx * Ry * Rz  (where Rx is rotation about the x-axis, etc.)
> This could easily be R = Rz * Ry * Rx instead, and because 3D rotations do not
> commute you get *different* answers for the rotation angles when using different
> conventions like this.
> 
> So it wouldn't matter if you got the angles from avscale of flirt or any other 
> method at all.  The problem is that there is no single, unique *definition* of
> what the angles should be for a given rotation matrix (similar things exist for
> skews/scales) and so you can only ever get a decomposition for some
> arbitrarily chosen convention/definition.
> 
> As long as you use the angles consistently with whatever processing you are
> doing later then it is OK.  The thing is to be careful that you understand the
> conventions fully before using the angles.  For this reason I prefer to stick 
> with the matrices whenever possible, and avoid such arbitrary decompositions.
> 
> All the best,
> 	Mark
> 
> 
> 
> 
> 
> On 27 Oct 2011, at 04:46, Tugan Muftuler wrote:
> 
>> Dear Mark,
>> 
>> Many thanks for the clarification and the rmsdiff tool. Certainly a useful tool that escaped my attention. 
>> 
>> In addition to quantifying the amount of motion, I also want to obtain the rotation angles of the affine transformation separately. I browsed through FSL email archives and FLIRT pages but I cannot find a better answer to this other than avscale. Since you mentioned that decomposition by avscale may not produce unique results, is it possible to command FLIRT to report rotation angles when i run it on my data? This way I can ensure that the bvecs are accurately oriented.
>> 
>> best regards,
>> 
>> Tugan
>> 
> 

--
Saad Jbabdi
University of Oxford, FMRIB Centre

JR Hospital, Headington, OX3 9DU, UK
(+44)1865-222466  (fax 717)
www.fmrib.ox.ac.uk/~saad