lvrtoc(3)

LIBRARY ROUTINE
lvrtoc - Convert REAL data to COMPLEX form

LIBRARY CALL
#include "vinclude.h"
lvrtoc(image1,image2,type)
struct xvimage *image1,*image2;
int type;

INPUT

image1
    pointer to xvimage structure to be processed

image2
    optional pointer to second xvimage structure (leave NULL otherwise)

type
    selects the type or REAL to COMPLEX conversion

OUTPUT

image1
    receives the output xvimage structure

Result Value:
    1 on success, 0 on failure

MODIFICATIONS

9-Mar-92 Scott Wilson Added DOUBLE support.

DESCRIPTION
lvrtoc performs simple conversions of REAL data to COMPLEX form. A non-COMPLEX image is transformed into a COMPLEX image by one of four methods:

1   Move the first input image into the real part of the complex output image. If a second input image is present, then move it into the imaginary part - otherwise leave the imaginary part as zero.

2   Move the first input image into the imaginary part of the complex output image. If a second input image is present, then move it into the real part - otherwise leave the real part as zero.

3   Move the first input image into the magnitude part of the complex output image. If a second input image is present, then move it into the phase part - otherwise leave the phase part as zero.

4   Move the first input image into the phase part of the complex output image. If a second input image is present, then move it into the magnitude part - otherwise leave the magnitude part as one.

Note that image1 is used for both the input xvimage structure and the resulting output xvimage structure. This is done to save space, but you must be careful not to overwrite important data.

SEE ALSO
vrtoc(1), intro(3), vipl(3), verror(3), vutils(3) vctor(1),vconvert(1)

RESTRICTIONS
Input images must not be BIT, COMPLEX, or transform types, and must have no map.

AUTHOR
Scott Wilson

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