Differences between revisions 2 and 3
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
  * _cp $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach.auto.xfm $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach.xfm_
  * _recon-all -tal-check -s $SUBJ_
  * _cp $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach.auto.xfm $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach.xfm_
   * _recon-all -tal-check -s $SUBJ_
Line 22: Line 22:
  * _mri_watershed -T1 -atlas -h 35 -brain_atlas $FREESURFER_HOME/average/RB_all_withskull_2008-03-26.gca $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach_with_skull.lta $SUBJECTS_DIR/$SUBJ/mri/T1.mgz $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz_   * _mri_watershed -T1 -atlas -h 35 -brain_atlas $FREESURFER_HOME/average/RB_all_withskull_2008-03-26.gca $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach_with_skull.lta $SUBJECTS_DIR/$SUBJ/mri/T1.mgz $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz_
Line 24: Line 24:
  * _mri_gcut -110 -mult $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz $SUBJECTS_DIR/$SUBJ/mri/T1.mgz $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz_   * _mri_gcut -110 -mult $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz $SUBJECTS_DIR/$SUBJ/mri/T1.mgz $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz_
Line 34: Line 34:
  * _cp $SUBJECTS_DIR/$SUBJECT/mri/transforms/talairach.auto.xfm $SUBJECTS_DIR/$SUBJECT/mri/transforms/talairach.xfm_   * _cp $SUBJECTS_DIR/$SUBJECT/mri/transforms/talairach.auto.xfm $SUBJECTS_DIR/$SUBJECT/mri/transforms/talairach.xfm_

High Resolution Data Recon

Notes from Falk Lüsebrink on the modifications to the default recon-all stream necessary to process high-resolution data (< 1mm), used in his paper.


Processing high resolution data with an isotropic resolution other than 1mm³ with Freesurfer (Version 5.1) For best results I advise to do an inhomogeneity correction by division before processing the data. The "corrected by division" image can be generated in SPM by first to aligning the MP-RAGE and the GE by co-registration. Afterwards use the image calculator to do the division using the formula: (i1./i2 .* (i2>20)) .* 100. The value of 20 depends on the image intensity and 100 is simply a scaling facotr (i1= MP-RAGE, i2= GE)

First: downsample high resolution data to 1mm and process completely

  • SUBJ=ab11_05mm_downsampled
    • _This will be the name of your subject_
  • recon-all -motioncor -talairach -tal-check -i ~/data/ab11_05mm.nii -s $SUBJ
    • _Adjust the path to your input file accordingly._
    • _If the talairach registration fails an automated correction is being performed but for whatever reason the result is not being used, try:_
      • _cp $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach.auto.xfm $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach.xfm_
      • _recon-all -tal-check -s $SUBJ_
    • _If it still fails try looking at the http://www.freesurfer.net/fswiki/FsTutorial/Talairach][manual talairach registration in the wiki of Freesurfer._

  • mri_nu_correct.mni --i $SUBJECTS_DIR/$SUBJ/mri/orig.mgz --o $SUBJECTS_DIR/$SUBJ/mri/nu.mgz --proto-iters 1000 --distance 15 --fwhm 0.15 --n 1 --uchar $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach.xfm
    • _N3 Algorithm for inhomogeneity correction with optimized parameters for 7T data. Works well with 1mm and 0.5mm MP-RAGE data and "corrected by division"-MP-RAGE data._
  • recon-all -mprage -normalization -skulstrip -s $SUBJ
    • _Visualize brainmask.mgz before continuing. If skullstripping does not look satisfactory, try:_
      • _mri_watershed -T1 -atlas -h 35 -brain_atlas $FREESURFER_HOME/average/RB_all_withskull_2008-03-26.gca $SUBJECTS_DIR/$SUBJ/mri/transforms/talairach_with_skull.lta $SUBJECTS_DIR/$SUBJ/mri/T1.mgz $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz_
    • _If small structures are still attached to the brain, try:_
      • _mri_gcut -110 -mult $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz $SUBJECTS_DIR/$SUBJ/mri/T1.mgz $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz_
    • _If it looks satisfactory: cp $SUBJECTS_DIR/$SUBJ/mri/brainmask.auto.mgz $SUBJECTS_DIR/$SUBJ/mri/brainmask.mgz_
  • recon-all -autorecon2 -autorecon3 -mprage -s $SUBJ

