RTR

Ratioing transformations


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Related

Back to top

Description


Creates a new image based on the ratio of two linear combinations of image channels. The denominator is optional.
Back to top

Parameters


Name Type Length Value range
InputNumer: Input channels for ratio numerator * Raster port 1 - 16 -1024 -
Weight List for Ratio Numerator Float 0 - 16 Default: 1.0
Constant for Ratio Numerator Float 0 - 1 Default: 0.0
InputDenom: Input channels for ratio denominator Raster port 0 - 16 -1024 -
Weight List for Ratio Denominator Float 0 - 16 Default: 1.0
Constant for Ratio Denominator Float 0 - 1 Default: 0.0
Output: Output raster channel Raster port 0 - 1  
Port Settings: Resample mode Raster port 1 - 1024 Nearest | Bilinear | Cubic
Default: Nearest
Output Raster Type: Output channel type * Raster port 1 - 1 8U | 16S | 16U | 32R
Scaling Mode String 4 - 1 NONE | AUTO | LOGS
Default: NONE
Area Mask: Area mask Bitmap port 0 - 4  
Value for Division by Zero Float 0 - 1  

* Required parameter
Back to top

Parameter descriptions

InputNumer: Input channels for ratio numerator

Specifies the input image channels that will be added together to form the ratio numerator.

Up to 16 channels can be specified; at least one must be specified. Duplicate channels are NOT allowed.

Weight List for Ratio Numerator

Optionally specifies the weights to be assigned to channels listed in the numerator.

The weights correspond to the input channels listed in CNUM (InputNumer) by their position in the list.

Constant for Ratio Numerator

Optionally specifies a REAL constant to be added to the numerator.

InputDenom: Input channels for ratio denominator

Optionally specifies the image channels (up to 16) to be added together to form the ratio denominator.

Up to 16 channels can be specified. Duplicate channels are NOT allowed.

Weight List for Ratio Denominator

Optionally specifies weights to be assigned to channels listed in the denominator.

The weights correspond to the input channels listed in CDEN (InputDenom) by their position in the list.

Constant for Ratio Denominator

Optionally specifies a REAL constant to be added to the denominator.

Output: Output raster channel

Specifies the output channel to receive the ratioed image.

if output to the new file , this parameter is ignored.

When your output file is a new file; that is, it does not exist already, you need not specify a value for this parameter; channel in the new file will be of the bit depth specified by the value of the DATATYPE parameter.

Port Settings: Resample mode

Specifies the type of image resampling desired.

Supported methods include:

Output Raster Type: Output channel type

Specifies the image data type of the output raster channel.

The output channel type depends on the specified Scaling Mode (SMOD) value:

Scaling Mode

Specifies the scaling mode.

Supported options are:

If the specified output channel (DBOC) is 32-bit real, this parameter is ignored. See Scaling in the Details section for more information.

Area Mask: Area mask

Specifies the bitmap that defines the area to be processed within the input raster.

If no value is specified, the entire channel is processed.

Value for Division by Zero

Specifies the value to use for the result of a denominator equal to zero.

If this parameter is not specified, this value defaults to the maximum possible value for the specified output channel.

Back to top

Details

RTR calculates any pixel by pixel ratioing transformation of the following form:

 WNUM(1)*CNUM(1) + WNUM(2)*CNUM(2) + ... + WNUM(i)*CNUM(i) + NCON
 ----------------------------------------------------------------
 WDEN(1)*CDEN(1) + WDEN(2)*CDEN(2) + ... + WDEN(i)*CDEN(i) + DCON
where:

If weights (WNUM, WDEN) are not specified, they default to 1.0. If constants (NCON,DCON) are not specified, they default to 0. If denominator channels (CDEN) are not specified, the constant for ratio denominator defaults to 1.0.

Results of this function are saved to the specified output channel (DBOC).

The MASK parameter specifies the area within the input channel to be processed. Only the area specified under the mask is processed; the rest of the image is unchanged.

Calculations are performed using real arithmetic. If the specified output channel is 8- or 16-bit, some loss of accuracy will occur. To help mitigate this, you can specify scaling options (SMOD).

Scaling

RTR performs ratioing transformation on 8-bit unsigned integer, 16-bit signed integer, 16-bit unsigned integer, and 32-bit real channels. These channels have the following ranges for data:

Type                               Min             Max

8-bit unsigned integer               0             255
16-bit signed integer           -32768           32767
16-bit unsigned integer              0           65535
32-bit real                     1.0E38         +1.0E38
Because the results of a ratioing transformation may be outside the range of values that the output channel can store, it is often necessary to scale the results for the output channel. You can control scaling using the SMOD (Scaling Method) parameter. This parameter provides the following scaling options:

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.