#include "worgen.h"
FUNCTION c_pxsub (ns, in1, in2, out, scale1, scale2, offset, dtype)
long *ns; unsigned char *in1; unsigned char *in2; unsigned char *out; float *scale1; float *scale2; float *offset; long *dtype;
The number of pixels to be subtracted.
An array of pixel values to subtract from.
An input array of pixel values to subtract.
An array created by scaling, subtracting, and offsetting the two input arrays.
out = in1 x scale1 - in2 x scale2 + offset
The scale factor to be applied to in1subtraction.
The scale factor to be applied to in2subtraction.
An offset added to the calculation after the subtraction.
An integer value that represents the type of data to be subtracted. The output array is of the same data type as the input arrays. Legal values include:
= EBYTE(1): unsigned byte data = EWORD(2): signed two byte data = ELONG(3): signed four byte data = EREAL(4): four byte floating point data
The c_pxsub() call is used to create an output array out by scaling, subtracting, and offsetting the values of ns samples of two input pixel arrays in1 and in2 of type dtype.
c_pxsub() returns
E_SUCC --> successful completion TOOBIG --> exceeded upper limit of data type TOOSMALL --> exceeded lower limit of data type TYPERR --> invalid data type specified