Ilwis-Objects  1.0
GIS and Remote Sensing framework for data access and processing
 All Classes Functions Enumerations Pages
rasterfilter.h
1 #ifndef RASTERFILTER_H
2 #define RASTERFILTER_H
3 
4 namespace Ilwis {
5 
6 class GridBlock;
7 
8 class KERNELSHARED_EXPORT RasterFilter
9 {
10 public:
11  RasterFilter();
12  bool isValid() const;
13  virtual double applyTo(const Ilwis::GridBlock &block) = 0;
14  virtual QSize size() const = 0;
15 
16 protected:
17  bool _valid;
18 
19 };
20 
21 class KERNELSHARED_EXPORT LinearGridFilter : public RasterFilter{
22 public:
23  LinearGridFilter(const QString& name);
24 
25  double applyTo(const Ilwis::GridBlock &block);
26  QSize size() const;
27 
28 private:
29  quint32 _columns;
30  quint32 _rows;
31  double _gain;
32  std::vector<std::vector<double>> _filterdef;
33 
34  bool definition(const QString& name);
35 
36 
37 };
38 
39 class KERNELSHARED_EXPORT RankOrderGridFilter : public RasterFilter{
40 public:
41  RankOrderGridFilter(const QString& name);
42 
43  double applyTo(const Ilwis::GridBlock &block);
44  void colrow(quint32 col, quint32 row);
45  void index(quint32 index);
46  QSize size() const;
47 
48 private:
49  quint32 _columns;
50  quint32 _rows;
51  quint32 _index;
52 
53  bool definition(const QString& name);
54 
55 
56 };
57 }
58 
59 #endif // RASTERFILTER_H