Overall Pipeline

Brain Extraction 3 Different Attempts

In this tutorial we will discuss performing brain segmentation using:

  • the brain extraction tool (BET) (Smith 2002) in FSL (Jenkinson et al. 2012)
    • without bias correction (method 1) and with (method 2)
  • a multi-atlas approach, called “multi-atlas label fusion” with the malf command (method 3).
  • (extra slides) a robust version using a wrapper function in extrantsr, fslbet_robust

MS Lesion T1

Let’s reset and read in the T1 image from a MS lesion data set:

t1_fname = "training01_01_t1.nii.gz"
t1 = neurobase::readnii(t1_fname)
rt1 = robust_window(t1, probs = c(0, 0.975)); 
red0.5 = scales::alpha("red", 0.5) # for plotting later

T1-weighted T1 Image


Attempt 1: Brain Extraction of T1 image using BET

Here we will use FSL’s Brain Extraction Tool (BET) to extract the brain tissue from the rest of the image (general overview):

  • 2nd and 98th percentiles are calculated. (98th - 2nd) * 10% + 2nd percentile used to threshold out background
  • From non-thresholded voxels - calculate center of gravity (COG)
  • Calculate radius of brain and median intensity of all points within “spherical brain” (used in last step)
  • Perform region growing and iterating to get brain surface
  • Smooth surface
  • Use median intensity to shrink surface to the “real” surface

Attempt 1: Brain Extraction of T1 image using BET

fslr - wraps FSL commands to use in R - registration, image manipulation

fslr::fslbet - takes in a filename/nifti and calls FSL bet function - additional options can be passed to FSL command in using opts

ss = fslbet(infile = t1_fname)

FSL BET Results - Missing Brain Tissues (Posterior)