Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DisparityInterpolator.hh
1 /*
2  * DisparityInterpolator.hh
3  *
4  * Created on: Jan 29, 2010
5  * Author: africk
6  */
7 
8 #ifndef __DISPARITY_INTERPOLATOR_HH__
9 #define __DISPARITY_INTERPOLATOR_HH__
10 
11 #include <OpenGLFramework/Base/glfTexture2D.hh>
12 #include <OpenGLFramework/Base/glfBatch.hh>
13 #include <OpenGLFramework/Base/glfFramebufferObject.hh>
14 #include <OpenGLFramework/SpecializedBatches/PerPixelProcessingBase.hh>
15 
16 #include <bias_config.h>
17 
18 namespace BIAS {
19 
20 class BIASOpenGLFramework_EXPORT DisparityInterpolator: public PerPixelProcessingBase {
21 public:
22 
23  enum INTERP_TYPE {
24  LINEAR = 0, BG = 1
25  };
26 
28  virtual ~DisparityInterpolator();
29 
30  void SetDisparityMap(glfTexture2D* dispMap);
31  void SetInterpType(INTERP_TYPE interp_type) {
32  interp_type_ = interp_type;
33  }
34 
35  void Init(unsigned int width, unsigned int height);
36 
37  void Draw();
38 
39 private:
40 
41  unsigned int width_, height_;
42 
43  INTERP_TYPE interp_type_;
44 
45  glfTexture2D* dispMapP_;
46 
47  std::string fragmentShaderCode_;
48 
49 };
50 }
51 
52 #endif /* __DISPARITY_INTERPOLATOR_HH__ */
A 2D texture.
Definition: glfTexture2D.hh:40
void SetInterpType(INTERP_TYPE interp_type)
this class can be used as a simple base class for specialized batches