Print

Print


Dear Andres,

It is not that easy to go back from the .par file to the matrices and then to the rmsdiff.
At least not exactly.  It is much easier to deal with the matrix output from mcflirt for this.
However, it depends what you are doing this for.  If all you need is a summary indication 
of movement then you can use the approximate formula:
  rms = sqrt(0.2*R^2*((cos(theta_x)-1)^2+(sin(theta_x))^2 + (cos(theta_y)-1)^2 + (sin(theta_y))^2 + (cos(theta_z)-1)^2 + (sin(theta_z)^2)) + transx^2+transy^2+transz^2)
where R=radius of spherical ROI = 80mm used in rmsdiff; theta_x, theta_y, theta_z are the three rotation angles from the .par file; and transx, transy, transz are the three translations from the .par file.

This is based on the formula used in rmsdiff - see http://www.fmrib.ox.ac.uk/analysis/techrep/tr99mj1/tr99mj1/node5.html
although it will not be exact as it approximates the matrix calculations, but for small angles this is pretty accurate.

All the best,
	Mark




  
On 16 Feb 2012, at 14:33, Andres Roman wrote:

> Hi All,
> 
> I have a big dataset and I am trying to see the mean displacement for each
> subject. I was wondering how to obtain this by calculating the mean
> displacement from .par file in the mc folder. I know you use a command
> called rmsdiff but was wondering how to use it to feed it to the .par file.
> Thank you very much for your help.
> 
> -- 
> Andres 
>