-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathmainwindow.h
More file actions
58 lines (45 loc) · 1.57 KB
/
mainwindow.h
File metadata and controls
58 lines (45 loc) · 1.57 KB
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "sliderctrl.h"
#include <ic4/ic4.h>
#include <ic4-interop/interop-Qt.h>
#include <QMainWindow>
#include <QPushButton>
#include <QtGui>
class MainWindow : public QMainWindow, ic4::QueueSinkListener
{
Q_OBJECT
public:
explicit MainWindow(QWidget* parent = nullptr);
~MainWindow();
private slots:
void onThresholdDoLPChanged(int value);
void onThresholdIntensityChanged(int value);
private:
bool checkForGenTLProducers();
void onSelectDevice();
void onDeviceProperties();
void startstopstream();
void closeEvent(QCloseEvent* event);
void updateControls();
void createUI();
bool isPolarizationCamera();
bool setPolarizationFormat();
void ThresholdPolarizedADIMono8(const ic4::ImageBuffer& src, ic4::ImageBuffer& dest);
void ThresholdPolarizedADIRGB8(const ic4::ImageBuffer& src, ic4::ImageBuffer& dest);
int _ThresholdDoLP = 30;
int _ThresholdIntensity = 10;
ic4interop::Qt::DisplayWidget* _VideoWidget = nullptr;
QPushButton* _btnDevice = new QPushButton("Device");
QPushButton* _btnProperties = new QPushButton("Properties");
QPushButton* _btnLiveVideo = new QPushButton("Start");
SliderControl* _sldThresholdDoLP = nullptr;
SliderControl* _sldThresholdIntensity = nullptr;
ic4::Grabber _grabber;
std::shared_ptr<ic4::Display> _display;
std::shared_ptr<ic4::QueueSink> _queueSink;
std::shared_ptr<ic4::BufferPool> _bufferPool;
bool sinkConnected(ic4::QueueSink& sink, const ic4::ImageType& imageType, size_t min_buffers_required) final;
void framesQueued(ic4::QueueSink& sink) final;
};
#endif // MAINWINDOW_H