31
FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard.edu

FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

  • Upload
    zoey

  • View
    35

  • Download
    2

Embed Size (px)

DESCRIPTION

FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard.edu. MR Anatomy Caveats. Surfaces 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 - PowerPoint PPT Presentation

Citation preview

Page 1: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

FreeSurfer: Troubleshootingsurfer.nmr.mgh.harvard.edu

Page 2: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

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

Suggested Morphometry Sequences

http://www.nmr.mgh.harvard.edu/~andre/

Page 4: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

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

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

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

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

Output of Cortical Surface Reconstruction

Page 9: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

Typical Errors

• Pial Surface misplacement

• Skull Strip Errors

• WM Segmentation Errors

• Intensity Normalization Errors

• Topological Defect

Page 10: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

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

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

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

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

“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

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

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

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

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

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

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

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

Processing Stream Order

http://surfer.nmr.mgh.harvard.edu/fswiki/ReconAllDevTable

Page 23: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

Or Make Life Easier

recon-all -make all -s subjid

Page 24: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

Troubleshooting – Advice

CONTEXT

AMBIGUITY

CONSISTENCY

SPEED

Page 25: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

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

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

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

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

Start Over

recon-all -all -clean -s subjid

Page 30: FreeSurfer: Troubleshooting surfer.nmr.mgh.harvard

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

See Edits Made

recon-all –show-edits -s subjid