SetWorldMatrix¶
-
MLModule
¶ genre Coordinate
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLCoordUtils1
definition MLCoordUtils1.def see also ImagePropertyConvert
,Info
,WorldVoxelConvert
,SoMLWorldToVoxel
,SoMLVoxelToWorld
keywords voxel
,coordinate
,transform
,translation
,rotation
,scaling
Purpose¶
The module SetWorldMatrix
copies the voxel-to-world-matrix from a reference image or composes anew matrix using elementary transforms.
Details¶
The world matrix of the output image is calculated by matrix-multiplication using the original matrix, the reference matrix and the elementary transform according to the selected status of the fields Source Image Matrix
, Reference Image Matrix
, and Elementary Transforms
.
Finally the result is inverted on request:
RES = inv_or_id( ELM * REF * SRC )
where ELM, REF, and SRC are matrix, inverted matrix, or identity according to the settings of the usage-fields.
If Set C-dimension info
, Set T-dimension info
, or Set U-dimension info
are selected, information of the respective data dimension are forwarded from the reference image.
Input Fields¶
The module has two input images. Data from input0 are transfered to the output, input1 is used in calculating the new world-matrix if requested.
Output Fields¶
Parameter Fields¶
Field Index¶
Center for Scaling/Rotation : Vector3 |
Set T-dimension info : Bool |
Elementary Transforms : Enum |
Set U-dimension info : Bool |
Invert result : Bool |
Source Image Matrix : Enum |
Reference Image Matrix : Enum |
Translation : Vector3 |
Rotation : Rotation |
|
Scale : Vector3 |
|
Scale Orientation : Rotation |
|
Set C-dimension info : Bool |
Visible Fields¶
Center for Scaling/Rotation¶
-
name:
center
, type:
Vector3
, default:
0 0 0
¶ Sets a center for scaling.
Scale Orientation¶
-
name:
scaleOrientation
, type:
Rotation
, default:
0 0 1 0
¶ Sets an orientation for scaling.
Source Image Matrix¶
-
name:
sourceUsage
, type:
Enum
, default:
Ignore
, deprecated name:
inputUsage
¶ Defines how to use the source image’s matrix.
Values:
Title | Name |
---|---|
Forward | Forward |
Inverse | Inverse |
Ignore | Ignore |
Reference Image Matrix¶
-
name:
referenceUsage
, type:
Enum
, default:
Forward
¶ Defines how to use the reference image’s matrix.
Values:
Title | Name |
---|---|
Forward | Forward |
Inverse | Inverse |
Ignore | Ignore |
Elementary Transforms¶
-
name:
elementaryUsage
, type:
Enum
, default:
Ignore
¶ Defines how the elementary transformations should be used.
Values:
Title | Name |
---|---|
Forward | Forward |
Inverse | Inverse |
Ignore | Ignore |
Invert result¶
-
name:
invertResult
, type:
Bool
, default:
FALSE
, deprecated name:
invResult
¶ If checked, the resulting transformation matrix is inverted.
Set C-dimension info¶
-
name:
setCInfo
, type:
Bool
, default:
FALSE
¶ If checked, the c-dimension info is copied from the reference image to the output image.