openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
IGBheader.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // openCARP is an open cardiac electrophysiology simulator.
3 //
4 // Copyright (C) 2020 openCARP project
5 //
6 // This program is licensed under the openCARP Academic Public License (APL)
7 // v1.0: You can use and redistribute it and/or modify it in non-commercial
8 // academic environments under the terms of APL as published by the openCARP
9 // project v1.0, or (at your option) any later version. Commercial use requires
10 // a commercial license (info@opencarp.org).
11 //
12 // This program is distributed without any warranty; see the openCARP APL for
13 // more details.
14 //
15 // You should have received a copy of the openCARP APL along with this program
16 // and can find it online: http://www.opencarp.org/license
17 // ----------------------------------------------------------------------------
18 
28 #ifndef IGBheader_h
29 #define IGBheader_h
30 
31 #include <cstdio>
32 #include <cstdlib>
33 #include <fstream>
34 #include <zlib.h>
35 #include <cstring>
36 #include <cctype>
37 #include <assert.h>
38 #include <float.h>
39 #include <limits.h>
40 
41 #include "short_float.h"
42 
43 namespace opencarp {
44 
45 #define NALLOC 100
46 
47 #define NUL 0
48 #define INCONNU 0
49 
50 #define IGB_BIG_ENDIAN 666666666
51 #define IGB_LITTLE_ENDIAN 777777777
52 #define N_SYSTEMES 2
53 
54 
55 /* ------------------------ TYPES definition ------------------------------ */
56 #define IGB_BYTE 1 /* -- byte ----------------------------------- */
57 #define IGB_CHAR 2 /* -- Char ----------------------------------- */
58 #define IGB_SHORT 3 /* -- short ---------------------------------- */
59 #define IGB_LONG 4 /* -- long ----------------------------------- */
60 #define IGB_FLOAT 5 /* -- float ---------------------------------- */
61 #define IGB_DOUBLE 6 /* -- Double --------------------------------- */
62 #define IGB_COMPLEX 7 /* -- 2 x float (real part, imaginary part) -- */
63 #define IGB_D_COMPLEX 8 /* -- 2 x Double (real part, imaginary part) - */
64 #define IGB_RGBA 9 /* -- 4 x byte (red, green, blue, alpha) ----- */
65 #define IGB_STRUCTURE 10 /* -- Structure ------------------------------ */
66 #define IGB_POINTER 11 /* -- void * --------------------------------- */
67 #define IGB_LIST 12 /* -- List --------------------------------- */
68 #define IGB_INT 13 /* -- integer -------------------------------- */
69 #define IGB_UINT 14 /* -- unsigned integer------------------------ */
70 #define IGB_USHORT 15 /* -- unsigned short integer------------------ */
71 #define IGB_VEC3_f 16 /* -- 3 X float ------------------------------ */
72 #define IGB_VEC3_d 17 /* -- 3 X double ----------------------------- */
73 #define IGB_VEC4_f 18 /* -- 4 X float ------------------------------ */
74 #define IGB_VEC4_d 19 /* -- 4 X double ----------------------------- */
75 #define IGB_HFLOAT 20 /* -- half float ----------------------------- */
76 #define IGB_VEC9_f 21 /* -- 9 X foat ------------------------------- */
77 #define IGB_VEC9_d 22 /* -- 9 X double ----------------------------- */
78 #define IGB_MIN_TYPE 1
79 #define IGB_MAX_TYPE 22
80 
81 #define Byte hByte
82 
83 /* Types de trames */
84 #define MIN_TRAME 0
85 #define IGB_C8 0
86 #define IGB_C4 1
87 #define IGB_HEX 2
88 #define HEXEDGES 3
89 #define HEXBRIDGES 4
90 #define HEXLINES 5
91 #define HEX2 6
92 #define MAX_TRAME 6
93 #define NTRAMES 7
94 
95 
96 /* define for endedness */
97 #define IGB_ENDIAN_VAL -1.24e5
98 #define IGB_LITTLE_END_REP 0,48,242,199
99 
100 // error codes
101 #define ERR_EOF_IN_HEADER 1
102 #define ERR_LINE_TOO_LONG 2
103 #define ERR_UNPRINTABLE_CHAR 3
104 #define ERR_IGB_SYNTAX 4
105 #define ERR_UNDEFINED_X_Y_TYPE 5
106 #define ERR_SIZE_REDEFINED 6
107 #define ERR_SIZE_NOT_DEFINED 7
108 #define WARN_DIM_INCONSISTENT 256
109 
110 #ifndef PrMTYPES
111 #define PrMTYPES
112 /*
113  Definition des types List, bytes, Char, Double, complex d_complex
114  et rgba
115 */
116 typedef struct List
117 {
118  long nitems;
119  char *items;
120 }
121 List;
122 typedef unsigned char byte;
123 #ifndef __GL_GL_H__
124 typedef unsigned char Byte;
125 typedef char *String;
126 #endif
127 typedef signed char Char;
128 typedef struct S_Complex S_Complex;
129 typedef double Double;
130 typedef struct D_Complex D_Complex;
131 typedef float Float;
132 typedef int Int;
133 typedef long Long;
134 typedef unsigned int UInt;
135 typedef short Short;
136 typedef int BooleaN;
137 typedef int Flag;
138 typedef char *RDir;
139 typedef char *RFile;
140 typedef char *RWDir;
141 typedef char *RWFile;
142 typedef char *WDir;
143 typedef char *WFile;
144 typedef char **Text;
145 typedef void Any;
146 struct S_Complex
147 {
148  Float real, imag;
149 };
150 struct D_Complex
151 {
152  Double real, imag;
153 };
154 #endif
155 
156 /* Indice de chaque composante dans le vecteur b[] de l'union rgba */
157 typedef union rgba {
158  unsigned long l;
159  byte b[4];
160 } rgba ;
161 #define RGBA_ROUGE 3
162 #define RGBA_VERT 2
163 #define RGBA_BLEU 1
164 #define RGBA_ALPHA 0
165 
166 #define HFLT_MIN -65504
167 #define HFLT_MAX 65504
168 
169 /* -------------- Definition du type des variables globales de header.c - */
170 
171 #ifndef HEADER_GLOBALS
172 extern bool Header_Quiet;
173 extern const char *Header_Type[IGB_MAX_TYPE+1];
174 extern unsigned short Data_Size[IGB_MAX_TYPE+1];
175 extern int Num_Components[IGB_MAX_TYPE+1];
176 extern const char *Header_Systeme[N_SYSTEMES];
177 extern unsigned long Header_Systeme_No[N_SYSTEMES];
178 extern char Header_Message[256];
179 #endif
180 
181 class IGBheader;
182 
183 template<class T>
184 int read_IGB_data( T* dp, int numt, IGBheader* h, char *buf=NULL );
185 
186 template<class T>
187 T IGB_convert_buffer_datum( IGBheader*, void *buf, int a );
188 
190 {
191  private:
192  void* file=NULL;
193  bool gzipping=false; // are we gzipping data?
194  int v_x=0, v_y=0, v_z=1, v_t=1;
195  int v_type=0;
196  int v_taille ;
197  unsigned long v_systeme=endian() ;
198  int v_num=0;
199  int v_bin=0;
200  int v_trame = IGB_C8;
201  unsigned int v_lut=0 ;
202  unsigned int v_comp=0 ;
203  float v_epais=0;
204  float v_org_x=1., v_org_y=1., v_org_z=1., v_org_t=0.;
205  float v_inc_x=1., v_inc_y=1., v_inc_z=1., v_inc_t=1.;
206  float v_dim_x, v_dim_y, v_dim_z, v_dim_t ;
207  float *v_vect_z=NULL;
208  char v_unites_x[41]={}, v_unites_y[41]={}, v_unites_z[41]={}, v_unites_t[41]={};
210  char v_unites[41]={};
211  float v_facteur=1., v_zero=0.;
212  char v_struct_desc[41]={};
213  char v_aut_name[41]={};
214  char** v_comment=(char**)calloc(NALLOC,sizeof(char*));
215  void* v_transparent=NULL;
216  int puts_fcn(void *, char *);
217  long tell(void *);
218 
219  // boolean flags to indicate if a default value has been overridden
220  bool bool_x=false, bool_y=false, bool_z=false, bool_t=false;
221  bool bool_type=false;
222  bool bool_taille=false;
223  bool bool_num=false;
224  bool bool_bin=false;
225  bool bool_trame=false;
226  bool bool_lut=false;
227  bool bool_comp=false;
228  bool bool_epais=false;
229  bool bool_org_x=false, bool_org_y=false, bool_org_z=false, bool_org_t=false;
230  bool bool_inc_x=false, bool_inc_y=false, bool_inc_z=false, bool_inc_t=false;
231  bool bool_dim_x, bool_dim_y=false, bool_dim_z=false, bool_dim_t=false;
232  bool bool_vect_z=false;
233  bool bool_unites_x=false, bool_unites_y=false, bool_unites_z=false, bool_unites_t=false;
234  bool bool_unites=false;
235  bool bool_facteur=false, bool_zero=false;
236  bool bool_struct_desc=false;
237  bool bool_aut_name=false;
238  bool bool_comment=false;
239  bool bool_transparent=false;
240  char transstr[257];
241 
242  public:
243  IGBheader( gzFile a = NULL, bool read=false, bool quiet=false );
244  IGBheader( FILE *f, bool read=false, bool quiet=false );
245  IGBheader( IGBheader *h ) { *this=*h; }
246  ~IGBheader();
247  int write();
248  int read( bool quiet=false );
249  void fileptr( gzFile f );
250  void fileptr( FILE* f );
251  void* fileptr(void){ return file; }
252  void close(void){if(gzipping)gzclose((gzFile)file);else fclose((FILE*)file);}
253  void swab( void *, int nd=-1 );
254  inline double from_raw( double a ){ return a*v_facteur+v_zero; }
255  inline double to_raw( double a ){ return (a-v_zero)/v_facteur; }
256  inline int slice_sz(){ return v_x*v_y*v_z; }
257  void comment( char* );
258  inline char **comment(void){return v_comment;}
259  inline int data_size(void){return Data_Size[v_type];}
260  inline int x(void){ return v_x; }
261  inline int x( bool &set ){ set=bool_x; return v_x; }
262  inline void x( int a ){ v_x = a; bool_x = true;}
263  inline int y(void){ return v_y; }
264  inline int y( bool &set ){ set=bool_y; return v_y; }
265  inline void y( int a ){ v_y = a; bool_y = true;}
266  inline int z(void){ return v_z; }
267  inline int z( bool &set ){ set=bool_z; return v_z; }
268  inline void z( int a ){ v_z = a; bool_z = true;}
269  inline int t(void){ return v_t; }
270  inline int t( bool &set ){ set=bool_t; return v_t; }
271  inline void t( int a ){ v_t = a; bool_t = true;}
272  inline int type(void){ return v_type; }
273  inline int type( bool &set ){ set=bool_type; return v_type; }
274  inline void type( int a ){ v_type = a; bool_type = true; }
275  void type( char* );
276  inline int taille(void){ return v_taille; }
277  inline int taille( bool &set ){ set=bool_taille; return v_taille; }
278  inline void taille( int a ){ v_taille = a; bool_taille = true;}
279  inline int num(void){ return v_num; }
280  inline int num( bool &set ){ set=bool_num; return v_num; }
281  inline void num( int a ){ v_num = a; bool_num = true;}
282  inline int bin(void){ return v_bin; }
283  inline int bin( bool &set ){ set=bool_bin; return v_bin; }
284  inline void bin( int a ){ v_bin = a; bool_bin = true;}
285  inline int trame(void){ return v_trame; }
286  inline int trame( bool &set ){ set=bool_trame; return v_trame; }
287  inline void trame( int a ){ v_trame = a; bool_trame = true;}
288  const char* systemestr(void);
289  inline int systeme( void ){ return v_systeme; }
290  void systeme( const char* s );
291  inline unsigned int lut(void){ return v_lut; }
292  inline unsigned int lut( bool &set ){ set=bool_x; return v_x; }
293  inline void lut( unsigned int a ){ v_lut = a; bool_lut = true; }
294  inline unsigned int comp(void){ return v_comp; }
295  inline unsigned int comp( bool &set ){ set=bool_lut; return v_lut; }
296  inline void comp( unsigned int a ){ v_comp = a; bool_comp = true;}
297  inline float epais(void){ return v_epais; }
298  inline float epais( bool &set ){ set=bool_epais; return v_epais; }
299  inline void epais( float a ){ v_epais = a; bool_epais = true;}
300  inline float org_x(void){ return v_org_x; }
301  inline float org_x( bool &set ){ set=bool_org_x; return v_org_x; }
302  inline void org_x( float a ){ v_org_x = a; bool_org_x = true; }
303  inline float org_y(void){ return v_org_y; }
304  inline float org_y( bool &set ){ set=bool_org_y; return v_org_y; }
305  inline void org_y( float a ){ v_org_y = a; bool_org_y = true; }
306  inline float org_z(void){ return v_org_z; }
307  inline float org_z( bool &set ){ set=bool_org_z; return v_org_z; }
308  inline void org_z( float a ){ v_org_z = a; bool_org_z = true;}
309  inline float org_t(void){ return v_org_t; }
310  inline float org_t( bool &set ){ set=bool_org_t; return v_org_t; }
311  inline void org_t( float a ){ v_org_t = a; bool_org_t = true;}
312  inline void inc_x( float a ){ v_inc_x = a; bool_inc_x = true;}
313  inline float inc_x( bool &set ){ set=bool_inc_x; return v_inc_x; }
314  inline float inc_x(void){ return v_inc_x; }
315  inline void inc_y( float a ){ v_inc_y = a; bool_inc_y = true;}
316  inline float inc_y( bool &set ){ set=bool_inc_y; return v_inc_y; }
317  inline float inc_y(void){ return v_inc_y; }
318  inline void inc_z( float a ){ v_inc_z = a; bool_inc_z = true;}
319  inline float inc_z( bool &set ){ set=bool_inc_z; return v_inc_z; }
320  inline float inc_z(void){ return v_inc_z; }
321  inline void inc_t( float a ){ v_inc_t = a; bool_inc_t = true;}
322  inline float inc_t( bool &set ){ set=bool_inc_t; return v_inc_t; }
323  inline float inc_t(void){ return v_inc_t; }
324  inline void dim_x( float a ){ v_dim_x = a; bool_dim_x = true;}
325  inline float dim_x( bool &set ){ set=bool_dim_x; return v_dim_x; }
326  inline float dim_x(void){ return v_dim_x; }
327  inline void dim_y( float a ){ v_dim_y = a; bool_dim_y = true;}
328  inline float dim_y( bool &set ){ set=bool_dim_y; return v_dim_y; }
329  inline float dim_y(void){ return v_dim_y; }
330  inline void dim_z( float a ){ v_dim_z = a; bool_dim_y = true;}
331  inline float dim_z( bool &set ){ set=bool_dim_z; return v_dim_z; }
332  inline float dim_z(void){ return v_dim_z; }
333  inline void dim_t( float a ){ v_dim_t = a; bool_dim_t = true;}
334  inline float dim_t( bool &set ){ set=bool_dim_t; return v_dim_t; }
335  inline float dim_t(void){ return v_dim_t; }
336  inline void facteur( float a ){ v_facteur = a; bool_facteur = true; }
337  inline float facteur( bool &set ){ set=bool_facteur; return v_facteur; }
338  inline float facteur(void){ return v_facteur; }
339  inline void zero( float a ){ v_zero = a; bool_zero = true; }
340  inline float zero( bool &set ){ set=bool_zero; return v_zero; }
341  inline float zero(void){ return v_zero; }
342  inline void vect_z( float* a ){ v_vect_z = a; bool_vect_z = true; }
343  inline float* vect_z( bool &set ){ set=bool_vect_z; return v_vect_z; }
344  inline float* vect_z(void){ return v_vect_z; }
345  inline void unites_x( const char* a ){ strcpy(v_unites_x, a); bool_unites_x = true; }
346  inline char* unites_x( bool &set ){ set=bool_unites_x; return v_unites_x; }
347  inline char* unites_x(void){ return v_unites_x; }
348  inline void unites_y( const char* a ){ strcpy(v_unites_y, a); bool_unites_y = true;}
349  inline char* unites_y( bool &set ){ set=bool_unites_y; return v_unites_y; }
350  inline char* unites_y(void){ return v_unites_y; }
351  inline void unites_z( const char* a ){ strcpy(v_unites_z,a); bool_unites_z = true; }
352  inline char* unites_z( bool &set ){ set=bool_unites_z; return v_unites_z; }
353  inline char* unites_z(void){ return v_unites_z; }
354  inline void unites_t( const char* a ){ strcpy(v_unites_t, a); bool_unites_t = true; }
355  inline char* unites_t( bool &set ){ set=bool_unites_t; return v_unites_t; }
356  inline char* unites_t(void){ return v_unites_t; }
357  inline void unites( const char* a ){ strcpy(v_unites, a); bool_unites = true; }
358  inline char* unites( bool &set ){ set=bool_unites; return v_unites; }
359  inline char* unites(void){ return v_unites; }
360  inline void struct_desc( const char* a ){ strcpy(v_struct_desc, a); bool_struct_desc = true; }
361  inline char* struct_desc( bool &set ){ set=bool_struct_desc; return v_struct_desc; }
362  inline char* struct_desc(void){ return v_struct_desc; }
363  inline void aut_name( const char* a ){ strcpy(v_aut_name, a); bool_aut_name = true; }
364  inline char* aut_name( bool &set ){ set=bool_aut_name; return v_aut_name; }
365  inline char* aut_name(void){ return v_aut_name; }
366  inline void transparent( void* a ){ v_transparent=a; bool_transparent = true; }
367  inline void* transparent( bool &set ){ set=bool_transparent; return v_transparent; }
368  inline void* transparent(void){ return v_transparent; }
369  inline char* transparentstr(void){ return transstr; }
370  int num_components(){ return Num_Components[v_type]; }
371  int endian();
372  template<class T> int read_data( T* dp, int numt=1, char *buf=NULL );
373  template<class T> void write_data( T* dp, int numt=1, char *buf=NULL );
374  template<class T> void to_bin( void *buf, T d );
375  template<class T> T convert_buffer_datum( void *buf, int a );
376 };
377 
378 
385 template<class T>
386 void
387 IGBheader::write_data( T* dp, int numt, char *buf )
388 {
389  int slicesize = data_size()*slice_sz()*numt;
390  bool alloc_buf = false;
391  if ( buf==NULL ) {
392  buf = new char[slicesize];
393  alloc_buf = true;
394  }
395 
396  int numprimitive = slice_sz()*num_components();
397  for ( int a=0; a<numprimitive; a++ )
398  to_bin<T>( buf+a*data_size(), dp[a] );
399 
400  if( gzipping )
401  gzwrite( (gzFile)file, buf, slicesize );
402  else
403  fwrite( buf, 1, slicesize, (FILE*)file );
404 
405  if ( alloc_buf ) delete[] buf;
406 }
407 
408 
419 template<class T>
420 int
421 IGBheader::read_data( T* dp, int numt, char *buf )
422 {
423  int slicesize = data_size()*slice_sz()*numt;
424  bool alloc_buf = false;
425  if ( buf==NULL ) {
426  buf = new char[slicesize];
427  alloc_buf = true;
428  }
429 
430  int numread;
431  if( gzipping )
432  numread = gzread( (gzFile)(file), buf, slicesize )/data_size();
433  else
434  numread = fread( buf, slice_sz()*numt, data_size(), (FILE *)(file) );
435 
436  if ( systeme() != endian() ) swab(buf, numread);
437 
438  int numprimitive = numread*num_components(); // adjust vector types
439 
440 #pragma omp parallel for
441  for ( int a=0; a<numprimitive; a++ )
442  dp[a] = convert_buffer_datum<T>( buf, a );
443 
444  if ( alloc_buf ) delete[] buf;
445  return numread;
446 }
447 
448 
455 template<class T>
456 T IGBheader::convert_buffer_datum( void *buf, int a )
457 {
458  T datum;
459 
460  switch ( type() ) {
461  case IGB_BYTE:
462  datum = ((unsigned char *)buf)[a];
463  break;
464  case IGB_CHAR:
465  datum = ((signed char *)buf)[a];
466  break;
467  case IGB_SHORT:
468  datum = ((short *)buf)[a];
469  break;
470  case IGB_LONG:
471  datum = ((long *)buf)[a];
472  break;
473  case IGB_FLOAT:
474  case IGB_VEC3_f:
475  case IGB_VEC4_f:
476  case IGB_VEC9_f:
477  datum = ((float *)buf)[a];
478  break;
479  case IGB_DOUBLE:
480  case IGB_VEC3_d:
481  case IGB_VEC4_d:
482  case IGB_VEC9_d:
483  datum = ((double *)buf)[a];
484  break;
485  case IGB_INT:
486  datum = ((int *)buf)[a];
487  break;
488  case IGB_UINT:
489  datum = ((unsigned int *)buf)[a];
490  break;
491  case IGB_USHORT:
492  datum = ((unsigned short *)buf)[a];
493  break;
494  case IGB_HFLOAT:
495  datum = floatFromShort(((short_float *)buf)[a]);
496  break;
497  default:
498  memset(&datum,0,sizeof(datum));
499  }
500  return datum=from_raw(datum);
501 }
502 
509 #define CONVERT_TYPE(D,m,M,B) { if(datum<m)datum=m;else if(datum>M)datum=M; \
510  D a0 = (D)datum; *((D*)(B))=a0;};
511 
517 template<class T>
518 void
519 IGBheader::to_bin( void *buf, T d )
520 {
521  double datum=to_raw(d);
522  switch ( type() ) {
523  case IGB_BYTE:
524  CONVERT_TYPE( unsigned char, 0, UCHAR_MAX, buf )
525  break;
526  case IGB_CHAR:
527  CONVERT_TYPE( char, CHAR_MIN, CHAR_MAX, buf )
528  break;
529  case IGB_SHORT:
530  CONVERT_TYPE( short, SHRT_MIN, SHRT_MAX, buf )
531  break;
532  case IGB_LONG:
533  CONVERT_TYPE( long, LONG_MIN, LONG_MAX, buf )
534  break;
535  case IGB_FLOAT:
536  CONVERT_TYPE( float, (-FLT_MAX), FLT_MAX, buf )
537  break;
538  case IGB_VEC3_f:
539  case IGB_VEC4_f:
540  case IGB_VEC9_f:
541  assert(0);
542  break;
543  case IGB_DOUBLE:
544  CONVERT_TYPE( double, (-DBL_MAX), DBL_MAX, buf )
545  break;
546  case IGB_VEC3_d:
547  case IGB_VEC4_d:
548  case IGB_VEC9_d:
549  assert(0);
550  break;
551  case IGB_INT:
552  CONVERT_TYPE( int, INT_MIN, INT_MAX, buf )
553  break;
554  case IGB_UINT:
555  CONVERT_TYPE( unsigned int, 0, UINT_MAX, buf )
556  break;
557  case IGB_USHORT:
558  CONVERT_TYPE( unsigned short, 0, USHRT_MAX, buf )
559  break;
560  case IGB_HFLOAT:
561  float fdatum;
562  CONVERT_TYPE( float, HFLT_MIN, HFLT_MAX, &fdatum )
563  *((short_float*)buf) = shortFromFloat(fdatum);
564  break;
565  default:
566  assert(0);
567  }
568 }
569 
570 } // namespace opencarp
571 
572 #endif //IGBheader_h
void org_t(float a)
Definition: IGBheader.h:311
void inc_z(float a)
Definition: IGBheader.h:318
void comp(unsigned int a)
Definition: IGBheader.h:296
unsigned char byte
Definition: IGBheader.h:122
int Num_Components[]
Definition: IGBheader.cc:275
int taille(bool &set)
Definition: IGBheader.h:277
#define IGB_CHAR
Definition: IGBheader.h:57
void facteur(float a)
Definition: IGBheader.h:336
float inc_t(void)
Definition: IGBheader.h:323
float epais(void)
Definition: IGBheader.h:297
float dim_t(void)
Definition: IGBheader.h:335
#define HFLT_MIN
Definition: IGBheader.h:166
char * RFile
Definition: IGBheader.h:139
int y(bool &set)
Definition: IGBheader.h:264
float inc_x(void)
Definition: IGBheader.h:314
char * unites_t(void)
Definition: IGBheader.h:356
int read_IGB_data(T *dp, int numt, IGBheader *h, char *buf=NULL)
void vect_z(float *a)
Definition: IGBheader.h:342
void dim_t(float a)
Definition: IGBheader.h:333
#define IGB_INT
Definition: IGBheader.h:68
void to_bin(void *buf, T d)
Definition: IGBheader.h:519
void struct_desc(const char *a)
Definition: IGBheader.h:360
#define IGB_FLOAT
Definition: IGBheader.h:60
unsigned int lut(bool &set)
Definition: IGBheader.h:292
void org_y(float a)
Definition: IGBheader.h:305
const char * Header_Systeme[]
Definition: IGBheader.cc:289
int type(bool &set)
Definition: IGBheader.h:273
int Flag
Definition: IGBheader.h:137
#define IGB_UINT
Definition: IGBheader.h:69
#define IGB_VEC9_f
Definition: IGBheader.h:76
void unites_t(const char *a)
Definition: IGBheader.h:354
int trame(bool &set)
Definition: IGBheader.h:286
float zero(void)
Definition: IGBheader.h:341
float dim_y(void)
Definition: IGBheader.h:329
char * RWDir
Definition: IGBheader.h:140
void type(int a)
Definition: IGBheader.h:274
void inc_y(float a)
Definition: IGBheader.h:315
void Any
Definition: IGBheader.h:145
int taille(void)
Definition: IGBheader.h:276
long Long
Definition: IGBheader.h:133
char * aut_name(bool &set)
Definition: IGBheader.h:364
T convert_buffer_datum(void *buf, int a)
Definition: IGBheader.h:456
bool Header_Quiet
Definition: IGBheader.cc:246
#define N_SYSTEMES
Definition: IGBheader.h:52
void t(int a)
Definition: IGBheader.h:271
#define IGB_VEC3_f
Definition: IGBheader.h:71
float * vect_z(void)
Definition: IGBheader.h:344
char * unites_x(bool &set)
Definition: IGBheader.h:346
char * RDir
Definition: IGBheader.h:138
float inc_t(bool &set)
Definition: IGBheader.h:322
double from_raw(double a)
Definition: IGBheader.h:254
#define IGB_VEC9_d
Definition: IGBheader.h:77
float inc_x(bool &set)
Definition: IGBheader.h:313
float facteur(void)
Definition: IGBheader.h:338
void bin(int a)
Definition: IGBheader.h:284
float dim_t(bool &set)
Definition: IGBheader.h:334
int x(bool &set)
Definition: IGBheader.h:261
#define IGB_C8
Definition: IGBheader.h:85
float inc_y(bool &set)
Definition: IGBheader.h:316
float epais(bool &set)
Definition: IGBheader.h:298
float org_t(bool &set)
Definition: IGBheader.h:310
char * WFile
Definition: IGBheader.h:143
void num(int a)
Definition: IGBheader.h:281
char * String
Definition: IGBheader.h:125
void y(int a)
Definition: IGBheader.h:265
float dim_x(void)
Definition: IGBheader.h:326
void * fileptr(void)
Definition: IGBheader.h:251
char * struct_desc(void)
Definition: IGBheader.h:362
float zero(bool &set)
Definition: IGBheader.h:340
char * RWFile
Definition: IGBheader.h:141
unsigned long l
Definition: IGBheader.h:158
int data_size(void)
Definition: IGBheader.h:259
void inc_t(float a)
Definition: IGBheader.h:321
float dim_z(void)
Definition: IGBheader.h:332
#define CONVERT_TYPE(D, m, M, B)
Definition: IGBheader.h:509
float inc_z(bool &set)
Definition: IGBheader.h:319
void transparent(void *a)
Definition: IGBheader.h:366
void unites(const char *a)
Definition: IGBheader.h:357
float inc_z(void)
Definition: IGBheader.h:320
#define IGB_HFLOAT
Definition: IGBheader.h:75
uint16_t short_float
Definition: short_float.h:48
void unites_z(const char *a)
Definition: IGBheader.h:351
char * unites(bool &set)
Definition: IGBheader.h:358
float org_x(void)
Definition: IGBheader.h:300
int Int
Definition: IGBheader.h:132
void aut_name(const char *a)
Definition: IGBheader.h:363
char * aut_name(void)
Definition: IGBheader.h:365
void z(int a)
Definition: IGBheader.h:268
void unites_x(const char *a)
Definition: IGBheader.h:345
#define IGB_VEC4_d
Definition: IGBheader.h:74
void taille(int a)
Definition: IGBheader.h:278
float org_z(void)
Definition: IGBheader.h:306
T IGB_convert_buffer_datum(IGBheader *, void *buf, int a)
void dim_x(float a)
Definition: IGBheader.h:324
char * unites_z(bool &set)
Definition: IGBheader.h:352
char ** comment(void)
Definition: IGBheader.h:258
unsigned int lut(void)
Definition: IGBheader.h:291
float org_z(bool &set)
Definition: IGBheader.h:307
void zero(float a)
Definition: IGBheader.h:339
unsigned int UInt
Definition: IGBheader.h:134
float dim_z(bool &set)
Definition: IGBheader.h:331
int systeme(void)
Definition: IGBheader.h:289
#define NALLOC
Definition: IGBheader.h:45
void inc_x(float a)
Definition: IGBheader.h:312
#define IGB_BYTE
Definition: IGBheader.h:56
float dim_x(bool &set)
Definition: IGBheader.h:325
char * unites_y(bool &set)
Definition: IGBheader.h:349
char * unites_z(void)
Definition: IGBheader.h:353
void dim_y(float a)
Definition: IGBheader.h:327
signed char Char
Definition: IGBheader.h:127
long unsigned Header_Systeme_No[]
Definition: IGBheader.cc:282
#define IGB_VEC3_d
Definition: IGBheader.h:72
unsigned int comp(void)
Definition: IGBheader.h:294
void write_data(T *dp, int numt=1, char *buf=NULL)
Definition: IGBheader.h:387
#define IGB_USHORT
Definition: IGBheader.h:70
void epais(float a)
Definition: IGBheader.h:299
void * transparent(void)
Definition: IGBheader.h:368
int z(bool &set)
Definition: IGBheader.h:267
void dim_z(float a)
Definition: IGBheader.h:330
char * items
Definition: IGBheader.h:119
float dim_y(bool &set)
Definition: IGBheader.h:328
#define IGB_SHORT
Definition: IGBheader.h:58
float facteur(bool &set)
Definition: IGBheader.h:337
int bin(bool &set)
Definition: IGBheader.h:283
#define IGB_MAX_TYPE
Definition: IGBheader.h:79
void trame(int a)
Definition: IGBheader.h:287
union opencarp::rgba rgba
#define IGB_DOUBLE
Definition: IGBheader.h:61
int num(bool &set)
Definition: IGBheader.h:280
char * unites(void)
Definition: IGBheader.h:359
int t(bool &set)
Definition: IGBheader.h:270
void close(void)
Definition: IGBheader.h:252
float * vect_z(bool &set)
Definition: IGBheader.h:343
#define IGB_LONG
Definition: IGBheader.h:59
float inc_y(void)
Definition: IGBheader.h:317
double to_raw(double a)
Definition: IGBheader.h:255
char * struct_desc(bool &set)
Definition: IGBheader.h:361
void lut(unsigned int a)
Definition: IGBheader.h:293
unsigned char Byte
Definition: IGBheader.h:124
void x(int a)
Definition: IGBheader.h:262
const char * Header_Type[]
Definition: IGBheader.cc:249
short Short
Definition: IGBheader.h:135
unsigned int comp(bool &set)
Definition: IGBheader.h:295
struct opencarp::List List
float org_y(bool &set)
Definition: IGBheader.h:304
float org_x(bool &set)
Definition: IGBheader.h:301
int read_data(T *dp, int numt=1, char *buf=NULL)
Definition: IGBheader.h:421
IGBheader(IGBheader *h)
Definition: IGBheader.h:245
char * transparentstr(void)
Definition: IGBheader.h:369
void * transparent(bool &set)
Definition: IGBheader.h:367
int BooleaN
Definition: IGBheader.h:136
#define HFLT_MAX
Definition: IGBheader.h:167
char Header_Message[256]
Definition: IGBheader.cc:247
void org_x(float a)
Definition: IGBheader.h:302
void unites_y(const char *a)
Definition: IGBheader.h:348
#define IGB_VEC4_f
Definition: IGBheader.h:73
float org_y(void)
Definition: IGBheader.h:303
unsigned short Data_Size[]
Definition: IGBheader.cc:264
void org_z(float a)
Definition: IGBheader.h:308
double Double
Definition: IGBheader.h:129
float org_t(void)
Definition: IGBheader.h:309
char * unites_y(void)
Definition: IGBheader.h:350
char * WDir
Definition: IGBheader.h:142
char * unites_t(bool &set)
Definition: IGBheader.h:355
char * unites_x(void)
Definition: IGBheader.h:347
float Float
Definition: IGBheader.h:131
char ** Text
Definition: IGBheader.h:144