LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::loadLTI Class Reference

Functor to read a bitmap (LTI) file. More...

#include <ltiLTIFunctor.h>

Inheritance diagram for lti::loadLTI:
Inheritance graph
[legend]
Collaboration diagram for lti::loadLTI:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 loadLTI ()
 ~loadLTI ()
virtual const char * getTypeName () const
bool checkHeader (const std::string &filename, point &imageSize, char &imageType, eCompressionType &compr)
virtual functorclone () 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)

Detailed Description

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.


Constructor & Destructor Documentation

lti::loadLTI::loadLTI (  ) 

default constructor

lti::loadLTI::~loadLTI (  )  [inline]

destructor


Member Function Documentation

bool lti::loadLTI::apply ( matrix< ubyte > &  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.

Parameters:
theChannel the matrix on the file will be loaded here
Returns:
true if successful, false otherwise.
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.

Parameters:
theChannel the matrix on the file will be loaded here
Returns:
true if successful, false otherwise.
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.

Parameters:
theChannel the matrix on the file will be loaded here
Returns:
true if successful, false otherwise.
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.

Parameters:
theChannel the matrix on the file will be loaded here
Returns:
true if successful, false otherwise.
bool lti::loadLTI::apply ( matrix< rgbPixel > &  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.

Parameters:
theChannel the matrix on the file will be loaded here
Returns:
true if successful, false otherwise.
bool lti::loadLTI::checkHeader ( const std::string &  filename,
point imageSize,
char &  imageType,
eCompressionType compr 
)

check the data of the bitmap header

Parameters:
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:

  • None
  • RunLength
  • Flate (only available if zLib is found)
Returns:
true if file is ok
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.

Parameters:
theChannel the matrix on the file will be loaded here
Returns:
true if successful, false otherwise.
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.

Parameters:
theChannel the matrix on the file will be loaded here
Returns:
true if successful, false otherwise.
bool lti::loadLTI::load ( const std::string &  filename,
matrix< ubyte > &  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.

Parameters:
theChannel the matrix on the file will be loaded here
Returns:
true if successful, false otherwise.
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.

Parameters:
theChannel the matrix on the file will be loaded here
Returns:
true if successful, false otherwise.
bool lti::loadLTI::load ( const std::string &  filename,
matrix< rgbPixel > &  theChannel 
)

shortcut for load LTI.

Parameters:
filename name of the file to be readed
theChannel variable where the matrix will be stored
Returns:
true if successful, false otherwise.

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

Generated on Sat Apr 10 15:28:05 2010 for LTI-Lib by Doxygen 1.6.1