Skip to content

image_antsmath

antsmath

Wrapper for ANTs ImageMath. ANTs ImageMath provides many operations; this module currently implements a subset. Additional operations can be added as
needed. Currently supported:
- MajorityVoting: label fusion selecting the most frequent label at each voxel.
- m: voxel-wise multiplication of two or more images.

Keywords : segmentation, label fusion, majority voting, multi-atlas, multiplication


Format : tuple val(meta), path(input)

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'test', single_end:false ]
True
inputfileOne or more NIfTI volumes to pass to the selected ImageMath operation. The number of images required depends on the operation (e.g., MajorityVoting needs 2+, m needs 2+).
True*.{nii,nii.gz}

Format : tuple val(meta), path(*.nii.gz)

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'test', single_end:false ]
True
*.nii.gzfileOutput image from the selected ImageMath operation.True*_{operation}.nii.gz

Format : path(versions.yml)

TypeDescriptionMandatoryPattern
versions.ymlfileFile containing software versionsTrueversions.yml

TypeDescriptionDefaultChoices
operationstringImageMath operation to perform. Must be one of: MajorityVoting, m.- MajorityVoting
- m
suffixstringSuffix for the output filename. Defaults to the operation name.None
single_threadbooleanForce single-threaded execution.False

DescriptionDOI
ANTsAdvanced Normalization Tools.10.1038/s41598-021-87564-6


Last updated : 2026-05-12