VAPoR  0.1
WaveletBlock3D.h
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 
5 #ifndef _WaveletBlock3D_h_
6 #define _WaveletBlock3D_h_
7 
8 #include <vapor/MyBase.h>
9 #include <vapor/EasyThreads.h>
10 #include <vapor/WaveletBlock1D.h>
11 
12 #include "Lifting1D.h"
13 
14 
15 namespace VAPoR {
16 
17 //
26 //
28 
29 public:
30 
44  //
46  unsigned int bs, // X,Y,Z coordinate block dimensions
47  unsigned int n, // # wavelet filter coefficents
48  unsigned int ntilde, // # wavelet lifting coefficients
49  unsigned int nthreads
50  );
51  virtual ~WaveletBlock3D();
52 
72  //
73  void ForwardTransform(
74  const float *src_super_blk[8],
75  float *dst_super_blk[8]
76  );
77 
89  //
90  void InverseTransform(
91  const float *src_super_blk[8],
92  float *dst_super_blk[8]
93  );
94 
103  //
104  void TransposeBlks(
105  float *super_blk[8]
106  );
107 
109 
110 private:
111  int _objInitialized; // has the obj successfully been initialized?
112  const float **src_super_blk_c;
113  float **dst_super_blk_c;
114  const float ***src_s_blk_ptr_c;
115  float ***dst_s_blk_ptr_c;
116  int bs_c; // block dimensions in voxels
117  int nthreads_c; // # execution threads
118  float **temp_blks1_c,
119  **temp_blks2_c;
120 
121  WaveletBlock1D *_wb1d; // lifting method wavelet transform
122 
123  int deallocate_c; // execute destructor for this object?
124 
125  VetsUtil::EasyThreads *et_c;
126 
127  WaveletBlock3D **threads_c; // worker threads
128 
129  int z0_c, zr_c; // decomposition work boundaries for threads
130 
131  WaveletBlock3D(WaveletBlock3D *X, int index);
132 
133  void forward_transform3d_blocks(
134  const float **src_blks,
135  float **lambda_blks,
136  float **gamma_blks,
137  int nblocks
138  );
139 
140  void forward_transform3d(
141  const float *src_blkptr,
142  float *lambda_blkptr,
143  float *gamma_blkptr,
144  int lambda_offset,
145  int gamma_offset
146  );
147 
148  void inverse_transform3d_blocks(
149  const float **lambda_blks,
150  const float **gamma_blks,
151  float **dst_blks,
152  int nblocks
153  );
154 
155  void inverse_transform3d(
156  const float *lambda_blkptr,
157  const float *gamma_blkptr,
158  float *dst_blkptr,
159  int lambda_offset,
160  int gamma_offset
161  );
162 
163 };
164 
165 };
166 
167 #endif // _WaveletBlock3D_h_
A block-based, 3D wavelet transformer.
void InverseTransform(const float *src_super_blk[8], float *dst_super_blk[8])
void ForwardTransform(const float *src_super_blk[8], float *dst_super_blk[8])
void TransposeBlks(float *super_blk[8])
VetsUtil base class.
Definition: MyBase.h:68
WaveletBlock3D(unsigned int bs, unsigned int n, unsigned int ntilde, unsigned int nthreads)
A block-based, 1D wavelet transformer.