App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

TSeparableFilter.hpp
Go to the documentation of this file.
1
6 namespace app {
7 template <typename TPIXEL, typename TCHANNEL> class TSeparableFilter;
8 }
9
10 #ifndef TSEPARABLEFILTER_HPP_
11 #define TSEPARABLEFILTER_HPP_
12
13 #include <cstdlib>
14
15 #include "TFilter.hpp"
16
17 #include "../typedefs.hpp"
18 #include "../bitmaps/TBitmap.hpp"
19 #include "../utils/MirroredReindexer.hpp"
20
21 namespace app {
22
24
34 template <typename TPIXEL, typename TCHANNEL>
35 class TSeparableFilter : public TFilter<TPIXEL, TCHANNEL> {
36 // Definuje provádění filtru, kernel inicializují odvozené třídy v konstruktoru
37
38 protected:
39 double * xKernel;
40 int xKernelWidth;
41 int xKernelCenter;
42
43 double * yKernel;
44 int yKernelWidth;
45 int yKernelCenter;
46
48 TSeparableFilter() {
49 xKernel = NULL;
50 yKernel = NULL;
51 }
52
53 virtual int applyTo_1ch(TBitmap<TPIXEL, TCHANNEL> &bitmap, Rect dstArea);
54
55 virtual int applyTo_4ch(TBitmap<TPIXEL, TCHANNEL> &bitmap, Rect dstRect);
56 virtual int applyTo_4ch(TBitmap<TPIXEL, TCHANNEL> &bitmap, Rect dstRect, double alpha);
57 virtual int applyTo_4ch(TBitmap<TPIXEL, TCHANNEL> &bitmap, TBitmap<TCHANNEL, TCHANNEL> &msk, Rect mskRect, Point mskOrig);
58 virtual int applyTo_4ch(TBitmap<TPIXEL, TCHANNEL> &bitmap, TBitmap<TCHANNEL, TCHANNEL> &msk, Rect mskRect, Point mskOrig, double alpha);
59
60 public:
61
62 virtual int isInitOk() {
63 if (xKernel != NULL && yKernel != NULL) {
64 return 1;
65 } else {
66 return 0;
67 }
68 }
69
71 virtual ~TSeparableFilter();
72
73
74 };
75
76 } /* namespace app */
77 #endif /* TSEPARABLEFILTER_HPP_ */