PICCANTE  0.4
The hottest HDR imaging library!
filter_bilateral_3dsp.hpp
Go to the documentation of this file.
1 /*
2 
3 PICCANTE
4 The hottest HDR imaging library!
5 http://vcg.isti.cnr.it/piccante
6 
7 Copyright (C) 2014
8 Visual Computing Laboratory - ISTI CNR
9 http://vcg.isti.cnr.it
10 First author: Francesco Banterle
11 
12 This Source Code Form is subject to the terms of the Mozilla Public
13 License, v. 2.0. If a copy of the MPL was not distributed with this
14 file, You can obtain one at http://mozilla.org/MPL/2.0/.
15 
16 */
17 
18 #ifndef PIC_GL_FILTERING_FILTER_BILATERAL_3DSP_HPP
19 #define PIC_GL_FILTERING_FILTER_BILATERAL_3DSP_HPP
20 
21 #include "../../base.hpp"
22 #include "../../util/std_util.hpp"
23 #include "../../gl/filtering/filter.hpp"
24 
25 namespace pic {
26 
31 {
32 protected:
35 
36 public:
41 
48  FilterGLBilateral3DSP(float sigma_s, float sigma_r, float sigma_t);
49 
51 
55  void releaseAux()
56  {
59  }
60 
65  void setFrame(int frame)
66  {
67  filterS->setSlice(frame);
68  filterT->setSlice(frame);
69  }
70 
77  void update(float sigma_s, float sigma_r, float sigma_t);
78 
88  static ImageGL *execute(std::string nameIn, std::string nameOut,
89  float sigma_s, float sigma_r, float sigma_t)
90  {
91  return NULL;
92  }
93 };
94 
96 {
97  target = GL_TEXTURE_2D_ARRAY;
98  filterS = filterT = NULL;
99 }
100 
102 {
103  release();
104 }
105 
107  float sigma_t): FilterGLNPasses()
108 {
109  target = GL_TEXTURE_2D_ARRAY;
110  filterS = new FilterGLBilateral1D(sigma_s, sigma_r, 0, target);
111  filterT = new FilterGLBilateral1D(sigma_t, sigma_r, 0, target);
112 
116 }
117 
118 PIC_INLINE void FilterGLBilateral3DSP::update(float sigma_s, float sigma_r, float sigma_t)
119 {
120  filterS->update(sigma_s, sigma_r);
121  filterT->update(sigma_t, sigma_r);
122 }
123 
124 } // end namespace pic
125 
126 #endif /* PIC_GL_FILTERING_FILTER_BILATERAL_3DSP_HPP */
127 
void insertFilter(FilterGL *flt)
insertFilter
Definition: display.hpp:143
FilterGLBilateral1D * filterT
Definition: filter_bilateral_3dsp.hpp:34
The FilterGLBilateral3DSP class.
Definition: filter_bilateral_3dsp.hpp:30
T * delete_s(T *data)
delete_s
Definition: std_util.hpp:123
void setFrame(int frame)
setFrame
Definition: filter_bilateral_3dsp.hpp:65
void setSlice(int slice)
setSlice
Definition: display.hpp:90
GLenum target
Definition: display.hpp:47
The FilterGLNPasses class.
Definition: filter_npasses.hpp:36
void update(float sigma_s, float sigma_r, float sigma_t)
update
The FilterGLBilateral1D class.
Definition: filter_bilateral_1d.hpp:30
The ImageGL class.
Definition: image.hpp:42
The FilterGLNPasses class.
Definition: display.hpp:36
#define PIC_INLINE
Definition: base.hpp:33
void update(float sigma_s, float sigma_r)
update
static ImageGL * execute(std::string nameIn, std::string nameOut, float sigma_s, float sigma_r, float sigma_t)
execute
Definition: filter_bilateral_3dsp.hpp:88
Definition: bilateral_separation.hpp:25
void releaseAux()
releaseAux
Definition: filter_bilateral_3dsp.hpp:55
The FilterGLBilateral1D class.
Definition: display.hpp:30
FilterGLBilateral1D * filterS
Definition: filter_bilateral_3dsp.hpp:33
FilterGLBilateral3DSP()
FilterGLBilateral3DSP.
void release()
release
Definition: display.hpp:85