Dear Freesurfers,
I have a problem using the "mri_segstats" function. I'm trying to get Intra cranial volumes (ICV) from images that I have previously segmented. As I have lots of images, I'm using this script :
" foreach filename (*_conv) mri_segstats --subject $(filename) --etiv-only --sum summaryfile end "
The script is working very well except for the -sum option : I'm not able to find the summary file in my directory : the ICV are printed in my Terminal but I don't get all the ICV in a summary file. My ultimate goal is to import the ICV in an excel sheet...
My question is : where can I find the summary file ? Should I specify after the -sum option an existing text file ? I don't understand how the -sum option works. Is there a function, like in "asegstats2table", that allows to directly get all the output of mri_segstats in a table ?
I wasn't able to find an answer to my question in freesurfer wiki or in the mailing list messages.
Thanks a lot for your attention,
Best regards,
Charles
The --etiv-only option only prints it to the screen and does not create a summary file. The ICV is present in the aseg.stats file and should be present when you run asegstats2table.
If you want to get the single ICV number in a file, you can run
mri_segstats --subject $(filename) --etiv-only | grep atlas_icv| awk '{print $4}' > summaryfile
doug
On 08/15/2013 05:51 PM, charles laidi wrote:
Dear Freesurfers,
I have a problem using the "mri_segstats" function. I'm trying to get Intra cranial volumes (ICV) from images that I have previously segmented. As I have lots of images, I'm using this script :
" foreach filename (*_conv) mri_segstats --subject $(filename) --etiv-only --sum summaryfile end "
The script is working very well except for the -sum option : I'm not able to find the summary file in my directory : the ICV are printed in my Terminal but I don't get all the ICV in a summary file. My ultimate goal is to import the ICV in an excel sheet...
My question is : where can I find the summary file ? Should I specify after the -sum option an existing text file ? I don't understand how the -sum option works. Is there a function, like in "asegstats2table", that allows to directly get all the output of mri_segstats in a table ?
I wasn't able to find an answer to my question in freesurfer wiki or in the mailing list messages.
Thanks a lot for your attention,
Best regards,
Charles
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu