home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
swCHIP 1991 January
/
swCHIP_95-1.bin
/
demo
/
wit4711
/
lib
/
help
/
point
/
aluop.
/
aluop.bin
Wrap
Text File
|
1995-12-09
|
2KB
|
51 lines
OPERATOR
aluOp --- perform alu operations on two images
DESCRIPTION
The aluOp performs basic binary operations given two input images, A and B .
Supported operations are:
+ - A + B
- - A - B
* - A * B
/ - A / B
| - logical OR of A and B
& - logical AND of A and B
^ - logical XOR of A and B
src - use B where defined, else use A
overlay - use B if (B & overlayMask), else use A
expression - utilize expression to determine result
Each pixel of the output is determined by performing the indicated operation
on the corresponding pixels in image A and image B . Image A and B do not
need to be the same size. The behavior of the output when A and B are of
different sizes is determined by the sizeOp parameter:
constrain - B must be contained in A
clip B - B is clipped to fit in A
expand A - A is expanded to include B
The offset parameter may be given to offset image B during the ALU operation.
The expression field allows the user to specify a C style mathematical
equation which will determine the output image. The top input image can be
specified in this equation using the variable A while the bottom image is
specified using B. The result for each pixel can be affected by that pixel's
particular column and row using the X and Y variables respectively. For
example, the expression (Y >= 5) ? A : B will produce an output image where
the first 5 rows are identical to the first five rows of B. Otherwise, the
output image corresponds to A. For more on the expression syntax and use see
calc .
The outputType parameter allows the user to specify the type of WIT image
produced by aluOp. The default option causes a default output image type to
be selected according to the following criterion.
Input Image Types Output Image Type
- if either input is float - output is float
- otherwise, if either input is 16 bit - output is 16 bit
- if either input is signed - output is signed
- if operation is '-' or 'expr' - output is signed