Diffeomorphic (Non-Linear) Image Registration

Set up for diffeomorphic registration by selecting the Diffeomorphic (Non-Linear) tab:

Selecting diffeomorphic registration

Diffeomorphic registration is achieved by modelling the "flow" of one image (the moving image) into the fixed image using a pair of vector fields. The first field moves the moving image towards the mid-point, while the second field moves from the mid-point to the fixed image. The vector fields are defined at a discrete set of points in a grid across the field-of-view, and the fineness of the grid determines the level of anatomical detail that can be achieved in the registration.

Affine Pre-Registration

Normally, before images are diffeomorphically registered, they should already be in close correspondence so that the non-linear part of the registration is only concerned with the local distortions required to bring anatomical structures into register. This is done using an affine pre-registration in one of two ways:

Of course, if your image are already in close overall correspondence, you don't need to use either of these options.

Regularisation

Non-linear registration is an ill-conditioned problem - there is a vast array of non-linear transforms that could map the moving image onto the fixed image. In order to give a "plausible" transform, it is necessary to apply some constraints on the degrees of freedom of the deformation. This is done using "regularisation", which impose penalties on sharply-varying deformation fields. There are four types of penalty:

Regularisation settings for diffeomorphic registration

There are currently no hard rules about which regularisation penalties to apply. You can apply any combination of penalties - setting a higher value for any of the penalties will result in a smoother deformation, but one which is less able to conform to very small detailed differences in the images.

The differences in the deformations for the different regularisation penalties are illustrated below. The image on the left is the fixed image registration target. The circular image on the right in the moving image which is to be registered to the target.
Diffeomorphic registration fixed and moving images.
The club-shaped registration target The annular ring moving image to be registered
Fixed image target Moving image
The diffeomorphic registration was performed using the maximum allowed setting (10.0) for each of the regularisation penalties in turn, with all other penalties set to zero. First, the results of the registration:
Results of the diffeomorphic registration for the different regularisation penalties.
Diffeomorphic registration regularised by bending energy Diffeomorphic registration regularised by membrane energy Diffeomorphic registration regularised by linear elasticity Diffeomorphic registration regularised by divergence
Bending Energy=10 Membrane Energy=10 Linear Elasticity=10 Divergence=10
The resulting registered images are, qualitatively, very similar, although some such as the ones for divergence and bending energy conform slightly more precisely to the registration target than others with this setting for the penalty. However, when we look at the deformations that took place to achieve the registration, the results are very different. The Jacobian matrix for each pixel characterises the deformation, and the determinant of the Jacobian (or the 'Jacobian determinant' for short) shows how much each pixel was stretched or compressed during the deformation. A Jacobian determinant higher than 1.0 signifies expansion; a Jacobian determinant lower than 1.0 signifies compression.
Jacobian determinant images for the deformation for the different regularisation penalties.
Jacobian determinant of the registration regularised by bending energy Jacobian determinant of the registration regularised by membrane energy Jacobian determinant of the registration regularised by linear elasticity Jacobian determinant of the registration regularised by divergence
Bending Energy Membrane Energy Linear Elasticity Divergence
As can be seen, the deformations that achieve the registration are very different and reflect the different penalties. For example, a high divergence penalises voxel expansion and contraction, so it is no surprise that the Jacobian determinants have a smaller range for this penalty (voxels that to not change volume have a Jacobian determinant of 1.0).

There is currently no consensus in the literature about what is the best regularisation penalty to apply when registering medical images. Indeed, the best penalty is likely to vary according to the application (for example intra-subject longitudinal registration vs. inter-subject registration). You will need to experiment to achieve satisfactory results.

Fidelity Settings

There are several settings that affect how closely the moving image can be deformed to the fixed image and the speed of processing.

Diffeomorphic registration fidelity settings

Cost Function

Diffeomorphic registration only really works well for registering images with similar contrast. For example, two images of the same subject acquired using the same pulse sequence at different times; or registering a patient image with an atlas of the same approximate contrast. You can choose:

Output Settings

The following affect the final outputs created by the diffeomorphic registration:

Diffeomorphic registration output settings

Other Settings

Select the fixed image by clicking on the open icon, or by typing in the folder (directory) and file name of the image, or by pressing the right mouse button and selecting from the menu of recently-used images.

Selecting the fixed image

Next, select the images that you want to register to the fixed image by clicking on the select_images_button button. This will bring up a file chooser. Select one or more images to register in the file chooser, and press the Select button. You can add more images to this list by pressing the add_images_button button. Ensure that the images are in the order in which you want them to be processed. If they are not in the right order, select one or more images in the displayed list to move, and the click either the move_up_button button or move_down_button button to get them in the right order.

You can remove all the images from the list by clicking the remove_all_button button, or remove just some of the images by first selecting them, and then clicking the remove_selected_button button.

Now click on the Button to do the registration button to perform the registration. Registration will take several minutes for each of the images, during which time various progress indicators will pop up, allowing you to cancel the registration at any stage. If registration completes, the registered images will be produced.

The registered images have the same numbers of rows, columns and slices as the fixed image, but will have pixel intensity values taken from the registered images after they have been re-aligned to match the position of the fixed image. The registered image are automatically given a name the same as the input images, but with the letter "r" prepended to the name. For example, if you chose an image to be registered with a name MyImage, the registered image will be given the name rMyImage.

Viewing the Result

If you want to check on the quality of the registration, the best way is to load the fixed image into Jim's main display window. Then, load the registered image as an overlay image. You can automatically get Jim to load the registered image to the overlay by selecting the Load result button load_save. With this selected, as each registered image is produced, it is overlaid onto the image in Jim's main display.
Note: you must have the fixed image loaded into Jim's main display for this feature to work.

Jim Home