code cleanup: spelling
[blender.git] / source / blender / compositor / operations / COM_DespeckleOperation.h
1 /*
2  * Copyright 2011, Blender Foundation.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  * Contributor: Campbell Barton
19  */
20
21 #ifndef _COM_DespeckleOperation_h
22 #define _COM_DespeckleOperation_h
23 #include "COM_NodeOperation.h"
24
25 class DespeckleOperation : public NodeOperation {
26 private:
27         float m_threshold;
28         float m_threshold_neighbor;
29
30         // int m_filterWidth;
31         // int m_filterHeight;
32
33 protected:
34         SocketReader *m_inputOperation;
35         SocketReader *m_inputValueOperation;
36
37 public:
38         DespeckleOperation();
39         bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
40         void executePixel(float output[4], int x, int y, void *data);
41
42         void setThreshold(float threshold) { this->m_threshold = threshold; }
43         void setThresholdNeighbor(float threshold) { this->m_threshold_neighbor = threshold; }
44
45         void initExecution();
46         void deinitExecution();
47 };
48
49 #endif