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 
24 class CL_API CL_Filter final : public CL_SlidingWindow
25 {
26 public:
27 
28  CL_Filter(int size, int overlap);
29  CL_Filter(UT_IStream &is);
30  ~CL_Filter() override;
31 
32  // must be 'size' floats long.
33  void setFilter(fpreal *filter, fpreal *phase = nullptr);
34 
35  void reset(fpreal val = 0.0) override;
36  int maxFilterSamples() override;
37 
38 private:
39  void doWindowOp(int nsamples, fpreal *dest) override;
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:664
#define CL_API
Definition: CL_API.h:10
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glcorearb.h:1297
virtual void reset(fpreal val=0.0)
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition: logging.h:294
GLuint GLfloat * val
Definition: glcorearb.h:1608
fpreal64 fpreal
Definition: SYS_Types.h:277
virtual int maxFilterSamples()