Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
bwave::Wavelet::LiftingStep Class Reference

Instances define a lifting step in a wavelet lifting scheme. More...

#include <Wavelet.h>

Inheritance diagram for bwave::Wavelet::LiftingStep:
bwave::Wavelet::WaveletComponent

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

bwave::Wavelet::LiftingStep::LiftingStep ( Type  t,
int  o,
double  d,
double  c0 
)

Construct a LiftingStep from it's specification.

Parameters:
tPRIMAL for a primal, DUAL for a dual lifting step, SSCALE, DSCALE for a scaling step.
oFilter origin.
dDivisor.
c0First 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 
)
See also:
LiftingStep (Type t, int o, double d, double c0)
bwave::Wavelet::LiftingStep::LiftingStep ( Type  t,
int  o,
double  d,
double  c0,
double  c1,
double  c2 
)
See also:
LiftingStep (Type t, int o, double d, double c0)
bwave::Wavelet::LiftingStep::LiftingStep ( Type  t,
int  o,
double  d,
double  c0,
double  c1,
double  c2,
double  c3 
)
See also:
LiftingStep (Type t, int o, double d, double c0)
bwave::Wavelet::LiftingStep::LiftingStep ( Type  t,
int  o,
double  d,
double  c0,
double  c1,
double  c2,
double  c3,
double  c4 
)
See also:
LiftingStep (Type t, int o, double d, double c0)
bwave::Wavelet::LiftingStep::LiftingStep ( Type  t,
int  o,
double  d,
double  c0,
double  c1,
double  c2,
double  c3,
double  c4,
double  c5 
)
See also:
LiftingStep (Type t, int o, double d, double c0)

Member Function Documentation

template<class tp_Type >
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.

Parameters:
s"Low-frequency-" or "Phi-" data channel.
d"High-frequency-" or "Psi-" data channel.
inverseDo inverse lifting.
beUse this extension mode for boundary handling.

Referenced by bwave::Wavelet::invLift(), and bwave::Wavelet::lift().

template<class tp_Type , int tp_size>
void bwave::Wavelet::LiftingStep::applyFS ( blitz::Array< tp_Type, 1 > &  s,
blitz::Array< tp_Type, 1 > &  d,
bool  inverse,
ExtensionMode  be 
) const [inline, protected]

! Add speed-up for divisor()==2^n

! Add speed-up for divisor()==2^n

! Add speed-up for divisor()==2^n

! Add speed-up for divisor()==2^n

double bwave::Wavelet::LiftingStep::coeff ( int  i) const [inline]

Get a filter coefficient.

Parameters:
iindex of the coefficient (i>=0)
Returns:
The i-th filter coefficient.

Referenced by operator==().

double bwave::Wavelet::LiftingStep::divisor ( ) const [inline]

Get the divisor.

Returns:
The lifting step divisor.

Referenced by operator==().

bool bwave::Wavelet::LiftingStep::operator== ( const LiftingStep s) const

Compare two lifting steps.

Parameters:
starget to compare with
Returns:
true if step types, filters and divisors are equal, false if not.

References coeff(), divisor(), bwave::Wavelet::equals(), origin(), size(), and type().

int bwave::Wavelet::LiftingStep::origin ( ) const [inline]

Get the origin of the lifting step filter.

Returns:
The relative position of the first filter coefficient for the convolution.

Referenced by operator==().

int bwave::Wavelet::LiftingStep::size ( ) const [inline]

Get the lifting step filter size.

Returns:
The number of filter coefficients.

Referenced by operator==().

Get type of lifting.

Returns:
PRIMAL for a primal, DUAL for a dual lifting step, SSCALE, DSCALE for a scaling step.

Referenced by operator==().


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