This page is for NMR Center use. It lists the location of the subcortical and cortical atlas subject training and test sets, and instructions on how to create (train) and test these atlases.
Contents
Subcortical Segmentation - Aseg Atlas
The 'official' subcortical atlases distributed with Freesurfer are named 'RB_all_YYYY-MM-DD.gca' and 'RB_all_withskull_YYYY-MM-DD.gca', where YYYY-MM-DD is the year/month/day of when the atlas was built. In the 'recon-all' script, the atlases are named near the beginning of the file, like this:
# For subcortical segmentation set GCA = RB_all_2007-08-08.gca set GCASkull = RB_all_withskull_2007-08-08.gca
If new atlases are created (instructions are next), then the .gca files need to be added to the Freesurfer CVS repository to the dev/distribution/average directory, the Makefile.am file updated, and recon-all updated with the new names.
See also Jenni's notes on the manual edits made to the training subjects.
Aseg Create
The 39 subjects used to create the two .gca files are found here:
cd /autofs/space/dijon_032/users/salat/RBnew source scripts/subjects.csh echo $SUBJECTS_DIR echo $SUBJECTS echo $#SUBJECTS
The /scripts/subjects.csh file will set the SUBJECTS env var to the list of the 41 subjects composing the atlas. Each subject has a file called 'seg_edited.mgz' in its mri directory, which is a symbolic link to the most recent valid edited aseg volume. Demographic info for those 39 subjects is found in the file 'demographics'.
To build the subcortical atlases, which should be performed on the cluster machine 'seychelles' because so many processes are necessary:
ssh seychelles cd /autofs/space/dijon_032/users/salat/RBnew source scripts/subjects.csh source /usr/local/freesurfer/nmr-dev-env rebuild_gca_atlas.csh &
Then wait about two days for it to complete. The location of the log file is displayed after rebuild_gca_atlas.csh finishes submitting all the jobs. That log file should be monitored for the location of the output files and their status. Note that 'dev' is used, whereas 'stable' might be preferable, depending on whether the atlas is intended for testing or public release (in stable).
Aseg Test
See AsegTestNotes
Cortical Parcellation - Aparc Atlas
The 'official' cortical atlas distributed with Freesurfer is named in the recon-all script as follows:
# For cortical registration, as found in $AvgCurvTifPath/$hemi.$AvgCurvTif
set AvgCurvTifPath = "${FREESURFER_HOME}/average"
set AvgCurvTif = average.curvature.filled.buckner40.tif
# For cortical parcellation atlas, as found in:
# $FREESURFER_HOME/average/$hemi.$GCS
set GCS = curvature.buckner40.filled.desikan_killiany.YYYY-MM-DD.gcsIf new atlases are created (instructions are next), then the .gcs and .tif files need to be added to the Freesurfer CVS repository to the dev/distribution/average directory, the Makefile.am file updated, make_average_surface and recon-all updated with the new names.
Aparc Create
The 40 training subjects are here:
cd /autofs/space/amaebi_026/users/buckner_cortical_atlas source scripts/subjects.csh setenv SUBJECTS_DIR $PWD echo $SUBJECTS_DIR echo $SUBJECTS echo $#SUBJECTS
Each subject has two files called label/?h.aparc_edited.annot which are the manually labeled cortical surface files.
To create new atlases:
cd /autofs/space/amaebi_026/users/buckner_cortical_atlas setenv SUBJECTS_DIR $PWD build_desikan_killiany_gcs.csh rh build_desikan_killiany_gcs.csh lh
The build_desikan_killiany_gcs.csh script runs mris_ca_train. Upon completion, the average directory will contain the new .gcs files (for each hemi). A log file is kept in the average directory. New .gcs atlas files, after testing, should be put in the source tree at dev/distribution/average, and the recon-all should be updated to use it (see GCS var).
Aparc Test
Training subjects jackknife testing
See parc_atlas_jackknife_test --help
Test subjects classification testing
80 manually labeled (and reconed) test subjects are found here:
cd /autofs/space/sake_033/users/nicks/aparc_test source scripts/subjects.csh echo $SUBJECTS_DIR echo $SUBJECTS echo $#SUBJECTS
In this set, these are the areas that are labeled:
bankssts entorhinal fusiform inferiorparietal inferiortemporal isthmuscingulate middletemporal parahippocampal posteriorcingulate precuneus rostralanteriorcingulate superiorparietal superiortemporal supramarginal temporalpole transversetemporal
To test, use mris_compute_parc_overlap to compare each subjects manual parcellation (their ?h.aparc_edited.annot file) to their automatically generated parcellation (?h.aparc.annot):
foreach s ($SUBJECTS)
echo $s
mris_compute_parc_overlap --s $s --hemi rh \
--annot1 aparc --annot2 aparc_edited \
--label-list valid_labels.txt \
>& $s/label/mris_compute_parc_overlap.rh.log &
mris_compute_parc_overlap --s $s --hemi lh \
--annot1 aparc --annot2 aparc_edited \
--label-list valid_labels.txt \
>& $s/label/mris_compute_parc_overlap.lh.log
endNote the argument --label-list valid_labels.txt, where the file valid_labels.txt is a text file listing the aforementioned areas that were labeled. mris_compute_parc_overlap only looks at those labels in computing Dice and the mean min distance measures.
Once the preceding loop is complete, then some overall stats can be extracted. To do so, run:
cd $SUBJECTS_DIR ./scripts/get_stats
and this will extract the mean and std overall Dice values for the left and right hemis, and ditto for the mean-min distance values.
To view those results in bar-chart form, comparing against prior test runs, edit the file scripts/aparc_test_run_plots.m, adding the new data pairs where instructed. Then open matlab and run:
cd scripts matlab & matlab>> aparc_test_run_plots
Verify that the current test run results are not too deviant from prior test runs.
Demographics
The master Buckner demographics excel spreadsheet is found here: /autofs/space/dijon_028/users/jpacheco/new_stream_buckner/master_buckner_demographics_092906.xls
