% =========================================================================
%       LABEL: Learning Algorithm for Brain Extraction and Labeling
% =========================================================================
% 06/30/2014, working with nii images.
% 04/30/2011, first version.
% For comments or questions please turn to Feng Shi (fengshiunc@gmail.com).
% =========================================================================

The LABEL package aims to perform brain extraction on the input image. It was
trained on adult, pediatric, and infant images specificially. 
It is an implementation of below paper:
Feng Shi, Li Wang, Yakang Dai, John H Gilmore, Weili Lin, Dinggang Shen. "LABEL: Pediatric Brain Extraction Using Learning-based Meta-algorithm", Neuroimage 62(3):1975-1986, Sep. 2012.

In this toolbox (bin folder) you can find the following files:
================================================

1. fLABEL - the main file in this toolbox that load data and call the core function for processing.
2. fLABEL.m - the core function to implement the atlas construction in MATALB environment.
  
Required software
================================================
This toolkit acknowledges below toolboxs (included at bin folder). 

1. NIfTI matlab toolbox from http://www.mathworks.com/matlabcentral/fileexchange/8797-tools-for-nifti-and-analyze-image
2. FSL package from http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/

Install the toolbox
================================================

1. Please setup LABELDIR as the program path in your shell environment ~/.bashrc or ~/.cshrc.
   For example, add below to ~/.bashrc (change the path accordingly)
   export LABELDIR=/lab_stor5/fengshi/skullStrippingToolkit
   export PATH=${PATH}:${LABELDIR}/bin
2. Please setup LABELDIR as the program path in your ~/matlab/startup.m file.
   For example, add below to ~/matlab/startup.m (change the path accordingly)
   %----------- add fLABEL for brain extraction ---------------%
   LABELDIR = '/lab_stor5/fengshi/skullStrippingToolkit';
   addpath(genpath(LABELDIR));
3. The toolbox require matlab environment. That means matlab will be activated when you type in matlab in command line.

To run the toolbox
================================================

1. The input image should be in nii format (better to perform bias correction first using tools such as N3).
2. Type in fLABEL and the program option will be listed.
3. Follow the example to run the algorithm.



