MAN page from RedHat Other XITE-3.3-3.i386.rpm
ASCII2BIFF
Section: C Library Functions (3)
Updated: 16 Mar 1998
Index
NAME
ascii2biff - convert an ascii file to BIFF format
SYNTAX
#include <
xite/convert.h>
int ascii2biff( IBAND* band, char* asciifile,
IPIXTYP pixtyp );
DESCRIPTION
ascii2biffreads
asciifileand returns a
bandof
pixtyp.asciifile=
-or NULL means
stdin.If the file contains $size info, use this. Otherwise, countthe number of elements on each line. Does it look like anm x n matrix? If yes, assign m to ysize and n to xsize.Otherwise return an error message.
If pixtypis equal to Iunknown_typ, use the $typeinfo in the file, otherwise set type to signed short.
FILE FORMAT
The file is an ordinary ascii file. Comments start with a
#or a
;and stop at end of line. Blank lines or commentlines are ignored. Lines with $ in coloumn 1 is treated asspecial arguments. The format is
$<keyword> <1 or 2 arguments>
where <keyword> is one of "type", "size", "xsize", "ysize","start", "xstart", "ystart", "mag", "xmag" or "ymag".
The format for each <keyword> is:
$type <uns_byte | uns_short | sign_short | integer | real>
$size <xsize> <ysize>
$xsize <xsize>
$ysize <ysize>
$start <xstart> <ystart>
$xstart <xstart>
$ystart <ystart>
$mag <xmag> <ymag>
$xmag <xmag>
$ymag <ymag>
The keywords will be used as image band arguments. If the sizearguments are omitted, the size is calculated from theorganization of the file. Default start arguments are-(size/2), and default mag arguments are 1.
Pixels inside a line are separated by blanks. Lines areseparated by newline. If pixel type is uns_byte, uns_short,sign_short or integer, the special value -means lowest legalvalue, and +means largest legal value.
EXAMPLES
- Example 1
#
$ size 4 3
3 5 6 4 3 2
7 5 3 2 1 3
The resulting image:
#
# 3 5 6 4
# 3 2 7 5
# 3 2 1 3
#
- Example 2
#
3 5 6 4
3 2 7 5
3 2 1 3
The resulting image:
#
# 3 5 6 4
# 3 2 7 5
# 3 2 1 3
RETURN VALUE
0 - OK
1 - Not used
2 - Can't find file
3 - Bad pixeltype
4 - Bad xsize or ysize
5 - Can't calculate image size
6 - Not enough memory
AUTHOR
Otto Milvang
Index
- NAME
- SYNTAX
- DESCRIPTION
- FILE FORMAT
- EXAMPLES
- RETURN VALUE
- AUTHOR
This document was created byman2html,using the manual pages.