Software - Linear Coregistration

We can do linear image alignment using up to 12 parameters (rotations, translations, scaling and shears). The matching criterion can be normalized mutual information, cross correlation or least squares. Although we initially used mutual information because of its claims to handle cross-modality alignments, we have found in practice that cross-correlation generally produces the best alignments (see next figure). The parameter optimization used is based on an algorithm by Maes et al. (pdf)

The user can select any subset or the entire 12 parameters over which to optimize. The aligned image is automatically resliced to the voxel lattice of the target image. The coregistration tool handles images of any voxel byte size (1, 2, 4 or 8) automatically. The accompanying figure shows the effects of aligning a longitudinal pair of images from the same subject. It shows difference images from before and from after the linear coregistration. After alignment, the difference image is almost flat within the brain, indicating near perfect alignment of brain features.

Figure 1 Difference images illustrating linear coregistration. Left: time 1 minus time 2 before alignment. Right: same two images after alignment.

The utility LinCoregL3 is used for these alignments. The usage is as follows:

LinCoregL3 targetVolume objectVolume matchingType [-s param indices to skip...] 
                                                  [-dir destination dir]

Coregister "object volume" onto "target volume"
by estimating the best 12-parameter transformation
Then interpolate the transformed values in the lattice
Finally, write out transformed volume

Matching type:
MI              Mutual Information: NB this match criterion works only with 1-byte images!!
                        ***The following match criteria work with any size images***
LS              Least Squares
CC              Cross Correlation

Matching parameters:
These are indexed as follows:
                0 1 2  --> x y z translations
                3 4 5  --> x y z axis rotations
                6 7 8  --> x y z axis scaling factors
                9 10 11 --> x y z shear factors
All parameter values default to 0 (except for scaling) and 1 (scaling) if not estimated
To skip estimation of a factor, use option -s followed by index or indices to skip

Destination Dir:
if set, then output of param files and coreg'd volume to this dir

Outputs of LinCoregL3 are an aligned version of the object volume and a parameter file listing the 12 affine transformation parameters (X Y Z translations, rotations, scaling and shears) computed to optimize the alignment. The parameter files also contain information about the voxel lattice of the target volume. The aligned image is thus resliced to the lattice of the target volume. The parameter file may be used by other of our utilities, such as transformL3 to rigidly transform an image to align with the target volume.

Automated and Batch Image Alignments

The alignment program may also be run in batch mode using a GUI front end:

Figure 2 The linear alignment batch tool GUI

In this case it is possible to do alignment in conjunction with the parity tool. Once the parities are assigned for each image, the object image (right box in the gui) is automatically resliced to have the same orientation as the target (left box) so that alignment can proceed successfully. The GUI also allows you to set all the command line options of LinCoregL3.


All software listed on this page is available in the linear alignment package. Please see the Download page.

Up (Software)

6363 unique visits since June 1, 2006