lvmapdata(3)

LIBRARY ROUTINE
lvmapdata - Maps the data through the map to create a new data set with no map.

LIBRARY CALL
#include "vinclude.h"
int
lvmapdata(image)
struct xvimage *image;

INPUT

image
    xvimage structure containing the data.

OUTPUT

image
    holds the result of the remapped data. The output data type is the will be that of the input map type.

MODIFICATIONS

10-Jan-91 -Scott Wilson : Fixed bugs in the map addressing that prevented this routine from ever working in SHORT, INT, or FLOAT map data.

11-Jan-91 - Scott Wilson : Added support for INT image data type

30-Jan-91 - Scott Wilson : Fix bugs regarding subrow size: map_subrow_size was being left alone instead of being transferred to subrow_size, which was always zero.

Tue Nov 12 19:24:41 MST 1991: John Rasure: Added calls to kfree() to free memory where appropriate and cleaned up documentation.

DESCRIPTION
lvmapdata maps the data through the maps. The result is a new data set with no maps associated with it. This routine operates on singel-band or multi-band images with map schemes of ONEPERBAND and SHARED.

If the map type is ONEPERBAND and there are 3 bands in the image, and each maps contains 2 columns, then the resulting image would contain 6 bands, one for each mapping.

lvmapdata operates on BYTE and INTEGER data only, the output will be the data type of the map; byte, short, long, or float. For example, a byte image with a float map will become a float image.

image is a pointer to a VIFF image structure containing the data to be mapped. image is also used to hold the result. The result may require that new memory be malloced and old memory be freed.

lvmapdata returns a value of one upon success and a zero on failure.

SEE ALSO
vmapdata(1), intro(3), vipl(3), verror(3), vutils(3) lvgamut(3), lvremmap(3), lvmapxfer(3), lvmsquish(3), lvprmap(3)

RESTRICTIONS
lvmapdata works only on byte and interger data, map schemes ONEPERBAND and SHARED are the only map schemes supported.

AUTHOR
Tom Sauer

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