Purpose

The ImageWarp module deforms (warps) an image according to a dense vector field. It is typically used for non-rigid registration and related algorithms.

Usage

Connect the image to be warped/deformed to input0. The image can be of any type, i.e., also vector images and tensor images can be warped. The vector field is connected to input1. The size of the vector field must match the size of the image on input0. Moreover, the vector field must be of type vecf2, vec2, vecf3 or vec3, i.e., 2- or 3-dimensional vectors of float or double precision respectively.

Details

An important note is that a backwards deformation is performed. That is, the vectors in the input1 vector field are associated with the voxels in the output image: for a voxel in the output image, the corresponding vector in input1 shows the position in the input image (input0) the value for the output voxel is found. This position generally lies between the voxel grid in input0, and an interpolation is required to find the value. Bi-linear (2D) or tri-linear (3D) interpolation is used for this. Hence, the module loops over all voxels in the output image, finds the corresponding positions in the input image input0 via the vector field on input1 and interpolates the values using linear interpolation.

To implement the algorithm using a page-based concept, one must know the maximum deformation vector so that a sufficiently large block of the input image always can be requested.

Windows

Default Panel

../../../Modules/ML/MLImageWarp/mhelp/Images/Screenshots/ImageWarp._default.png

Input Fields

An image volume is connected to input0. This volume can be of any type, i.e., for example also vectors (vec2, vec3 etc.) and matrices/tensors (mat2, mat3 etc). In case of a non-scalar data type, each component is warped separately. A vector field (vecf2, vec2, vecf3 or vec3) is connected to input1. The sizes of input0 and input1 must match.

input0

name: input0, type: Image

An image volume is connected to input0. This volume can be of any type, i.e., for example also vectors (vec2, vec3 etc.) and matrices/tensors (mat2, mat3 etc). In case of a non-scalar data type, each component is warped separately.

input1

name: input1, type: Image

A vector field (vecf2, vec2, vecf3 or vec3) is connected to input1. The sizes of input0 and input1 must match.

Output Fields

output0

name: output0, type: Image

A warped image of the same type as the image at input0.

Parameter Fields

Field Index

Auto Update: Bool
Coordinate System: Enum
Displacement Limit: Float
Interpolation Mode: Enum
Update: Trigger

Visible Fields

Coordinate System

name: coordinateSystem, type: Enum, default: Voxel

The warping can be carried out in a voxel coordinate system or in a world coordinate system. If world coordinates are chosen, the unit of all parameters is millimeters and images (including the vectors on input1) are interpreted in the world coordinate system described by the world coordinate matrix. The voxel coordinate system is a special case where the world coordinate system is aligned with the image axes and the world coordinate matrix is a unit matrix. The unit of the deformation vectors is then voxels. The voxel coordinate system in MeVisLab has an x-axis that runs from left to right, a y-axis the runs from up to down and a z-axis that runs inwards.

Values:

Title Name
Voxel Voxel
World World

Interpolation Mode

name: interpolationMode, type: Enum, default: Linear

Selects the way of interpolation for the output image.

Values:

Title Name Description
Nearest Neighbour NearestNeighbour Use intensity values of closest voxel. No “new” intensity values are generated.
Linear Linear A linear combination of all neighbored voxels is applied. New intensity values may occur.

Displacement Limit

name: displacementLimit, type: Float, default: 30

A limit of the displacement along each axis (in millimeters or voxels depending on the coordinate system choice). This parameter is required so that the block of input data required for calculating a block/page of the output image can be predicted.

Update

name: updateButton, type: Trigger

Button for updating the transformation.

Auto Update

name: autoUpdate, type: Bool, default: FALSE

This field indicates, whether automatic update is enabled or not.