Module: Convert Image Type ()

Description:

This is a computational module that allows you to change the primitive data type of a regular 3D scalar field or an RGBA color field. A new scalar field will be created having the same dimensions and the same coordinates as the incoming one, but the data values will be shifted, scaled, and cast to a new data type.

As an additional feature, Convert Image Type is also able to convert a uniform scalar field of bytes into a Label Field, which is commonly used to store segmentation results in . For each value or label occurring in the incoming field a corresponding material will be created. Material colors may be defined via an optional colormap.

Press the Apply button to start the computation.

Connections:

Data [required]
The scalar field or color field to be converted.

Colormap [optional]
Optional colormap specifying material colors if a uniform scalar field of bytes is to be converted into a label image. Only visible if Label Image has been selected for output.

Ports:

Info

Shows how the input data will be mapped during conversion. If no clipping occurs, the input range covers all values between the minimum and maximum data value of the incoming scalar field. This range will be mapped as indicated. If clipping occurs, the minimum or maximum value of the output range or both will be equal respectively to the smallest or largest value that can be represented by the selected output data type. In this case, the input range shows which values correspond to these limits. Data values below the lower limit or above the upper limit will be clamped.

Output Datatype

Lets you select the primitive data type of the output field. The item Label Field is special. If this is selected, the incoming scalar field is converted into a Label Field.

Scaling

Defines a linear transformation that is applied before the data values are clamped and cast to the output datatype. The transformation is performed as follows:
output = SCALE*(input+OFFSET)
If you want to convert data with a range inmin ... inmax into a range outmin ... outmax, SCALE and OFFSET are determined like this: SCALE = (outmax - outmin) / (inmax - inmin) and OFFSET = outmin / SCALE - inmin

Options

This port is only shown if you want to convert the incoming scalar field into a label image. If option clean labels is set, then the materials found in the input data set will be relabeled so that the first material is 0, the second is 1, and so on. If clean labels is not set, then the resulting label image will contain exactly as many materials as initial maximum data range and no check is performed if a material actually can be found.

Colormap

Port to select a colormap.

Color Channel

This option menu will only be shown if an RGBA color field is to be converted. It allows you to specify which channel of the color field should be regarded. In addition to the four RGBA channels also Gray and Alpha*Gray can be selected. The gray channel is computed on-the-fly from the RGB values of the color field according to the NTSC formula: I=.3*R+.59*G+.11*B.