FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
MathOperation.h
1 /*
2  * Copyright 2013 Lukas Jirkovsky
3  *
4  * This file is part of FotoSHOCK.
5  *
6  * FotoSHOCK is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, version 3 of the License.
9  *
10  * FotoSHOCK is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with FotoSHOCK. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef MATHOPERATION_H
20 #define MATHOPERATION_H
21 
22 #include <FotoSHOCKOperation.h>
23 
25 {
26  public:
27  enum Enum {ADD, SUBTRACT, MULTIPLY};
28 
29  MathOperation();
30 
31  virtual void runOperation(const FotoSHOCKcore::Inputs& sources, const FotoSHOCKcore::Outputs& dest,
32  std::vector<FotoSHOCKcore::UpdateInfo>& ROI, const long int stamp);
33  virtual QDialog* getUI(QWidget* parent);
34 
35  Enum getOperation() const;
36  void changeOperation(Enum operation);
37  private:
38  template <FotoSHOCKcore::ValueType::Enum PixelFormat>
39  void runMathOperation(const FotoSHOCKcore::Inputs& sources, const FotoSHOCKcore::Outputs& dest,
40  std::vector<FotoSHOCKcore::UpdateInfo>& ROI, const long int stamp);
41 
42  Enum m_operation;
43 
44 };
45 
47  public:
48  virtual const char* name() {return "Math Ops";}
49  virtual const char* description() {return "Apply mathematical operation on images.";}
52 };
53 
54 #endif // MATHOPERATION_H