Instances define a lifting step in a wavelet lifting scheme. More...
#include <Wavelet.h>
Public Types | |
enum | Type { PRIMAL, DUAL, SSCALE, DSCALE } |
Constants to model lifting step types. | |
Public Member Functions | |
Type | type () const |
Get type of lifting. | |
int | origin () const |
Get the origin of the lifting step filter. | |
int | size () const |
Get the lifting step filter size. | |
double | coeff (int i) const |
Get a filter coefficient. | |
double | divisor () const |
Get the divisor. | |
template<class tp_Type > | |
void | apply (blitz::Array< tp_Type, 1 > &s, blitz::Array< tp_Type, 1 > &d, bool inverse, ExtensionMode be=CONSTANT_EXT) const |
Apply the lifting step on some data. | |
LiftingStep () | |
Default constructor. | |
LiftingStep (Type t, int o, double d, double c0) | |
Construct a LiftingStep from it's specification. | |
LiftingStep (Type t, int o, double d, double c0, double c1) | |
LiftingStep (Type t, int o, double d, double c0, double c1, double c2) | |
LiftingStep (Type t, int o, double d, double c0, double c1, double c2, double c3) | |
LiftingStep (Type t, int o, double d, double c0, double c1, double c2, double c3, double c4) | |
LiftingStep (Type t, int o, double d, double c0, double c1, double c2, double c3, double c4, double c5) | |
bool | operator== (const LiftingStep &s) const |
Compare two lifting steps. | |
virtual | ~LiftingStep () |
Destructor. | |
Protected Member Functions | |
template<class tp_Type , int tp_size> | |
void | applyFS (blitz::Array< tp_Type, 1 > &s, blitz::Array< tp_Type, 1 > &d, bool inverse, ExtensionMode be) const |
Protected Attributes | |
Type | m_type |
int | m_origin |
std::vector< double > | m_coeffs |
double | m_divisor |
Instances define a lifting step in a wavelet lifting scheme.
A lifting step consists of a filter and a divisor. When applied, the lifting step filters one of two given data channels (s and d), divides the filtered values by the divisor and then adds/subtracts them to/from the data in the other channel. The divisor is necessary for integer lifting, use only integer filter coefficients and integer divisor for integer compatibility. You can use such an integer compatible lifting for both integer and floating point data-types. Divisors which are powers of two will result in much faster computation.
In addition to classical primal/dual lifting steps you can specify scaling steps to scale the d- or s-channel. However, scaling steps lead to information loss in at least one transformation direction when operating on integer data.
bwave::Wavelet::LiftingStep::LiftingStep | ( | Type | t, |
int | o, | ||
double | d, | ||
double | c0 | ||
) |
Construct a LiftingStep from it's specification.
t | PRIMAL for a primal, DUAL for a dual lifting step, SSCALE, DSCALE for a scaling step. |
o | Filter origin. |
d | Divisor. |
c0 | First filter coefficient, use c1 , c2 , etc. for more. |
Use only this constructor (i.e. use only one filter coefficient) to specify a scaling step.
bwave::Wavelet::LiftingStep::LiftingStep | ( | Type | t, |
int | o, | ||
double | d, | ||
double | c0, | ||
double | c1 | ||
) |
bwave::Wavelet::LiftingStep::LiftingStep | ( | Type | t, |
int | o, | ||
double | d, | ||
double | c0, | ||
double | c1, | ||
double | c2 | ||
) |
bwave::Wavelet::LiftingStep::LiftingStep | ( | Type | t, |
int | o, | ||
double | d, | ||
double | c0, | ||
double | c1, | ||
double | c2, | ||
double | c3 | ||
) |
bwave::Wavelet::LiftingStep::LiftingStep | ( | Type | t, |
int | o, | ||
double | d, | ||
double | c0, | ||
double | c1, | ||
double | c2, | ||
double | c3, | ||
double | c4 | ||
) |
bwave::Wavelet::LiftingStep::LiftingStep | ( | Type | t, |
int | o, | ||
double | d, | ||
double | c0, | ||
double | c1, | ||
double | c2, | ||
double | c3, | ||
double | c4, | ||
double | c5 | ||
) |
void bwave::Wavelet::LiftingStep::apply | ( | blitz::Array< tp_Type, 1 > & | s, |
blitz::Array< tp_Type, 1 > & | d, | ||
bool | inverse, | ||
ExtensionMode | be = CONSTANT_EXT |
||
) | const [inline] |
Apply the lifting step on some data.
s | "Low-frequency-" or "Phi-" data channel. |
d | "High-frequency-" or "Psi-" data channel. |
inverse | Do inverse lifting. |
be | Use this extension mode for boundary handling. |
Referenced by bwave::Wavelet::invLift(), and bwave::Wavelet::lift().
void bwave::Wavelet::LiftingStep::applyFS | ( | blitz::Array< tp_Type, 1 > & | s, |
blitz::Array< tp_Type, 1 > & | d, | ||
bool | inverse, | ||
ExtensionMode | be | ||
) | const [inline, protected] |
double bwave::Wavelet::LiftingStep::coeff | ( | int | i | ) | const [inline] |
Get a filter coefficient.
i | index of the coefficient (i>=0) |
Referenced by operator==().
double bwave::Wavelet::LiftingStep::divisor | ( | ) | const [inline] |
bool bwave::Wavelet::LiftingStep::operator== | ( | const LiftingStep & | s | ) | const |
int bwave::Wavelet::LiftingStep::origin | ( | ) | const [inline] |
Get the origin of the lifting step filter.
Referenced by operator==().
int bwave::Wavelet::LiftingStep::size | ( | ) | const [inline] |
Get the lifting step filter size.
Referenced by operator==().
Type bwave::Wavelet::LiftingStep::type | ( | ) | const [inline] |
Get type of lifting.
Referenced by operator==().