Each section below describes a family of vops operators related by functionality. Each operator (procedure) is implemented with the same root name and calling sequence for several data types. However, not all operators are implemented (nor do they make sense) for every data type. The tables list the root procedure name, implemented data types, calling sequence, and description of the operation. All of the functions require an int argument that specifies the number of elements in the passed vector or vectors. If the procedure requires more than one vector, they are assumed to have the same number of elements. In nearly every case, multiple array arguments to vops procedures are also the same data type. A significant exception is achtTT(), which converts a vector of one data type to another vector of a different data type.
All vector operations may be performed in place. That is, the same array may be used on input as well as output. An array passed to a vector procedure need not be one-dimensional. In all cases, the vectors are treated simply as contiguous words. Since there is assumed to be no functional relationship among the pixel positions in the vectors, arrays of any dimensionality may be passed. Only the total number of pixels in the array need be passed to the vops procedure. Many procedures are implemented for the case of two vectors or a vector and a scalar. In the latter case, the procedure name has a k inserted before the last character (the initial of the data type) and one argument must be a constant or scalar variable.
Generated with CERN WebMaker
These procedures implement basic arithmetic operations. The binary operators (add, subtract, multiply, and divide) include operations between two vectors or between a vector and a scalar. In the former case, each element of the output vector is the result of the operation on the corresponding elements of the input vectors. In the second case, each element of the output vector represents the result of the operation between the corresponding element of the input vector and the same scalar.
Table 2.48: Arithmetic Functions.
Each of these procedures is implemented for the following data types:
complex. To use the appropriate data type, replace T with the representative of the data type name,
aaddki(), for example. Most of these are the first character of the data type, except for
complex, whose representative character is
x. The last procedure,
(), implements dividing vectors, but upon dividing by zero it calls
errfcn(), supplied by the application as an external function.
Bitwise Boolean operators
These procedures perform boolean operations on integer arrays, returning the same type result. The resulting vector is the result of the boolean operation on each bit of each element of the arrays.
Table 2.49: Bitwise Boolean Operators.
All of the above procedures are implemented only for the integer data types:
These procedures return an int array containing the result of the logical comparison between elements of the input vectors. If the result of the comparison is true, the value in the vector is one, otherwise, it is zero.
Table 2.50: Logical Comparison Functions.
All of the above are implemented for the range of SPP data types:
complex. Note, however, that the output vector,
c is always an
Fundamental Array Operators
These procedures implement various basic array operations. The achtTT() procedure is unique in that the input and output vectors are of different data types. It requires two data type specifiers (t) for the input and output vectors.
Table 2.51: Fundamental Array Operators.
All of the above are implemented for the full range of SPP data types:
complex. In addition,
() is implemented for unsigned byte
b and unsigned short
u types. These are used primarily in low-level image I/O (imio) code.
() is also implemented for byte.
These procedures implement various functions. The log and square root functions include an external function passed to the procedure that sets the returned value in the case of an invalid function result such as xd6 -1.
Table 2.52: Algebraic Operators.
All of these procedures are implemented for the data types:
complex, except the modulus functions
(), which are not implemented for
These procedures involve complex operators, but involve not only complex arguments.
Table 2.53: Complex Operators.
() is implemented only for
complex arrays. The first argument to
() must be a
complex array. The last argument to
() must be a
Table 2.54: Fourier Transforms.
The transform may be performed in place. The size of the arrays must be a power of two.
Table 2.55: Transformations.
Table 2.56: Miscellaneous Procedures.
These procedures return a scalar value from computation upon a vector. In most cases, the data type of the function, vector or vectors, and the returned value must match. Exceptions are
awvgt(), in which the returned value is the number of points remaining in the sample after rejection.
Table 2.57: Scalar Results.
Generated with CERN WebMaker