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
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
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 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 CautionDear 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 mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer 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 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
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
freesurfer@nmr.mgh.harvard.edu