Freesrufer
From hpcwiki
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.
An overview of the freesurfer pipeline could be see here
Contents |
Installation
- Uncompress the freesurfer package in tour desired location, for this document (as illustration) in /usr/local
- Set the freesurfer home, append the line at bottom
- Source the freesurfer tools, append the line at bottom
- 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
where [~~]$ cd /usr/local
[~~]$ tar -xzvf /home/myUser/Downloads/freesurfer-XXX-stable.tar.gz
/home/myUser/Downloads/freesurfer-XXX-stable.tar.gz
is freesurfer package for your OS
[~~]$ sudo vim /etc/environment
[~~]$ FREESURFER_HOME=/usr/local/freesurfer
[~~]$ sudo vim /etc/profile
[~~]$ source $FREESURFER_HOME/SetUpFreeSurfer.sh
[~~]$ cd $FREESURFER_HOME
[~~]$ sudo vim .license
Freesurfer Cortical Analysis
Surface based stream
- Surface registered to Talairach-Tourneux atlas (AC-CP driven)
- Estimation of the B1 bias field by measuring the variation in the white matter intensity
- Skull stripped using a deformable template model.
- Voxel classification as white matter based on internsity and neighbor constraints
- Separation os the brain hemispheres and cerebellum and brainstem remotion by computing cutting planes
- 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
- The surface is employed to approach the gradients between gray matter and Cerebro-Spinal Fluid (CSF), buidinl the pial surface
Freesurfer Subcortical Analysis
- Affine registration with Talairach space (design to be insensitive to pathology)
- Initial volumetric labeling (variation intensity due to B1 bias corrected)
- High dimensional nonlinear alignment to the Talairach altas.
- 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:
- Fully automated reconstruction process recon-all (cortical reconstruction)
- 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:
- scripts
- mri
- surf
- label
- stats
- Ready to work with your own images
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