TypeArithmetic2¶
-
MLModule
¶ genre NonScalar
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLTypeSupport
definition MLTypeSupport.def see also TypeComposer
,TypeFromScalars
,TypeFromDimension
,Info
,TypeDecomposer
,TypeArithmetic1
,Arithmetic0
,Arithmetic1
,Arithmetic2
,ComplexArithmetic1
,ComplexArithmetic2
keywords binary
,dual
,double
,arithmetics
,extended
,carrier
,datatype
,converters
,reformats
,conversions
,matrix
,tensor
,vector
,complex
,operations
,tensorarithmetic
Purpose¶
The module TypeArithmetic2
offers a large number of operations to calculate results from identical or different (non) scalar voxels from two input images.
Depending on the selected operation, the supported voxel types are vec2, vec2f, complexf, complexd, complexld, quaternionf, quaterniond, quaternionld, vec3-vec10, vec3f-vecf10, vec16, vecf16, vec32, vecf32, vec64, vecf64, mat2, matf2, mat3, matf3, mat4, matf4, mat5, matf5, mat6, matf6, Vector16, Vector, and Vector64.
Details¶
- Integer voxel components are converted to double voxel components before being used inside the module. This means that Vector16, Vector, and Vector64 are converted to vec6 voxels before using them internally.
- Internally, all operations are always calculated either with float or double vector or matrix voxels. This means that other types, such as the two-component types vecf2, complexf, complexd, and complexld, are implicitly handled as type vec2 or vecf2; all four-component types, such as quaternionf, quaterniond, and quaternionld, are implicitly handled as vec4 or vecf4; and all six-component types, such as vecf6, Vector16, Vector, and Vector64, are implicitly handled as vec6 or vecf6.
- If input voxel types are composed of both float and double components, then the lower precision of both is used as the component type for the output image. For example, if a vecf3 voxel image is multiplied with a mat3 voxel image, then the result voxel will be a vecf3. If the usage of double components shall be forced, then the float component type must be cast appropriately to a comparable double-typed one.
- If explicit operations on complex voxels are needed, then the dedicated modules for complex arithmetic, such as
ComplexArithmetic1
,ComplexArithmetic2
,ComplexToReal
, or complex modules from ITK should be used instead ofTypeArithmetic2
.
Parameter Fields¶
Visible Fields¶
Operation¶
-
name:
operation
, type:
Enum
, default:
Vec or Mat Plus Scalar To Vec or Mat
¶ Defines the operation to calculate output voxels from input1 and input2 voxels.
Values:
Title | Name | Description |
---|---|---|
Vec or Mat Plus Scalar To Vec or Mat | Vec or Mat Plus Scalar To Vec or Mat | Scalar addition of a scalar to any vector or matrix type results in a vector or matrix. |
Vec or Mat Minus Scalar To Vec or Mat | Vec or Mat Minus Scalar To Vec or Mat | Scalar subtraction of any vector or matrix type from a scalar results in a vector or matrix. |
Vec or Mat Multiplied by Scalar To Vec or Mat | Vec or Mat Multiplied by Scalar To Vec or Mat | Scalar multiplication of a scalar with any vector or matrix type results in a vector or matrix. |
Vec or Mat Divided by Scalar To Vec or Mat | Vec or Mat Divided by Scalar To Vec or Mat | Scalar division of a scalar by any vector or matrix type results in a vector or matrix. Divisions by zero will result in |
Vec or Mat Component-wise Plus Vec or Mat To Vec or Mat | Vec or Mat Component-wise Plus Vec or Mat To Vec or Mat | Component-wise addition of a vector or matrix with another vector or matrix results in a vector or matrix. |
Vec or Mat Component-wise Minus Vec or Mat To Vec or Mat | Vec or Mat Component-wise Minus Vec or Mat To Vec or Mat | Component-wise subtraction of a vector or matrix from another vector or matrix results in a vector or matrix. |
Vec or Mat Component-wise Multiplied by Vec or Mat To Vec or Mat | Vec or Mat Component-wise Multiplied by Vec or Mat To Vec or Mat | Component-wise multiplication of a vector or matrix with another vector or matrix results in a vector or matrix. |
Vec or Mat Component-wise Divided By Vec or Mat To Vec or Mat | Vec or Mat Component-wise Divided By Vec or Mat To Vec or Mat | Component-wise division of a vector or matrix by another vector or matrix results in a vector or matrix. Divisions by zero will result in |
Mat x Mat To Mat | Mat x Mat To Mat | Matrix multiplication of a matrix with another matrix results in a matrix. Supported are mat[f][2,3,4,5,6] x mat[f][2,3,4,5,6]. |
Vec2 x Vec2 To Vec3 | Vec2 x Vec2 To Vec3 | Vector product of a vec[f][2] and a vec[f][2] (with the third component equal to 0) results in a vec[3]. |
Vec3 x Vec3 To Vec3 | Vec3 x Vec3 To Vec3 | Vector product of a vec3 and a vec3 results in a vec3. |
Vec Dot Vec To Double | Vec Dot Vec To Double | Scalar product of a vector with another vector results in a double. |
Angle Between Vectors | Angle Between Vectors | Angle between two vectors. |
Compute Maximum Vector Components | Compute Maximum Vector Components | Compare two vectors component-wise and return the maximum values in a new vector. |
Compute Minimum Vector Components | Compute Minimum Vector Components | Compare two vectors component-wise and return the minimum values in a new vector. |
Vec2 Dyadic Prod Vec2 To Mat2 | Vec2 DyadicProd Vec2 To Mat2 | Dyadic product of a vec[f]2 and a vec[f]2 results in a mat[2]. |
Vec3 Dyadic Prod Vec3 To Mat3 | Vec3 DyadicProd Vec3 To Mat3 | Dyadic product of a vec[f]3 and a vec[f]3 results in a mat3. |
Vec4 Dyadic Prod Vec4 To Mat4 | Vec4 DyadicProd Vec4 To Mat4 | Dyadic product of a vec[f]4 and a vec[f]4 results in a mat4. |
Vec5 Dyadic Prod Vec5 To Mat5 | Vec5 DyadicProd Vec5 To Mat5 | Dyadic product of a vec[f]5 and a vec[f]5 results in a mat5. |
Vec6 Dyadic Prod Vec6 To Mat6 | Vec6 DyadicProd Vec6 To Mat6 | Dyadic product of a vec[f]6 and a vec[f]6 results in a mat6. |
Vec x Mat To Vec | Vec x Mat To Vec | Multiplication of a vector with a matrix results in a vector. Supported are vec[f][2,3,4,5,6] x mat[f][2,3,4,5,6]. |
Mat x Vec To Vec | Mat x Vec To Vec | Multiplication of a matrix with a vector results in a vector. Supported are mat[f][2,3,4,5,6] x vec[f][2,3,4,5,6]. |
Vec4 x Mat4 To Vec3 | Vec4 x Mat4 To Vec3 | Multiplication of a vec4 with a mat4 results in a rescaling to 3D, which is then written to a vec3. |
Mat4 x Vec4 To Vec3 | Mat4 x Vec4 To Vec3 | Multiplication of a mat4 with a vec4 results in a rescaling to 3D, which is then written to a vec3. |
Affine Point3 x Mat4 To Vec3 | AffinePoint3 x Mat4 To Vec3 | Multiplication of an affine point in 3D with a mat4 results in a rescaling to 3D, which is then written to a vec3. |
Mat4 x Affine Point3 To Vec3 | Mat4 x AffinePoint3 To Vec3 | Multiplication of a mat4 with an affine point in 3D results in a rescaling to 3D, which is then written to a vec3. |
Affine Vector3 x Mat4 To Vec3 | AffineVector3 x Mat4 To Vec3 | Multiplication of an affine vector in 3D with a mat4, which is then written to a vec3. |
Mat4 x Affine Vector3 To Vec3 | Mat4 x AffineVector3 To Vec3 | Multiplication of a mat4 with an affine vector in 3D, which is then written to a vec3. |