VAT  3.0
Video Analysis Tool
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
AcquisitionModule Class Reference

The AcquisitionModule class is a module designed to be in charge of reading a sequence of frames that corresponds to a video. More...

#include <AcquisitionModule.h>

Inheritance diagram for AcquisitionModule:
ModuleInterface ModuleInterface

Public Member Functions

 AcquisitionModule (Datapool *i_data)
 
bool setParameters (QDomNode &config)
 
bool init ()
 
bool run ()
 
bool updateParameters ()
 
QImage * getNextFrame ()
 
QImage * getFrame (int i_numFrame)
 
int getNumFrame ()
 
bool goToFirstFrame ()
 
void openDir ()
 
void openFiles ()
 
bool readImageOnDisk (QImage **)
 
void readTimeStamp (QString &)
 
void setDirectory (QString dir)
 
void setDirectory ()
 
void initialFrame ()
 
 AcquisitionModule (Datapool *i_data)
 Constructor. More...
 
bool setParameters (QDomNode &config)
 Assigns the read values from configuration file to this module. More...
 
bool init ()
 Initializes module routine after first reading of parameters. More...
 
bool run ()
 Executes module routine. This is the life cycle of this module. In this method pointer of current image is moved to the next valid image in the sequence, and stored in the data pool structure. More...
 
bool updateParameters ()
 refreshs parameters of module according to specified at runtime by user. More...
 
QImage * getNextFrame ()
 Obtains the next image from stablished image sequence path. More...
 
QImage * getFrame (int i_numFrame)
 Obtains the i-th image from stablished image sequence path. More...
 
int getNumFrame ()
 Obtains the label number of current image. More...
 
bool goToFirstFrame ()
 Changes the current image index to the frame index that is marked as initial. More...
 
void openDir ()
 Finds sub-folders (only first level of sub-folders). This method is called if m_parseDirectory is enabled.
 
void openFiles ()
 Loads current folder filenames. If m_parseDirectory is enabled it finds filenames from each sub-folder at.
 
bool readImageOnDisk (QImage **)
 Loads current image identified by m_currentImageIndex and saves it to given parameter. It reads as cv::Mat with BGR format and stores as QImage with ARGB 32 bits format. More...
 
void readTimeStamp (QString &)
 Loads image timestamp from imageheader given the path of the image. This method stores the timestamp inside data pool structure. More...
 
void setDirectory (QString dir)
 Assigns the directory given as a class attribute. More...
 
void setDirectory ()
 
void initialFrame ()
 Sets current image index label to the marked as start image label. This label corresponds to integer form of filename.
 
- Public Member Functions inherited from ModuleInterface
 ModuleInterface (Datapool *i_data)
 
void addParameter (QString name, QString value, QString type)
 
void addParameterChild (QString name, QString value, QString type, parameter *parent)
 
parametergetParameter (QString name)
 
parametergetParameter (QString name, parameter *parent)
 
parametergetParameter (QString name, std::multimap< QString, parameter > subList)
 
Parameter2getParameterFromTree (const QString name)
 
Parameter2getParameterFromTree (const QString name, Parameter2 *parent)
 
Parameter2getParameterFromTree (const QString name, std::multimap< QString, Parameter2 > subList)
 
void addParameterToTree (const QString name, const QString value, const QString defaultValue, const ParameterDataType &type)
 
