VAPoR  0.1
WaveletBlock3DWriter.h
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 
5 #ifndef _WavletBlock3DWriter_h_
6 #define _WavletBlock3DWriter_h_
7 
8 #include <vapor/MyBase.h>
9 #include <vapor/WaveletBlockIOBase.h>
10 
11 namespace VAPoR {
12 
13 //
24 //
26 
27 public:
28 
36  //
38  const MetadataVDC &metadata
39  );
40 
48  //
50  const string &metafile
51  );
52 
53  virtual ~WaveletBlock3DWriter();
54 
77  virtual int OpenVariableWrite(
78  size_t timestep,
79  const char *varname,
80  int reflevel = -1,
81  int lod = -1
82  );
83 
84  virtual int OpenVariableRead(
85  size_t timestep,
86  const char *varname,
87  int reflevel = 0,
88  int lod = 0
89  ) {SetErrMsg("Operation not supported"); return(-1);};
90 
91 
92  virtual int CloseVariable();
93 
113  //
114 // int WriteSlabs(const float *two_slabs);
115  int WriteSlabs(float *two_slabs);
116 
117 protected:
118 
119  void _GetDataRange(float range[2]) const;
120  float _dataRange[2];
121 
122 private:
123 
124  int slab_cntr_c;
125  int is_open_c;
126  float *lambda_blks_c[MAX_LEVELS]; // temp storage for lambda blocks
127  float *zero_block_c; // a block of zero data for padding
128  size_t _block_size;
129 
130 
131  int write_slabs(
132  const float *two_slabs,
133  int reflevel
134  );
135 
136  int write_gamma_slabs(
137  int level,
138  const float *two_slabs,
139  int src_nbx,
140  int src_nby,
141  float *dst_lambda_buf,
142  int dst_nbx,
143  int dst_nby
144  );
145 
146  int my_realloc();
147  void my_free();
148 
149  void _WaveletBlock3DWriter();
150 
151 };
152 
153 };
154 
155 #endif // _WavletBlock3d_h_
#define VDF_API
Definition: common.h:61
A class for managing data set metadata.
Definition: MetadataVDC.h:92
A slab writer for VDF files.
Performs data IO to VDF files.
virtual int OpenVariableRead(size_t timestep, const char *varname, int reflevel=0, int lod=0)