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

read_xrit.h

Go to the documentation of this file.
00001 /* read_xrit.h */
00002 
00003 /* 
00004    Copyright (C) 2005 Fabrice Ducos <fabrice.ducos@icare.univ-lille1.fr>
00005    This file is part of the LibXRIT Library.
00006 
00007    The LibXRIT Library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011 
00012    The LibXRIT Library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Lesser General Public License for more details.
00016 
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with the LibXRIT Library; if not, write to the Free
00019    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00020    02111-1307 USA.
00021 
00022 */
00023 
00028 #ifndef READ_XRIT_H
00029 #define READ_XRIT_H
00030 
00031 #include <stdint.h>
00032 #include "libxrit_types.h"
00033 #include "libmsg_sp_types.h"
00034 
00035 #define XRIT_HEADERSIZE 16
00036 #define XRIT_NROWS 3712
00037 #define XRIT_NROWS_PER_SEG 464
00038 #define XRIT_NCOLUMNS 3712
00039 #define XRIT_HRV_NROWS 11136
00040 #define XRIT_HRV_NCOLUMNS 5568
00041 #define XRIT_MAXROW ( XRIT_NROWS - 1 )
00042 #define XRIT_MAXCOLUMN ( XRIT_NCOLUMNS - 1 )
00043 #define XRIT_SEGMENTSIZE XRIT_NROWS_PER_SEG*XRIT_NCOLUMNS
00044 
00045 enum { XRIT_LOW_RES, XRIT_HIGH_RES };
00046 
00047 /* structures for file header data */
00048 
00049 typedef struct xrit_header_struct xrit_header_t;
00050 
00051 struct xrit_header_struct {
00052   xrit_header_t *next;
00053   uint8_t header_type;
00054   uint16_t header_record_len;
00055   union {
00056     xrit_prim_header_t primary;
00057     xrit_image_struct_t image_struct;
00058     xrit_image_navig_t image_navig;
00059     xrit_data_func_t data_func;
00060     xrit_annotation_t annotation;
00061     xrit_time_stamp_t time_stamp;
00062     xrit_ancillary_text_t ancillary_text;
00063     xrit_key_header_t key_header;
00064     xrit_segment_id_t segment_id;
00065   } content;
00066 };
00067 
00068 typedef struct xrit_rows_infos_struct xrit_rows_infos_t;
00069 
00070 struct xrit_rows_infos_struct {
00071   time_t time[XRIT_NROWS];
00072   uint8_t validity[XRIT_NROWS];
00073   uint8_t radiometric_validity[XRIT_NROWS];
00074   uint8_t geometric_validity[XRIT_NROWS];
00075 };
00076 
00077 enum { XRIT_NORTH_AT_TOP, XRIT_SOUTH_AT_TOP };
00078 
00087 extern void xrit_orientation(int orientation);
00088 
00105 extern int read_xrit(const char *filename, uint16_t *counts, int *isegment, xrit_header_t **xrit_header,
00106               xrit_rows_infos_t *rows_infos, MSG_Prologue *prologue, MSG_Epilogue *epilogue);
00107 
00112 extern void free_xrit_header(xrit_header_t *xrit_header);
00113 
00120 extern void print_xrit_header(xrit_header_t *xrit_header);
00121 
00122 #endif

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