lviff2mat(3)

LIBRARY ROUTINE
lviff2mat - viff2mat - outputs a matrix in desired form.

LIBRARY CALL
#include "vinclude.h"
int lviff2mat(filename,image,style,numcols,delimiter,bracket,errnum)
    char *filename,*style;
    struct xvimage *image;
    int numcols,delimiter,bracket,*errnum;

INPUT

fname
    specify ouput file

image
    input matrix image to operate on.

style
    input the control string for style of output. In normal C style format control string for printf. ex: %-5.2f specifies left justified floating point number with a total
                size of 5 spaces with 2 for the fractional part. Note: Does not include hexidecimal or octal output format.

numcols
    the number of columns per line.

delimiter
    the type of element delimiter. 0-> space 1-> comma

bracket
    determines the type of bracket used in the matrix. 0-> "[ ]" 1-> "< >"

OUTPUT

errnum
    errnum returns an error number which specifies the reason for failure. 1-> Output file name not specified. 2-> Matrix parameter is empty. 3-> Rows or Cols value is invalid. 4-> Style string not specified. 5-> Number of Cols specification invalid. 6-> Invalid element delimiter specified. 7-> Invalid bracket type specified. 8-> Can't open output file.

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS

Jeremy Worley 16 Aug 1991 08:30 MDT
    Changed an expression that caused the multiband images to get translated incorrectly.

Jeremy Worley 19 Mar 1992 17:40 MST
    Added/changed necessary code to deal with transport capabilities in vgparm. Also fixed a bug wherein the kfile was closed after each matrix was output.

DESCRIPTION

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

RESTRICTIONS

AUTHOR
Matthew Lawrence,Jeremy Worley

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