Purpose

The module TypeFromScalars converts input voxels of scalar data type to an output image of scalar or vector type.

This is done component-wise, that means each component of each voxel of the output image is composed from a number of voxels of the input image. Hence the x-extent of the output image is the nth fraction of the extent of the input image if the voxels of the output image have n components.

Usage

It requires another conversion step with InterleaveDimension to get the data correctly formatted in the x-dimension.

Tips

While composing the output image voxels the components are implicitly cast to double or integer values; this might lead to a precision loss on long double or int64 values on some platforms.

Windows

Default Panel

../../../Modules/ML/MLTypeSupport/mhelp/Images/Screenshots/TypeFromScalars._default.png

Input Fields

input0

name: input0, type: Image

The input image of scalar voxels. On non-scalar voxels the output image is invalidated.

Output Fields

output0

name: output0, type: Image

The output image with an x-extent n times smaller than the input image where n is given by the number of components of the output voxels.

Parameter Fields

Visible Fields

Output Type

name: outputType, type: Enum, default: double

Sets the output data type.

Values:

Title Name
int8 int8
unsigned int8 unsigned int8
int16 int16
unsigned int16 unsigned int16
int32 int32
unsigned int32 unsigned int32
float float
double double
int64 int64
unsigned int64 unsigned int64
complexf complexf
complexd complexd
quaternionf quaternionf
quaterniond quaterniond
vec2 vec2
vec3 vec3
vec4 vec4
vec5 vec5
vec6 vec6
vec7 vec7
vec8 vec8
vec9 vec9
vec10 vec10
vec16 vec16
vec32 vec32
vec64 vec64
Vector2i8 Vector2i8
Vector2i16 Vector2i16
Vector2i32 Vector2i32
Vector2i64 Vector2i64
Vector3i8 Vector3i8
Vector3i16 Vector3i16
Vector3i32 Vector3i32
Vector3i64 Vector3i64
Vector4i8 Vector4i8
Vector4i16 Vector4i16
Vector4i32 Vector4i32
Vector4i64 Vector4i64
Vector5i8 Vector5i8
Vector5i16 Vector5i16
Vector5i32 Vector5i32
Vector5i64 Vector5i64
Vector6i8 Vector6i8
Vector6i16 Vector6i16
Vector6i32 Vector6i32
Vector6i64 Vector6i64
Vector7i8 Vector7i8
Vector7i16 Vector7i16
Vector7i32 Vector7i32
Vector7i64 Vector7i64
Vector8i8 Vector8i8
Vector8i16 Vector8i16
Vector8i32 Vector8i32
Vector8i64 Vector8i64
Vector9i8 Vector9i8
Vector9i16 Vector9i16
Vector9i32 Vector9i32
Vector9i64 Vector9i64
Vector10i8 Vector10i8
Vector10i16 Vector10i16
Vector10i32 Vector10i32
Vector10i64 Vector10i64
Vector16i8 Vector16i8
Vector16i16 Vector16i16
Vector16i32 Vector16i32
Vector16i64 Vector16i64
Vector32i8 Vector32i8
Vector32i16 Vector32i16
Vector32i32 Vector32i32
Vector32i64 Vector32i64
Vector64i8 Vector64i8
Vector64i16 Vector64i16
Vector64i32 Vector64i32
Vector64i64 Vector64i64
mat2 mat2
mat3 mat3
mat4 mat4
mat5 mat5
mat6 mat6
matf2 matf2
matf3 matf3
matf4 matf4
matf5 matf5
matf6 matf6
vecf2 vecf2
vecf3 vecf3
vecf4 vecf4
vecf5 vecf5
vecf6 vecf6
vecf7 vecf7
vecf8 vecf8
vecf9 vecf9
vecf10 vecf10
vecf16 vecf16
vecf32 vecf32
vecf64 vecf64