ANTSMOTIONCORR(1)
Okay bestie, let's talk about antsMotionCorr π¦ (section 1, user commands, and it's giving main character energy) π
β¨ NAME β¨
antsMotionCorr β part of the ANTS registration suite πΈ
β¨ DESCRIPTION β¨
π COMMAND π
antsMotionCorr
okay so antsMotionCorr = motion correction π. It's a user-level registration app that's built to use classes in ITK v4.0 or greater β¨.
You can stack any number of "stages" π₯. Each stage is a transform, an image metric, and then iterations, shrink factors, and smoothing sigmas for each level. Iconic.
This one is specialized for 4D time series data π§. The fixed image is 3D, and the moving image should be the 4D time series. The fixed image is a reference space or a time slice. Want a reference image built from your time series? Use -a π«Ά.
π OPTIONS π
-d,--dimensionality 2/3β forces the image to be treated as the dimensionality you specify. If you don't specify it, the program tries to infer the dimensionality from the input image π.-n,--n-images 10β sets how many images get used to construct the template image πΈ.-m,--metricβ here's the metric lineup π:
CC[fixedImage,movingImage,metricWeight,radius,<samplingStrategy={Regular,Random}>,<samplingPercentage=[0,1]>,<useGradientFilter=false>]
MI[fixedImage,movingImage,metricWeight,numberOfBins,<samplingStrategy={Regular,Random}>,<samplingPercentage=[0,1]>,<useGradientFilter=false>]
Demons[fixedImage,movingImage,metricWeight,radius,<samplingStrategy={Regular,Random}>,<samplingPercentage=[0,1]>,<useGradientFilter=false>]
GC[fixedImage,movingImage,metricWeight,radius,<samplingStrategy={Regular,Random}>,<samplingPercentage=[0,1]>,<useGradientFilter=false>]
Four image metrics are available π: GC is global correlation, CC is ANTS neighborhood cross correlation, MI is mutual information, and Demons is Thirion's Demons (modified mean-squares). Heads up: metricWeight isn't used right now π. It's just a placeholder until multivariate metrics are available for a single stage. The fixed image should be a single time point (e.g. the average of the time series). By default that fixed image isn't used. Instead, each volume gets corrected against the preceding volume in the time series. Check -u below if you want one fixed reference image for all volumes. useGradientFilter decides whether a smoothing filter gets applied when the metric gradient is estimated.
-u,--useFixedReferenceImage (0)/1β use one fixed reference image to correct all the volumes, instead of correcting each image against the prior volume in the time series π.-e,--useScalesEstimatorβ uses the scale estimator to control optimization ποΈ.-t,--transformβ your transform menu π§:
Affine[gradientStep]
Rigid[gradientStep]
GaussianDisplacementField[gradientStep,updateFieldSigmaInPhysicalSpace,totalFieldSigmaInPhysicalSpace]
SyN[gradientStep,updateFieldSigmaInPhysicalSpace,totalFieldSigmaInPhysicalSpace]
The gradientStep (also called learningRate) characterizes the gradient descent optimization. It gets scaled appropriately for each transform using the shift scales estimator. The later parameters are transform-specific, and you can figure them out from the usage β¨.
-i,--iterations MxNx0...β specifies the number of iterations at each level π.-s,--smoothingSigmas MxNx0...β specifies the sigma for smoothing at each level. Smoothing can be in mm withAxBxCmmor in voxels withAxBxCvox. No units means voxels π.-f,--shrinkFactors MxNx0...β specifies the shrink factor for the virtual domain (typically the fixed image) at each level πͺ.-o,--outputβ your output bundle π:
[outputTransformPrefix,<outputWarpedImage>,<outputAverageImage>]
Specify the output transform prefix (output format is .nii.gz). Optionally, you can warp the moving image into fixed space. If the inverse transform exists, you can also output the warped fixed image.
-a,--average-image <timeseries>β averages the input time series image π·.-w,--write-displacement (0)/1β writes the low-dimensional 3D transforms out to a 4D displacement field π¦.--use-histogram-matching 0/(1)β histogram matches the moving images to the reference image β¨.--random-seed seedValueβ uses a fixed seed for random number generation. By default the system clock is used to initialize the seeding. The fixed seed can be any nonzero int value π².-p,--interpolationβ several ITK interpolation options are available π«§. The ones you can pick from areLinear,NearestNeighbor,BSpline[<order=3>],BlackmanWindowedSinc,CosineWindowedSinc,WelchWindowedSinc,HammingWindowedSinc, andLanczosWindowedSinc. The default isLinear.-v,--verbose (0)/1β verbose output π’.-hβ prints the help menu (short version).<VALUES>: 0π--helpβ prints the help menu.<VALUES>: 1, 0π
Okay bestie, that's the whole tea β. antsMotionCorr version 2.6.4+dfsg, dated December 2025, ANTSMOTIONCORR(1). You're literally the best π periodt π
π¦ 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