So you want a mean over all the vertices? The easiest thing to do is something like
mri_segstats --i surf.overlay.mgh --slabel subject lh $SUBJECTS_DIR/subject/label/lh.cortex.label --id 1 --avgwf mean.dat mean.dat will have a single number that will be the mean over the cortex label.
On 5/6/2020 4:03 PM, Knut Jørgen Bjuland wrote:
External Email - Use Caution
I am trying to calculate the mean for a surface mgh file and use the standard deviation to adjust the range when I make tiff file from the beta from a lme model. I wish to store the result in a bash variable.
On 6 May 2020, at 19:56, Douglas N. Greve <dgreve@mgh.harvard.edu mailto:dgreve@mgh.harvard.edu> wrote:
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 DearFreesurferexperts,
Ihavetriedtousemris_calctocalculatemeanandstdandexportthevariabletobashwiththiscommand,
mean=$(mris_calcmghfilestd),butthearrayisnotstoredinmean.Isthereanyotherwaytocalculate,meananduseitinabashscriptapartfromusingmatlab?
Bestregards
KnutJørgenBjuland
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer