latest version v1.9 - last update 10 Apr 2010 |
This functor loads a list of images and transforms each into a vector or all into a matrix where each row contains a vector image. More...
#include <ltiLoadVectorImageList.h>
Classes | |
class | parameters |
The parameters for the class loadVectorImageList. More... | |
Public Member Functions | |
loadVectorImageList () | |
loadVectorImageList (const parameters &par) | |
loadVectorImageList (const loadVectorImageList &other) | |
loadVectorImageList (const std::string &name, loadImageList::parameters::eOperationMode mode=loadImageList::parameters::ListFileName) | |
loadVectorImageList (const std::list< std::string > &names) | |
virtual | ~loadVectorImageList () |
virtual const char * | getTypeName () const |
bool | apply (fvector &img) |
bool | apply (fvector &img, int &rows, int &columns) |
bool | apply (dvector &img) |
bool | apply (dvector &img, int &rows, int &columns) |
bool | apply (fmatrix &images) |
bool | apply (fmatrix &images, int &rows, int &columns) |
bool | apply (dmatrix &images) |
bool | apply (dmatrix &images, int &rows, int &columns) |
loadVectorImageList & | copy (const loadVectorImageList &other) |
loadVectorImageList & | operator= (const loadVectorImageList &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
virtual bool | updateParameters () |
virtual bool | read (ioHandler &handler, const bool complete=true) |
This functor loads a list of images and transforms each into a vector or all into a matrix where each row contains a vector image.
For convenience it is possible to perform downsampling on the images while loading. Note that when getting a matrix of vector images all images must have the same size (i.e. all vector images must have the same length).
Use this functor just like loadImageList.
lti::loadVectorImageList::loadVectorImageList | ( | ) |
Default constructor.
lti::loadVectorImageList::loadVectorImageList | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::loadVectorImageList::loadVectorImageList | ( | const loadVectorImageList & | other | ) |
Copy constructor.
other | the object to be copied |
lti::loadVectorImageList::loadVectorImageList | ( | const std::string & | name, | |
loadImageList::parameters::eOperationMode | mode = loadImageList::parameters::ListFileName | |||
) |
Sets one of two modes: parameters::ListFileName or parameters::DirName and the corresponding name of the file or directory in the parameters.
Default is the filename of a textfile containing image filenames.
See also:
name | name of a file containing image filenames or of a directory | |
mode | parameters::ListFileName or parameters::DirName. |
lti::loadVectorImageList::loadVectorImageList | ( | const std::list< std::string > & | names | ) |
Sets parameters::mode to parameters::NameList and uses the list names for loading the files.
See also:
names | list of image filenames. |
virtual lti::loadVectorImageList::~loadVectorImageList | ( | ) | [virtual] |
Destructor.
bool lti::loadVectorImageList::apply | ( | dmatrix & | images, | |
int & | rows, | |||
int & | columns | |||
) |
bool lti::loadVectorImageList::apply | ( | dmatrix & | images | ) |
Returns all images from the list as rows of the matrix images.
images | all images as rows of the matrix. |
bool lti::loadVectorImageList::apply | ( | fmatrix & | images, | |
int & | rows, | |||
int & | columns | |||
) |
bool lti::loadVectorImageList::apply | ( | fmatrix & | images | ) |
Returns all images from the list as rows of the matrix images.
images | all images as rows of the matrix. |
bool lti::loadVectorImageList::apply | ( | dvector & | img, | |
int & | rows, | |||
int & | columns | |||
) |
bool lti::loadVectorImageList::apply | ( | dvector & | img | ) |
bool lti::loadVectorImageList::apply | ( | fvector & | img, | |
int & | rows, | |||
int & | columns | |||
) |
bool lti::loadVectorImageList::apply | ( | fvector & | img | ) |
virtual functor* lti::loadVectorImageList::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of this functor.
Reimplemented from lti::loadImageList.
loadVectorImageList& lti::loadVectorImageList::copy | ( | const loadVectorImageList & | other | ) |
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::loadImageList.
const parameters& lti::loadVectorImageList::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from lti::loadImageList.
virtual const char* lti::loadVectorImageList::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("loadVectorImageList").
Reimplemented from lti::loadImageList.
loadVectorImageList& lti::loadVectorImageList::operator= | ( | const loadVectorImageList & | other | ) |
Alias for copy member.
other | the functor to be copied |
Reimplemented from lti::loadImageList.
virtual bool lti::loadVectorImageList::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
Read the functor from the given ioHandler.
The default implementation is to read just the parameters object.
Since this virtual method needs to know the exact type of the parameters to call the proper read method, it will just assume that the current functor instance has a valid parameter set. If this is not the case, you need to reimplement the read method to set first a dummy parameter object.
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::functor.
virtual bool lti::loadVectorImageList::updateParameters | ( | ) | [virtual] |
set functor's parameters.
This member makes a copy of theParam: the functor will keep its own copy of the parameters!
Reimplemented from lti::loadImageList.