CIGAL Reference Manual, Chapter 2 (Commands): READ
usage: read file [ varb flag recsize hdrbytes wordsize ]
READ is used to read binary data from a disk file into a CIGAL variable. This command reads data a block at a time with no format conversion. The FILE argument specifies which disk file is to be read, and the VARB argument indicates where the data are stored. The READ command transfers enough records to fill VARB, or until the end of the disk file.
The arguments to READ are:
The file argument is required. FILE can either be a character string giving the name of the disk file explicitly, or it can be a number in which case the file name is generated by appending that number to the character string in the DATADIR internal variable (see DATADIR(4)). An error message will appear if READ cannot find a disk file with the specified name. See FILES(1) for more general information on accessing disk files from CIGAL.
The target variable can be any ARRAY, MATRIX, IMAGE, or SOLID variable, or a subset of any of these variables (see VARIABLES(1) and SUBSCRIPTS(1)). If you are using an image processor, then VARB can also be a number in which case it is assumed to refer to one of the numbered image memory planes within the image processor hardware (see IMAGING(1) and DEVICES(1)).
If the target variable is not specified, the READ command will assume the current display image. If you have an image processor and it has been initialized, then the current display image is the active memory of the image processor (see IPLANE(4)). Otherwise, the current display image is the terminal's video screen if you are in graphics mode, or null if you are in text mode (see GRAPHICS(1)).
Normally, READ's format is taken from the header block of the data file. This can be overridden with the FLAG argument, as:
FLAG = 1-7 Read data in "packed" format (see [WRITE]). 70o File format: 10o Short CIGAL modified TIFF format (default) 20o Standard TIFF format 30o BITMAP format 40o PICT format (not implemented yet) 70o Pitt fMRI format 100o Don't treat first block as header block 200o Reverse byte order (e.g. for TIFF files)
The number of 8-bit bytes to be transferred in each I/O record. The default record size is 4096 bytes. This argument is ignored if the target VARB already has a record size set (see POINTER(3)).
The number of bytes to skip at the beginning of the disk file. Default is 0.
The number of bytes per word in the disk file. Default is 1.
DATADIR(4), DEVICES(1), FILES(1), GRAPHICS(1), IMAGING(1), INPUT(2), IPLANE(4), OUTPUT(2), POINTER(3), SUBSCRIPTS(1), VARIABLES(1), WRITE(2)