Title: Introduction to FreeSurfer
1Introduction to FreeSurfer
Presented by Sarah Whittle Dominic Dwyer 19th
March 2009
2Talk Outline
- Introduction
- Individual Cortical (surface-based) and
Volumetric Analysis - Group Analyses (brief)
- Structure-Function Integration (brief)
- Working with Freesurfer
3Intro What can we do with Freesurfer?
- Surface inflation and manipulation Visualize
structural and functional data reveal data in
sulcal depths - Intersubject registration Alternate spatial
normalization - Morphometric analysis Cortical thickness
analysis of folding patterns - Cortical Parcellation Analysis of cortical
subregions fMRI ROI analysis - Subcortical segmentation Volumetric analysis
fMRI ROI analysis - White matter parcellation Volumetric analysis
DTI region of interest analysis - Integrate with FSL tools Spatial normalization
of fMRI data ROI analyses
4Intro FreeSurfer Resources
- FreeSurfer Wiki can be VERY useful
- http//surfer.nmr.mgh.harvard.edu/fswiki
- can too much info not 100 logically
organised! - 2008 Brisbane FSL/FreeSurfer workshop booklet
available to loan from MNC lab
5Cortical (surface-based) Analysis Surface
Reconstruction Theory
- Input T1-weighted (MPRAGE,SPGR)
- Segment white matter from rest of brain.
- Find white/gray surface
- Find pial surface
- Find create mesh
- Vertices, neighbors, triangles, coordinates
- Accurately follows boundaries between tissue
types - Topologically Correct
- closed surface, no donut holes
- no self-intersections
- Subcortical Segmentation along the way
6Surface Model
- Mesh (Finite Element)
- Vertex point of 6 triangles
- Neighborhood
- XYZ at each vertex
- Triangles/Faces 150,000
- Area, Distance
- Curvature, Thickness
- Moveable
7White Matter Surface
- Nudge orig surface
- Follow T1 intensity gradients
- Smoothness constraint
- Vertex Identity Stays
8Pial Surface
- Nudge white surface
- Follow T1 intensity gradients
- Vertex Identity Stays
9Cortical Thickness
pial surface
- Distance between white and pial surfaces
- One value per vertex
- Surface-based more accurate than volume-based
white/gray surface
lh.thickness, rh.thickness
10Curvature (Radial)
- Circle tangent to surface at each vertex
- Curvature measure is 1/radius of circle
- One value per vertex
- Signed (sulcus/gyrus)
- Actually use gaussian curvature
lh.curv, rh.curv
11Rosas et al., 2002
Sailer et al., 2003
Kuperberg et al., 2003
Fischl et al., 2000
Gold et al., 2005
Rauch et al., 2004
Salat et al., 2004
12Surface Inflation
Inflated
Sphere
- Vertex Identity (index) Preserved
White
Pial
13Non-Cortical Areas of Surface
Amygdala
Amygdala, Putamen, Hippocampus, Caudate,
Ventricles, CC
14Spherical Registration
Sulcal Map
Spherical Inflation
High-Dimensional Registration to Spherical
Template
15Inter-Subject Registration of Cortical Folding
Patterns
16Volume Analysis Automatic Individualized
Segmentation
17ROI Atlas Creation
- Hand label N data sets
- Volumetric (subcortical) CMA
- Surface Based
- Desikan/Killiany
- Destrieux
- Map labels to common coordinate system (using
spherical registration). - Probabilistic Atlas
- Probability of a label at a vertex/voxel (global
spatial info) - Sulcal gyral geometry
- Neighborhood relationships
- You can create your own atlases
18Automatic Labeling
- Transform ML labels to individual subject
- Adjust boundaries based on
- Curvature/Intensity statistics
- Neighborhood relationships
- Result labels are customized to each individual.
Formally, we compute maximum a posteriori
estimate of the labels given the input data
19Why not just register to an ROI Atlas?
12 DOF (Affine)
ICBM Atlas
20- Problems with Affine (12 DOF) Registration
- ROIs need to be individualized.
Subject 2 aligned with Subject 1 (Subject 1s
Surface)
Subject 1
21Cant segment on intensity alone
22Volumetric Segmentation (aseg)
Not Shown Nucleus Accumbens Cerebellum
Whole Brain Segmentation Automated Labeling of
Neuroanatomical Structures in the Human Brain,
Fischl, B., D.H. Salat, E. Busa, M. Albert, M.
Dieterich, C. Haselgrove, A. van der Kouwe, R.
Killiany, D. Kennedy, S. Klaveness, A. Montillo,
N. Makris, B. Rosen, and A.M. Dale, (2002).
Neuron, 33341-355.
23Volumetric Segmentation Atlas Description
- 39 Subjects
- 14 Male, 39 Female
- Ages 18-87
- Young (1-22) 10
- Mid (40-60) 10
- Old Healthy (69) 8
- Old Alzheimer's (68) 11
- Siemens 1.5T Vision (Wash U)
Whole Brain Segmentation Automated Labeling of
Neuroanatomical Structures in the Human Brain,
Fischl, B., D.H. Salat, E. Busa, M. Albert, M.
Dieterich, C. Haselgrove, A. van der Kouwe, R.
Killiany, D. Kennedy, S. Klaveness, A. Montillo,
N. Makris, B. Rosen, and A.M. Dale, (2002).
Neuron, 33341-355.
24 Automatic Surface ParcellationDesikan/Killiany
Atlas
Precentral Gyrus
Postcentral Gyrus
Superior Temporal Gyrus
An automated labeling system for subdividing the
human cerebral cortex on MRI scans into gyral
based regions of interest, Desikan, R.S., F.
Segonne, B. Fischl, B.T. Quinn, B.C. Dickerson,
D. Blacker, R.L. Buckner, A.M. Dale, R.P.
Maguire, B.T. Hyman, M.S. Albert, and R.J.
Killiany, (2006). NeuroImage 31(3)968-80.
25Desikan/Killiany Atlas
- 40 Subjects
- 14 Male, 26 Female
- Ages 18-87
- 34 cortical regions
- Siemens 1.5T Vision (Wash U)
An automated labeling system for subdividing the
human cerebral cortex on MRI scans into gyral
based regions of interest, Desikan, R.S., F.
Segonne, B. Fischl, B.T. Quinn, B.C. Dickerson,
D. Blacker, R.L. Buckner, A.M. Dale, R.P.
Maguire, B.T. Hyman, M.S. Albert, and R.J.
Killiany, (2006). NeuroImage 31(3)968-80.
26 Automatic Surface ParcellationDestrieux Atlas
Automatically Parcellating the Human Cerebral
Cortex, Fischl, B., A. van der Kouwe, C.
Destrieux, E. Halgren, F. Segonne, D. Salat, E.
Busa, L. Seidman, J. Goldstein, D. Kennedy, V.
Caviness, N. Makris, B. Rosen, and A.M. Dale,
(2004). Cerebral Cortex, 1411-22.
27 Automatic Surface ParcellationDestrieux Atlas
- 58 Parcellation Units
- 12 Subjects
Automatically Parcellating the Human Cerebral
Cortex, Fischl, B., A. van der Kouwe, C.
Destrieux, E. Halgren, F. Segonne, D. Salat, E.
Busa, L. Seidman, J. Goldstein, D. Kennedy, V.
Caviness, N. Makris, B. Rosen, and A.M. Dale,
(2004). Cerebral Cortex, 1411-22.
28Gyral White Matter Segmentation
aparcaseg
wmparc
Nearest Cortical Label to point in White Matter
29Surface-based group analysis
Processing Stages
- Specify Subjects and Surface measures
- Assemble Data (mris_preproc)
- Resample into Common Space (fsaverage)
- Smooth
- Concatenate into one file
- Model and Contrasts (GLM)
- Fit Model (Estimate) (mri_glmfit)
- Correct for multiple comparisons
- Visualize (tksurfer)
30Surface-based Measures
- Morphometric (eg, thickness)
- Functional
- PET
- MEG/EEG
- Diffusion (?) sampled just under the surface
31Surface-based Group Analysis in FreeSurfer
GLM
- Command-line based
- Create a FreeSurfer Group Descriptor File (FSGD)
- FreeSurfer creates design matrix
- You still have to specify contrasts
- Fit model (mri_glmfit)
- QDEC (GUI)
- Limited to 2 discrete variables, 2 levels max
- Limited to 2 continuous variables
32 Visualisation with tksurfer
Saturation -log10(p), Eg, 5.00001
Threshold -log10(p), Eg, 2.01
False Discovery Rate, Eg, .01
View-gtConfigure-gtOverlay
http//surfer.nmr.mgh.harvard.edu/docs/ftp/pub/doc
s/freesurfer.groupanalysis.pdf
File-gtLoadOverlay
33Function-Structure Integration inFreeSurfer Why
Is a Model of the Cortical Surface Useful?
- Local functional organization of cortex is
largely 2-dimensional! Eg, functional mapping of
primary visual areas
Also, smooth along surface
From (Sereno et al, 1995, Science).
34Function-Structure Integration inFreeSurfer
- Basic Overview of process
- First analyze your data with FEAT (No Smoothing)
- Register FEAT to FreeSurfer Anatomical
- Automatic (FLIRT)
- Manual (tkregister2)
- Sample FEAT output on the surface
- Individual
- Common Surface Space (Atlas/fsaverage)
- Can display any functional data, eg, zstat,
fzstat, cope, pe, etc
35Function-Structure Integration inFreeSurfer
- Basic Overview of process (contd)
- Mapping FreeSurfer Segmentations to FEAT
- ie, displaying functional data on
subcortical/cortical segmentation - ROI analysis based on segmentation
- Group Analysis
- Using GFEAT data
- Mri_glmfit
- See Comprehensive Instructions at
http//surfer.nmr.mgh.harvard.edu/docs/ftp/pub/doc
s/freesurfer.feat.pdf
36Working with Freesurfer
- Unix command-line (Linux, MacOSX)
- GUIs for viewing/editing
- Tkmedit, tksurfer, tkregister
- Directory structure, naming conventions
- Pipeline
- Recon-all automated surface/volume analysis
37File Formats
- FreeSurfer uses a unique file format (mgz
compressed MGH file) - Can store 4D (like NIFTI)
- cols, rows, slices, frames
- Generic volumes and surfaces
- Surface lh.white
- Curv lh.curv, lh.sulc, lh.thickness
- Annotation lh.aparc.annot
- Label lh.pericalcarine.label
- Unique to FreeSurfer
- FreeSurfer can read/write
- NIFTI, Analyze, MINC
- FreeSurfer can read
- DICOM, Siemens IMA, GE, AFNI
38FreeSurfer Directory Tree
Subject ID
SUBJECTS_DIR
fred
jenny
margaret
39FreeSurfer Directory Tree
Each data set has its own unique SubjectId (eg,
bert)
- bert
- bem label morph mri scripts surf tiff
label - orig T1 brain wm aseg
40Add Your Data
- cd SUBJECTS_DIR
- mkdir p bert/orig
- mri_convert yourdicom.dcm bert/mri/orig/001.mgz
- mri_convert yourdicom.dcm bert/mri/orig/002.mgz
bert bem label morph mri scripts surf
tiff label
orig
001.mgz 002.mgz
41Fully Automated Reconstruction
1. Create directory for data mkdir p
SUBJECTS_DIR/bert/orig 2. Copy/Convert data into
directory mri_convert file.dcm
SUBJECTS_DIR/bert/orig/001.mgz 3. Launch
reconstruction recon-all s bert
autorecon-all
- Come back in 48 hours
- Check your results do the white and pial
surfaces follow the boundaries? - -- Can be broken up
42Individual Stages
Volumetric Processing Stages (subjid/mri) 1.
Motion Cor, Avg, Conform (orig.mgz) 2. Talairach
transform computation 3. Non-uniform inorm
(nu.mgz) 4. Intensity Normalization 1
(T1.mgz) 5. Skull Strip (brain.mgz) 6. EM
Register (linear volumetric registration) 7. CA
Intensity Normalization 8. CA Non-linear
Volumetric Registration 9. CA Label
(Volumetric Labeling) (aseg.mgz) 10. Intensity
Normalization 2 (T1.mgz) 11. White matter
segmentation (wm.mgz) 12. Edit WM With ASeg 13.
Fill and cut (filled.mgz)
Surface Processing Stages (subjid/surf) 14.
Tessellate (?h.orig) 15. Smooth1
(?h.smoothwm) 16. Inflate1 (?h.inflated) 17.
QSphere (?h.qsqhere) 18. Automatic Topology Fixer
(?h.orig) 19. Euler Number 20. Smooth2 21.
Inflate2 22. Final Surfs (?h.white,?h.pial) 23.
Cortical Ribbon Mask 24. Spherical Morph 25.
Spherical Registration 26. Spherical
Registration 27. Map average curvature to
subject 28. Cortical Parcellation (Labeling) 29.
Cortical Parcellation Statistics 30. Cortical
Parcellation mapped to ASeg
Green Manual Intervention?
recon-all -help
Note ?h.orig means lh.orig or rh.orig
43Workflow in Stages
- recon-all autorecon1 (Stages 1-5)
- Check talairach transform, skull strip,
normalization (?) - recon-all autorecon2 (Stages 6-23)
- Check surfaces
- Add control points recon-all autorecon2-cp
(Stages 10-23) - Edit wm.mgz recon-all autorecon2-wm (Stages
13-23) - Edit brain.mgz recon-all autorecon2-pial (Stage
23) - recon-all autorecon3 (Stages 24-30)
- Note all stages can be run individually
44Results
- Volumes
- Surfaces
- Surface Overlays
- ROI Summaries
45Volumes
orig.mgz
T1.mgz
brainmask.mgz
wm.mgz
filled.mgz Subcortical Mass
- SUBJECTS_DIR/bert/mri
- All Conformed 2563, 1mm3
- Many more
aseg.mgz
aparcaseg.mgz
Volume Viewer tkmedit
46Surfaces
patch (flattened)
inflated
sphere,sphere.reg
- SUBJECTS_DIR/bert/surf
- Number/Identity of vertices stays the same
(except patches) - XYZ Location Changes
- Flattening not done as part of standard
reconstruction
Surface Viewer tksurfer
47Surface Overlays
lh.sulc on inflated
lh.curv on inflated
lh.thickness on inflated
lh.sulc on pial
lh.curv on inflated
fMRI on flat
- Value for each vertex
- Color indicates value
- Color gray,red/green, heat, color table
- Rendered on any surface
- fMRI/Stat Maps too
lh.aparc.annot on inflated
48ROI Summaries
SUBJECTS_DIR/bert/stats aseg.stats volume
summaries ?h.aparc.stats desikan/killiany
parcellation summaries ?h.aparc.2005.stats
destrieux parcellation summaries wmparc.stats
white matter parcellation
- Index SegId NVoxels Volume_mm3 StructName
normMean normStdDev normMin normMax
normRange -
- 1 1 0 0.0
Left-Cerebral-Exterior 0.0000
0.0000 0.0000 0.0000 0.0000 - 2 2 265295 265295.0 Left-Cerebral-White-
Matter 106.6763 8.3842 35.0000
169.0000 134.0000 - 3 3 251540 251540.0 Left-Cerebral-Cortex
81.8395 10.2448 29.0000
170.0000 141.0000 - 4 4 7347 7347.0
Left-Lateral-Ventricle 42.5800
12.7435 21.0000 90.0000 69.0000 - 5 5 431 431.0
Left-Inf-Lat-Vent 66.2805
11.4191 30.0000 95.0000 65.0000 - 6 6 0 0.0
Left-Cerebellum-Exterior 0.0000
0.0000 0.0000 0.0000 0.0000 - .
- Routines to generate spread sheets of group data
- asegstats2table --help
- aparcstats2table --help