groupwise_affine(1)

✨ NAME ✨

groupwise_affine β€” affine population registration. That's it, that's the whole girlboss job description. It's page groupwise_affine(1) from the Computational Morphology Toolkit, and she's here to get your whole image squad aligned at the same time. No template needed. Periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

groupwise_affine [options] image0 [image1 ...]

πŸ’– DESCRIPTION πŸ’–

Okay so here's the tea, bestie β˜• β€” this tool registers a whole population of input images simultaneously. All at once. Together. No template, no middleman, no "everyone line up behind image zero" energy. It's giving main character ensemble cast. πŸ‘‘

And how does it do that? You've got two options, lowkey iconic both of them:

  • the 'congealing' algorithm, or
  • a groupwise similarity measure built on a continuous approximation of mutual information (aka 'RMI').

Choose your fighter, we'll get to the flags below. ✨


🌸 OPTIONS 🌸

πŸ’« Global Toolkit Options (these are shared by all CMTK tools)

Like, every CMTK tool has these. They're the family heirlooms. 🫢

  • --help β€” writes the list of basic command line options to standard output.
  • --help-all β€” writes the complete list of basic and advanced command line options to standard output. The deluxe edition. πŸ’–
  • --wiki β€” writes the list of command line options to standard output in MediaWiki markup.
  • --man β€” writes man page source in 'nroff' markup to standard output.
  • --version β€” writes the toolkit version to standard output.
  • --echo β€” writes the current command line to standard output. So you can screenshot it for the group chat, obviously.
  • --verbose-level <integer> β€” set the verbosity level. Pick your volume. πŸ”Š
  • --verbose, -v β€” increments verbosity level by 1. It is deprecated; it's supported for backward compatibility only (we keep it around like that one situationship, iykyk).
  • --threads <integer> β€” set the maximum number of parallel threads (for POSIX threads and OpenMP). Multitasking queen. πŸ‘‘

πŸ”₯ Registration Metric Options

Which metric drives the whole thing.

  • --rmi β€” use the RMI (a.k.a. regional mutual information) metric to drive the registration.
  • --congeal β€” use the congealing algorithm, using pixelwise stack entropies to drive the registration. This is the default. The moment. πŸ’…

πŸŽ€ Template Image Options

  • --template <string>, -t <string> β€” input filename for a pre-defined template image. [Default: NONE]
  • --template-with-data <string>, -T <string> β€” use the user-supplied template image's pixel data in registration. [Default: disabled]

🫢 Output Options

Where all the goods get written, bestie.

  • --output-root <string>, -O <string> β€” root directory for all output files. [Default: NONE]
  • --output <string>, -o <string> β€” output filename for the groupwise registration archive. [Default: groupwise.xforms]
  • --output-average <string> β€” output filename for the registered average image. [Default: average.nii]
  • --average-linear β€” use linear interpolation for the average image. This is the default.
  • --average-cubic β€” use cubic interpolation for the average image. Fancier, slower, ✨vibes✨.
  • --no-output-average β€” do not write the average image. Sometimes you just don't want the souvenir.

🌈 Multiresolution Parameters

  • --downsample-from <integer>, -d <integer> β€” initial downsampling factor. [Default: 4]
  • --downsample-to <integer>, -D <integer> β€” final downsampling factor. [Default: 1]
  • --sampling-density <float>, -s <float> β€” probabilistic sampling density. Legal values are between 0 and 1. [Default: disabled]

πŸ¦‹ Image Options and Operations

  • --force-background <integer>, -B <integer> β€” force background pixels (outside FOV) to the given (bin) value. [Default: disabled]
  • --histogram-bins <integer>, -H <integer> β€” manually set the number of histogram bins for entropy evaluation. [Default: disabled]
  • --crop-histograms β€” crop image histograms to make better use of the histogram bins.
  • --smooth <double> β€” sigma of the Gaussian smoothing kernel, in multiples of the template image pixel size. [Default: disabled]
  • --match-histograms β€” match all image histograms to the template data (or to the first image, if no template image is given).
  • --free-and-reread β€” free memory allocated for the original images whenever they're not needed, and re-read the image files as needed. This can be useful when running on a machine with limited memory resources. Very "my laptop is fighting for its life" core. 😭

πŸ‘‘ Transformation Parameters

  • --dofs <integer>[,<integer>,...] β€” add DOFs to the list. [Default: one pass, 6 DOF]
  • --zero-sum, -z β€” enforce zero-sum computation.
  • --normal-group-first-n <integer>, -N <integer> β€” the first N images are from the normal group and should be registered unbiased. [Default: 0]
  • --zero-sum-first-n <integer>, -Z <integer> β€” enforce zero-sum computation for the first N images. [Default: disabled]

⭐ Transformation Initialization

  • --align-bounding-boxes β€” initially align the centers of the bounding boxes of all images by translations. This is the default.
  • --align-centers-of-mass β€” initially align the centers of mass by translations.
  • --init-scales β€” initialize the scale factors using first-order moments.

πŸ’œ Optimization Parameters

  • --exploration <double>, -e <double> β€” exploration of optimization, in pixels. [Default: 0.25]
  • --accuracy <double>, -a <double> β€” accuracy of optimization, in pixels. [Default: 0.01]
  • --repeat-level <integer>, -r <integer> β€” number of repetitions per optimization level. [Default: 5]
  • --step-factor <double>, -S <double> β€” step factor for successive optimization passes. [Default: 0.5]
  • --delta-f-threshold <double> β€” optional threshold to terminate optimization (level) if the relative change of the target function drops below this value. [Default: 0]
  • --disable-optimization β€” disable optimization and output the initial configuration. Do not pass go, do not collect your optimized transform. 🚫

🫢 AUTHORS 🫢

Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko. The whole crew ate and left no crumbs. πŸ‘‘


πŸ“œ LICENSE πŸ“œ

http://www.fsf.org/licensing/licenses/gpl.html


πŸ’€ BUGS πŸ’€

Report bugs at http://nitrc.org/projects/cmtk/ β€” tell them everything, babes, they want the details.


🌟 ACKNOWLEDGMENTS 🌟

CMTK is developed with support from the NIAAA under Grant AA021697, National Consortium on Alcohol and Neurodevelopment in Adolescence (N-CANDA): Data Integration Component. From April 2009 through September 2011, CMTK development and maintenance was supported by the NIBIB under Grant EB008381. Institutional support? We love to see it. πŸ’–


And that's the page, bestie β€” this is CMTK version 3.3.1p2, dated Jun 24 2026. Go register your population, slay, and don't forget to cite. Mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from