ANTS(1)
๐ ANTS: User Commands Bestie ๐
Okay so this is the ANTS manual page ๐ฆ It lives in the User Commands section, and it's all about the ANTS registration suite. Let's get into it โจ
โจ NAME โจ
ANTS, part of the ANTS registration suite ๐ธ
โจ DESCRIPTION โจ
The DESCRIPTION is split into two parts, a COMMAND bit and an OPTIONS bit. Main character energy ๐
๐ COMMAND ๐
ANTS
๐ OPTIONS ๐
-x,--mask-image maskFileNameโ okay so this mask is defined in the'fixed'image space and marks the region of interest the registration gets computed over. Above0.1means inside the mask. Continuous values in the range[0.1,1.0]act kinda like a probability ๐ฎ and anything> 1gets treated as1.0๐-m,--image-metricโ the metric weights are relative to the weights on the N other metrics you pass to ANTS (and N is unlimited, no cap!) ๐ฅ So the weight on thei^{th}metric becomesw_i=w_i/ ( sum_i w_i ). Here's the metric squad:
Intensity-Based Metrics:
CC/cross-correlation/CrossCorrelation[fixedImage,movingImage,weight,radius/OrForMI-#histogramBins]
MI/mutual-information/MutualInformation[fixedImage,movingImage,weight,radius/OrForMI-#histogramBins]
SMI/spatial-mutual-information/SpatialMutualInformation[fixedImage,movingImage,weight,radius/OrForMI-#histogramBins]
PR/probabilistic/Probabilistic[fixedImage,movingImage,weight,radius/OrForMI-#histogramBins]
SSD
--- standard intensity difference.[fixedImage,movingImage,weight,radius/OrForMI-#histogramBins]
MSQ/mean-squares/MeanSquares
-- demons-like, radius > 0 uses moving image gradient in metric
deriv.[fixedImage,movingImage,weight,radius/OrForMI-#histogramBins]
Point-Set-Based Metrics:
PSE/point-set-expectation/PointSetExpectation[fixedImage,movingImage,fixedPoints,movingPoints,weight,pointSetPercentage,pointSetSigma,boundaryPointsOnly,kNeighborhood,PartialMatchingIterations=100000]
The partial matching option assumes the complete labeling is in the first set of label parameters ... more iterations leads to more symmetry in the matching. 0 iterations means full asymmetry ๐
[fixedImage,movingImage,fixedPoints,movingPoints,weight,pointSetPercentage,pointSetSigma,boundaryPointsOnly,kNeighborhood,alpha,meshResolution,splineOrder,numberOfLevels,useAnisotropicCovariances]
-o,--output-namingโ the name for your output, either a prefix or a name+type. Examples:-o OUT,-o OUT.nii, or-o OUT.mha๐--Rโ TODO/FIXME ๐ this--Rsets an ROI option. It passes a vector of parameters that sets the center and bounding box of the region of interest for a sub-field registration. For example, in 3D the option setting-r 10x12x15x50x50x25sets up a bounding box of size50,50,25with origin at10,12,15in voxel (should this be physical?) coordinates. Values:0-i,--number-of-iterationsโ the number of iterations per level, as a vector. For example100x100x20. Values:10x10x5--Restrict-Deformationโ this one restricts the gradient that drives the deformation by scalar factors along the dimensions you pick. It's a TReal vector of lengthImageDimensionthat gets multiplied against the similarity metric's gradient values. In 3D,0.1x1x0sets the z gradient to zero, scales x by0.1, and keeps y as is (1, so no change). You end up with a 2.5-Dimensional registration, since there's still 3D continuity in the mapping โจ Values:1x1-v,--verboseโ verbose output, so you get all the tea ๐ซ--use-all-metrics-for-convergenceโ enables using a weighted sum of all metric terms for the convergence computation. By default only the first metric is used ๐ฎ Values:0-hโ prints the help menu (the short version) ๐ง Values:0--helpโ prints the help menu, the full version ๐ Values:1, 0-t,--transformation-modelโ pick a transformation with the formatTRANSFORMATION[gradient-step-length,number-of-time-steps,DeltaTime,symmetry-type].Then choose one of these TRANSFORMATIONS:Diff= diffeomorphicElast= ElasticExp= exponential diffGreedy Exp= greedy exponential diff, like diffeomorphic demons. Same parameters.SyN= symmetric normalization
DeltaTime is the integration time-discretization step (sub-voxel), and the n-time steps are currently fixed at 2. Values: SyN[0.5]
-r,--regularizationโ the format isREGULARIZATION[gradient-field-sigma,def-field-sigma,truncation].Choose one of these REGULARIZATIONS:Gauss= gaussianDMFFD= directly manipulated free form deformation
Values: Gauss[3,0.5]
-a,--initial-affineโ uses the input file as the initial affine parameter ๐ฆ-F,--fixed-image-initial-affineโ uses the input file as the initial affine parameter for the fixed image ๐--fixed-image-initial-affine-ref-imageโ the reference space for using the input file as the initial affine parameter for the fixed image ๐-T,--geodesicโ takes0,1, or2.0= not time-dependent,1= asymmetric,2= symmetric ๐ธ-G,--go-fasterโ takestrueorfalse. Iftrue, SyN is faster but loses some accuracy with respect to the inverse-identity constraint (see Avants MIA 2008). > Heads up bestie, speed has a cost here โ ๏ธ Values:false--continue-affineโtrue(default) orfalse. This decides whether or not to perform affine, given the initial affine parameters ๐ Values:true--number-of-affine-iterationsโ the number of iterations per level, as a vector. For example100x100x20. Values:10000x10000x10000--use-NNโ uses nearest neighbor interpolation ๐ Values:0--use-Histogram-Matchingโ uses histogram matching of moving to fixed image โจ Values:0--affine-metric-typeโ picks the affine metric:MI: mutual information (default)MSQ: mean square errorSSDCC: Normalized correlationCCH: Histogram-based correlation coefficient (not recommended)GD: gradient difference (not recommended)
Values: MI
--MI-optionโ the option of mutual information, written asMI_bins x MI_samples. The default is32x32000๐งฎ Values:32x5000--rigid-affineโ uses a rigid transformation:trueorfalse(default) ๐ชจ Values:false--do-rigidโ uses a rigid transformation:trueorfalse(default) ๐ชจ Values:false--affine-gradient-descent-optionโ the option of gradient descent in the affine transformation, in the ordermaximum_step_length x relaxation_factor x minimum_step_length x translation_scales๐ข Values:0.1x0.5x1.e-4x1.e-4--use-rotation-headerโ uses the rotation matrix in the image headers:true(default) orfalse๐งญ Values:false--ignore-void-originโ ignores the apparently unmatched origins (whenuse-rotation-headerisfalseand the rotation matrix is identity). Takestrue(default) orfalse๐ซฅ Values:false--gaussian-smoothing-sigmasโ at each resolution level the image gets subsampled and smoothed by Gaussian convolution. This option lets you override the default smoothing by specifying sigma values (in mm) for smoothing both the fixed and moving images at each resolution level ๐ Values: (blank)--subsampling-factorsโ at each resolution level the image gets subsampled and smoothed by Gaussian convolution. This option lets you override the default subsampling by specifying the subsampling factor for both the fixed and moving images at each resolution level โจ Values: (blank)
That's the whole ANTS page, bestie ๐ซถ It's from ANTS 2.6.4+dfsg, December 2025, and it's the ANTS(1) manual. Slay the registration ๐ ๐
๐ฆ where this page comes from
- ubuntu resolute: ants 2.6.4+dfsg-1 ยท BSD-3-Clause
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms