Multiple Automatically Generated Templates brain segmentation algorithm
Looking for the MAGeT Morphology pipeline? Use the
morpho-labelmask branch instead.
Given a set of labelled MR images (atlases) and unlabelled images (subjects), MAGeT produces a segmentation for each subject using a multi-atlas voting procedure based on a template library made up of images from the subject set.
Here is a schematic comparing 'traditional' multi-atlas segmentation, and MAGeT brain segmentation:
The major difference between algorithms is that, in MAGeT brain, segmentations from each atlas (typically manually delineated) are propogated via image registration to a subset of the subject images (known as the 'template library') before being propogated to each subject image and fused. It is our hypothesis that by propogating labels to a template library, we are able to make use of the neuroanatomical variability of the subjects in order to 'fine tune' each individual subject's segmentation.
To cite MAGeTbrain in publications, please use:
Pipitone J, Park MT, Winterburn J, et al. Multi-atlas segmentation of the whole hippocampus and subfields using multiple automatically generated templates. Neuroimage. 2014;
M Mallar Chakravarty, Patrick Steadman, Matthijs C van Eede, Rebecca D Calcott, Victoria Gu, Philip Shaw, Armin Raznahan, D Louis Collins, and Jason P Lerch. Performing label-fusion-based segmentation using multiple automatically generated templates. Hum Brain Mapp, 34(10):2635–54, October 2013. (doi:10.1002/hbm.22092)
In order to use MAGeTBrain, you will need to install:
- Python 2.7, we recommend you install the anaconda python 2.7 distribution
- If you didn't install anaconda, you will need the python packages NumPy and SciPy
- minc-toolkit 1.0.07
Just use the pipeline on Scinet.
Getting started, for the impatient:
git clone https://github.com/CobraLab/MAGeTbrain.git source MAGeTbrain/bin/activate mb init segmentations cd segmentations mb import atlas1_t1.mnc atlas1_labels.mnc mb import atlas2_t1.mnc atlas2_labels.mnc ... mb check mb run
Check out a copy of this repository somewhere handy,
git clone https://github.com/CobraLab/MAGeTbrain.git
MAGeTbrain/binfolder to your path. This can be done easily by running,
source MAGeTbrain/bin/activate(revert PATH by typing
Create a new folder for your project and,
Copy/link your atlases, templates, subjects into
input/subjects, respectively. As per always, MR images go in
Atlas labels are expected to have the same name as their MR image but with a postfix of
_labels.mnc. Use the
importcommand to simplify the renaming process: mb import /path/to/image_file.mnc /path/to/label_file.mnc
This copies the image and label files into the proper folder and rename the label file accordingly. Use the
mb import -lto use symbolic links rather than copying files.
MAGeT Brain is operated using the
mbcommand. In order to run the entire pipeline, simply run:
This uses the default settings to execute the necessary commands. In particular, it assumes you have access to a PBS batch queuing system, and uses the utility
bin/qbatchto submit commands in batches. If you are running this on SciNet, you should no problems.
If you can also run MAGeT Brain using the GNU parallel on a single machine, like so:
mb run -q parallel
Currently, only majority voting label fusion is enabled. For a more complete implementation, check the 'master' branch.
MAGeT Brain Commands
mb init [<folder>]
init command is used to start a new project. It creates a folder
structure to hold MAGeT brain inputs and outputs. If no folder name is supplied
then the current folder is used.
init creates the following folders:
project-folder/ input/ atlases/ brains/ labels/ templates/ brains/ subjects/ brains/ output/
mb import <image.mnc> <labels.mnc> [<mask.mnc>]
The given image and corresponding labels are imported into the
folder, with the proper naming convention.
Checks the input configuration and reports any anomalies and suggestions to correct them. If this command doesn't return any messages then you should be set to run MAGeT brain.
Reports on the progress of MAGeT brain and shows the number of remaining tasks.
Starts the MAGeT brain pipeline.