Module: ElasticRegistration ()

Description:

This module computes a nonaffine transformation for registration of two image data sets (reference and template or model image), using an iterative optimization algorithm. It is assumed that the model has been registered to the reference affinely before (cf. Register Images). In order to save a lot of computation time, it is recommended to reformat the model image in advance using Resample Transformed Image. An exception to this rule is for Label Images where the necessary nearest neighbor interpolation usually produces considerable artifacts.
The transformation here is given by a set of control points which are placed on a regular grid initially. Each control point interpolates the positions of the voxels in its region of influence (ROI) in an inexact, approximative way using cubic B-splines (free form deformation, FFD). The ROI extends to the two neighboring control points in each (x,y,z)-direction. Movement of control points during registration yields a deformation of the model image and such defines the nonaffine transformation.
A hierarchical strategy is applied, starting at a coarse resampling of the data set along with a coarse control grid, proceeding to finer resolutions later on using a so-called data pyramid and a parameter pyramid. Different similarity measures like Euclidean distance, mutual information and correlation can be chosen.

To use this module, you must connect it to two scalar fields. To follow the progress visually, a module like Ortho Slice or Isosurface can be connected to each of them or, but this may slow down the registration process dramatically. In order to use this feature, the Package file of hxregistration must be edited: Add an entry
set DEFINES { REG_USE_DISPLAY }
and rebuild .

If the Register button of the Action port is pressed, the module starts by successively optimizing the transformation of the model image.

The optimization can be interrupted at any time. Interruption might take some seconds because the model image is reformatted using Lanczos interpolation.

Connections:

Data [required]
The model data set to be transformed.

Reference [required]
The reference data set to which the model is registered.

Control points [optional]
The control points defining the deformation.

Ports:

Optimizer

At this port you can choose between different optimization strategies. Line search optimizer and Conjugated gradients are suited for all levels, Quasi-Newton for the finer resolution levels only (cf. Gradient optimizer).

Extensive search

If line search optimizer is chosen, you can influence it here. Switching Extensive search on means dividing the step size repeatedly by two. Otherwise, it is decreased exponentially. The initial step size approaches the final step size more rapidly.

Optimizer step

This port sets the initial and the final value for the step size to be applied in the optimizations. These step sizes refer to translations of control points. The initial step size must be chosen carefully. Too large a value might result in heavily torn images whereas too small a value might not be sufficient to move the optimization towards the capture range.

The default value for the initial step size is 1/20 of the size of the bounding box. If the objects in both data sets are already quite similar, you may choose a smaller initial step size.

The default value for the final step size is 1/6 of the voxel size, which will result in very long run times in some cases.

Gradient optimizer

With this port you can select the number of resolution levels (between 0 and 2) where the Quasi Newton optimizer is applied. On the coarser levels the optimizer as selected in port Optimizer is applied. If the number of levels is less than or equal to the number selected at this port, the optimizer as selected in port Optimizer is applied at least at the coarsest level.

Currently, usage of Quasi-Newton is recommended for intrasubject registration only. If a gradient optimizer is chosen here or in port Optimizer, the tolerance can be set also. The value filled in here is used for the first resolution level only, it is decreased by a factor of ten for each following resolution level. This actually reduces the number of iterations the optimizer performs. This can have a severe impact on the total computation time.

Coarsest resampling

At this port you can define the resampling rate for the coarsest resolution level where registration starts. Valid rates are factors of two. The resampling rate refers to the reference data set. If the voxels of the reference data set are anisotropic, i.e., have a different size in x-, y-, and z-direction, the default resampling rates are chosen in order to achieve isotropic voxels on the coarsest level. If the voxel sizes of model and reference differ, the resampling rates for the model are chosen in order to achieve similar voxel sizes as for the reference on the same level.

Resampling not only makes the optimization faster, but also prevents the optimizer from getting stuck in a local minimum.

Metric

