Personal tools

Freesrufer

From hpcwiki

Jump to: navigation, search

Freesurfer is an open source software suite for processing and analyzing (human) brain MRI images. Official site . It provides a different tools to proccess a human brain, some of its tools are:

  • Skull stripping
  • Image Registration
  • Subcortical Segmentation
  • Cortical Surface Reconstruction
  • Cortical Segmentation
  • Cortical Thickness Estimation
  • Longitudinal Processing
  • fMRI Analysis
  • Tractography
  • FreeView Visualization GUI

This tutorial is based on the official guides and were adapted to work with our local set of images. Let's start:

The next images illustrate the recon-all tool provided by freesurfer to process images with fressurfer, and this table summarizes the procedures and commands executed by recon-all tool.

Block diag1.jpg

Block diag2.jpg

An overview of the freesurfer pipeline could be see here

Contents

Installation

  1. Uncompress the freesurfer package in tour desired location, for this document (as illustration) in /usr/local
  2. [~~]$ cd /usr/local
    [~~]$ tar -xzvf /home/myUser/Downloads/freesurfer-XXX-stable.tar.gz

    where /home/myUser/Downloads/freesurfer-XXX-stable.tar.gz is freesurfer package for your OS

  3. Set the freesurfer home, append the line at bottom
  4. [~~]$ sudo vim /etc/environment
    [~~]$ FREESURFER_HOME=/usr/local/freesurfer
    

  5. Source the freesurfer tools, append the line at bottom
  6. [~~]$ sudo vim /etc/profile
    [~~]$ source $FREESURFER_HOME/SetUpFreeSurfer.sh
    

  7. Create the license file in the Freesurfer home. To do that, create a .license file then copy and paste the lines send to your mailbox by the freesurfer team
  8. [~~]$ cd $FREESURFER_HOME 
    [~~]$ sudo vim .license
    

Freesurfer Cortical Analysis

Surface based stream

  1. Surface registered to Talairach-Tourneux atlas (AC-CP driven)
  2. Estimation of the B1 bias field by measuring the variation in the white matter intensity
  3. Skull stripped using a deformable template model.
  4. Voxel classification as white matter based on internsity and neighbor constraints
  5. Separation os the brain hemispheres and cerebellum and brainstem remotion by computing cutting planes
  6. For each hemisphere a surface is generated by tiling the outside of the white matter mass. This is refined lately to follow the intensity gradients between the white and gray matter
  7. The surface is employed to approach the gradients between gray matter and Cerebro-Spinal Fluid (CSF), buidinl the pial surface


Freesurfer Subcortical Analysis

  1. Affine registration with Talairach space (design to be insensitive to pathology)
  2. Initial volumetric labeling (variation intensity due to B1 bias corrected)
  3. High dimensional nonlinear alignment to the Talairach altas.
  4. Volume labeling

The volume-based stream only depends upon the skull stripping to create a mask of the brain in which the labeling is performed.

Working with Freesurfer

Once, the main purpose and global processing of freesurfer was understood, we are ready to work with it:

  1. Fully automated reconstruction process recon-all (cortical reconstruction)
  2.  
     recon-all –i file.dcm –subject bert –all

    recon-all is a fully automated reconstruction process. It is a macro-process that involves many
    other processes to compute the final cortical reconstruction.
    -i input file:
    in this case file.dcm has the MRI anatomic image of the brain
    -subject the name of the subject:
    creates a folder in SUBJECTS_DIR with the results of the process
    -all do everything:
    indicates that the process has to execute all the sub-processes
  3. Once the process is finished the results were saved in an spscific directories structure. In this case, the main directory is called bert (subject name) and result were organized in:
    1. scripts
    2. mri
    3. surf
    4. label
    5. stats
  4. Ready to work with your own images