Scroll to navigation

groupwise_affine(1) The Computational Morphometry Toolkit groupwise_affine(1)


groupwise_affine - Affine population registration


groupwise_affine [options] image0 [image1 ...]


This tool registers a population of input images simultaneously, without a template, using either the 'congealing' algorithm or a groupwise similarity measure based on a continuous approximation of mutual information ('RMI').


Global Toolkit Options (these are shared by all CMTK tools)

Write list of basic command line options to standard output.
Write complete list of basic and advanced command line options to standard output.
Write list of command line options to standard output in MediaWiki markup.
Write man page source in 'nroff' markup to standard output.
Write toolkit version to standard output.
Write the current command line to standard output.
Set verbosity level.
Increment verbosity level by 1 (deprecated; supported for backward compatibility).
Set maximum number of parallel threads (for POSIX threads and OpenMP).

Registration Metric Options

Use the RMI (a.k.a. regional mutual information) metric to drive the registration).
Use the congealing algorithm using pixelwise stack entropies to drive the registration. [This is the default]

Template Image Options

Input filename for pre-defined template image. [Default: NONE]
Use user-supplied template images's pixel data in registration [Default: disabled]

Output Options

Root directory for all output files. [Default: NONE]
Output filename for groupwise registration archive. [Default: groupwise.xforms ]
Output filename for registered average image. [Default: average.nii ]
Use linear interpolation for average image [This is the default]
Use cubic interpolation for average image
Do not write average image.

Multiresolution Parameters

Initial downsampling factor [Default: 4]
Final downsampling factor. [Default: 1]
Probabilistic sampling density. Legal values between 0 and 1. [Default: disabled]

Image Options and Operations

Force background pixels (outside FOV) to given (bin) value. [Default: disabled]
Manually set number of histogram bins for entropy evaluation [Default: disabled]
Crop image histograms to make better use of histogram bins.
Sigma of Gaussian smoothing kernel in multiples of template image pixel size. [Default: disabled]
Match all image histograms to template data (or first image, if no template image is given)
Free memory allocated for original image whenever these are not needed and re-read image files as needed. This can be useful when running on a machine with limited memory resources.

Transformation Parameters

Add DOFs to list [default: one pass, 6 DOF]
Enforce zero-sum computation.
First N images are from the normal group and should be registered unbiased. [Default: 0]
Enforce zero-sum computation for first N images. [Default: disabled]

Transformation Initialization

Initially align centers of bounding boxes of all images by translations [This is the default]
Initially align centers of mass by translations
Initialize scale factors using first-order moments

Optimization Parameters

Exploration of optimization in pixels [Default: 0.25]
Accuracy of optimization in pixels [Default: 0.01]
Number of repetitions per optimization level [Default: 5]
Step factor for successive optimization passes [Default: 0.5]
Optional threshold to terminate optimization (level) if relative change of target function drops below this value. [Default: 0]
Disable optimization and output initial configuration.


Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko



Report bugs at


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.

Jun 6 2022 CMTK 3.3.1p2