Image Arithmetic

Overview

Image Arithmetic calculates an output data set from one or two input data sets using one of several arithmetic operations. The inputs may be any combination of windows or files.

To create the result, select the operation, the coefficients, and whether or not to force values less than zero to zero. Then select the file or files on which to operate and the region of the file to process (these controls are the same as other region processing applications; see the region processing interface documentation for more information). When the parameters have been set, press DoIt to generate the result.

Image Arithmetic performs its internal calculations in floating-point arithmetic, but by default, the output is converted to the same data type as the first input file. In several cases, this may not be what you want and you should explicity set the output type with the Mode control.

You can work with data sets that have different dimensions, but be aware that both will use the same parameters to select the region processed and that the controls in the dialog are initialized from the characteristics of the first file. For most of these cases, you'll want to use CopyRegion to generate intermediate files with the same dimensions and then use Image Arithmetic. To arithmetically combine two waves from the same data set (for example, to calculate the ratio of the first two waves), you'll have to use intermediate files.

Topics

Overview | Region processing | Operators | Coefficients | Clamping to zero

Related Priism Topics

Priism | CopyRegion


Operators

There a fixed set of operations that Image Arithmetic can apply. The operations are applied indepedently to each pixel in the selected region. In terms of the two coefficients, A and B, the pixel value in file 1, X, and the pixel value in file 2, the available operations are:

Abs in the fourth operation takes the absolute value of a real quantity and the magnitude of a complex quantity.

All the calculations are done in floating-point arithmetic. When an operation produces a complex result but the output file does not use a complex data type, the imaginary part of the result is discarded and only the real part is stored.

Topics

Overview | Region processing | Operators | Coefficients | Clamping to zero


Coefficients

Image Arithmetic's operators use two coefficients. Coefficient A is substituted for A in the operator expressions; in general, it is applied to values from the first file. Coefficient B is substituted for B in the operator expressions; in general, it is applied to values from the second file.

Topics

Overview | Region processing | Operators | Coefficients | Clamping to zero


Clamping to zero

Set this toggle on if you want values less than zero from the arithmetic operation to be set to zero in the output (clamping). Clamping is only performed if the output is stored in a pure real format (byte, short, or float); if the output is complex no clamping is done. When clamping is used with an operation that generates a complex value and the output data set is real, the clamping is only applied to the real component of the intermediate value (the imaginary component is discarded).

Topics

Overview | Region processing | Operators | Coefficients | Clamping to zero