-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcvimagedisplaywidget.h
74 lines (56 loc) · 1.57 KB
/
cvimagedisplaywidget.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef TVSEG_UI_CVIMAGEDISPLAYWIDGET_H
#define TVSEG_UI_CVIMAGEDISPLAYWIDGET_H
#include "imagewidget.h"
#include <QWidget>
#include "tvseg/util/includeopencv.h"
class QLabel;
class QScrollArea;
class QStatusBar;
class QToolBar;
class QScrollBar;
namespace tvseg_ui {
class CvImageDisplayWidget : public QWidget
{
Q_OBJECT
public:
explicit CvImageDisplayWidget(QWidget *parent = 0);
virtual void setImage(cv::Mat image);
virtual void clearImage();
signals:
public slots:
protected slots:
void zoomIn();
void zoomOut();
void normalSize();
void fitScale();
virtual void updateImageDisplay();
protected:
void resizeEvent(QResizeEvent *);
bool eventFilter(QObject *obj, QEvent *event);
QString positionValueString(QPoint widgetPos);
void createActions();
void updateActions();
void updateInfo();
void scaleImage(double factor);
void adjustScrollBar(QScrollBar *scrollBar, double factor);
bool adjustInputImage(const cv::Mat &input);
virtual cv::Mat postProcessDisplayImage(cv::Mat image);
virtual void postProcessDisplayPixmap(QPixmap &pixmap);
protected:
cv::Mat image_;
ImageWidget *imageWidget_;
QScrollArea *imageScrollArea_;
double scaleFactor_;
QToolBar* toolBar_;
QStatusBar* statusBar_;
QLabel *infoLabel_;
QAction *showStatusAct_;
QAction *zoomInAct_;
QAction *zoomOutAct_;
QAction *normalSizeAct_;
QAction *fitScaleAct_;
QAction *remapValuesAct_;
QAction *histEqualValuesAct_;
};
} // namespace tvseg_ui
#endif // TVSEG_UI_CVIMAGEDISPLAYWIDGET_H