square
[ XITE Reference Manual | XITE home ]
Name
square - take the square of each pixel value
Syntax
#include <xite/arithmetic.h>
int square( IBAND input, IBAND output,
double scale );
Description
square squares the input band into the output band:
output(x,y) = input(x,y) * input(x,y) * scale
Only the largest rectangle common to the two bands
is squared.
Accepts all pixel types, but input and output must have the
same pixel type, otherwise use convertBiff. If the result is
outside the domain of the actual pixel type, the nearest
possible value is returned.
Identical arguments for input and output are allowed.
Return value
0 => ok
1 => Illegal combination of pixel types
2 => Unknown pixel type
See also
square(1), squareRoot(3), phase(3), power(3), absValue(3),
imag(3), real(3), scale(3), multiply(3), divide(3),
convertBand(3)
Author
Tor Lønnestad, BLAB, Ifi, UiO
Id
$Id: square.c,v 1.30 1997/05/27 14:46:25 svein Exp $