magetbrain
MAGeT-Brain: Multiple Automatically Generated Templates Brain Segmentation.
Performs multi-atlas segmentation through combinatorial registration and majority vote label fusion. The algorithm propagates atlas labels to subjects via an intermediate template library, leveraging neuroanatomical variability to improve segmentation accuracy.
Pipeline steps:
1. Register every atlas to every template (REGISTER_ATLAS_TEMPLATE)
2. Register every template to every subject (REGISTER_TEMPLATE_SUBJECT)
3. Chain transforms to resample atlas labels into subject space via every
possible atlas-template-subject path (RESAMPLE_LABELS)
4. Majority vote across all candidate labels per subject (IMAGE_ANTSMATH)
Computational note: With A atlases, T templates, S subjects, and L labels per atlas, the subworkflow produces AT + TS registrations and ATS*L label resamplings.
References:
- Pipitone J, Park MT, Winterburn J, et al. Multi-atlas segmentation of the
whole hippocampus and subfields using multiple automatically generated templates. Neuroimage. 2014.
- Chakravarty MM, Steadman P, van Eede MC, et al. Performing label-fusion-
based segmentation using multiple automatically generated templates. Hum Brain Mapp, 34(10):2635-54, October 2013. doi:10.1002/hbm.22092
Implementation assistance: Claude (Anthropic). Models: Opus 4.6, Opus 4.7
Keywords : segmentation, multi-atlas, label fusion, majority voting, MAGeTBrain, registration
Components : registration/ants, registration/antsapplytransforms, image/antsmath
Inputs
Section titled “Inputs”| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| ch_atlases | file | Channel containing atlas brain images. Each atlas may have one or more associated label files provided via ch_labels. Structure : tuple val(meta), path(image)
| True | *.\{nii,nii.gz\} |
| ch_labels | file | Channel containing atlas label (segmentation) files. The meta.id must match the corresponding atlas, and meta.label_tag identifies the label type (e.g. “_label_amygdala”). Structure : tuple val(meta), path(label)
| True | *.\{nii,nii.gz\} |
| ch_templates | file | Channel containing template brain images. Templates serve as intermediate registration targets between atlases and subjects. Structure : tuple val(meta), path(image)
| True | *.\{nii,nii.gz\} |
| ch_subjects | file | Channel containing subject brain images to be segmented. Structure : tuple val(meta), path(image)
| True | *.\{nii,nii.gz\} |
Outputs
Section titled “Outputs”| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| labels | file | Channel containing majority-voted segmentation labels for each subject and label type. Structure : tuple val(meta), path(label)
| True | *_majorityvote.nii.gz |
| versions | file | File containing software versions used. Structure : tuple path(versions)
| True | versions.yml |
Parameters (see configuration)
Section titled “Parameters (see configuration)”| Type | Description | Default | Choices | |
|---|---|---|---|---|
| single_thread | boolean | {‘type’: ‘boolean’, ‘description’: ‘Force single-threaded execution for registration and resampling processes.’, ‘default’: False} | False | |
| repro_mode | boolean | {‘type’: ‘boolean’, ‘description’: ‘Run registration in reproducibility mode (registration/ants only).’, ‘default’: False} | False |
Authors
Section titled “Authors”Last updated : 2026-05-12