aboutsummaryrefslogtreecommitdiff
path: root/src/IOJpeg.h
blob: 75355e2e023d516bcbd817803f80f93ce1084d06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifdef __cplusplus
extern "C" {
#endif

#define SLABSKEL_MAXDIM 4

#include "StoreNamedData.h"

/* structure holding information on the output geometry */
typedef struct IOJpegGeo
{
  int vdim;                       /* dimension of the gridvariable (dynamic) */
  int sdim;                       /* dimension of the slab (dynamic) */
  int direction[SLABSKEL_MAXDIM]; /* direction of slab (by parameter) */
  int slab_start[SLABSKEL_MAXDIM];/* global start index  (by parameter) */
  int length[SLABSKEL_MAXDIM];    /* requested index slab length (by parameter) */
  int actlen[SLABSKEL_MAXDIM];    /* actual index slab length (by PUGHSlab)*/
  int downs[SLABSKEL_MAXDIM];     /* downsampling (by parameter) */
} IOJpegGeo_t;


/* IOJpeg  GH extension structure */
typedef struct  IOJpegGH  {

  /* how often to output */
  int  out2D_every;

  /* flags indicating output for var [i] */
  char   *do_out2D;

  /* directories in which to output */
  char  *outdir2D;

  /* the last iteration output */
  int   *out2D_last;

  /* geometry information (downsampling, zooming, etc.) */
   IOJpegGeo_t **out_geo; 

  /* database for names of output files that were already created */
  pNamedData *fileList_2D;


} IOJpegGH;

/* function prototypes */
int IOJpeg_Write3D (cGH *GH, int index, const char *alias);
int IOJpeg_Write2D (cGH *GH, int index, const char *alias);
int IOJpeg_Write1D (cGH *GH, int index, const char *alias);

int  IOJpeg_DumpVar (cGH *GH, int index, int timelevel, IOJpegGeo_t *geo, FILE *fid);


#ifdef __cplusplus
} // extern "C"
#endif