HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CL_Filter.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: CL_Filter.h ( Clip Library, C++)
7  *
8  * COMMENTS:
9  * Does continuous digital filtering
10  *
11  */
12 
13 
14 #ifndef __CL_Filter__
15 #define __CL_Filter__
16 
17 #include "CL_API.h"
18 #include "CL_SlidingWindow.h"
19 #include <UT/UT_FFT.h>
20 #include <SYS/SYS_Types.h>
21 
22 class UT_IStream;
23 
25 {
26 public:
27 
28  CL_Filter(int size, int overlap);
29  CL_Filter(UT_IStream &is);
30  virtual ~CL_Filter();
31 
32  // must be 'size' floats long.
33  void setFilter(fpreal *filter,fpreal *phase = 0);
34 
35  virtual void reset(fpreal val = 0.0);
36  virtual int maxFilterSamples();
37 
38 private:
39  virtual void doWindowOp(int nsamples, fpreal *dest);
40 
41  // Should only be called from the constructor
42  void initialize();
43 
44  void window(fpreal *windower);
45  void filter();
46  void computeWindow();
47 
48  fpreal myLastDataSample;
49  fpreal myLastSlope;
50 
51  fpreal *myData;
52  fpreal *myReal, * myImag;
53  fpreal *myFilter;
54  fpreal *myPhaseFilter;
55 
56  fpreal *myWindow;
57  fpreal *myUnWindow;
58 
59  UT_FFT<fpreal> *myTransform;
60 
61 };
62 
63 #endif
GLsizeiptr size
Definition: glcorearb.h:663
#define CL_API
Definition: CL_API.h:10
virtual void reset(fpreal val=0.0)
OPENVDB_API void initialize()
Global registration of basic types.
Definition: logging.h:318
double fpreal
Definition: SYS_Types.h:270
GLuint GLfloat * val
Definition: glcorearb.h:1607
virtual int maxFilterSamples()
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glcorearb.h:1296