iVS3D v2.0.0
Loading...
Searching...
No Matches
AlgorithmManager Class Reference

The AlgorithmManager class is a singleton which is responisble for loading and executing the IAlgorithm plugins. More...

#include <algorithmmanager.h>

Inheritance diagram for AlgorithmManager:

Public Member Functions

QWidget * getSettingsWidget (QWidget *parent, uint idx)
 getSettingsWidget Gets the Settings widget from the algorithm with the given index
 
std::vector< uint > sample (std::vector< uint > sharpImages, Progressable *receiver, volatile bool *stopped, int idx, bool useCuda, LogFileParent *logFile)
 sample Executes the indexed algorithm
 
QStringList getAlgorithmNames ()
 ‍**
 
QString getPluginNameToIndex (int index)
 getIndexToPluginName Takes the index of a plugin and returns it's translated name.
 
QString getPluginFileNameToIndex (int index)
 getPluginFileNameToIndex Takes the index of a plugin and returns it's file name.
 
QString getPluginNameFromFileName (QString FileName)
 getPluginNameFromFileName Takes the name of a plugin file and returns it's translated name.
 
int getIndexFromFileName (QString FileName)
 getIndexFromFileName Takes the name of a plugin file and returns its index.
 
int getAlgorithmCount ()
 getAlgorithmCount returns the number of loaded IAlgorithms
 
void initializePlugins (Reader *reader, QMap< QString, QMap< QString, QVariant > > allBuffer)
 initializePlugins calls the initialize method on all loaded IAlgorithms
 
void setSettings (int idx, QMap< QString, QVariant > settings)
 setSettings sets the settings of the indexed plugin
 
QMap< QString, QVariant > generateSettings (int idx, Progressable *receiver, bool useCuda, volatile bool *stopped)
 generateSettings returns the generated settings of the indexed plugin
 
QMap< QString, QVariant > getSettings (int idx)
 getSettings gets the settings of the indexed plugin
 

Static Public Member Functions

static AlgorithmManagerinstance ()
 instance singleton method
 

Detailed Description

The AlgorithmManager class is a singleton which is responisble for loading and executing the IAlgorithm plugins.

Author
Patrick Binder
Date
2021/02/15

Member Function Documentation

◆ generateSettings()

QMap< QString, QVariant > AlgorithmManager::generateSettings ( int  idx,
Progressable receiver,
bool  useCuda,
volatile bool *  stopped 
)

generateSettings returns the generated settings of the indexed plugin

Parameters
idxIndex of the plugin
receiveris a progressable, which displays the already made progress
bufferQVariant with the buffered data form last call to sampleImages
useCudatrue if cv::cuda can be used
stoppedBool to indicated user stopped the generation of settings

◆ getAlgorithmCount()

int AlgorithmManager::getAlgorithmCount ( )

getAlgorithmCount returns the number of loaded IAlgorithms

Returns
The number of loaded IAlgorithms

◆ getIndexFromFileName()

int AlgorithmManager::getIndexFromFileName ( QString  FileName)

getIndexFromFileName Takes the name of a plugin file and returns its index.

Parameters
FileNamenmae of the plugin file
Returns
index Index of the plugin

◆ getPluginFileNameToIndex()

QString AlgorithmManager::getPluginFileNameToIndex ( int  index)

getPluginFileNameToIndex Takes the index of a plugin and returns it's file name.

Parameters
indexIndex of the plugin
Returns
Name of the plugin file

◆ getPluginNameFromFileName()

QString AlgorithmManager::getPluginNameFromFileName ( QString  FileName)

getPluginNameFromFileName Takes the name of a plugin file and returns it's translated name.

Parameters
FileNamenmae of the plugin file
Returns
(possibly) translated name of the plugin

◆ getPluginNameToIndex()

QString AlgorithmManager::getPluginNameToIndex ( int  index)

getIndexToPluginName Takes the index of a plugin and returns it's translated name.

Parameters
indexIndex of the plugin
Returns
(possibly) translated name of the plugin

◆ getSettings()

QMap< QString, QVariant > AlgorithmManager::getSettings ( int  idx)

getSettings gets the settings of the indexed plugin

Parameters
idxIndex of the plugin
Returns
Settings map

◆ getSettingsWidget()

QWidget * AlgorithmManager::getSettingsWidget ( QWidget *  parent,
uint  idx 
)

getSettingsWidget Gets the Settings widget from the algorithm with the given index

Parameters
parentThe parent Widget
idxIndex of the Algorithm
Returns
Settings widget of the indexed algorithm

◆ initializePlugins()

void AlgorithmManager::initializePlugins ( Reader reader,
QMap< QString, QMap< QString, QVariant > >  allBuffer 
)

initializePlugins calls the initialize method on all loaded IAlgorithms

Parameters
readerThe reader needed for the initialize method according to IAlgorithm

◆ instance()

AlgorithmManager & AlgorithmManager::instance ( )
static

instance singleton method

Returns
The one istance of this class

◆ sample()

std::vector< uint > AlgorithmManager::sample ( std::vector< uint >  sharpImages,
Progressable receiver,
volatile bool *  stopped,
int  idx,
bool  useCuda,
LogFileParent logFile 
)

sample Executes the indexed algorithm

Parameters
Parametersaccording to the IAlgorithm interface
idxIndex of the Algorithm
Returns
Keyframe list calculated by the plugin

◆ setSettings()

void AlgorithmManager::setSettings ( int  idx,
QMap< QString, QVariant >  settings 
)

setSettings sets the settings of the indexed plugin

Parameters
idxIndex of the plugin
settingsSettings map

The documentation for this class was generated from the following files: