#include "worgen.h" #include "dltf.h" #include "vll.h"FUNCTION c_r2dltf (fd, key, band, startpt, endpt, dlen, lutdata, slope, offset)
long *fd; char *key; long *band; long *startpt; long *endpt; long *dlen; unsigned char *lutdata; double *slope; double *offset;
File descriptor of an opened DLTF file. The file descriptor is set in c_r1dltf() and should not be altered.
DLTF entry name. Note that the length of the key is limited to twelve characters even though the file format allows sixteen. This is because LUT numbers are appended to the key value to form the names of the second type of DLTF records. Thus, the twelve characters with the maximum appended three characters plus one for the null become the sixteen character maximum allowed in the key field of label services.
Band number of the DLTF entry to be read. This number is used to determine the corresponding LUT number of the DLTF entry.
Starting point of the LUT. This value corresponds to the first entry in the LUT data.
Ending point of the LUT. This value corresponds to the last entry in the LUT data.
Length of the data portion of the second type of DLTF record.
Buffer for the data portion of the DLTF entry. The length of this field is dependent on the size of the data portion of the second DLTF entry. This block of memory must be previously allocated using the dtlen parameter of the c_r1dltf() routine.
Slope of the LUT. The slope of the LUT in the DLTF entry. This value is used in conjunction with the offset to expand LUTs saved as BYTE to their full I*2 range using inverse scaling and interpolation.
Offset of the LUT. The offset of the LUT in the DLTF entry. This value is used in conjunction with the slope to expand LUTs saved as BYTE to their full I*2 range using inverse scaling and interpolation.
The c_r2dltf() routine is designed to read the second type of record and return the fields of the second type of record as output parameters.
c_r2dltf() returns
E_SUCC (0) --> successful completion E_FAIL (-1) --> operation failed