Are you trying to compute the mean at each voxel?
Try
mri_concat file.mgz --mean --o file.mean.mgz
Assuming that file.mgz has multiple frames. If you have each input in a separate file, you can just
mri_concat file1.mgz file2.mgz ... --mean mean.mgz
To compute the stddev, use --std instead of --mean


On 5/6/2020 1:22 PM, Knut J Bjuland wrote:

        External Email - Use Caution        

Dear Freesurfer experts, 

 
 

I have tried to use mris_calc to calculate mean and std and export the variable to bash with this command, 

mean=$(mris_calc mghfile std), but the array is not stored in mean. Is there any other way to calculate, mean and use it in a bash script apart from using matlab?  

 
 

Best regards 

 
 

Knut Jørgen Bjuland   



_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer