latest version v1.9 - last update 10 Apr 2010 |
Functor to read a bitmap (LTI) file. More...
#include <ltiLTIFunctor.h>
Public Member Functions | |
loadLTI () | |
~loadLTI () | |
virtual const char * | getTypeName () const |
bool | checkHeader (const std::string &filename, point &imageSize, char &imageType, eCompressionType &compr) |
virtual functor * | clone () const |
bool | apply (matrix< rgbPixel > &theChannel) |
bool | apply (imatrix &theChannel) |
bool | apply (dmatrix &theChannel) |
bool | apply (fmatrix &theChannel) |
bool | apply (matrix< ubyte > &theChannel) |
bool | load (const std::string &filename, matrix< rgbPixel > &theChannel) |
bool | load (const std::string &filename, fmatrix &theChannel) |
bool | load (const std::string &filename, matrix< ubyte > &theChannel) |
bool | load (const std::string &filename, imatrix &theChannel) |
bool | load (const std::string &filename, dmatrix &theChannel) |
Functor to read a bitmap (LTI) file.
It is NOT thread save, this means, the SAME instance can not be used from different threads or processes at the same time. If this occurs an unpredictible behaviour must be expected!. If you need to read or write many LTIs at the same time, use in each thread an instance of this functor, or protect your code with semaphores.
lti::loadLTI::loadLTI | ( | ) |
default constructor
lti::loadLTI::~loadLTI | ( | ) | [inline] |
destructor
Loads a matrix of a given type.
There are implementations for image, channel, channel8, imatrix, and dmatrix. If the content of the file does not match the parameter type, the method will try to convert it by using the matrix's castFrom method, if such a conversion makes sense. Otherwise, it will return false.
theChannel | the matrix on the file will be loaded here |
bool lti::loadLTI::apply | ( | fmatrix & | theChannel | ) |
Loads a matrix of a given type.
There are implementations for image, channel, channel8, imatrix, and dmatrix. If the content of the file does not match the parameter type, the method will try to convert it by using the matrix's castFrom method, if such a conversion makes sense. Otherwise, it will return false.
theChannel | the matrix on the file will be loaded here |
bool lti::loadLTI::apply | ( | dmatrix & | theChannel | ) |
Loads a matrix of a given type.
There are implementations for image, channel, channel8, imatrix, and dmatrix. If the content of the file does not match the parameter type, the method will try to convert it by using the matrix's castFrom method, if such a conversion makes sense. Otherwise, it will return false.
theChannel | the matrix on the file will be loaded here |
bool lti::loadLTI::apply | ( | imatrix & | theChannel | ) |
Loads a matrix of a given type.
There are implementations for image, channel, channel8, imatrix, and dmatrix. If the content of the file does not match the parameter type, the method will try to convert it by using the matrix's castFrom method, if such a conversion makes sense. Otherwise, it will return false.
theChannel | the matrix on the file will be loaded here |
Loads a matrix of a given type.
There are implementations for image, channel, channel8, imatrix, and dmatrix. If the content of the file does not match the parameter type, the method will try to convert it by using the matrix's castFrom method, if such a conversion makes sense. Otherwise, it will return false.
theChannel | the matrix on the file will be loaded here |
bool lti::loadLTI::checkHeader | ( | const std::string & | filename, | |
point & | imageSize, | |||
char & | imageType, | |||
eCompressionType & | compr | |||
) |
check the data of the bitmap header
filename | name of the bitmap file to be tested | |
imageSize | returns the size of the bitmap: imageSize.x is the number of columns and imageSize.y the numbeer of rows. | |
imageType | type of the image found in file. It can be: | |
compr | compression type. It can be:
|
virtual functor* lti::loadLTI::clone | ( | ) | const [virtual] |
returns a pointer to a clone of the functor.
Implements lti::functor.
virtual const char* lti::loadLTI::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("loadLTI")
Reimplemented from lti::ioLTI.
bool lti::loadLTI::load | ( | const std::string & | filename, | |
dmatrix & | theChannel | |||
) |
Loads a matrix of a given type.
There are implementations for image, channel, channel8, imatrix, and dmatrix. If the content of the file does not match the parameter type, the method will try to convert it by using the matrix's castFrom method, if such a conversion makes sense. Otherwise, it will return false.
theChannel | the matrix on the file will be loaded here |
bool lti::loadLTI::load | ( | const std::string & | filename, | |
imatrix & | theChannel | |||
) |
Loads a matrix of a given type.
There are implementations for image, channel, channel8, imatrix, and dmatrix. If the content of the file does not match the parameter type, the method will try to convert it by using the matrix's castFrom method, if such a conversion makes sense. Otherwise, it will return false.
theChannel | the matrix on the file will be loaded here |
Loads a matrix of a given type.
There are implementations for image, channel, channel8, imatrix, and dmatrix. If the content of the file does not match the parameter type, the method will try to convert it by using the matrix's castFrom method, if such a conversion makes sense. Otherwise, it will return false.
theChannel | the matrix on the file will be loaded here |
bool lti::loadLTI::load | ( | const std::string & | filename, | |
fmatrix & | theChannel | |||
) |
Loads a matrix of a given type.
There are implementations for image, channel, channel8, imatrix, and dmatrix. If the content of the file does not match the parameter type, the method will try to convert it by using the matrix's castFrom method, if such a conversion makes sense. Otherwise, it will return false.
theChannel | the matrix on the file will be loaded here |
shortcut for load LTI.
filename | name of the file to be readed | |
theChannel | variable where the matrix will be stored |