multiply
[ XITE Reference Manual | XITE home ]
Name
multiply, fftMult - multiply two bands pixel by pixel
Syntax
#include <xite/arithmetic.h>
int multiply( IBAND band1, IBAND band2,
IBAND output, double scale );
#include <xite/fft.h>
int fftMult( IC_BAND in_band1,
IC_BAND in_band2, IC_BAND out_band );
Description
multiply calculates, pixel by pixel, the product
of band1, band2, and scale, and assigns the result
to output.
output(x,y) = band1(x,y) * band2(x,y) * scale
Resulting values outside the domain of the actual
pixel type of output is truncated to the nearest legal value.
fftMult is retained for compatibility with previous XITE
versions. It is a macro call to multiply with scale equal
to 1.0.
Restrictions
All pixel types are accepted, as long as all three
bands have the same pixel type. There are two exceptions:
band2 may be real if band1 and band3 are complex, and
band2 may be double if band1 and band3 are double
complex.
Only the largest rectangle common to all three bands
is multiplied.
Return value
Status, 0 => ok
1 => Illegal combination of pixel types
2 => Unknown pixel type
See also
multiply(1), divide(3), absDiff(3), signDiff(3), addw(3),
average(3), scale(3)
Author
Tor Lønnestad, BLAB, Ifi, UiO
Modified
Svein Bøe, BLAB, Ifi, UiO (allowed combinations of complex
times real and double complex times double - this takes care
of the capabilities of fftMult).
Id
$Id: multiply.c,v 1.35 1997/05/27 14:46:30 svein Exp $