Tuesday, 8 March 2011

Using applescript to convert freesurfer stats2table (asegstats2table & aparcstats2table)

This applescript can be used to control asegstats2table and aparcstats2table commands in order to generate text/ascii tables of freesurfer stats data for all subjects in the directory at once using 4 mouse clicks!
Please click on the link below to download script;

This script is suitable for MAC only.

The following script uses aparcstats2table and asegstats2table to extract cortical thickness, surface area and volume of manually defined regions of interest using stats files that resulted from qdec.

The main purpose of this script is to simplify and automate conversion process because subjects’ IDs should be written with some options in the command line depending on freesurfer stats file. So users will not need to write any thing when they use this script instead of command line;

asegstats2table --subjects bert ernie fred margaret --meas volume --tablefile aseg_stats.txt


aparcstats2table --subjects bert ernie fred margaret --hemi rh --meas thickness --tablefile aparc_stats.txt

To visit script page in Freesurfer website please click on the following link 

1 comment:

Anonymous said...

Another great scrit! Thanks a lot!