AffineTransformation3D¶
-
MLModule
¶ genre SpatialTransformation
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLTransformation
definition MLTransformation.def keywords rotate
,translate
,shear
,scale
,image
Purpose¶
This module warps an input volume according to a three-dimensional affine coordinate transformation, using trilinear interpolation.
Usage¶
Translation, rotation, shearing and scaling can be entered and reset. The field for the transformation matrix is read-only.
- Limitations:
- the field
Matrix
is not updated when no output image is demanded. - works efficiently only with datatypes of < MLuint16
- the field
Details¶
The module uses the well-known backward mapping technique (see e.g. the excellent monography by George Wolberg: Digital image warping). From the given parameters the module constructs a transformation matrix for the backward mapping. This transformation matrix B maps a point y in the output volume onto the corresponding point x in the input volume:
The idea of backwarp mapping graphically:
To achieve sub-voxel resolution, trilinear interpolation is applied in the input volume. The origin of the coordinate system is in the center of the output volume.
The order for constructing the matrix is shearing, rotation, scaling, translation (the translation is applied after the other transformations).
Parameter Fields¶
Field Index¶
Is World Transformation : Bool |
Scaling Y : Double |
Translation Z : Double |
Matrix : Matrix |
Scaling Z : Double |
World Voxel Transformation : Matrix |
Opt Parameters : String |
Shearing X : Double |
|
Reset : Trigger |
Shearing Y : Double |
|
Rotation X : Double |
Shearing Z : Double |
|
Rotation Y : Double |
Transformation Mode : Enum |
|
Rotation Z : Double |
Translation X : Double |
|
Scaling X : Double |
Translation Y : Double |
Visible Fields¶
Reset¶
-
name:
reset
, type:
Trigger
¶ If pressed, all transformation parameters are set back to their default value.
Opt Parameters¶
-
name:
optParameters
, type:
String
, default:
0 0 0 0 0 0 1 1 1 0 0 0
¶ Set optionally all values in one string.
The order is translations, rotations, shearings and scalings. This is used e.g. for coupling to an Optimizer module.
Translation X¶
Translation Y¶
-
name:
translationY
, type:
Double
, default:
0
¶ Equivalent to
Translation X
.
Translation Z¶
-
name:
translationZ
, type:
Double
, default:
0
¶ Equivalent to
Translation X
.
Rotation X¶
Rotation Y¶
-
name:
rotationY
, type:
Double
, default:
0
¶ Equivalent to
Rotation X
.
Rotation Z¶
-
name:
rotationZ
, type:
Double
, default:
0
¶ Equivalent to
Rotation X
.
Scaling X¶
-
name:
scalingX
, type:
Double
, default:
1
¶ Scaling behaves reciprocally to the value (e.g. 0.5 zooms in the image by 2).
Matrix¶
-
name:
matrix
, type:
Matrix
, persistent:
no
¶ This is the backward mapping matrix B as a 4x4 matrix.
Note
The matrix is according to ML convention, not Open Inventor convention. One may use the “DecomposeMatrix” macro to format this field in a 4x4 matrix.
The matrix B is constructed by the module from the parameters according to the following formula:
with
Translation:
Scaling:
Shearing:
Rotation in X:
and Rotation in Z and Y accordingly. The entries for the displacement vector in B are in voxels.
Transformation Mode¶
-
name:
transformationMode
, type:
Enum
, default:
Affine
¶ Defines the transformation mode.
Values:
Title | Name |
---|---|
Translation | Translation |
Rigid | Rigid |
Similarity | Similarity |
Rigid + Scale | Rigid + Scale |
Affine | Affine |