Main Page | Class List | File List | Class Members | File Members

read_xrit.h File Reference

#include <stdint.h>
#include "libxrit_types.h"
#include "libmsg_sp_types.h"

Go to the source code of this file.

Classes

struct  xrit_header_struct
struct  xrit_rows_infos_struct

Defines

#define XRIT_HEADERSIZE   16
#define XRIT_NROWS   3712
#define XRIT_NROWS_PER_SEG   464
#define XRIT_NCOLUMNS   3712
#define XRIT_HRV_NROWS   11136
#define XRIT_HRV_NCOLUMNS   5568
#define XRIT_MAXROW   ( XRIT_NROWS - 1 )
#define XRIT_MAXCOLUMN   ( XRIT_NCOLUMNS - 1 )
#define XRIT_SEGMENTSIZE   XRIT_NROWS_PER_SEG*XRIT_NCOLUMNS

Typedefs

typedef xrit_header_struct xrit_header_t
typedef xrit_rows_infos_struct xrit_rows_infos_t

Enumerations

enum  { XRIT_LOW_RES, XRIT_HIGH_RES }
enum  { XRIT_NORTH_AT_TOP, XRIT_SOUTH_AT_TOP }

Functions

void xrit_orientation (int orientation)
int read_xrit (const char *filename, uint16_t *counts, int *isegment, xrit_header_t **xrit_header, xrit_rows_infos_t *rows_infos, MSG_Prologue *prologue, MSG_Epilogue *epilogue)
 loads a buffer with an MSG/SEVIRI radiances XRIT file reads a file containing MSG radiances 2-bytes counts and stores them in the 'counts' buffer. Only the 'filename' argument is mandatory. The other ones may be set to NULL if they are not to be used. If xrit_header is not set to NULL, it shall have to be freed by free_xrit_header

void free_xrit_header (xrit_header_t *xrit_header)
 frees the 'xrit_header' linked list returned by read_xrit

void print_xrit_header (xrit_header_t *xrit_header)
 prints each element of the 'xrit_header' linked list (useful for debugging purposes)


Detailed Description


Define Documentation

#define XRIT_HEADERSIZE   16
 

#define XRIT_HRV_NCOLUMNS   5568
 

#define XRIT_HRV_NROWS   11136
 

#define XRIT_MAXCOLUMN   ( XRIT_NCOLUMNS - 1 )
 

#define XRIT_MAXROW   ( XRIT_NROWS - 1 )
 

#define XRIT_NCOLUMNS   3712
 

#define XRIT_NROWS   3712
 

#define XRIT_NROWS_PER_SEG   464
 

#define XRIT_SEGMENTSIZE   XRIT_NROWS_PER_SEG*XRIT_NCOLUMNS
 


Typedef Documentation

typedef struct xrit_header_struct xrit_header_t
 

typedef struct xrit_rows_infos_struct xrit_rows_infos_t
 


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
XRIT_LOW_RES 
XRIT_HIGH_RES 

anonymous enum
 

Enumeration values:
XRIT_NORTH_AT_TOP 
XRIT_SOUTH_AT_TOP 


Function Documentation

void free_xrit_header xrit_header_t xrit_header  ) 
 

frees the 'xrit_header' linked list returned by read_xrit

Parameters:
xrit_header a pointer to an xrit_header structure filled by read_xrit (if the xrit_header argument of read_xrit has been used)

void print_xrit_header xrit_header_t xrit_header  ) 
 

prints each element of the 'xrit_header' linked list (useful for debugging purposes)

a debugging purpose function that prints infos about headers found in an XRIT file

Parameters:
xrit_header pointer to an xrit_header structure filled by read_xrit (if the xrit_header argument of read_xrit has been used)

int read_xrit const char *  filename,
uint16_t *  counts,
int *  isegment,
xrit_header_t **  xrit_header,
xrit_rows_infos_t rows_infos,
MSG_Prologue prologue,
MSG_Epilogue epilogue
 

loads a buffer with an MSG/SEVIRI radiances XRIT file reads a file containing MSG radiances 2-bytes counts and stores them in the 'counts' buffer. Only the 'filename' argument is mandatory. The other ones may be set to NULL if they are not to be used. If xrit_header is not set to NULL, it shall have to be freed by free_xrit_header

read_xrit:

Parameters:
filename the name of the XRIT file to read
counts must be allocated by the user (with XRIT_NROWS*XRIT_NCOLUMNS*sizeof(uint16_t) bytes)
isegment a pointer to an int that will be filled with the index of segment to extract from the file (put it to NULL to extract all the segments, or set isegment to 0. Otherwise, isegment must be filled with a value between 1 and 8).
xrit_header a linked list containing the headers for each segment: give the adress to an (xrit_header_t *) object
rows_infos an xrit_rows_infos_t pointer that must be allocated by the user (or NULL if not used)
prologue a pointer to a MSG_Prologue structure that will be filled if prologue is not NULL
epilogue is a pointer to a MSG_Epilogue structure that should be filled if epilogue is not NULL. For the time being, the MSG_Epilogue structure is not implemented, so don't use this argument (set it to NULL).
Returns:
the number of processed segments on success, a negative value on failure

void xrit_orientation int  orientation  ) 
 

Parameters:
orientation may be
XRIT_NORTH_AT_TOP
the image will be written from north to south
XRIT_SOUTH_AT_TOP
it will be written from south to north
This function must be used BEFORE any call to read_xrit


Generated on Wed Oct 19 13:55:57 2005 for LibXRIT by doxygen 1.3.5