iVS3D v2.0.0
Loading...
Searching...
No Matches
concurrentreader.h
1#ifndef CONCURRENTREADER_H
2#define CONCURRENTREADER_H
3
4#include <QObject>
5#include <QThread>
6#include <QTimer>
7
8#include "reader.h"
9#include "opencv2/core.hpp"
10
27class ConcurrentReader : public QObject
28{
29 Q_OBJECT
30public:
35 explicit ConcurrentReader(Reader *reader);
37
38public slots:
43 void slot_read(uint idx);
44
45private slots:
49 void slot_pull();
50
51signals:
57 void sig_imageReady(uint idx, const cv::Mat &img);
58
59private:
60 Reader *m_reader;
61 uint m_next_idx;
62 QThread m_readerThread;
63 QTimer *m_timer;
64};
65
66#endif // CONCURRENTREADER_H
The ConcurrentReader class is a wrapper for a Reader object. The ConcurrentReader can be moved to a s...
Definition concurrentreader.h:28
void slot_read(uint idx)
[slot] slot_read adds the requested idx to the waiting-queue or starts the reader if the queue is emp...
Definition concurrentreader.cpp:16
void sig_imageReady(uint idx, const cv::Mat &img)
[signal] sig_imageReady is emitted after image is loaded.
void slot_pull()
slot_pull takes the most recent index from queue and reads the image from.
Definition concurrentreader.cpp:27
The Reader interface defines functions which are used for reading and parsing the import.
Definition reader.h:23