This port selects the similarity measure to be applied. Euclidean means the Euclidean distance, i.e., the mean squared difference between the gray values of model and reference. Correlation measures the correlation of the registered images. The Mutual information metrics, especially the normalized one, are recommended when medical images from different modalities, e.g., CT and MRT, are to be registered. For Label Fields, label difference is appropriate.

Histogram range reference

This port is only active if one of the Mutual information metrics has been selected. Here you can define the range of gray values for the histogram of the reference data set. The essential information of the data set should be within this range. It is beneficial to determine the range via a visual or quantitative analysis of the data set, e.g., using an Ortho Slice or Histogram module.

Histogram range model

The same as the previous port, now for the model data set.

Histogram bins

For the Normalized Mutual Information andMutual Information metric it is possible to set the number of bins for model and reference histograms The number of bins basically determines the resolution by which the range of gray values set in ports Histogram range reference/model is partitioned. The more bins the more accurate the gray values are resolved but the more computation time is needed. The default values set by the module are usually a good compromise.

Options

If toggle Ignore finest resolution is selected, registration is performed on all but the finest (i.e., the original) resolution. This refers to the data pyramid only! In many cases a sufficient accuracy can be achieved in this way. Registration on the finest level will slightly improve the accuracy, but the computation time will typically increase by one order of magnitude. Another way of saving computation time can be to use the toggle Fix control points in low entropy regions. This will fix control points when their ROI has lower entropy then the average over the complete image. This will typically fix control points referring to the image background, but care has to be taken when there are homogeneous areas within the area of interest - these regions might be fixed unintentional.

Extended options

If this toggle is unset, only the most important ports are visible. The other ports are set to default values which should work well in many cases.

Initial grid size

An initial grid resolution of 4x4x4 is preferable. Only in rare cases, if the image is very anisotropic, 5x4x4 or 6x5x4 might be better suited.

Refine grid n times

Each grid refinement increases the number of control points in one direction from n to 2 * n - 3. Care has to be taken that the number of voxels which lie between two control points does not fall below an application dependent threshold. In this case, the optimization becomes numerically unstable with pathologically blurred and deformed model images as a result. Typical values in intrasubject registration are two or three refinements, while in intersubject registration four to six refinements are usually required.

Regularization

In order to reduce numerical instability and to prefer plausible deformations, regularizers can be employed. They serve as weighted penalty terms during optimization. The weights that shall be used have to be provided by the user. Jacobian constraint measures the volume change of each grid cell. Additionally, if a folding of the grid eventually occurs, optimization will change its course. Grid energy measures the "bending energy" of the control grid in terms of second and mixed derivatives of the transformation. This measure has an analog in the bending energy of thin metal plates (cf. Thin Plate Splines). Grid energy is active on the last three resolution levels only. On coarser levels, it is not necessary due to the smoothness properties of the cubic B-spline interpolation. The weight will be increased adaptively, reaching the value provided here only at the last level.
Smoothing: Gaussian refers to the control grid. If Fix control points in low entropy regions in port Options has been chosen, it makes sense to adjust the fixed control points to their neighbors in a smooth way. The value provided here refers to the steepness of the Gaussian bell used in the filter kernel.

The regularizers are not mandatory. Their use should be considered if registration results are unsatisfactory.

Action

Pressing the Register button starts the actual registration process. Pressing Resample Transformed Image and optionally Control points before enables you to watch the registration proceed as described above (cf. introduction). This is not recommended because of massive performance loss. Usually, you visualize the final result only. Control points are visualized by connecting Landmark View.

Result

These buttons allow for inspecting the result further as well as saving it. Save transform produces a vector field which stores the movement of the control points with respect to the initial bounding box of the reference. Vector field creates a vector field storing the movement of each voxel which makes it prohibitively storage consuming. It allows for visualizing the deformation of space nicely, though, if Grid Lines or Vectors Slice are chosen as display.