iVS3D v2.0.0
Loading...
Searching...
No Matches
nthframe.h
1#ifndef NTHFRAME_H
2#define NTHFRAME_H
3
11#include <QObject>
12#include <QWidget>
13#include <QString>
14#include <QMap>
15#include <QSpinBox>
16#include <QLayout>
17#include <QLabel>
18#include <QSpinBox>
19#include <QSizePolicy>
20#include <QCheckBox>
21#include <QTranslator>
22#include <QCoreApplication>
23
24#include "ialgorithm.h"
25#include "reader.h"
26#include "progressable.h"
27#include "signalobject.h"
28
29#define DESCRIPTION_STYLE "color: rgb(58, 58, 58); border-left: 6px solid rgb(58, 58, 58); border-top-right-radius: 5px; border-bottom-right-radius: 5px; background-color: lightblue;"
30#define NAME_N "N"
31
32// log file
33#define LF_TOTAL "Total"
34
35
48class NthFrame : public IAlgorithm
49{
50 Q_OBJECT
51 Q_PLUGIN_METADATA(IID "iVS3D.IAlgorithm") // implement interface as plugin, use the iid as identifier
52 Q_INTERFACES(IAlgorithm) // declare this as implementation of IAlgorithm interface
53
54public:
58 NthFrame();
59 ~NthFrame();
60
65 QWidget* getSettingsWidget(QWidget *parent);
66
79 std::vector<uint> sampleImages(const std::vector<unsigned int> &imageList, Progressable *receiver, volatile bool *stopped, bool useCuda, LogFileParent* logFile) override;
84 QString getName() const override;
91 void initialize(Reader* reader, QMap<QString, QVariant> buffer, signalObject* sigObj) override;
96 void setSettings(QMap<QString, QVariant> settings) override;
105 QMap<QString, QVariant> generateSettings(Progressable *receiver, bool useCuda, volatile bool* stopped) override;
110 QMap<QString, QVariant> getSettings() override;
111
112
113private slots:
114 void slot_nChanged(int n);
115 void slot_checkboxToggled(bool checked);
116
117private:
118 void createSettingsWidget(QWidget *parent);
119 Reader *m_reader;
120 unsigned int m_N;
121 bool m_keepLonely;
122 uint m_numFrames;
123 QWidget *m_settingsWidget;
124 int m_fps = 30;
125 QSpinBox* m_spinBox = nullptr;
126 QCheckBox* m_checkBox = nullptr;
127};
128
129#endif // NTHFRAME_H
The IAlgorithm interface is used to include plugin implementations for different sampling algorithms....
Definition ialgorithm.h:35
The LogFileParent class logs progress as well as information about a process (e.g....
Definition LogFileParent.h:30
The NthFrame class implements the IAlgorithm plugin interface and provides functionality needed to se...
Definition nthframe.h:49
QMap< QString, QVariant > generateSettings(Progressable *receiver, bool useCuda, volatile bool *stopped) override
generateSettings tries to generate the best settings for the current input
Definition nthframe.cpp:111
QMap< QString, QVariant > getSettings() override
getter for plugin's settings
Definition nthframe.cpp:122
NthFrame()
NthFrame Contructor to create an instance with N initialized to 1.
Definition nthframe.cpp:3
std::vector< uint > sampleImages(const std::vector< unsigned int > &imageList, Progressable *receiver, volatile bool *stopped, bool useCuda, LogFileParent *logFile) override
sampleImages Create an keyframe list with indices to every nth sharp image. Sharp images are specifie...
Definition nthframe.cpp:29
QWidget * getSettingsWidget(QWidget *parent)
showSettings Show a SettingsDialog to the user. This allows to change the value of N.
Definition nthframe.cpp:20
void initialize(Reader *reader, QMap< QString, QVariant > buffer, signalObject *sigObj) override
initialize Blur doesn't use this currently
Definition nthframe.cpp:85
QString getName() const override
getName Returns the plugin Name
Definition nthframe.cpp:80
void setSettings(QMap< QString, QVariant > settings) override
setter for plugin's settings
Definition nthframe.cpp:101
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