Second: process high resolution data and use downsampled data whenever needed

  • SUBJECT=ab11_05mm
    • _This will be the name of your subject_
  • recon-all -cm -motioncor -talairach -tal-check -i ~/data/ab11_05mm.nii -s $SUBJECT
    • _Adjust the path to your input file accordingly._
    • _If the talairach registration fails an automated correction is being performed but for whatever reason the result is not being used, try:_
      • _cp $SUBJECTS_DIR/$SUBJECT/mri/transforms/talairach.auto.xfm $SUBJECTS_DIR/$SUBJECT/mri/transforms/talairach.xfm_
    • _recon-all -tal-check -s $SUBJECT_
    • _If it still fails try looking at the http://www.freesurfer.net/fswiki/FsTutorial/Talairach][manual talairach registration in the wiki of Freesurfer._

  • mri_nu_correct.mni --cm --i $SUBJECT_DIR/$SUBJECT/mri/orig.mgz --o $SUBJECT_DIR/$SUBJECT/mri/nu.mgz --proto-iters 1000 --distance 15 --fwhm 0.15 --n 1 --uchar $SUBJECTS_DIR/$SUBJECT/mri/transforms/talairach.xfm
    • _N3 Algorithm for inhomogeneity correction with optimized parameters for 7T data. Works well with 1mm and 0.5mm MP-RAGE data and "corrected by division"-MP-RAGE data._
  • recon-all -cm -mprage -normalization -s $SUBJECT
  • mri_convert -rl $SUBJECTS_DIR/$SUBJECT/mri/orig.mgz -rt nearest $SUBJECTS_DIR/$SUBJ/mri/aseg.auto_noCCseg.mgz $SUBJECTS_DIR/$SUBJECT/mri/aseg.auto_noCCseg.mgz
    • _This upsamples the aseg.auto_noCCseg.mgz of the formerly downsampled dataset and places it in the according folder of the high resolution data._
  • mri_convert -rl $SUBJECTS_DIR/$SUBJECT/mri/orig.mgz -rt nearest $SUBJECTS_DIR/$SUBJ/mri/aseg.mgz $SUBJECTS_DIR/$SUBJECT/mri/aseg.mgz
    • _This upsamples the aseg.mgz of the formerly downsampled dataset and places it in the according folder of the high resolution data._
  • mri_convert -rl $SUBJECTS_DIR/$SUBJECT/mri/orig.mgz -rt nearest $SUBJECTS_DIR/$SUBJ/mri/brain.mgz $SUBJECTS_DIR/$SUBJECT/mri/brainmask.hires.mgz
    • _This upsamples the brainmask.mgz of the formerly downsampled dataset and places it in the according folder of the high resolution data._
  • mri_mask $SUBJECTS_DIR/$SUBJECT/mri/T1.mgz $SUBJECTS_DIR/$SUBJECT/mri/brainmask.hires.mgz $SUBJECTS_DIR/$SUBJECT/mri/brainmask.mgz
    • _This creates the brainmask.mgz of the high resolution data by masking the high resolution T1.mgz by the upsampled brainmask of the formerly downsampled dataset._
  • recon-all -gcareg -canorm -s $SUBJECT
  • mri_normalize -mprage -noconform -mask $SUBJECTS_DIR/$SUBJECT/mri/brainmask.mgz $SUBJECTS_DIR/$SUBJECT/mri/norm.mgz $SUBJECTS_DIR/$SUBJECT/mri/brain.mgz
  • recon-all -maskbfs -segmentation -fill -tessellate -s $SUBJECT
  • recon-all -smooth1 -inflate1 -qsphere -hemi lh -log $SUBJECTS_DIR/$SUBJECT/scripts/recon-all.lh.log -s $SUBJECT
  • recon-all -smooth1 -inflate1 -qsphere -hemi rh -log $SUBJECTS_DIR/$SUBJECT/scripts/recon-all.rh.log -s $SUBJECT
    • _To speed up the processing of the data (which takes quite long) run the two commands above in two seperate terminals by processing each hemisphere individually._
  • cp $SUBJECTS_DIR/$SUBJECT/surf/lh.orig.nofix $SUBJECTS_DIR/$SUBJECT/surf/lh.orig
  • cp $SUBJECTS_DIR/$SUBJECT/surf/rh.orig.nofix $SUBJECTS_DIR/$SUBJECT/surf/rh.orig
    • _This is just a poor work-around as the stage "fix" of recon-all might take weeks to finish..._
  • recon-all -white -smooth2 -inflate2 -autorecon3 -hemi lh -log $SUBJECTS_DIR/$SUBJECT/scripts/recon-all.lh.log -s $SUBJECT
  • recon-all -white -smooth2 -inflate2 -autorecon3 -hemi rh -log $SUBJECTS_DIR/$SUBJECT/scripts/recon-all.rh.log -s $SUBJECT
    • _To speed up the processing of the data (which takes quite long) run the two commands above in two seperate terminals by processing each hemisphere individually._

HiResRecon (last edited 2016-08-16 17:00:02 by AllisonMoreau)