Functions for run length decoding


Functions

int rldec_to_file (char *outfile, varfl *vals, int depth, int *nvals)
 Decodes a BUFR-runlength-encoded radar image to a file.
int rldec_to_mem (varfl *vals, unsigned short **img, int *nvals, int *nrows, int *ncols)
 Decodes a BUFR-runlength-encoded radar image to memory.
void rldec_decompress_line (varfl *vals, unsigned int *dest, int *ncols, int *nvals)
 Decodes one line of a radar image from BUFR runlength-code.
void rldec_get_size (varfl *vals, int *nrows, int *ncols)
 Gets the number of rows and columns of a runlength compressed image.

Function Documentation

int rldec_to_file ( char *  outfile,
varfl vals,
int  depth,
int *  nvals 
)

This function decodes a BUFR-runlength-encoded radar image stored at vals. The decoded image is stored in a "\p depth byte-per-pixel-format" at the file outfile. Currently depth can be one or two bytes per pixel. In case of two bytes per pixel data is stored in "High byte - low byte order". So pixel values 256 257 32000 are represented by 0100 0101 7D00 hex.

Parameters:
[in] outfile Destination-file for the radar image.
[in] vals Float-array holding the coded image.
[in] depth Number of bytes per pixel
[out] nvals Number of varfl values needed for the compressed radar image.
Returns:
The return-value ist 1 on success, 0 on a fault.
See also:
rldec_to_mem, rldec_decompress_line, rlenc_from_file

Definition at line 469 of file rlenc.c.

int rldec_to_mem ( varfl vals,
unsigned short **  img,
int *  nvals,
int *  nrows,
int *  ncols 
)

This function decodes a BUFR-runlength-encoded radar image stored at vals. The decoded image is stored in an array img[] which will be allocated by this function if img[] = NULL. The memory for the image must be freed by the calling function!

Parameters:
[in] vals Float-array holding the coded image.
[in,out] img Destination-array for the radar image.
[out] nvals Number of varfl values needed for the compressed radar image.
[out] nrows Number of lines in image
[out] ncols Number of pixels per line
Returns:
The return-value ist 1 on success, 0 on a fault.
See also:
rlenc_from_mem, rldec_to_file, rldec_decompress_line
Examples:
apisample.c.

Definition at line 652 of file rlenc.c.

void rldec_decompress_line ( varfl vals,
unsigned int *  dest,
int *  ncols,
int *  nvals 
)

This function decodes one line of a radar image from BUFR runlength-code and stores the resulting values to array dest which has to be large enough to hold a line.

Parameters:
[in] vals Float-array holding the coded image.
[out] dest Is where the uncompressed line is stored.
[out] ncols Number of pixels per line.
[out] nvals Number of values needed for compressed line.
See also:
rlenc_compress_line_new

Definition at line 855 of file rlenc.c.

void rldec_get_size ( varfl vals,
int *  nrows,
int *  ncols 
)

This function gets the number of rows and colums of a runlength compressed image stored at array vals

Parameters:
[in] vals Float-array holding the coded image.
[out] nrows Number of lines in image.
[out] ncols Number of pixels per line.
See also:
rldec_to_file, rldec_decompress_line

Definition at line 908 of file rlenc.c.


Generated on Tue Dec 18 16:52:45 2007 for OPERA BUFR software by  doxygen 1.5.4