-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConvolve.h
43 lines (35 loc) · 1.09 KB
/
Convolve.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// ======================================================================
// IMPROC: Image Processing Software Package
// Copyright (C) 2017 by George Wolberg
//
// Convolve.h - Convolve widget
//
// Written by: George Wolberg, 2017
// ======================================================================
#ifndef CONVOLVE_H
#define CONVOLVE_H
#include "ImageFilter.h"
class Convolve : public ImageFilter {
Q_OBJECT
public:
Convolve (QWidget *parent = 0); // constructor
QGroupBox* controlPanel (); // create control panel
bool applyFilter (ImagePtr, bool, ImagePtr); // apply filter to input
void convolve (ImagePtr, ImagePtr, ImagePtr);
void initShader();
void gpuProgram(int pass); // use GPU program to apply filter
protected slots:
int load ();
private:
// widgets
QPushButton* m_button; // Convolve pushbutton
QTextEdit* m_values; // text field for kernel values
QGroupBox* m_ctrlGrp; // groupbox for panel
// variables
QString m_file;
QString m_currentDir;
ImagePtr m_kernel;
int m_width; // input image width
int m_height; // input image height
};
#endif // CONVOLVE_H