registration_ants
Image registration with antsRegistrationSyN or antsRegistrationSyNQuick.
Defaults: 3D images and 3-stage registration (rigid + affine + deformable)
Main features:
(1) Supports multiple transformation types (see transform argument).
(2) Supports initial transformations (see initial_transform argument) via a closure, e.g. { [$fixedimage,$movingimage,0] }.
(3) Automatic creation of backward (inverse) transformations matrices.
(4) Curated combined output transformations for REGISTRATION_ANTSAPPLYTRANSFORMS and REGISTRATION_TRANSFORMTRACTOGRAM
processes : forward_image_transform, forward_tractogram_transform, and their backward versions.
(5) Quality control (QC) image generation for MultiQC reports.
Keywords : nifti, registration, antsRegistrationSyN, antsRegistrationSyNQuick
Inputs
Section titled “Inputs”Input 1
Section titled “Input 1”Format : tuple val(meta), path(fixed_image), path(moving_image), path(mask)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| fixed_image | file | Fixed image(s) or source image(s) or reference image(s) | True | *.{nii,nii.gz} |
| moving_image | file | Moving image(s) or target image(s) | True | *.{nii,nii.gz} |
| mask | file | Mask(s) for the fixed image space | False | *.{nii,nii.gz} |
Outputs
Section titled “Outputs”image_warped
Section titled “image_warped”Format : tuple val(meta), path(*_warped.nii.gz)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| *_warped.nii.gz | file | Nifti volume after registration. | True | *_warped.nii.gz |
forward_affine
Section titled “forward_affine”Format : tuple val(meta), path(*_forward1_affine.mat)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| *_forward1_affine.mat | file | Affine transformation from moving to fixed | False | *_forward1_affine.mat |
forward_warp
Section titled “forward_warp”Format : tuple val(meta), path(*_forward0_warp.nii.gz)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| *_forward0_warp.nii.gz | file | Nifti volume containing warp field from moving to fixed | False | *_forward0_warp.nii.gz |
backward_warp
Section titled “backward_warp”Format : tuple val(meta), path(*_backward1_warp.nii.gz)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| *_backward1_warp.nii.gz | file | Nifti volume containing warp field from fixed to moving | False | *_backward1_warp.nii.gz |
backward_affine
Section titled “backward_affine”Format : tuple val(meta), path(*_backward0_affine.mat)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| *_backward0_affine.mat | file | Affine transformation from fixed to moving | False | *_backward0_affine.mat |
forward_image_transform
Section titled “forward_image_transform”Format : tuple val(meta), val(*_forward*.{nii.gz,mat})
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| _forward.{nii.gz,mat} | list | Tuple, Transformation files to warp images in fixed space, in the correct order for REGISTRATION_TRANSFORMTRACTOGRAM : [ meta, [ forward_warp, forward_affine ] ]. | True | *_forward*.{nii.gz,mat} |
backward_image_transform
Section titled “backward_image_transform”Format : tuple val(meta), val(*_backward*.{nii.gz,mat})
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| _backward.{nii.gz,mat} | list | Tuple, transformation files to warp images in moving space, in the correct order for REGISTRATION_TRANSFORMTRACTOGRAM : [ meta, [ backward_affine, backward_warp ] ]. | True | *_backward*.{nii.gz,mat} |
forward_tractogram_transform
Section titled “forward_tractogram_transform”Format : tuple val(meta), val(*_backward*.{nii.gz,mat})
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| _backward.{nii.gz,mat} | list | Tuple, transformation files to warp tractograms into fixed space, in the correct order for REGISTRATION_TRANSFORMTRACTOGRAM : [ meta, [ backward_affine, backward_warp ] ]. | True | *_backward*.{nii.gz,mat} |
backward_tractogram_transform
Section titled “backward_tractogram_transform”Format : tuple val(meta), val(*_forward*.{nii.gz,mat})
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| _forward.{nii.gz,mat} | list | Tuple, transformation files to warp tractograms into moving space, in the correct order for REGISTRATION_TRANSFORMTRACTOGRAM : [ meta, [ forward_affine, forward_warp ] ]. | True | *_forward*.{nii.gz,mat} |
Format : tuple val(meta), path(*_registration_ants_mqc.gif)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| meta | map | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] | True | |
| *_registration_ants_mqc.gif | file | .gif file containing quality control image for the registration process. Made for use in MultiQC report. | False | *_registration_ants_mqc.gif |
versions
Section titled “versions”Format : path(versions.yml)
| Type | Description | Mandatory | Pattern | |
|---|---|---|---|---|
| versions.yml | file | File containing software versions | True | versions.yml |
Arguments (see process.ext)
Section titled “Arguments (see process.ext)”| Type | Description | Default | Choices | |
|---|---|---|---|---|
| quick | boolean | Use antsRegistrationSyNQuick instead of antsRegistrationSyN. | False | |
| repro_mode | boolean | Run in reproducibility mode (single threaded). | False | |
| histogram_matching | boolean | Perform histogram matching between images before registration. | False | |
| transform | string | Type of transformation to perform : - t : translation (1 stage) - r : rigid (1 stage) - a : rigid + affine (2 stages) - s : rigid + affine + deformable syn (3 stages) - sr : rigid + deformable syn (2 stages) - so : deformable syn only (1 stage) - b : rigid + affine + deformable b-spline syn (3 stages) - br : rigid + deformable b-spline syn (2 stages) - bo : deformable b-spline syn only (1 stage) | s | - t - r - a - s - sr - so - b - br - bo |
| initial_transform | string | Algorithmic initialization by geometric center, intensities, or origin. | - geometric center - intensities - origin | |
| dimension | int | Number of spatial dimensions of the images | 3 | |
| gradient_step | float | Gradient step size for the optimization of SyN and B-spline SyN. | 0.1 | |
| histogram_bins | int | Number of histogram bins when using the Mutual Information metric with SyN and B-spline SyN. | 32 | |
| spline_distance | float | Distance between control points for B-spline SyN. | 26 | |
| run_qc | boolean | Run quality control (QC) to generate a MultiQC report. | False | |
| suffix_qc | string | Suffix for the QC image file. | ||
| precision | string | Precision of the output image. | float | - float - double |
| collapse_output | boolean | Collapse output transformations into a single file. | False | |
| random_seed | int | Random seed for reproducibility. | 1234 |
| Description | DOI | |
|---|---|---|
| ANTs | Advanced Normalization Tools. | 10.1038/s41598-021-87564-6 |
| ImageMagick | ImageMagick is a software suite to create, edit, compose, or convert bitmap images. | |
| MRtrix3 | MRtrix3 is a software package for processing diffusion MRI data. | 10.1016/j.neuroimage.2019.116137 |
| Scilpy | Scilpy is a Python library for processing diffusion MRI data. |
Authors
Section titled “Authors”Last updated : 2025-12-22