PICCANTE  0.4
The hottest HDR imaging library!
filter_iterative.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_ITERATIVE_HPP
19 #define PIC_GL_FILTERING_FILTER_ITERATIVE_HPP
20 
21 #include "../../base.hpp"
22 
23 #include "../../util/gl/fbo.hpp"
24 
25 #include "../../gl/filtering/filter_npasses.hpp"
26 
27 namespace pic {
28 
33 {
34 protected:
36 
42  FilterGL* getFilter(int i);
43 
49  int getIterations();
50 
51 public:
52 
59 
61 
67  void update(FilterGL *flt, int iterations);
68 };
69 
71 {
72  update(flt, iterations);
73 }
74 
76 {
77  release();
78 }
79 
80 PIC_INLINE void FilterGLIterative::update(FilterGL *flt, int iterations)
81 {
82  if(iterations > 0) {
83  this->iterations = iterations;
84  }
85 
86  if(flt == NULL) {
87  return;
88  }
89 
90  if(!filters.empty()) {
91  filters.clear();
92  }
93 
94  filters.push_back(flt);
95 }
96 
98 {
99  return filters[0];
100 }
101 
103 {
104  return iterations;
105 }
106 
107 } // end namespace pic
108 
109 #endif /* PIC_GL_FILTERING_FILTER_ITERATIVE_HPP */
110 
void update(FilterGL *flt, int iterations)
update
FilterGLIterative(FilterGL *flt, int iterations)
FilterGLIterative.
The FilterGLNPasses class.
Definition: filter_npasses.hpp:36
The FilterGLIterative class.
Definition: filter_iterative.hpp:32
int getIterations()
getFilter
The FilterGLNPasses class.
Definition: display.hpp:36
std::vector< FilterGL *> filters
Definition: display.hpp:55
The FilterGL class.
Definition: filter.hpp:35
int iterations
Definition: filter_iterative.hpp:35
The FilterGL class.
Definition: display.hpp:35
#define PIC_INLINE
Definition: base.hpp:33
Definition: bilateral_separation.hpp:25
FilterGL * getFilter(int i)
getFilter
void release()
release
Definition: display.hpp:85