35 #pragma warning(push, 0) // no warnings from includes 37 #include <QSharedPointer> 41 #include <opencv2/core.hpp> 43 #pragma warning (disable: 4251) // inlined Qt functions in dll interface 46 #ifdef DLL_CORE_EXPORT 47 #define DllCoreExport Q_DECL_EXPORT 49 #define DllCoreExport Q_DECL_IMPORT 58 #define mDebug qDebug().noquote() << debugName() 59 #define mInfo qInfo().noquote() << debugName() 60 #define mWarning qWarning().noquote() << debugName() 61 #define mCritical qCritical().noquote() << debugName() 66 ModuleConfig(
const QString& moduleName =
"Generic Module");
72 void loadSettings(QSettings& settings);
73 void saveSettings()
const;
74 void saveSettings(QSettings& settings)
const;
75 void saveDefaultSettings()
const;
76 virtual void saveDefaultSettings(QSettings& settings)
const;
79 virtual QString toString()
const;
82 virtual void load(
const QSettings& settings);
83 virtual void save(QSettings& settings)
const;
88 num
checkParam(num param, num min, num max,
const QString & name)
const {
91 qWarning().noquote() << name <<
"must be >" << min <<
"but it is: " << param;
96 qWarning().noquote() << name <<
"must be <" << max <<
"but it is: " << param;
111 const QString& moduleName =
"Generic Module",
112 const QSharedPointer<ScaleFactory>& sf = QSharedPointer<ScaleFactory>());
114 void setScaleFactory(
const QSharedPointer<ScaleFactory>& sf);
115 QSharedPointer<ScaleFactory> scaleFactory();
145 virtual bool isEmpty()
const = 0;
151 virtual QString name()
const;
157 virtual QString toString()
const;
163 virtual bool compute() = 0;
165 virtual void setConfig(QSharedPointer<ModuleConfig>
config);
166 QSharedPointer<ModuleConfig>
config()
const;
171 virtual bool checkInput()
const = 0;
172 QString debugName()
const;
QSharedPointer< ScaleFactory > mScaleFactory
Definition: BaseModule.h:118
Definition: BaseModule.h:63
#define DllCoreExport
Definition: BaseModule.h:49
QDataStream & operator<<(QDataStream &s, const BaseElement &e)
Definition: BaseImageElement.cpp:81
num checkParam(num param, num min, num max, const QString &name) const
Definition: BaseModule.h:88
config
Definition: DependencyCollector.py:271
Definition: BaseModule.h:107
Definition: ScaleFactory.h:95
QSharedPointer< ModuleConfig > mConfig
Definition: BaseModule.h:169
DllCoreExport bool save(const QImage &img, const QString &savePath, int compression=-1)
Saves the specified QImage img.
Definition: Image.cpp:180
DllCoreExport QImage load(const QString &path, bool *ok=0)
Definition: Image.cpp:152
QString mModuleName
Definition: BaseModule.h:85
This is the base class for all modules. It provides all functions which are implemented by the module...
Definition: BaseModule.h:126
Definition: Algorithms.cpp:45