ldgrleigh(3)

LIBRARY ROUTINE
ldgrleigh - Creates a Rayleigh distributed noise data set.

LIBRARY CALL
#include "vinclude.h"
int ldgrleigh(image,numvec,numpts,variance,type,procdir)
    struct xvimage **image;
    int    numvec,numpts,procdir,type;
    float  variance;

INPUT

image
    as an optional input, this argument can be used to pass the pointer to the parameter "kernel", if this argument is NULL, then the parameter option is not used.

numvec
    number of data vectors

numpts
    number of points per data vector

variance
    variance of data set

type
    data type of output image. This must be either VFF_TYP_FLOAT or VFF_TYP_COMPLEX.

procdir
    process direction. This can be either 0 for vector processing or 1 for band processing.

OUTPUT

image
    holds the result of the data generation. The output data type is the same as the input data type.

return Value:
    1 on success, 0 on failure.

MODIFICATIONS

DESCRIPTION
creates a one dimensional Rayleigh distributed noise data set. The user can specify the variance and signal dimensions.
If a "value file" is specified, it will contain a kernel that describes the signal ensemble to be generated. This is an viff format file. The information will be contained in a single vector of float type information. The row and column size information is irrelevant. The format of the information is as follows:
[<variance>]
where each item enclosed in triangular brackets represents a single float. The information set in square brackets is repeated as a group one per vector.
For example if 2 vectors are specified, and the first vector has a variance of 1.0, the second vector has a variance of 6.0, the "parameter file" will look like this:
band #1: 1.0 6.0
The advantage of this "parameter file" is that it allows the creation of an ensemble of 1D signals that are independant of each other. Number of data sets, number of points per data set, data type, and process direction must be entered on the command line, or the defaults can be taken. If more data sets are requested than are specified in the parameter file, then an error will occur. If fewer data sets are requested than are specified, then the unused parameters will be ignored.
The resulting images may be of type FLOAT or COMPLEX.
Data can be processed with either band or vector orientation. The default data processing direction is in the vector direction. This means that data stored in multiband format will be processed as a set of data sequences, where each sequence corresponds to a pixel location, and the points of each sequence are defined by the bands corresponding to that pixel location. The direction of processing can be changed so that each band is processed as a signal (instead of each vector being a signal) by setting the -d option to 1.

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

RESTRICTIONS
can only generate VFF_TYP_FLOAT and VFF_TYP_COMPLEX type images.

AUTHOR
Jeremy Worley

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