forked from amungo/ItsFx3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconvolutionwidget.h
47 lines (38 loc) · 966 Bytes
/
convolutionwidget.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
44
45
46
47
#ifndef CONVOLUTIONWIDGET_H
#define CONVOLUTIONWIDGET_H
#include <mutex>
#include <vector>
#include <QWidget>
#include <QColor>
#include "gcacorr/convresult.h"
class ConvolutionWidget : public QWidget
{
Q_OBJECT
public:
explicit ConvolutionWidget(QWidget *parent = 0);
void SetConvolution( ConvResult* convolution );
void SetUnderThreshold( bool is_under_threshold );
private:
std::mutex mtx;
ConvResult* conv = nullptr;
std::vector<QColor> colors;
std::vector<std::vector<QColor>> conv_paint;
QSize getFrameSize();
QSize frameSize;
std::vector<int> xtr;
std::vector<int> ytr;
int lastXSize = 0;
int lastYSize = 0;
int stepDeg = 1;
float xscale = 1.0f;
float yscale = 1.0f;
QSize lastFrameSize;
void recalcTransform();
bool is_under_threshold;
signals:
public slots:
// QWidget interface
protected:
void paintEvent(QPaintEvent *event);
};
#endif // CONVOLUTIONWIDGET_H