Dear Paul,

Thank you so much! And this is really helpful!

Just one more question, if I use -rmsabs and -rmsrel flag in mcflirt, the output values will be different with the values acquired with rmsdiff. Are they supposed to be the same? 
And can I use the mcflirt output mat folder as the input in rmsdiff calculating the displacement all at once instead of calculating them one by one?

Thank you again for your help!

Best regards,
Weiqi 

On Thu, Aug 22, 2019 at 10:52 AM paul mccarthy <[log in to unmask]> wrote:
Hi Weiqi,

1, in the mcflirt output mat file (-omat), there is no info for absolute and relative displacement. Does anybody know how to generate those files automatically?

The options are not documented, but mcflirt accepts -rmsabs and -rmsrel flags which will cause it to save absolute and relative displacements respectively.
 
2, the file name in mat file is like MAT_0000, MAT_0001, etc. However, the applyxfm4D looks for file name like MAT_00000, MAT_00001, etc. So the error shows that it couldn't open the matrix file when I tried to use applyxfm4D.  Is there an easy way to solve this instead of changing the matrix file name one by one?

If you use the -fourdigit option to applyxfm4D, it will search for files named MAT_XXXX instead of MAT_XXXXX.
 
3, I would like to generate the mean PET volume from the several PET volumes. Does anyone know how to do that?  

You can use the -Tmean option to fslmaths.

Cheers,

Paul

On Wed, 21 Aug 2019 at 17:28, Weiqi Yang <[log in to unmask]> wrote:
Dear FSL,

I am new to FSL. I am using mcflirt to correct motion for my smoothed PET data frame by frame. Then I would like to use applyxfm4D to apply the transformation matrix to my unsmoothed PET data and generated the mean PET data. I have several questions:

1, in the mcflirt output mat file (-omat), there is no info for absolute and relative displacement. Does anybody know how to generate those files automatically?

2, the file name in mat file is like MAT_0000, MAT_0001, etc. However, the applyxfm4D looks for file name like MAT_00000, MAT_00001, etc. So the error shows that it couldn't open the matrix file when I tried to use applyxfm4D.  Is there an easy way to solve this instead of changing the matrix file name one by one?

3, I would like to generate the mean PET volume from the several PET volumes. Does anyone know how to do that? 

Thank you so much for your time. I appreciate it!

Best regards,
Weiqi

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1


To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1



To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1