ChangeType

The Network | Computational | ChangeType command adds a ChangeType module to the network.

 

The ChangeType module changes the data type from one primitive type, e.g., int, float, to another type. Smaller types save memory at the expense of reduced numeric precision. All components of the input data set are converted. This module changes the type of the data components only (not the coordinates). Use the Transform module to change the coordinates

 

The ChangeType module is essentially a subset of the Math module— each allows the values to be scaled and controls the output size. ChangeType has been included primarily for convenience and to make the scaling equations easier to specify.

 

Inputs

Lattice and point data are input types for the ChangeType module.

 

Outputs

The ChangeType module may be connected to Graphics Output Modules or Computational Modules. An Info Module may also be connected to the output node.

 

Properties

The ChangeType module properties are described below.

 


Select the ChangeType module in the Network Manager
to display its properties in the Property Manager.

Properties
Use the ChangeType module to change
the input or output data type.

 

Input

The Input property shows the source to which the module is connected. This option cannot be changed in the Property Manager, but can be changed in the Network Manager by changing the module input.

 

Input Type

The Input type is the type of values stored in the input data. Various primitive type choices exist for this option, including Signed, Unsigned, Float, and Double.

 

Input Range

Input range is the range of the input component data.

 

Output Range

Output range is the range of the output component data.

 

The message "truncated!" appears after the output range if the input data is too large or small to be represented by the output type after scaling.

 

Output Type

The Output type is the type of values stored in the output data. Various choices exist for this option, including Signed, Unsigned, Float, and Double. Select from Signed 8 bits, Unsigned 8 bits, Signed 16 bits, Unsigned 16 bits, Signed 32 bits, Unsigned 32 bits, Signed 64 bits, Float (32 bits), and Double (64 bits).

 

Offset

The Offset option defines a linear transformation to convert the input to the output in the scaling transformation equation. The Offset adds or subtracts values from the Input range to compute the Output range.

 

output = (input+offset) * scale

 

To change this value, highlight the existing value and enter a new value. The default Offset is zero, which means to not offset the values.

 

Scale

The Scale option defines a linear transformation to convert the input to the output in the scaling transformation equation. The Scale multiplies or divides values from the Input range to compute the Output range.

 

output = (input+offset) * scale

 

To change this value, highlight the existing value and enter a new value. The default Scale is one, which means to not scale the values.

 

Contrast Stretch

Click the Recalculate button next to Contrast stretch to scale the input to completely span the range of the output data. This button is disabled for floating point types.

 

 

See Also

Data Types

Computational Modules

Connecting Modules

Introduction to Modules