48
Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer 19 th March 2009

Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

  • View
    229

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Introduction to FreeSurferPresented by Sarah Whittle & Dominic Dwyer 19th March 2009

Page 2: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Talk Outline

1. Introduction

2. Individual Cortical (surface-based) and Volumetric

Analysis

3. Group Analyses (brief)

4. Structure-Function Integration (brief)

5. Working with Freesurfer

Page 3: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Intro: 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

Page 4: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Intro: 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

Page 5: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Cortical (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

Page 6: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Surface Model

• Mesh (“Finite Element”)

• Vertex = point of 6 triangles

• Neighborhood

• XYZ at each vertex

• Triangles/Faces ~ 150,000

• Area, Distance

• Curvature, Thickness

• Moveable

Page 7: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

White Matter Surface• Nudge orig surface

• Follow T1 intensity gradients

• Smoothness constraint

• Vertex Identity Stays

Page 8: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Pial Surface

• Nudge white surface

• Follow T1 intensity gradients

• Vertex Identity Stays

Page 9: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Cortical Thickness

white/gray surface

pial surface

lh.thickness, rh.thickness

• Distance between white and pial surfaces

• One value per vertex• Surface-based more accurate

than volume-based

Page 10: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Curvature (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

Page 11: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Rosas et al., 2002

Kuperberg et al., 2003

Gold et al., 2005

Rauch et al., 2004Salat et al., 2004

Fischl et al., 2000

Sailer et al., 2003

Page 12: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Surface “Inflation”

Inflated Sphere

White Pial

•Vertex Identity (index) Preserved

Page 13: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Non-Cortical Areas of Surface

Amygdala, Putamen, Hippocampus, Caudate, Ventricles, CC

Amygdala

Page 14: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

“Spherical” Registration

Sulcal Map

Spherical Inflation High-DimensionalRegistration toSpherical Template

Page 15: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Inter-Subject Registration of Cortical Folding Patterns

Page 16: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Volume Analysis: Automatic Individualized Segmentation

Page 17: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

ROI 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

Page 18: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Automatic 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

Page 19: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

ICBM Atlas

Why not just register to an ROI Atlas?

12 DOF(Affine)

Page 20: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Subject 1Subject 2 aligned with Subject 1

(Subject 1’s Surface)

Problems with Affine (12 DOF) Registration• ROIs need to be individualized.

Page 21: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Can’t segment on intensity alone

0 20 40 60 80 100 1200

2

4

6

8

10

intensity

% v

oxe

ls i

n l

abel

WMGMlVThCaPuPaHpAm

Page 22: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Volumetric Segmentation (aseg)

Caudate

Pallidum

Putamen

Amygdala

Hippocampus

Lateral Ventricle

Thalamus

White Matter

Cortex

Not Shown:Nucleus AccumbensCerebellum

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, 33:341-355.

Page 23: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Volumetric 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, 33:341-355.

Page 24: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Automatic Surface Parcellation:Desikan/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.

Page 25: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Desikan/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.

Page 26: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Automatic Surface Parcellation:Destrieux 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, 14:11-22.

Page 27: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Automatic Surface Parcellation:Destrieux 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, 14:11-22.

• 58 Parcellation Units

• 12 Subjects

Page 28: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Gyral White Matter Segmentation

Nearest Cortical Labelto point in White Matter

aparc+aseg wmparc

+ +

Page 29: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

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)

Surface-based group analysis

Page 30: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Surface-based Measures

• Morphometric (eg, thickness)• Functional• PET• MEG/EEG• Diffusion (?) sampled just under the surface

Page 31: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Surface-based Group Analysis in FreeSurfer

• 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

GLM

Page 32: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Visualisation with tksurfer

View->Configure->Overlay

Threshold:-log10(p),Eg, 2=.01

Saturation:-log10(p),Eg, 5=.00001

False DiscoveryRate, Eg, .01

File->LoadOverlay http://surfer.nmr.mgh.harvard.edu/docs/ftp/pub/docs/freesurfer.groupanalysis.pdf

Page 33: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Function-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:

From (Sereno et al, 1995, Science). Also, smooth along surface

Page 34: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Function-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

Page 35: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Function-Structure Integration inFreeSurfer

• Basic Overview of process (cont’d):• 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/docs/freesurfer.feat.pdf

Page 36: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Working with Freesurfer

• Unix command-line (Linux, MacOSX)

• GUI’s for viewing/editing– Tkmedit, tksurfer, tkregister

• Directory structure, naming conventions

• Pipeline– Recon-all: automated surface/volume analysis

Page 37: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

File 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

Page 38: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

FreeSurfer Directory Tree

bert

$SUBJECTS_DIR

fred jenny margaret …

Subject ID

Page 39: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

FreeSurfer Directory Tree

bert

bem label morph mri scripts surf tiff label

orig T1 brain wm aseg

•Subject ID•Subject Name

Each data set has its own unique SubjectId (eg, bert)

Page 40: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Add 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

Page 41: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Fully Automated Reconstruction

Come back in 48 hours …

Check your results – do the white and pial surfaces follow the boundaries?

-- Can be broken up

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

Page 42: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Individual StagesVolumetric Processing Stages (subjid/mri):1. Motion Cor, Avg, Conform (orig.mgz)2. Talairach transform computation3. 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 ASeg13. 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 Number20. Smooth221. Inflate222. Final Surfs (?h.white,?h.pial)23. Cortical Ribbon Mask

24. Spherical Morph25. Spherical Registration 26. Spherical Registration27. Map average curvature to subject28. Cortical Parcellation (Labeling)29. Cortical Parcellation Statistics30. Cortical Parcellation mapped to ASeg

recon-all -help Note: ?h.orig means lh.orig or rh.orig

Green = Manual Intervention?

Page 43: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Workflow in Stages

1. recon-all –autorecon1 (Stages 1-5)2. Check talairach transform, skull strip, normalization (?)3. recon-all –autorecon2 (Stages 6-23)4. Check surfaces

1. Add control points: recon-all –autorecon2-cp (Stages 10-23)

2. Edit wm.mgz: recon-all –autorecon2-wm (Stages 13-23)3. Edit brain.mgz: recon-all –autorecon2-pial (Stage 23)

5. recon-all –autorecon3 (Stages 24-30)

Note: all stages can be run individually

Page 44: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Results

• Volumes

• Surfaces

• Surface Overlays

• ROI Summaries

Page 45: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Volumes

orig.mgz

• $SUBJECTS_DIR/bert/mri• All “Conformed” 2563, 1mm3

• Many more …

aseg.mgz

T1.mgz brainmask.mgz wm.mgz filled.mgzSubcortical Mass

aparc+aseg.mgz Volume Viewer:tkmedit

Page 46: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Surfaces

orig white pial

inflated sphere,sphere.reg patch (flattened)• $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

Page 47: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

Surface Overlays

• Value for each vertex• Color indicates value• Color: gray,red/green, heat, color table• Rendered on any surface• fMRI/Stat Maps too

lh.sulc on inflated lh.curv on inflated lh.thickness on inflated

lh.sulc on pial

lh.aparc.annot on inflated

lh.curv on inflated fMRI on flat

Page 48: Introduction to FreeSurfer Presented by Sarah Whittle & Dominic Dwyer19 th March 2009

ROI Summaries:

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 ….

$SUBJECTS_DIR/bert/statsaseg.stats – volume summaries?h.aparc.stats – desikan/killiany parcellation summaries?h.aparc.2005.stats – destrieux parcellation summarieswmparc.stats – white matter parcellation

Routines to generate spread sheets of group data• asegstats2table --help• aparcstats2table --help