Saturday, October 13, 2012

FSL Tutorial 8: FAST

For countless aeons did neuroscientists burn with the perverse desire to segment human brains apart in vivo, while the juicy glands still pulsated with life within their unfortunate hosts. Numerous methods were attempted, as crude as they were unnatural - paint scrapers, lint rollers, zesters - but without success. And the neuroscientists did curse and they did rage and they did utter blasphemy of such wickedness as to make the ears of Satan himself bleed. With the terrible advent of FMRI did that all change; now, the tissue of the brain, the seat of consciousness, could be blasted apart while leaving its host intact; now could the grey be separated from the white, the gold from the dross. And then did the neuroscientists go down and slay the Canaanites, thirty thousand in number, and not a man survived as the neuroscientists did wade through swales of blood covered with the skins of their enemies and their eyes burned centroids of murder.

So goes the story of the creation of FAST. The tool is straightforward: Provide a skullstripped brain, decide how many tissue classes you wish to segment, and the rest of the defaults are usually fine. Often a researcher will want three tissue classes: White matter, grey matter, and cerebrospinal fluid (CSF). However, if you are dealing with a subject that presents with a brain abnormality, such as a lesion, you may want to increase the number of classes to four in order to segment the lesion into its own class.

FAST outputs a dataset for each tissue type. For example, if three tissue types have been segmented, there will be three output datasets, one corresponding to each tissue class; each dataset is a mask for each tissue type, and contains a fraction estimate at each voxel. The picture below shows a grey matter mask segmented with FAST. The intensity at the voxel centered at the crosshairs is 0.42, meaning that 42% of that voxel is estimated to be grey matter; presumably, the other 58% is white matter, as the voxel lies at the boundary between the head of the caudate nucleus (a grey matter structure), and the internal capsule (which is composed of white matter).


For some packages such as SPM, tissue masks can be used for normalization. For example, the grey matter and white matter masks will be normalized to mask templates in a standard space, such as MNI, and these warping parameters are then applied to the functional runs. However, the volume of these masks can also be calculated and compared across subjects or across groups. In order to calculate the total grey matter volume within a mask, for example, fslstats can be used:

fslstats s007a1001_brain_pve_1.nii.gz -M -V | awk '{ print $1 * $3 }'

This will return the volume of the mask in cubic millimeters; the same operation can be applied to the other masks by substituting s007a1001_brain_pve_1 with a different class (e.g., either 0 or 2).

However, for more sophisticated voxel-based morphometry comparing volumetric differences between focal cortical areas or specific subcortical structures, I recommend FreeSurfer. Brain segmentation is part of the default processing stream in FreeSurfer, and the volume of each area is output into a formatted table. This will be covered in a later tutorial; for now, use FAST and appreciate its bloody, violent history.

10 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This is great. Do you know if you can apply the MNI template to rodent brains for segmentation purposes? I have been doing it with success however I am not sure if it is an acceptable method.

    ReplyDelete
    Replies
    1. Hi Heather,

      I don't have any experience with rodent brains, but I'm assuming that FAST should be able to distinguish white matter from gray matter and CSF. As for using an MNI template, to my knowledge this is just used for human subjects, but if you seem to be getting reasonable results, I don't see why you shouldn't be able to use it.


      Best,

      -Andy

      Delete
  3. Can you comment on ideal parameter setting for FAST??

    ReplyDelete
  4. Hi Andy, Thank you for this useful post. I have a question regarding preprocessing data. I have a dataset which is already preprocessed using SMP. Since the dataset didn't include mask, I created a grey matter mask for the dataset using Fast and resampled it using 3dresample command in AFNI to be in the same dimension as functional data and finally converted it to a nifti file using 3dAFNItoNIFTI command. My question is that is it ok to use multiple softwares to do preprocessing and creating mask for a single dataset? In my case I am using AFNI and FSL to create the mask while data is preprocessed using SPM. Does it have any affect on correctness and accuracy of the data for further analysis?

    ReplyDelete
    Replies
    1. Hello Taban,

      NIFTI format was created for these kinds of issues; you can use it with any of the major software packages. Although preprocessing differs between the packages, the result after each step is just a three-dimensional (or four-dimensional) matrix. I routinely use AFNI for creating masks and doing ROI analyses whether the data has been processed in FSL or SPM, and I use FSL commands within my SPM preprocessing pipeline.

      I recommend checking your masks after each step in the viewer of the software you are primarily working with (e.g., if you did the preprocessing in SPM and will do the results in SPM, check the AFNI masks in SPM's Display viewer). If everything looks OK, then go for it!

      -Andy

      Delete
  5. Hi Andy, do you reckon it'd be ok to employ FSL's VBM to analyze data that have been preprocessed using SPM or is it advised to stick with using SPM solely for the entire pipeline?

    ReplyDelete
    Replies
    1. Hi Paola,

      I would stick to SPM. In principle there is no problem with using any software package to analyze data preprocessed with any other software package, but you may run into problems with mismatches in orientation and resolution that can be difficult to debug.

      Best,

      -Andy

      Delete
  6. Hi Andy,
    Wondering if you can help clarify a concept. Similar (I think) to what you describe in your post, I used a mid cingulate AAL mask from Wake Forest Pick Atlas to extract GMV using MarsBaR. But since the mask is a volume in and of itself, can you tell me exactly what the number from the cingulate ROI is telling me now (i.e., GMV within a... volume? Seems like a strange concept!)? Thanks for your help!
    Val

    ReplyDelete