** Constant Arithmetic **
+ x
Adds x to the data in the current image data buffer.
- x
Subtracts x from the data in the current image data buffer.
* x
Multiplies the data in the current image data buffer by x.
/ x
Divides the data in the current image data buffer by x.
+RGB x y z
Add x to the red, y to the green, and z to the blue part of the current (assumed RGB) image in the buffer.
-RGB x y z
Subtract x from the red, y from the green, and z from the blue part of the current (assumed RGB) image in the buffer.
*RGB x y z
For the current (assumed RGB) image in the buffer, multiply the red part by x, the green part by y, and the blue part by z.
/RGB x y z
For the current (assumed RGB) image in the buffer, divide the red part by x, the green part by y, and the blue part by z.
** File and Temporary Image Arithmetic **
ADDFILE filename
Adds the contents of an OMA file of a given name to the data in the current image data buffer.
DIVFILE filename
Divides the data in the current buffer by the contents of the specified file.
MULFILE filename
Multiplies the contents of the current data buffer by the contents of the specified file.
SUBFILE filename
Subtracts the contents of the specified file from the data in the current buffer.
ADDTMP n
Adds the contents of temporary image n to the data in the current image data buffer.
DIVTMP n
Divides the data in the current buffer by the contents of temporary image n.
MULTMP n
Multiplies the contents of the current data buffer by the contents of temporary image n.
SUBTMP n
Subtracts the contents of temporary image n from the data in the current buffer.
** Accumulator Arithmetic **
ACCUMULATE
Allocates and clears memory for a 32-bit image accumulator buffer that can be used to sum individual images. The size of the accumulator is determined by the scan parameters when the accumulate command is first given.
ACADD
Adds the current image data buffer to the accumulator buffer.
ACGET
Moves the data from the accumulator buffer into the current image data area. The previous contents of the image data buffer are destroyed.
ACDELETE
Frees the memory associated with the accumulator.
** Variables and Simple Arithmetic **
VARIABLES
Lists currently defined variables and their values. Variables are defined using simple arithmetic expressions, such as
my_var = 10
or
y = my_var*2
The values of variables are accessed from other commands using @my_var. For example,
+ @my_var
or
save datfile_@4myvar
As with loops, the end of a variable can be tagged by adding a '\' For example,
save datfile_@my_var\_corrected
See also commands FLOAT and INTVARIABLE
FLOAT variable_name
Specifies that variable_name is to be used as a floating point variable.
INTVARIABLE variable_name
Specifies that variable_name is to be used as an integer variable.