void addChildParameterToTree (const QString &name, const QString &value, const QString &defaultValue, const ParameterDataType &type, Parameter2 *parent)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const bool &defaulValue, bool &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const char &defaulValue, char &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const uchar &defaulValue, uchar &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const int &defaulValue, int &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const uint &defaulValue, uint &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const long &defaulValue, long &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const ulong &defaulValue, ulong &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const float &defaulValue, float &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const double &defaulValue, double &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool getParameterValueFromXml (const QDomNode &rootNode, const QString &parameterName, const QString &defaulValue, QString &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const bool defaulValue, bool &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const int defaulValue, int &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const char defaulValue, char &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const uchar defaulValue, uchar &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const uint defaulValue, uint &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const long defaulValue, long &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const ulong defaulValue, ulong &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const float defaulValue, float &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const double defaulValue, double &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setNodeParameterModule (const QDomNode &rootNode, const QString &parameterName, const QString defaulValue, QString &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const bool defaulValue, bool &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const int defaulValue, int &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const char defaulValue, char &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const uchar defaulValue, uchar &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const uint defaulValue, uint &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const long defaulValue, long &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const ulong defaulValue, ulong &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const float defaulValue, float &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const double defaulValue, double &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 
bool setChildParameterModule (const QDomNode &rootNode, const QString &parameterName, const QString defaulValue, QString &outParameter, QDomNode &parameterNode, bool appendWarning=false)
 

Public Attributes

cv::Mat opencvImage
 Stores current read image.
 
bool m_saveCurrent
 
- Public Attributes inherited from ModuleInterface
std::deque< QString > nameParameters
 
std::deque< QString > valueParameters
 
std::deque< QString > typeParameters
 
std::deque< parameterlistParameters
 
std::deque< Parameter2parametersTree
 
std::string name
 
ModuleType type
 

Static Public Attributes

static int m_defaultMillisecs = 80
 

Additional Inherited Members

- Protected Attributes inherited from ModuleInterface
Datapoolm_data
 

Detailed Description

The AcquisitionModule class is a module designed to be in charge of reading a sequence of frames that corresponds to a video.

AcquisitionModule

Constructor & Destructor Documentation

AcquisitionModule::AcquisitionModule ( Datapool i_data)

Constructor.

Parameters
i_dataThis param is the reference to the global data pool storage.

Member Function Documentation

QImage* AcquisitionModule::getFrame ( int  i_numFrame)

Obtains the i-th image from stablished image sequence path.

Parameters
i_numFramethe i-th image.
Returns
Image.
QImage* AcquisitionModule::getNextFrame ( )

Obtains the next image from stablished image sequence path.

Returns
Image.
int AcquisitionModule::getNumFrame ( )

Obtains the label number of current image.

Returns
Label number of current image in Integer format.
bool AcquisitionModule::goToFirstFrame ( )

Changes the current image index to the frame index that is marked as initial.

Returns
True if index of initial frame has found. False otherwise.
bool AcquisitionModule::init ( )
virtual

Initializes module routine after first reading of parameters.

Returns
True if success.

Implements ModuleInterface.

bool AcquisitionModule::readImageOnDisk ( QImage **  )

Loads current image identified by m_currentImageIndex and saves it to given parameter. It reads as cv::Mat with BGR format and stores as QImage with ARGB 32 bits format.

Parameters
outputThis is the parameter for output storage of loaded image. This must be read as it is: pointer to an QImage pointer.
Returns
True if success.
void AcquisitionModule::readTimeStamp ( QString &  )

Loads image timestamp from imageheader given the path of the image. This method stores the timestamp inside data pool structure.

Parameters
pathThis is the route to the image with the header to be extracted.
bool AcquisitionModule::run ( )
virtual

Executes module routine. This is the life cycle of this module. In this method pointer of current image is moved to the next valid image in the sequence, and stored in the data pool structure.

Returns
True if success.

Implements ModuleInterface.

void AcquisitionModule::setDirectory ( )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void AcquisitionModule::setDirectory ( QString  dir)

Assigns the directory given as a class attribute.

Parameters
dirThis is the directory containing the video sequence.
bool AcquisitionModule::setParameters ( QDomNode &  config)
virtual

Assigns the read values from configuration file to this module.

Parameters
configConfiguration xml node that correspond to this module.
Returns
True if success.

Implements ModuleInterface.

bool AcquisitionModule::updateParameters ( )
virtual

refreshs parameters of module according to specified at runtime by user.

Returns
True if success.

Implements ModuleInterface.


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