00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CTA_METAINFO_H
00028 #define CTA_METAINFO_H
00029 #include "cta_system.h"
00030 #include "cta_handles.h"
00031 #include "cta_datatypes.h"
00032 #include "cta_functions.h"
00033 #include "cta_string.h"
00034 #include "cta_vector.h"
00035 #include "cta_matrix.h"
00036
00037
00038 typedef CTA_Handle CTA_Grid;
00039 typedef CTA_Handle CTA_Metainfo;
00040 typedef CTA_Handle CTA_MetainfoClass;
00041
00042 #include "cta_sobs.h"
00043
00044
00045 #define CTA_METAINFO_CREATE_SIZE ( 1)
00046 #define CTA_METAINFO_CREATE_INIT ( 2)
00047 #define CTA_METAINFO_FREE ( 3)
00048 #define CTA_METAINFO_GET_REST ( 4)
00049 #define CTA_METAINFO_GET_KEYS ( 5)
00050 #define CTA_METAINFO_COUNT_OBSERVATIONS ( 6)
00051 #define CTA_METAINFO_COUNT_PROPERTIES ( 7)
00052 #define CTA_METAINFO_EXPORT ( 8)
00053 #define CTA_METAINFO_NUMFUNC ( 9)
00054
00055
00056
00057
00058 typedef struct {
00059 char name[CTA_STRLEN_TAG];
00060 int type;
00061 int nx, ny, nz,nsize;
00062 double x_origin, y_origin, z_origin;
00063 double dx,dy,dz;
00064 char refdimp[10][80];
00065 } CTAI_Gridm;
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 #ifdef __cplusplus
00079 extern "C" {
00080 #endif
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092 CTAEXPORT int CTA_Metainfo_DefineClass(const char *name,
00093 const CTA_Func h_func[CTA_METAINFO_NUMFUNC],
00094 CTA_MetainfoClass *hobsdscrcl);
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 CTAEXPORT int CTA_Metainfo_Create( CTA_Metainfo *hobsdscr);
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124 CTAEXPORT int CTA_Metainfo_SetUnit( CTA_Metainfo hobsdscr, char* Key);
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137 CTAEXPORT int CTA_Metainfo_SetTag(CTA_Metainfo hobsdescr, char* tagname);
00138
00139
00140 CTAEXPORT int CTA_Metainfo_Free(
00141 CTA_Metainfo *hobsdscr
00142 );
00143
00144
00145 CTAEXPORT int CTA_Metainfo_SetRest(CTA_Metainfo hobsdescr, int *rest);
00146
00147 CTAEXPORT int CTA_Metainfo_SetGrid(CTA_Metainfo hobsdescr, CTAI_Gridm *hgrid);
00148
00149 CTAEXPORT int CTA_Metainfo_GetGrid(CTA_Metainfo hobsdescr, CTAI_Gridm *hgrid);
00150
00151 CTAEXPORT int CTA_Metainfo_Copy(CTA_Metainfo hmeta_x, CTA_Metainfo hmeta_y);
00152
00153 CTAEXPORT int CTA_Metainfo_GetRest(CTA_Metainfo hobsdescr, int *rest);
00154
00155 CTAEXPORT int CTA_Metainfo_GetTag(CTA_Metainfo hobsdescr, char *tagname);
00156
00157 CTAEXPORT int CTA_Metainfo_SetBelongsTo(CTA_Metainfo hobsdescr, char* tagname);
00158
00159 CTAEXPORT int CTA_Metainfo_GetBelongsTo(CTA_Metainfo hobsdescr, char *tagname);
00160
00161 CTAEXPORT int CTAI_Grid_Interpolate(CTAI_Gridm gridy, CTAI_Gridm gridx, CTA_Vector vecx, CTA_Vector vecx_to_y);
00162
00163 CTAEXPORT int CTA_Metainfo_Export(CTA_Metainfo minfo, CTA_Handle usrdata);
00164
00165 CTAEXPORT int CTA_Metainfo_GetUnit(CTA_Metainfo hobsdescr, char *nameofunit);
00166
00167
00168 int CTA_Metainfo_setRegGrid(CTA_Metainfo hdescr, char *name,
00169 int nx, int ny, int nz,
00170 double x_origin, double y_origin,
00171 double z_origin,
00172 double dx, double dy, double dz);
00173
00174 int CTA_Metainfo_getRegGrid(CTA_Metainfo hdescr, char *name,
00175 int *nx, int *ny, int *nz,
00176 double *x_origin, double *y_origin,
00177 double *z_origin,
00178 double *dx, double *dy, double *dz);
00179
00180 #ifdef __cplusplus
00181 }
00182 #endif
00183
00184
00185 #endif