Cortical Thickness of a Volume-defined ROI
This page describes the workflow to extract freesurfer cortical thickness values for a region-of-interest (ROI) defined in volume space.
For this workflow, assume the following data is present:
1) An ROI mask in the form of a volume file, where the voxel value is '1' in the ROI, and '0' elsewhere. The coordinate space of that volume is irrelevant. Let's call this file ROI5.nii.
2) An anatomical (T1) volume file of the subject (or average of subjects) which is in the same coordinate space as the ROI mask. Let's call this file TT_avg152T1.nii.
3) Processed freesurfer data for a subject (or set of subjects) from which you wish to gather thickness info in the ROI. That is, recon-all -s <subj> -all has run to completion, producing subject surfaces and cortical thickness data. Let's call this subject subjid.
The workflow consists of these steps:
1) Confirm that your ROI is where you expect it to be when overlayed on the anatomical:
tkmedit -f TT_avg152T1.nii -overlay ROI5.nii -fthresh 0.5
The ROI will appear in orange.
2) Create a registration from the ROI-anatomical volume to a freesurfer template subject, preferably the 'fsaverage' subject (which is the recommended template subject, distributed with freesurfer, the freesurfer/subjects directory). To perform this registration, use either an automatic method, such as fslregister or spmregister, or a manual method, like tkregister. fslregister and spmregister utilities are freesurfer wrappers for fsl's flirt and spm's spm_coreg. For example, using the example filenames from above:
cd $SUBJECTS_DIR/fsaverage/surf fslregister --s fsaverage --mov /path/to/TT_avg152T1.nii --reg TT_avg152T1_to_fsaverage.dat
will produce the output file TT_avg152T1_to_fssaverage.dat. The utility spmregister has the same calling sequence. Type fslregister --help or spmregister --help for details.
It is a good idea to view your ROI in the fsaverage subject volume to ensure that it is located where you expect it to be:
cd $SUBJECTS_DIR/fsaverage/surf tkmedit fsaverage T1.mgz \ -overlay /path/to/ROI5.nii \ -overlay-reg TT_avg152T1_to_fsaverage.dat \ -fthresh 0.5 \ -surface lh.white -aux-surface rh.white
Your ROI will appear in orange.
3) Map the ROI-mask to the fsaverage surface, to create an fsaverage-ROI surface overlay.
cd $SUBJECTS_DIR/fsaverage/surf mri_vol2surf \ --mov /path/to/ROI5.nii \ --reg TT_avg152T1_to_fsaverage.dat \ --projdist-max 0 1 0.1 \ --interp nearest \ --hemi lh \ --out lh.fsaverage.ROI5.mgh
It is a good idea to view your ROI on the fsaverage surface to ensure that it is located where you expect it to be:
tksurfer fsaverage lh inflated -overlay lh.fsaverage.ROI5.mgh -fthresh 0.5
4) Map your subject thickness data to the fsaverage subject. Do this for all your subjects.
cd $SUBJECTS_DIR/subjid/surf mri_surf2surf \ --s subjid \ --trgsubject fsaverage \ --hemi lh \ --sval lh.thickness \ --tval lh.thickness.fsaverage.mgh
5) Run mri_segstats, using the subject-ROI surface, to get the thickness data for your ROI.
cd $SUBJECTS_DIR/subjid/surf mri_segstats \ --seg $SUBJECTS_DIR/fsaverage/surf/lh.fsaverage.ROI5.mgh \ --in lh.thickness.fsaverage.mgh \ --sum segstats-ROI5.txt
In the output file, segstats-ROI5.txt, the last lines list the thickness data, for example:
# ColHeaders Index SegId NVoxels Volume_mm3 Mean StdDev Min Max Range 1 0 163825 163825.0 2.2344 0.8913 0.0000 5.0000 5.0000 2 1 17 17.0 2.3747 0.1754 1.9733 2.6986 0.7252
Here, the ROI is SegId '1' (because the original ROI5.nii mask volume used a value of 1 to identify its voxels). Mean thickness is 2.3747mm.