Generalized arithmetic operations using multiple cube files
Overview
Parameters
Example 1
Description
FX allows general arithmetic operations to be performed on an arbitrary
number of input cubes. It works by loading whatever input files are
specified, if any, then applying a user defined equation to those files
and then writing the results to an output cube. For instance, if the user
wanted to isolate all pixels in a cube that had a DN greater than 100,
then an equation like "f1 * (f1 > 100)" could be applied to the cube.
The equation parser is case insensitive and all braces get converted to
parenthesis. Whitespace is ignored. Currently, you must explicitly
state all multiplication operations (e.g. 5x will not work, but 5*x will).
The modulus (%), AND and OR operators are not implemented yet.
The following table shows all currently supported scalars/special tokens.
SCALARS
Scalar
Description
Example
F#
File operator
f3 denotes third file
# or #.# or .#
Any integer or double.
12, 3.14, .007 are all valid.
band
Current band number
f1 * band
line
Current line number
line + f1
sample
Current sample number
sample / line + f1
pi
Pi (3.14159...)
f1 > (e^pi)
e
Euler's number (2.71828...)
f1 == ln(e)
The following table shows all currently supported operators sorted
by precedence (0 = highest precedence). All examples are valid
equations that assume one or two files (F1, F2) are loaded.