![Page 1: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/1.jpg)
FreeSurfer: Troubleshootingsurfer.nmr.mgh.harvard.edu
![Page 2: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/2.jpg)
MR Anatomy CaveatsSurfaces are only as good as your scan.
• Dependent on data quality– Contrast to noise– Signal to noise– Voxel resolution
• MR Artifacts– MR susceptibility– MR distortions
• Variations in MR tissue parameters across regions of the brain are altered in different populations
![Page 3: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/3.jpg)
Suggested Morphometry Sequences
http://www.nmr.mgh.harvard.edu/~andre/
![Page 4: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/4.jpg)
Processing Errors
• check recon-all.log• try to rerun step that failed • look at volume from last successful step• examine data quality to see what might cause error• search FreeSurfer mailing list for other instances of this
problem:http://www.mail-archive.com/[email protected]/• if it fails again, attempt to run modified version of command
if possible• email the mailing list if still need help
recon-all fails
![Page 5: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/5.jpg)
FreeSurfer Directory Tree
Subject ID
Each data set has its own unique SubjectId (eg, bert)
bert
bem stats src mri scripts surf tmp label
recon-all.log recon-all-status.log
![Page 6: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/6.jpg)
Report Errors
• Report version currently using – see top of recon-all.log– more $FREESURFER_HOME/build-stamp.txt
• command line tried to run• attach recon-all.log• Output in terminal window if appropriate• Operating System
![Page 7: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/7.jpg)
Check Your Recon for Accuracy
• Do your surfaces follow gm/wm borders?
• Does the subcortical segmentation follow intensity boundaries?
![Page 8: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/8.jpg)
Output of Cortical Surface Reconstruction
![Page 9: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/9.jpg)
Typical Errors
• Pial Surface misplacement
• Skull Strip Errors
• WM Segmentation Errors
• Intensity Normalization Errors
• Topological Defect
![Page 10: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/10.jpg)
Dura or Blood VesselWhite/Gray OK, butPial Inaccurate
Pial Surface Misplacement
Dura and GM have extremely similar intensity characteristics on most T1-weighted sequences (but different T2*!). Typical fix: edit the brainmask.mgz to erase dura/blood vessels, and run:
recon-all -s <subject> -autorecon-pial
![Page 11: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/11.jpg)
New Morphometry Protocol: Identifying Dura with Multi-echo MP-RAGE
*joint work with Andre van der Kouwe
![Page 12: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/12.jpg)
Skull Strip Error
brainmask.mgzorig.mgz
Use “clone” tool to manually correct, or adjust watershed parameters and run (default wsthresh is 25, higher means strip less):recon-all -skullstrip -wsthresh 35 -clean-bm -no-wsgcaatlas -s <subj>
recon-all -autorecon2 -autorecon3 -s <subj>
![Page 13: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/13.jpg)
Troubleshooting: Skull Strip
brainmask.mgzorig.mgz
Or try gcut (be sure to check didn’t take too much!!): recon-all -skullstrip -clean-bm -gcut -s <subj>
recon-all -autorecon2 -autorecon3 -s <subj>
![Page 14: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/14.jpg)
“Hypo-Intensities”White Matter LesionsMisclassified as gray matter
WM Segmentation Error
Fill in wm.mgz then run: recon-all -s <subject> -autorecon2-wm -autorecon3
![Page 15: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/15.jpg)
Eye Socket classified as WM due to Skull Strip Failure.Erase in wm.mgz then run: recon-all -s <subject> -autorecon2-wm -autorecon3
WM Segmentation Error
![Page 16: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/16.jpg)
Intensity Normalization Failure. Most WM in T1 volume (T1.mgz) should be close to 110. Can fix by adding “Control Points” to interior of wm. Beware partial voluming!
recon-all -s <subject> -autorecon2-cp -autorecon3
Intensity Normalization Error
![Page 17: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/17.jpg)
Topology Fixer Error
Fornix
Pallidum and Putamen
hippocampus
Ventricles and Caudate
Cortical Defects
• Holes• Handles• Automatically Fixed
![Page 18: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/18.jpg)
White Matter “disconnects”
orig.nofix will be accurate
Topology Fixer Error
Add in wm.mgz then run: recon-all -s <subject> -autorecon2-wm -autorecon3
![Page 19: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/19.jpg)
What are the Common Interventions?
• Manually edit the wm.mgz to change incorrectly labeled voxels (only for small errors).
• Manually edit the brainmask.mgz to erase dura/vasculature.
• Adjust watershed parameters or use –gcut to fix large-scale skull-strip errors.– Manually erase/clone regions of remaining skull on
brainmask.mgz
• Control Points – add locations that are in the interior of the white matter and <110 to bring regional wm intensity up. Use norm.mgz as guide.
• Use tkregister2 to fix incorrect talairach.xfm
![Page 20: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/20.jpg)
How Know What to Edit?
• If pial surface includes too much:• edit brainmask.mgz
• If it affects the white surface (too much/little) or If pial surface includes too little:• edit the wm.mgz (if segmentation error)• add control points (if normalization error)
![Page 21: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/21.jpg)
Must rerun to fix errors
recon-all -autorecon2 -autorecon3 (Stages 6+) Skull strip error (after fixed watershed/cloned)
recon-all -autorecon2-cp -autorecon3 (Stages 10+)Added control points
recon-all -autorecon2-wm -autorecon3 (Stages 13+)Edited wm.mgz
recon-all -autorecon-pial (Stage 19+)Edited brainmask.mgz
![Page 22: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/22.jpg)
Processing Stream Order
http://surfer.nmr.mgh.harvard.edu/fswiki/ReconAllDevTable
![Page 23: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/23.jpg)
Or Make Life Easier
recon-all -make all -s subjid
![Page 24: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/24.jpg)
Troubleshooting – Advice
CONTEXT
AMBIGUITY
CONSISTENCY
SPEED
![Page 25: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/25.jpg)
Troubleshooting – Advice
CONTEXT• Always look at the data in multiple views and scroll back and forth
a few slices – 3D structure is difficult to discern!
AMBIGUITY
CONSISTENCY
SPEED
![Page 26: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/26.jpg)
Troubleshooting – AdviceCONTEXT
• Always look at the data in multiple views and scroll back and forth a few slices – 3D structure is difficult to discern!
AMBIGUITY
• Don’t edit too much! This will reduce reliability while only moderately increasing accuracy and is almost never needed. If unsure, leave it.
• Even one or two missing voxels can cause large-scale defects, so very minor editing (e.g. filling in white matter voxels that are holes, or erasing handles) may fix the problem.
CONSISTENCY
SPEED
![Page 27: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/27.jpg)
Troubleshooting – AdviceCONTEXT
• Always look at the data in multiple views and scroll back and forth a few slices – 3D structure is difficult to discern!
AMBIGUITY
• Don’t edit too much! This will reduce reliability and is almost never needed. If unsure, leave it.
• Even one or two missing voxels can cause large-scale defects, so very minor editing (e.g. filling in white matter voxels that are holes, or erasing handles) may fix the problem.
CONSISTENCY
• Edit consistently within and across subjects.
SPEED
![Page 28: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/28.jpg)
Troubleshooting – AdviceCONTEXT
• Always look at the data in multiple views and scroll back and forth a few slices – 3D structure is difficult to discern!
AMBIGUITY
• Don’t edit too much! This will reduce reliability and is almost never needed. If unsure, leave it.
• Even one or two missing voxels can cause large-scale defects, so very minor editing (e.g. filling in white matter voxels that are holes, or erasing handles) may fix the problem.
CONSISTENCY
• Edit consistently within and across subjects.
SPEED
• You will get faster with time; certain sections go faster.
![Page 29: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/29.jpg)
Start Over
recon-all -all -clean -s subjid
![Page 30: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/30.jpg)
Tutorial Tips
•DO NOT open tkmedit & tksurfer from the same terminal window. (Use two terminal windows)
•You CANNOT type commands in a terminal window if you are running tkmedit or tksurfer from it. (Open a new terminal window to do this.)
![Page 31: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard](https://reader030.vdocument.in/reader030/viewer/2022033104/56814d81550346895dbae052/html5/thumbnails/31.jpg)
See Edits Made
recon-all –show-edits -s subjid