iVS3D v2.0.0
Loading...
Searching...
No Matches
ialgorithm.h
1#ifndef IALGORITHM_H
2#define IALGORITHM_H
3
4#include <QObject>
5#include "opencv2/core.hpp"
6//#include "cvmat_qmetadata.h"
7#include "iVS3D-pluginInterface_global.h"
8#include <QDebug>
9
10#include "reader.h"
11#include "progressable.h"
12#include "LogFileParent.h"
13#include "signalobject.h"
14
34class IVS3DPLUGININTERFACE_EXPORT IAlgorithm : public QObject
35{
36 Q_OBJECT
37
38public:
39 virtual ~IAlgorithm() {}
46 virtual QWidget* getSettingsWidget(QWidget* parent) = 0;
47
52 virtual QString getName() const = 0;
53
106 virtual std::vector<uint> sampleImages(const std::vector<uint> &imageList, Progressable* receiver, volatile bool* stopped, bool useCuda, LogFileParent *logFile) = 0;
107
114 virtual void initialize(Reader* reader, QMap<QString, QVariant> buffer, signalObject* sigObj) = 0;
115
120 virtual void setSettings(QMap<QString, QVariant> settings) = 0;
121
126 virtual QMap<QString, QVariant> getSettings() = 0;
127
135 virtual QMap<QString, QVariant> generateSettings(Progressable *receiver, bool useCuda, volatile bool* stopped) {return {}; };
136
137signals:
142 void updateKeyframes(std::vector<uint> keyframes);
143
148 void updateBuffer(QMap<QString, QVariant> buffer);
149};
150
151Q_DECLARE_INTERFACE(IAlgorithm, "iVS3D.IAlgorithm")
152
153#endif // IALGORITHM_H
The IAlgorithm interface is used to include plugin implementations for different sampling algorithms....
Definition ialgorithm.h:35
virtual QWidget * getSettingsWidget(QWidget *parent)=0
getSettingsWidget is provides an QWidget to display plugin specific settings to the user....
virtual std::vector< uint > sampleImages(const std::vector< uint > &imageList, Progressable *receiver, volatile bool *stopped, bool useCuda, LogFileParent *logFile)=0
sampleImages selects the keyframes from the given images. The computation is based on the images prov...
virtual void setSettings(QMap< QString, QVariant > settings)=0
setter for plugin's settings
void updateBuffer(QMap< QString, QVariant > buffer)
updateBuffer stores the given buffer for future uses of the buffered data.
virtual QMap< QString, QVariant > getSettings()=0
getter for plugin's settings
void updateKeyframes(std::vector< uint > keyframes)
updateKeyframes updates the keyframe list in the core object.
virtual QString getName() const =0
getName returns the display name for the plugin. This name is presented to the user.
virtual QMap< QString, QVariant > generateSettings(Progressable *receiver, bool useCuda, volatile bool *stopped)
generateSettings tries to generate the best settings for the current input
Definition ialgorithm.h:135
virtual void initialize(Reader *reader, QMap< QString, QVariant > buffer, signalObject *sigObj)=0
initialize the the IAlgorithm and the settings widget with plausible values from the Reader.
The LogFileParent class logs progress as well as information about a process (e.g....
Definition LogFileParent.h:30
The Progressable interface is used to by multithreaded actions such as sampling or exporting to repor...
Definition progressable.h:18
The Reader interface defines functions which are used for reading and parsing the import.
Definition reader.h:23
Definition signalobject.h:10