iVS3D v2.0.0
Loading...
Searching...
No Matches
algorithmexecutor.h
1#ifndef ALGORITHMEXECUTOR_H
2#define ALGORITHMEXECUTOR_H
3
4#include "progressable.h"
5#include "modelinputpictures.h"
6#include "algorithmthread.h"
7#include "samplethread.h"
8#include "settingsthread.h"
9#include "algorithmthread.h"
10#include "applicationsettings.h"
11#include "stringcontainer.h"
12
13#include <QObject>
14#include <QtConcurrent/QtConcurrent>
15#include <QFuture>
16#include <QFutureWatcher>
17
18struct ALGO_DATA {
20 std::vector<uint> images;
21 bool useCuda;
22};
23
36{
37 Q_OBJECT
38public:
49 int startSampling(int pluginIdx);
55 int startGenerateSettings(int pluginIdx);
56
57signals:
69 void sig_pluginFinished(int index);
70
71public slots:
75 void slot_abort();
80
81private:
82 ALGO_DATA prepareAlgoStart(int pluginIdx);
83
84 int m_pluginIndex = 0;
85 volatile bool m_stopped = false;
86 bool m_algorithmFinished = false;
87 bool m_blurFinished = false;
88 ModelInputPictures *m_mip = nullptr;
89 SampleThread *m_sampleThread = nullptr;
90 QThread *m_currentThread = nullptr;
91 SettingsThread *m_settingsThread = nullptr;
92 QString m_currentOperation = "";
93 int m_operationProgress = 0;
94};
95
96#endif // ALGORITHMEXECUTOR_H
The AlgorithmExecutor class is used to start the execution of a plugin(algorithm) and to provide sign...
Definition algorithmexecutor.h:36
void slot_pluginFinished()
slot_pluginFinished gets invoked by Thread emitting "Finished(..)", meaning it is finished with its w...
Definition algorithmexecutor.cpp:66
int startGenerateSettings(int pluginIdx)
startGenerateSettings prepares data for generateSettings and starts its execution on new Thread
Definition algorithmexecutor.cpp:32
void sig_algorithmStarted()
sig_algorithmStarted signals start of plugin (unused
void slot_abort()
slot_abort gets called by GUI to start aborting the plugin
Definition algorithmexecutor.cpp:50
void sig_pluginFinished(int index)
sig_algorithmFinished gets emitted once the plugin finished and all results are saved to the model
void sig_algorithmAborted()
sig_algorithmAborted signals completed abortion of plugin
int startSampling(int pluginIdx)
startAlgorithm prepares data for plugin and starts its execution on new Thread
Definition algorithmexecutor.cpp:9
The ModelInputPictures class is responsible for saving all the Data regarding the input....
Definition modelinputpictures.h:41
The Progressable interface is used to by multithreaded actions such as sampling or exporting to repor...
Definition progressable.h:18
The SettingsThread class is a derivived class of Algorithmthread and is used to execute the sampling ...
Definition samplethread.h:19
The SettingsThread class is a derivived class of Algorithmthread and is used to execute the generateS...
Definition settingsthread.h:19
Definition algorithmexecutor.h:18