latest version v1.9 - last update 10 Apr 2010 |
This class allows the reconstruction of channels which were wavelet- transformed by the functor lti::qmf. More...
#include <ltiQmfInverse.h>
Public Types | |
typedef lti::qmf::parameters | parameters |
Public Member Functions | |
qmfInverse () | |
qmfInverse (const qmfInverse &other) | |
virtual | ~qmfInverse () |
virtual const char * | getTypeName () const |
bool | apply (channel &srcdest) |
bool | apply (vector< float > &srcdest) |
bool | apply (const channel &src, channel &dest) |
bool | apply (const vector< float > &src, vector< float > &dest) |
qmfInverse & | copy (const qmfInverse &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Protected Member Functions | |
void | mergeTwo (vector< float > &src, const int &from, const int &to) const |
void | mergeTwo (channel &src, const int &fromRow, const int &toRow, const int &fromCol, const int &toCol) const |
void | mergeTwoCol (channel &src, const int &fromRow, const int &toRow, const int &fromCol, const int &toCol) const |
void | initializeUpsamplers (const bool onlyRows=true) |
Protected Attributes | |
upsampling | lowUpsampler |
upsampling | highUpsampler |
upsampling | lowColUpsampler |
upsampling | highColUpsampler |
This class allows the reconstruction of channels which were wavelet- transformed by the functor lti::qmf.
The low-pass kernel specified in the parameters will be used to calculate the wavelet coefficients required in the inverse wavelet transform.
the parameters for the class qmfInverse are the same than for the qmf functor (see lti::qmf::parameters).
This way it is really easy to set the parameters for the transform and its inverse:
lti::qmf theTransform; lti::qmfInverse theInvTransform; lti::qmf::parameters qmfParam; qmfParam.setKernel(haarKernel()); // use the haar kernel qmfParam.levels = 3; // decompose in one low-pass band and // three high-pass bands theTransform.setParameters(qmfParam); theInvTransform.setParameters(qmfParam); // the same parameters can be // used!
lti::qmfInverse::qmfInverse | ( | ) |
default constructor
lti::qmfInverse::qmfInverse | ( | const qmfInverse & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::qmfInverse::~qmfInverse | ( | ) | [virtual] |
destructor
operates on a copy of the given parameters.
src | vector<float> with the source data. | |
dest | vector<float> where the result will be left. |
dest
. bool lti::qmfInverse::apply | ( | vector< float > & | srcdest | ) |
operates on the given parameter.
srcdest | vector<float> with the source data. The result will be left here too. |
srcdest
. bool lti::qmfInverse::apply | ( | channel & | srcdest | ) |
operates on the given parameter.
srcdest | channel with the source data. The result will be left here too. |
srcdest
. virtual functor* lti::qmfInverse::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
qmfInverse& lti::qmfInverse::copy | ( | const qmfInverse & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
const parameters& lti::qmfInverse::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::modifier.
virtual const char* lti::qmfInverse::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("qmfInverse")
Reimplemented from lti::modifier.
void lti::qmfInverse::initializeUpsamplers | ( | const bool | onlyRows = true |
) | [protected] |
initialize both upsampling functors, using the kernel filter specified in the parameters.
If onlyRows is false, also the upsamplers for columns of channels will be initialized.
void lti::qmfInverse::mergeTwo | ( | channel & | src, | |
const int & | fromRow, | |||
const int & | toRow, | |||
const int & | fromCol, | |||
const int & | toCol | |||
) | const [protected] |
transform just the two bands between the given indices for each row.
The result will be left at the same place! Do not forget to initialize the upsampling functors before calling this member!
void lti::qmfInverse::mergeTwo | ( | vector< float > & | src, | |
const int & | from, | |||
const int & | to | |||
) | const [protected] |
transform just the two bands between the given indices.
The result will be left at the same place! Do not forget to initialize the upsampling functors before calling this member!
void lti::qmfInverse::mergeTwoCol | ( | channel & | src, | |
const int & | fromRow, | |||
const int & | toRow, | |||
const int & | fromCol, | |||
const int & | toCol | |||
) | const [protected] |
transform just the two bands between the given indices for each column.
The result will be left at the same place! Do not forget to initialize the upsampling functors before calling this member!
upsampling lti::qmfInverse::highColUpsampler [protected] |
upsampling functor for the high-frecuency band of columns
upsampling lti::qmfInverse::highUpsampler [protected] |
upsampling functor for the high-frecuency band
upsampling lti::qmfInverse::lowColUpsampler [protected] |
upsampling functor for the low-frecuency band of columns
upsampling lti::qmfInverse::lowUpsampler [protected] |
upsampling functor for the low-frecuency band