ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
backend.h
Go to the documentation of this file.
1
23
24#ifndef BACKEND_H
25#define BACKEND_H
26
27#include <QObject>
28#include <QImage>
29#include <QString>
30#include <QThread>
31#include <cstdint>
32
33#include "acquisitionworker.h"
34#include <peak/peak.hpp>
35
36class BackEnd : public QObject
37{
38 Q_OBJECT
39
40public:
41 explicit BackEnd(QObject* parent = nullptr);
43
44 bool start();
45
46 bool openDevice();
48
49 int getImageWidth() const;
50 int getImageHeight() const;
51
52private:
53 std::shared_ptr<peak::core::Device> m_device;
54 std::shared_ptr<peak::core::DataStream> m_dataStream;
55 std::shared_ptr<peak::core::NodeMap> m_nodemapRemoteDevice;
56
58 QThread m_acquisitionThread;
59
60signals:
61 void imageReceived(QImage image, double chunkDataExposureTime_ms);
62 void counterChanged(unsigned int frameCounter, unsigned int errorCounter);
63 void messageBoxTrigger(QString messageTitle, QString messageText);
64};
65
66#endif // BACKEND_H
The AcquisitionWorker class is used in a worker thread to capture images from the device continuously...
Definition acquisitionworker.h:41
Definition backend.h:38
int getImageHeight() const
Definition backend.cpp:310
bool openDevice()
int getImageWidth() const
Definition backend.cpp:305
std::shared_ptr< peak::core::Device > m_device
Definition backend.h:100
std::shared_ptr< peak::core::NodeMap > m_nodemapRemoteDevice
Definition backend.h:102
std::shared_ptr< peak::core::DataStream > m_dataStream
Definition backend.h:101
void counterChanged(unsigned int frameCounter, unsigned int errorCounter)
bool start()
AcquisitionWorker * m_acquisitionWorker
Definition backend.h:111
void imageReceived(QImage image, double chunkDataExposureTime_ms)
QThread m_acquisitionThread
Definition backend.h:112
BackEnd(QObject *parent=nullptr)
void messageBoxTrigger(QString messageTitle, QString messageText)
void closeDevice()