MatrixArithmetic¶
-
MLModule
¶ author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLCoordUtils1
definition mlMatrixArithmetic.def see also DecomposeMatrix
,ComposeMatrix
keywords mult
,div
,sum
,add
,subtract
,compose
,inverse
,determinant
,trace
Purpose¶
The module MatrixArithmetic
offers standard arithmetic operations on one or two given homogeneous 4x4 matrices, scalars, and vectors.
Usage¶
The module requires up to two matrices Matrix A
and Matrix B
.
Unary operations (inverse, pseudoinverse, transpose, negation) take only one Matrix A
, whereas binary operations (add, subtract, multiply) require both matrices.
Scalar and vector operations require corresponding inputs.
Parameter Fields¶
Field Index¶
Determinant : Double |
Resulting Matrix C : Matrix |
Inner Products. : Vector3 |
Scalar : Double |
Is orthogonal : Bool |
Trace : Double |
Is valid : Bool |
Vector D : Vector4 |
Matrix A : Matrix |
Vector R : Vector4 |
Matrix B : Matrix |
|
Matrix Sum : Double |
|
Operation : Enum |
Visible Fields¶
Matrix A¶
-
name:
matrixA
, type:
Matrix
, default:
1 0 0 0, 0 1 0 0, 0 0 1 0, 0 0 0 1
¶ Sets the first input matrix. This is required for unary operations.
Matrix B¶
-
name:
matrixB
, type:
Matrix
, default:
1 0 0 0, 0 1 0 0, 0 0 1 0, 0 0 0 1
¶ Sets the second input matrix. This is required for binary operations.
Operation¶
-
name:
operation
, type:
Enum
, default:
Identity
¶ Defines the operation.
Values:
Title | Name | Deprecated Name | Description |
---|---|---|---|
Identity | Identity | C = A | |
Inverse | Inverse | C = A^-1 | |
Moore Penrose Pseudoinverse | MoorePenrosePseudoinverse | C = (A^T * A)^-1 * A^T | |
Transpose | Transpose | C = A^T | |
Negation | Negation | C = -A | |
Add | Add | C = A + B | |
Multiply | Multiply | C = A * B | |
Subtract | Subtract | C = A - B | |
Multiply With Scalar | MultiplyWithScalar | C = A * s | |
Add Scalar | AddScalar | C = A + s | |
Multiply With Vector | MultiplyWithVector | R = A * D | |
Equation System Solver | EquationSystemSolver | Equation System Solver | A * R = D |
Determinant¶
-
name:
outputDeterminant
, type:
Double
, persistent:
no
¶ Shows the determinant of the resulting matrix.
Vector R¶
-
name:
outputVectorV
, type:
Vector4
, persistent:
no
¶ Shows the output vector in the case of using the operation Equation System Solver or Multiply With Vector.