Differences between revisions 6 and 7
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
----
Line 5: Line 5:
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. 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'''.
Line 7: Line 7:
2) an anatomical (T1) volume file of the subject used to create the ROI mask volume, in the same coordinate space as the ROI mask. 2) An anatomical (T1) volume file of the subject used to create the ROI mask volume, in the same coordinate space as the ROI mask.  Let's call this file '''TT_avg152T1.nii'''.
Line 9: Line 9:
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. 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'''.
----
Line 13: Line 13:
1) create a registration from the ROI-anatomical volume to a freesurfer template subject, preferably the 'fsaverage' subject (which is the recommended template subject). 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, if the name of the ROI-anatomical volume is {{{roi-anat.nii}}}, then this command: 1) Create a registration from the ROI-anatomical volume to a freesurfer template subject, preferably the 'fsaverage' subject (which is the recommended template subject). 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:
Line 15: Line 15:
  fslregister --s fsaverage --mov /path/to/roi-anat.nii --reg roi-anat_to_fsaverage.dat   cd $SUBJECTS_DIR/fsaverage/surf
fslregister --s fsaverage --mov /path/to/TT_avg152T1.nii --reg TT_avg152T1_to_fsaverage.dat
Line 18: Line 19:
will produce the output file {{{roi-anat_to_fssaverage.dat}}}. the utility spmregister has the same calling sequence. type {{{fslregister --help}}} or {{{spmregister --help}}} for details. 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.
Line 20: Line 21:
2) map the ROI-mask to the fsaverage surface, to create an fsaverage-ROI surface overlay. 2) Map the ROI-mask to the fsaverage surface, to create an fsaverage-ROI surface overlay.
Line 22: Line 23:
  cd $SUBJECTS_DIR/fsaverage/surf
Line 23: Line 25:
    --mov /path/to/roi-mask.nii \
    --reg roi-anat_to_fsaverage.dat \
    --mov /path/to/ROI5.nii \
    --reg TT_avg152T1_to_fsaverage.dat \
Line 26: Line 28:
    --out lh.fsaverage.roi.mgh     --out lh.fsaverage.ROI5.mgh
Line 29: Line 31:
3) map your subject thickness data to the fsaverage subject. 3) Map your subject thickness data to the fsaverage subject.
Line 31: Line 33:
  cd $SUBJECTS_DIR/subjid/surf
Line 35: Line 38:
    --fwhm 0 \
    --sval /path/to/subjid/surf/lh.thickness \
    --tval /path/to/subjid/surf/lh.thickness.fwhm0.fsaverage.mgh
    --fwhm 10 \
    --sval lh.thickness \
    --tval lh.thickness.fwhm10.fsaverage.mgh
Line 42: Line 45:
  mri_segstats   cd $SUBJECTS_DIR/subjid/surf
  mri_segstats \
    --seg $SUBJECTS_DIR/fsaverage/surf/lh.fsaverage.ROI5.mgh \
    --in lh.thickness.fwhm10.fsaverage.mgh

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 used to create the ROI mask volume, 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 general workflow consists of these steps:

1) Create a registration from the ROI-anatomical volume to a freesurfer template subject, preferably the 'fsaverage' subject (which is the recommended template subject). 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:

  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.

2) 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 \
    --hemi lh \
    --out lh.fsaverage.ROI5.mgh

3) Map your subject thickness data to the fsaverage subject.

  cd $SUBJECTS_DIR/subjid/surf
  mri_surf2surf \
    --s subjid \
    --trgsubject fsaverage \
    --hemi lh \
    --fwhm 10 \
    --sval lh.thickness \
    --tval lh.thickness.fwhm10.fsaverage.mgh

4) 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.fwhm10.fsaverage.mgh

VolumeRoiCorticalThickness (last edited 2017-09-03 18:58:10 by 76)