iVS3D v2.0.0
Loading...
Searching...
No Matches
algorithmthread.h
1#ifndef ALGORITHMTHREAD_H
2#define ALGORITHMTHREAD_H
3
4#include <QThread>
5#include <opencv2/core.hpp>
6
7#include "reader.h"
8#include "plugin/algorithmmanager.h"
9#include "progressable.h"
10#include "logmanager.h"
11#include "logfile.h"
12
25template<typename outType>
26class AlgorithmThread : public QThread
27{
28public:
33 AlgorithmThread(Progressable *receiver, std::vector<uint> images, volatile bool *stopped, int pluginIdx, bool useCuda);
38 outType getOutput();
43 int getResult();
44
45protected:
49 virtual void run() = 0;
50
51 outType m_output;
52 Progressable *m_receiver;
53 int m_pluginIdx;
54 std::vector<uint> m_images = {};
55 volatile bool *m_stopped;
56 int m_result = -1;
57 bool m_useCuda;
58 LogFile *m_logFile;
59};
60
61#endif // ALGORITHMTHREAD_H
The AlgorithmThread class is used to start the execution of a major plugin task on a new thread....
Definition algorithmthread.h:27
virtual void run()=0
QThread method stub which is implemented in its child classes.
outType getOutput()
getOutput getter for the computed output (for example keyframes or generated settings )
Definition algorithmthread.cpp:15
int getResult()
getResult Getter for the status of the plugin calulation
Definition algorithmthread.cpp:23
The LogFile class logs progress as well as information about a process (e.g. Inport,...
Definition logfile.h:23
The Progressable interface is used to by multithreaded actions such as sampling or exporting to repor...
Definition progressable.h:18