Cortical Reconstruction with FreeSurfer surfer.nmr.mgh.harvard.edu Douglas N. Greve MGH-NMR Center Harvard University
Acknowledgements Bruce Fischl Anders Dale Marty Sereno Doug Greve Xiao Han Nick Schmansky Florent Segonne Yasunari Tosa CMA (Nikos Makris, Dave Kennedy) Jenni Pacheco, Brian Quinn, Rahul Desikan, Ron Killiany, …
Outline What you can get from FreeSurfer Surface Reconstruction Theory Surface Reconstruction with FreeSurfer Demo Tutorial Stuff not covered: Mapping functional data to the surface Surface-based group analysis
Administratia surfer.nmr.mgh.harvard.edu/fswiki Platforms: Linux and Mac Registration Versions – stable vs dev FreeSurfer mailing list Important! How to report a bug! Version Command-line Error description subjid/scripts/reconall.log
What FreeSurfer Can Do for You “Models” of cortical surfaces Morphological measures of cortex Surfaced-based registration to atlas Automatic surface labeling/segmentation Automatic volume labeling/segmentation Surface-based group analysis Visualization in the volume and surface
Surface Model Mesh (“Finite Element”) Vertex = point of 6 triangles XYZ at each vertex Triangles/Faces ~ 150,000 Area, Distance Curvature, Thickness Moveable
Surfaces: White and Pial
Inflation
Cortical Morphometry Thickness Sulcal Curvature Gyrus “Mean” Cortical Surface + - Pial White/Gray Sulcus
Inter-Subject Registration
Inter-Subject Averaging Subject 1 Subject 2 Native Spherical Surface-to- Surface Surface-to- Surface GLM Demographics mris_glm
Automatic Surface Labeling Based on folding Fine-tuned to subject
Automatic Volume Labeling Subcortical Segmentation Caudate Putamen Pallidum Hippocampus Amygdala Nucleus Acumbens Ventricles White Matter Cerebellum …
Visualization
Surface Reconstruction Theory 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
Find “Subcortical Mass” All White Matter All Subcortical Structures Ventricles Excludes brain stem and cerebellum Hemispheres separated Connected (no islands) Many Stages … More Later …
Tessellation and Topology Fixing Mosaic of triangles (“tessellation”) Donut holes, handles Automatic topology fixer orig surface surf/lh.orig surf/rh.orig
White Matter Surface Nudge orig surface Follow T1 intensity gradients Smoothness constraint Vertex Identity Stays
Pial Surface Nudge white surface Follow T1 intensity gradients Vertex Identity Stays
Details on Getting the Subcortical Mass Hardest part Some FreeSurfer background All Stages of Processing Volumetric Processing
FreeSurfer Directory Tree bert bem label morph mri scripts surf tiff orig T1 brain aseg wm filled Subject ID mksubjdirs SubjectId Each data set has its own unique SubjectId (eg, bert) mksubjdirs bert Exercise A:
Individual 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 recon-all -help Note: ?h.orig means lh.orig or rh.orig Green = Manual Intervention?
Motion Correction and Averaging 001.mgz 002.mgz + rawavg.mgz orig 001.mgz 002.mgz mri rawavg.mgz Does not change native resolution.
Conform rawavg.mgz orig.mgz mri rawavg.mgz Changes to 256^3, 1mm^3 All volumes will be conformed. orig.mgz
Talairach Transform Computes 12 DOF transform matrix Does NOT resample MNI305 template Used to help find structures (eg, CC) Can also be used to localize functional activation mri/transforms/talairach.xfm mri transforms talairach.xfm
Intensity Normalization Removes B1 bias field NU (MNI) nu.mgz Presegmentation (T1.mgz) –All WM = 110 intensity –Pre- and Post-Skull Strip T1 Volume
Skull Strip Removes all non-brain –Skull, Eyes, Neck, Dura brain.mgz Orig VolumeBrain Volume
Automatic Volume Labeling Used to fill in subcortical structures for creating subcortical mass Usefull in its own right aseg.mgz ASeg Volume
White Matter Segmentation Separates white matter from everything else “Fills in” subcortical structures Cerebellum removed, brain stem still there Somewhat redundant with aseg wm.mgz WM Volume
Fill and Cut (Subcortical Mass) Fills in any voids Removes any islands Removes brain stem Separates hemispheres (each hemi has different value) filled.mgz – “Subcortical Mass” WM Volume Filled Volume
Pressing the Buttons Creating a FreeSurfer subject directory Adding your data The SUBJECTS_DIR environment variable Automatic reconstruction Actual Reconstruction and Troubleshooting Downloading and Installing Getting Help Tutorial Overview
FreeSurfer Directory Tree bert bem label morph mri scripts surf tiff label orig T1 brain wm aseg Subject ID mksubjdirs SubjectId Each data set has its own unique SubjectId (eg, bert) mksubjdirs bert Exercise A:
SUBJECTS_DIR Environment Variable bert $SUBJECTS_DIR fredjennymargaret … Subject ID
Add Your Data 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 Exercise A: MGZ – Compressed MGH Format
Automatic Reconstruction Come back in 48 hours … Check your results – do the white and pial surfaces follow the boundaries? -- Not normally how we proceed … recon-all –s bert –autorecon-all
Partial Voluming – WM classified as Non-WM in thin strands in Temporal Lobe Exercise F:
Eye Socket classified as WM. Skull Strip Failure. Exercise F:
Exercise F: “Hypo-Intensities” White Matter Lesions
Blood Vessel White/Gray OK, but Pial Inaccurate Exercise G:
Exercise C: Intensity Normalization Failure. All WM in T1 volume (T1.mgz) should be 110. Can fix by adding “Control Points”. Beware partial voluming!
Exercise D: Skull Strip Failure
Individual Stages Volumetric Processing Stages (subjid/mri): 1. Motion Correct and Average (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 recon-all -help Note: ?h.orig means lh.orig or rh.orig Green = Manual Intervention?
Actual Workflow 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
Tutorial Exercises You don’t actually have run anything! Exercise A: mksubjdir and convert a DICOM volume into mgz format Exercise B: SKIP (check talairach registration) Exercise C: Using control points for intensity normalization Exercise D: Fixing skull stripping Exercise E: View orig, T1, brain, and wm volumes with tkmedit Exercise F: Recognizing and fixing inaccuracies in the white matter surfaces Exercise G: Correcting Pial Surfaces
Administratia surfer.nmr.mgh.harvard.edu/fswiki Platforms: Linux and Mac Registration Versions – stable vs dev FreeSurfer mailing list Important! How to report a bug! Version Command-line Error description subjid/scripts/reconall.log Stuff not covered: Mapping functional data to the surface Surface-based group analysis
Study Questions 1.What are the two types of surfaces? 2. How are surfaces modeled? 3.What is meant by a topologically correct surface? 4.What is the purpose of the SUBJECTS_DIR?