Main Page   File List   Globals  

vop.c File Reference

vop - perform arithmetic and logical operations on images. More...


Detailed Description

vop - perform arithmetic and logical operations on images.

Description
vop performs arithmetic and logical operations on image pixels. It has three modes:

1. It can perform a unary (single-operand) operation on each pixel of an input image.

2. It can perform a binary (two-operand) operation between each pixel of an input image and a scalar value.

3. It can perform a binary (two-operand) operation between each pixel of an input image and the corresponding pixel of a second image. The mode, operation, and operands are specified by command line options. Input images come from a data file; the specified operation is performed on each to pro­ duce an output image of the same properties.

When the operation is a binary one between two images (case 3, above), the second input comes from a separate file, and it may have the same number of bands as the first input image, in which case band i of the output image is formed from band i of both input image; or formed from band i of the first input image and band 0 of the second.

By means of the -min and -max options, you can specify bounds for clipping output pixel values.

When -op specifies a binary operation, either -image or -value must be specified. The and, or, and xor operations can only be performed with images having integer pixel representations (not float or double). A floating point result (such as what exp produces) is rounded to the nearest inte­ ger for storing in an integer output pixel. Clipping of output pixel values and arithmetic exceptions are reported by means of warning messages.

Usage
vop
Parameters:
-in  Specifies a Vista data file containing the input images. These images serve as the first operand of a binary operation, or the only operand of a unary one.
-out  output image
-op  Specifies the operation. Possible values: abs,exp,log,not,sqrt,square,add,and,dist,div,max,min,mult,or,sub,xor
-value  Specifies a scalar constant to be used as the second operand of a binary operation.
-image  Specifies a Vista data file containing a single image to serve as the second operand of a binary operation.
-min  Sets a lower bound for clipping output pixel values. Default: the minimum value that can be represented by an output pixel.
-max  Sets an upper bound for clipping output pixel values. Default: the maximum value that can be represented by an output pixel.
Examples

Known bugs
none.
Author:
Ralph Horstmann, UBC Laboratory for Computational Intelligence

Generated on Tue Nov 23 09:50:52 2004 for VIA - Volumetric Image Analysis by doxygen1.2.15