I have created some python and bash scripts to pull items from FreeSurfer data. I've found tools like
. I recommend reading the source code before using them to make sure they'll suit your needs. As all home-built software, this is written for my own purposes and may not suit yours.
I mostly use "fs411" (importing mrs_dicts.py and fs_fxns.py in the same folder) as follows:
$ fs411 -h
displays options
-i for "item" to retrieve, it will pull anything in aseg.stats, lh.aparc.stats, rh.aparc.stats or wmparc.stats
Due to left and right in aparcs, you can query for paracentral_L or paracentral_R
$ fs411 -i eTIV /path/to/subject/001
001 : eTIV = 1850532.139065
$ fs411 -i Left-Hippocampus /path/to/subject/001
001 : Left-Hippocampus = 3985.2
$ fs411 -i paracentral_L /path/to/subject/001
001 : paracentral_L = 3286
-s for "sparse" just returns the value alone, useful for scripting
$ fs411 -s -i eTIV /path/to/subject/001
1850532.139065
Or to get all aseg data into a comma separated value (csv) file:
$ fs411 /path/to/subject/001 --outfile /home/me/stuff.csv --filetype aseg
And it's smart enough to only write the header row once, then append only data if you do something like this (in bash shell). You'll get all aparc data from all subjects in that folder in a single "allsubjects.csv" file with one header row on top.
$ cd /path/to/subject
$ for id in $(ls -1d *); do fs411 $id --outfile /home/me/allsubjects.csv --filetype aparc; done
Feel free to download it and use it if you find it helpful. The csv file generated at the end will load beautifully into any stats program or spreadsheet and allow you to calculate averages, etc.