ANTSMOTIONCORR(1)

πŸ“¦
version 2.6.4 Β· 2 versions
, in ubuntu resolute

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 with AxBxCmm or in voxels with AxBxCvox. 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 are Linear, NearestNeighbor, BSpline[<order=3>], BlackmanWindowedSinc, CosineWindowedSinc, WelchWindowedSinc, HammingWindowedSinc, and LanczosWindowedSinc. The default is Linear.
  • -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