genre | Registration |
authors | Tobias Boehler, Doerte van Straaten, Jan Strehlow, Stefan Wirtz |
package | FMEstable/ReleaseMeVis |
dll | MLMERIT |
definition | MLMERIT.def |
keywords | linear, registration, affine, rigid |
The module MERIT encapsulates the MEVIS Image Registration Toolkit, a framework for the implementation and usage of image registration methods. By default, it allows the computation of an affine-linear image registration. A template image T (also called moving image or source image) is transformed to improve the spatial alignment between T and a reference image R (also called fixed image or target image). In addition, the MERIT module allows the dynamic extension of the standard linear image registration using a plug-in interface.
Connect the two images, choose appropriate parameters (see details below) and press the Automatic Registration button to start the registration. Alternatively you can can run a defined number of registration steps (Multiple Steps) or do a single iteration (Single Step). Various parametric settings can be adjusted in the corresponding tabs.
MERIT has a lot of features, see the parameter section to learn about all of them:
See the publication on MERIT for further information: Boehler, T.; van Straaten, D.; Wirtz, S.; Peitgen, H.O (2011): A robust and extendible framework for medical image registration focused on rapid clinical application deployment. In: Computers in Biology and Medicine 41, pages 340-349. DOI: 10.1016/j.compbiomed.2011.03.011.
No special interactions than parameter settings are possible.
Tips and Tricks:
Known Bugs:
Hopefully none.
The automatic panel contains five tabs, which summarize different aspects of the parameterization of MERIT.
In the first tab, all components for registration following the standard registration scheme, can be chosen. This the transformation type, the similarity measure, the interpolation type and whether a plugin should be used or not.
In the settings tab, all parameters for Multi-Resolution, Hardware-Acceleration and Initialization can be set.
The optimizer-settings-tab contains all parameters regarding the optimizer, the discretization and the step size control mechanism.
In the output-tab all settings regarding the output (transformation and image) can be set.
The last tab gives some informations about MERIT, contacts and the current version.
MERIT has four image inputs and one base input. The first two input images are mandatory while the other are optional.
Optional mask image. It can be used to specify the regions where similarity is evaluated. The mask image needs to have the same size as the reference image. The similarity will be computed using only non-zero masked voxels. Voxels masked with zero do not contribute to the registration.
Optional initial deformation field (in same size as the reference image). The field is only evaluated during non-linear registration.
This input field can be used to connect a MERIT plugin. You can connect your own image registration module (it does not matter whether it is rigid or non-rigid) here, and make use of MERIT's components like reformatting, similarity measures, image stacks, etc. Generally, MERIT plugins are provided by other modules via base outputs. The MERIT framework provides an easy-to-use extension mechanism for these plugins. More details will be added.
MERIT has five output fields. The first three outputs give the reference, template and warped template image, respectively. Furthermore, deformation fields (if switched on) and error plots (if switched on) are accessible via the last two output fields.
Warped template image, i.e. the template image on which the transformation was applied. The transformed template image generally resides in the reference domain.
Deformation field. For each voxel a vec3 is generated which describes the backward-mapping voxel-coordinate displacement of this voxel. The resulting deformation can be visualized for instance using the modules SoView2DVectorFieldView or SoView2DDeformationGridView.
Starts a single iteration, and continues the active registration.
Computes a defined number of iterations, and continues the active registration.
Declares the number of iterations that are calculated when pressing Multiple Steps.
Starts the automatic registration. The algorithm stops when the termination criteria hold.
Lowest level of the image stack for which a registration is computed. Level 0 means full image resolution, levels higher than 0 indicate that the registration will finish at this particular level. The computation of the registration on the lowest level may take a while, especially for substantially large images. If larger than 0, the final transformation result will be interpolated appropriately.
Maximum number of iterations that are calculated on each level if termination criteria do not hold before. This parameter is only evaluated when Automatic Registration is selected.
Maximum number of iterations that are calculated on the last level if termination criteria do not hold before. This parameter is only used when Automatic Registration is selected. Typically, the maximum number of iterations on the last level is smaller or equal to the number of iterations on the other levels, avoiding large computational costs.
Minimum number of iterations that are calculated on each level. This number is superior to termination criteria which might already want to finish registration. Sometimes it is advantageous to perform at least 2-4 iterations per level. This parameter is only used when Automatic Registration is selected.
Minimum number of iterations that are calculated on the last level. This number is superior to termination criteria which might already want to finish registration. Sometimes it is advantageous to perform at least 2-4 iterations on the last level. This parameter is only used when Automatic Registration is selected.
Termination criteria precision. See parameter tau in termination criteria of Gill, Murray and Wright ( Gill, Murray, Wright: Practical Optimization, Elsevier Academic Press, section 8.2.3 Termination Criteria ). The smaller this parameter is, the stricter are the criteria, i.e. the more iterations are calculated.
Maximum runtime in seconds. This parameter is only evaluated when Automatic Registration is selected.
If set to true MERIT automatically computes the maximum Number of Levels for the given image pair according to the used Scale Factor.
Number of levels of the image stacks MERIT generates for the multi-resolution image registration. Denotes the number of levels of the Gaussian image pyramid. MERIT automatically checks if the number of levels allows the generation of a valid multi-resolution stack.
The images of each image stacks are downsampled using this scale factor. Use factors in the range [0,1]. MERIT automatically checks if the scale factor allows the generation of a valid multi-resolution stack.
Switch to the next level manually during stepwise registration. Used in combination with Setup Registration, Single Step and Multiple Steps to step through the iterations.
The stepsize control method adapts the stepsize into the direction of descent to prevent too large or too small steps. In every iteration the algorithm generates a direction of descent to decrease the error value, as required for the internal Newton step. The stepsize control method adapts the stepsize into that direction to prevent too large or too small steps. See Nocedal, Wright: Practical optimization for details.
Values:
Title | Name | Description |
---|---|---|
Armijo | Armijo | Compares old and new error value and decreases stepsize until new error value is considerably smaller than old error value. This also takes the gradient of the error function into account. |
Wolfe | Wolfe | Compares old and new error value and decreases stepsize until new error value is considerably smaller than old error value. This also takes the gradient of the error function into account and additionally sets requirements on the curvature. |
Off | Off | No stepsize control. A fixed stepsize is used. |
Line-search | Line-search | Also called progressive line search, which only searches in calculated direction and cuts the length until progress is reached. |
Length of step into direction of descent which is first tried in every iteration. The effective step size can be less because stepsize control methods reduce the stepsize if necessary.
Minimum stepsize which is used.
If the new error value is still too high the stepsize is reduced using the stepsize reduction factor and the new error value is evaluated again.
This factor is only necessary for Step Size Control Mode Armijo, additionally contributing to step size convergence.
Sufficient decrease factor for Step Size Control Mode Wolfe.
Interpolation that is used during registration when transforming the template image. Generally, voxel intensities do not lie on grid points and are thus resampled using one of the strategies detailed below. Interpolation of the output image can be set separately in the field Output.
Values:
Title | Name | Description |
---|---|---|
Nearest Neighbor | Nearest Neighbor | Rounds the image intensity value of the warped voxel to those of the the nearest voxel value. |
Linear | Linear | Linearly interpolates a new voxel intensity value from its neighbor voxel intensities. |
Cubic | Cubic | New voxel intensity value is calculated from its neighbor voxel intensities using cubic spline interpolation. |
Lanczos | Lanczos | New voxel intensity value is calculated from its neighbor voxel intensities using Lanczos interpolation. |
Type of linear transformation used for the registration.
Values:
Title | Name | Description |
---|---|---|
Translation | Translation | Transformation includes only translation, i.e. three degrees-of-freedom (in 3-D) are optimized. |
Rigid | Rigid | Transformation includes translation and rotation. Six degrees-of-freedom (in 3-D) are optimized. |
Similarity | Similarity | Transformation includes translation, rotation and one scale parameter which is equal in all three dimensions. Seven degrees-of-freedom (in 3-D) are optimized. |
Rigid + Scale | Rigid + Scale | Transformation includes translation, rotation and scaling. Nine degrees-of-freedom (in 3-D) are optimized. |
Affine | Affine | Transformation includes translation, rotation, scaling and shearing. Twelve degrees-of-freedom (in 3-D) are optimized. |
4x4 homogeneous matrix which describes the affine-linear transformation.
4x4 homogeneous matrix which codes the affine-linear transformation directly to the world matrix of the template image. You can set the new world matrix of the transformed template image directly using an ImagePropertyConvert module.
The similarity measure S evaluates the similarity of the reference image R and the template image T. MERIT minimizes the error E ( R, T ) = 1 - S ( R, T ) to spatially align the images R and T .
Values:
Title | Name | Description |
---|---|---|
Ssd | SSD | Sum of Squared Differences error measure, in particular suitable for images with a close intensity relationship, e.g., mono-modal registration. |
Ncc | NCC | Normalized Cross Correlation similarity measure, considers intra- and inter-class variances of both images, based on Pearson's correlation coefficient. Allows the registration of images with a linear intensity-relationship, e.g., inverted images. |
Lcc | LCC | Local Cross Correlation similarity measure. Evaluates the local cross-correlation coefficient in a local 3x3x3 window around each voxel. LCC has properties related to NMI (see below) and is robust to non-linear intensity relations. |
Nmi | NMI | Normalized Mutual Information similarity measure, maximizes the joint Shannon entropy values of both images, based on histogram analysis. Probably the most robust and standard similarity measure for multi-modal intensity-based image registration. |
Ngf | NGF | Normalized Gradient Field similarity measure. A rather new similarity measure which considers the sum of angles of all image gradient vectors. Since only derivatives contribute to this computation, even multi-modal images can be registered. |
Number of gray value histogram bins for NMI calculation. This parameter is only necessary in case the similarity measure Type is set to NMI. NMI is calculated using gray value histograms. Therefore gray values of the images are merged into equally distributed bins. This means the larger the number of bins, the finer the "resolution" of the histogram and the more gray value levels are distinguished.
Sets the displacement in millimeters to approximate similarity measure derivatives based on the central difference quotient.
Sets the displacement in radians to approximate similarity measure derivatives based on the central difference quotient.
Sets the displacement in relative scale factors to approximate similarity measure derivatives based on the central difference quotient.
Sets the displacement in shear factors to approximate similarity measure derivatives based on the central difference quotient.
Switch between linear registration and plugin registration.
Values:
Title | Name | Description |
---|---|---|
Linear | Linear | Standard internal MERIT affine-linear registration. |
Plugin | Plugin | Plugin registration. |
Name of the plugin registration detected at the plugin input.
Describes which error plots are displayed. A good way to visualize error plots is using the modules SoDiagram2D with legend switched on, StylePalette and SoExaminerViewer as shown in the example network.
Values:
Title | Name | Description |
---|---|---|
Error only | Error only | Plots iteration number vs. absolute error value. |
Relative error only | Relative error only | Plots iteration number vs. relative error value. Reference value is the error value on the specific level before start of the registration. |
Error and relative error combined | Error and relative error combined | Plots iteration number vs. absolute and relative error values. |
Combined errors overview mode | Combined errors overview mode | Plots iteration number vs. error value and relative error value. On every level, the value of 1.0 is added to the relative error value. |
States if error plots should be generated.
Interpolation used for the output images. Interpolation used during the registration process is set separately using Internal.
Values:
Title | Name | Description |
---|---|---|
Nearest Neighbor | Nearest Neighbor | Rounds the image intensity value of the warped voxel to those of the the nearest voxel value. |
Linear | Linear | Linearly interpolates a new voxel intensity value from its neighbor voxel intensities. |
Cubic | Cubic | New voxel intensity value is computed via cubic spline interpolation from its neighbor voxel intensities. |
Lanczos | Lanczos | New voxel intensity value is computed via cubic spline interpolation from its neighbor voxel intensities. |
States if the images are resampled in z-dimension when the image stacks are generated.
Specifies the image dimension (2-D or 3-D).
Values:
Title | Name | Description |
---|---|---|
3-d | 3-D | 3-D registration. |
2-d | 2-D | 2-D registration. |
Number of threads used for the calculation. It will be automatically adjusted when MERIT is instantiated, but can be set to a lower value if desired.
States the time the registration required to finish.
Overall number of iterations the registration required to finish.
States if the registration has finished.
States if the current progress, e.g. the progress bar, is updated in every iteration.
States if a deformation field is computed for linear registration. Note that the deformation is always in the voxel-coordinate system.
Prepares the registration. This field is required only for stepwise registration. It loads images, creates image stacks, performs initialization (if switched on) and calculates initial error values.
Different types of initialization to automatically center input images before actual image registration. E.g. for multi-modal image fusion or follow-up analysis.
Values:
Title | Name | Description |
---|---|---|
Off | Off | No initialization. |
Image center equalization | Image center equalization | Template image center is transformed onto reference image center. |
Center of gravity equalization | Center of gravity equalization | Template center of gravity is transformed onto reference center of gravity. |
Binary center of gravity equalization | Binary center of gravity equalization | Experimental: Template center of gravity is transformed onto reference center of gravity. Image gray value are not weighted during center of gravity calculation, but contribute if larger than minimum gray value and do not contribute if equal to minimum value (to distinguish background and object). |
Center equalization and translation | Center equalization and translation | Template image center is transformed onto reference image center. Additionally the template image is translated coarsely in all three image dimensions (see field initTranslationArea for details) to minimize the error value further. |
Center of Gravity equalization and translation | Center of Gravity equalization and translation | Template center of gravity is transformed onto reference center of gravity. Additionally the template image is translated coarsely in all three image dimensions (see field initTranslationArea for details) to minimize the error value further. |
Input Matrix | Input Matrix | An arbitrary External Initialization Matrix is used for initialization, e.g. from manual registration or prior knowledge. |
If set to true initialization is performed.
Input matrix used for initialization if Initialization Mode is set to Input Matrix.
If set to true output fields are invalidated on field changes.
If true the deformed template image output is actually reformatted, else only the new world matrix is set.
MERIT version info.
Affine-linear transformation parameters (3x translation, 3x rotation, 3x scaling, 3x shear).
Activate storage of images for each iteration.
The interval for which an image will be stored.
Optimizer method for the built-in affine-linear registration.
Values:
Title | Name | Description |
---|---|---|
Approx. Newton (diag(H)) | Approx. Newton (diag(H)) | Approximated Newton, using diagonal entries of Hessian only. This is faster but not as accurate. |
Newton | Newton | Newton optimizer. |
The Status field reflects the internal state of the module.
Values:
Title | Name | Description |
---|---|---|
Ok | OK | Status OK, everything can be handled. |
Invalid Input | INVALID_INPUT | At least one of the module inputs is invalid. |
Invalid Parameter | INVALID_PARAMETER | At least one parameter of the registration settings is set incorrectly (e.g. 2D-Mode activated and 3D-images at input or vice versa). |
Out Of Memory | OUT_OF_MEMORY | There is not enough memory to create all necessary image stacks. |
Unknown Error | UNKNOWN_ERROR | All other errors. |