Skip to content

magetbrain

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


TypeDescriptionMandatoryPattern
ch_atlasesfileChannel containing atlas brain images. Each atlas may have one or more associated label files provided via ch_labels.

Structure : tuple val(meta), path(image)
  • meta [map] Metadata map. Must contain id (atlas identifier). e.g. [ id:'atlas1' ]
  • image [file] Atlas brain image.
True*.\{nii,nii.gz\}
ch_labelsfileChannel 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)
  • meta [map] Metadata map. Must contain id (atlas identifier matching ch_atlases) and label_tag (label type identifier, e.g. “_label_amygdala”). e.g. [ id:'atlas1', label_tag:'_label_amygdala' ]
  • label [file] Atlas label segmentation file.
True*.\{nii,nii.gz\}
ch_templatesfileChannel containing template brain images. Templates serve as intermediate registration targets between atlases and subjects.

Structure : tuple val(meta), path(image)
  • meta [map] Metadata map. Must contain id (template identifier). e.g. [ id:'template1' ]
  • image [file] Template brain image.
True*.\{nii,nii.gz\}
ch_subjectsfileChannel containing subject brain images to be segmented.

Structure : tuple val(meta), path(image)
  • meta [map] Metadata map. Must contain id (subject identifier). e.g. [ id:'subject1' ]
  • image [file] Subject brain image.
True*.\{nii,nii.gz\}

TypeDescriptionMandatoryPattern
labelsfileChannel containing majority-voted segmentation labels for each subject and label type.

Structure : tuple val(meta), path(label)
  • meta [map] Metadata map containing id (composed of subject identifier and label tag, e.g. “subject1_label_amygdala”).
  • label [file] Majority-voted label segmentation file.
True*_majorityvote.nii.gz
versionsfileFile containing software versions used.

Structure : tuple path(versions)
  • versions [file] Versions YAML file.
Trueversions.yml

TypeDescriptionDefaultChoices
single_threadboolean{‘type’: ‘boolean’, ‘description’: ‘Force single-threaded execution for registration and resampling processes.’, ‘default’: False}False
repro_modeboolean{‘type’: ‘boolean’, ‘description’: ‘Run registration in reproducibility mode (registration/ants only).’, ‘default’: False}False


Last updated : 2026-05-12