lvect2band(3)

LIBRARY ROUTINE
lvect2band - reformats data stored in vector format to a file where each vector is represented as a single band in the output file.

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

INPUT

*image
    pointer to the input/output xvimage structure

OUTPUT

*image
    pointer to the input/output (struct xvimage)

MODIFICATIONS
24-Jan-91 Scott Wilson - Removed restriction that the input image be a single row image. I don't think this restriction was intended originally but it was there anyway. The output image now contains one band for each vector (pixel) in the input image regardless of the number of rows. The bands are generated in scan-line order of the vectors in the input image.

DESCRIPTION
lvect2band rearranges the data stored in vector format to a file where each vector of the input file is represented as a single band in the output file. The number of pixels in each band of the output image is determined by the dimension of each vector (ie. number of bands) in the input image. The number of rows in the output image is set by the value of the subrow size of the input image. The number of columns in each band of the output image is found by dividing each input vector (pixel) by the subrow size. The number of bands in the output image is determined by the number of vectors (rows*cols) of the input file.

For example, if an input file contained 5 vectors (pixels) of dimension 20 with a subrow size of 2, then the output file would contain a 5 band image with each band comprised of 2 rows and 10 columns.

The data storage type of the output image will be of the same type as the input image. This routine will accept any data storage type, except BIT.

The valid map schemes are NONE and SHARED. Map schemes of CYCLE and GROUP are not supported at this time. Note that a map scheme of GROUP may be appropriate for this transformation, but is not yet defined. A map scheme of GROUP could be used to define a map for a pixel that is represented as a vector.

Valid combinations of map scheme and map enable include:

    map scheme of SHARED with map enable of FORCE or OPTIONAL

    map scheme of NONE with map enable of OPTIONAL

The map may be removed from an image by using "vremmap", or the data may be mapped through the map using "vmapdata" prior to using this routine.

The argument, image represents the input/output viff image structure.

SEE ALSO
vect2band(1), intro(3), vipl(3), verror(3), vutils(3) dunload_vector(3), load_vector(3), vremmap(1), vmapdata(1), lband2vect(3).

RESTRICTIONS
Will not operate on VFF_TYP_BIT data files.

Will not work with a map_scheme of ONEPERBAND, CYCLE, or GROUP.

AUTHOR
Charlie Gage

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