lvgconst(3)

LIBRARY ROUTINE
lvgconst - Creates an image with constant pixel values.

LIBRARY CALL
#include "vinclude.h"
int
lvgconst (image, rows, cols, type, real, imag, bands)
struct xvimage **image;
int rows, cols, type, bands;
float real, imag;

INPUT
Input to lvgconst :

image
    pointer to VIFF structure containing image data to be processed.

rows
    number of rows in output image.

cols
    number of columns in output image.

type
    Uses the data storage type convension from the defines in the viff header. VFF_TYP_1_BYTE = char, VFF_TYP_2_BYTE = short, VFF_TYP_4_BYTE = int, VFF_TYP_FLOAT = float, VFF_TYP_COMPLEX = complex, VFF_TYP_DOUBLE = double, and VFF_TYP_DCOMPLEX = dcomplex.

real
    specifices the constant value (level) for the real part

imag
    specifices the constant value for the imaginary part.

bands
    defines the number of data bands for the resulting image.

OUTPUT
Output from lvgconst :

image
    pointer to VIFF structure containing image data after processing.

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS
Modifications to lvgconst :

7-Feb-91 Scott Wilson - Added DOUBLE and DCOMPLEX data types.

DESCRIPTION
lvgconst : creates an image of dimension rows * columns * bands. The image pixel values are constant. The user can specify the constant value (level).

This routine will create multiband images and works with data types BIT, BYTE, SHORT, INT, FLOAT, DOUBLE and COMPLEX, and DCOMPLEX.

For byte type images:
If the level value specified by user is greater than 255, the level value will be scaled down to 255. If the level specified by user is less than 0, the level value will by scaled up to 0.

The resulting images may be of type byte, short, int or float, or complex.

SEE ALSO
vgconst(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
does not support transformed images.

AUTHOR
Marcelo Teran, Ramiro Jordan, Tom Sauer

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.