Classes | Public Member Functions | Static Public Member Functions | Protected Attributes
bwave::Wavelet Class Reference

General Wavelet class. More...

#include <Wavelet.h>

List of all members.

Classes

class  LiftingStep
 Instances define a lifting step in a wavelet lifting scheme. More...
class  WaveletComponent
 Superclass for LiftingStep and other possible components / operations defining a wavelet. More...

Public Member Functions

const std::string & name () const
 Get the name of the wavelet.
bool integerCompatible () const
 Query if wavelet is integer compatible.
bool normalized () const
 Query if wavelet and scaling coefficients are normalized after lifting.
int steps () const
 Get number of steps in the lifting scheme.
const LiftingStepliftingStep (int i) const
 Get a step of the lifting scheme.
double normS () const
 Get the normalization factor for the scaling coefficients.
double normD () const
 Get the normalization factor for the wavelet coefficients.
bool operator== (const Wavelet &w) const
 Compare with another wavelet.
template<class tp_Type >
void lift (blitz::Array< tp_Type, 1 > &s, blitz::Array< tp_Type, 1 > &d, ExtensionMode be=CONSTANT_EXT) const
 Apply the lifting scheme on the data channels s and d.
template<class tp_Type >
void invLift (blitz::Array< tp_Type, 1 > &s, blitz::Array< tp_Type, 1 > &d, ExtensionMode be=CONSTANT_EXT) const
 Apply the inverse lifting scheme on the data channels s and d.
blitz::Array< double, 1 > forwardFkt (unsigned int size=1<< 9, int scale=6, unsigned int trans=3) const
 Get sampled values (i.e. the form) of the forward transformation scaling or wavelet function.
blitz::Array< double, 1 > inverseFkt (unsigned int size=1<< 9, int scale=6, unsigned int trans=3) const
 Get sampled values (i.e. the form) of the inverse transformation scaling or wavelet function.
 Wavelet ()
 Construct an empty wavelet.
 Wavelet (const std::string &name, double ns, double nd, const LiftingStep &s0, const LiftingStep &s1)
 Construct a wavelet and it's lifting scheme.
 Wavelet (const std::string &name, double ns, double nd, const LiftingStep &s0, const LiftingStep &s1, const LiftingStep &s2)
 Wavelet (const std::string &name, double ns, double nd, const LiftingStep &s0, const LiftingStep &s1, const LiftingStep &s2, const LiftingStep &s3)

Static Public Member Functions

static bool equals (double x, double y)
 Compare two numbers within numeric limits.

Protected Attributes

std::string m_spec
double m_nS
double m_nD
std::vector< LiftingStepm_steps

Detailed Description

General Wavelet class.

Instances define specific lifting schemes and therefore specific wavelets. Keep your lifting steps integer compatible if you want do operate on both integer an floating point data-types. Some constant instances of this class are available for instant usage, for example WL_HAAR and WL_D_4.


Constructor & Destructor Documentation

bwave::Wavelet::Wavelet ( const std::string &  name,
double  ns,
double  nd,
const LiftingStep s0,
const LiftingStep s1 
)

Construct a wavelet and it's lifting scheme.

Parameters:
namethe name of the wavelet.
nsnormalization factor for scaling coefficients.
ndnormalization factor for wavelet coefficients.
s0first lifting step.
s1second lifting step, more steps can be specified.

The normalisation factors can later be queried using normS() and normD().

bwave::Wavelet::Wavelet ( const std::string &  name,
double  ns,
double  nd,
const LiftingStep s0,
const LiftingStep s1,
const LiftingStep s2 
)
bwave::Wavelet::Wavelet ( const std::string &  name,
double  ns,
double  nd,
const LiftingStep s0,
const LiftingStep s1,
const LiftingStep s2,
const LiftingStep s3 
)

Member Function Documentation

bool bwave::Wavelet::equals ( double  x,
double  y 
) [static]

Compare two numbers within numeric limits.

Returns:
true if x and y and (almost) equal, false if not.

Referenced by bwave::Wavelet::LiftingStep::operator==(), and operator==().

blitz::Array< double, 1 > bwave::Wavelet::forwardFkt ( ) const

Get sampled values (i.e. the form) of the forward transformation scaling or wavelet function.

Parameters:
sizenumber of samples.
scalethe scale of the function, use positive values to generate scaling, negative values to generate wavelet functions.
transthe translation of the function.
Returns:
Array of function values.

Useful for getting the data to plot wavelet and scaling functions. Use a higher number of samples for better resolution.

References bwave::WaveletDecomp< tp_rank >::apply(), bwave::WaveletDecomp< tp_rank >::coeffs(), and bwave::WaveletDecomp< tp_rank >::normFactor().

Query if wavelet is integer compatible.

Returns:
true if wavelet is integer compatible, false if not.

Integer compatibility means that wavelet decomposition and reconstruction do not use floating point operations on the data. Wavelet decomposition and reconstruction may still lead to information loss on integer data if the lifting scheme contains scaling steps.

Not implemented yet!

blitz::Array< double, 1 > bwave::Wavelet::inverseFkt ( ) const

Get sampled values (i.e. the form) of the inverse transformation scaling or wavelet function.

See also:
forwardFkt(unsigned int size = 1<<9, int scale = 6, unsigned int trans = 3)

References bwave::WaveletDecomp< tp_rank >::applyInv(), bwave::WaveletDecomp< tp_rank >::coeffs(), and bwave::WaveletDecomp< tp_rank >::normFactor().

template<class tp_Type >
void bwave::Wavelet::invLift ( blitz::Array< tp_Type, 1 > &  s,
blitz::Array< tp_Type, 1 > &  d,
ExtensionMode  be = CONSTANT_EXT 
) const

Apply the inverse lifting scheme on the data channels s and d.

Parameters:
susually initialised with the scaling coefficients.
dusually initialised with the wavelet coefficients.
beextension method to use for boundary handling.

References bwave::Wavelet::LiftingStep::apply(), liftingStep(), and steps().

template<class tp_Type >
void bwave::Wavelet::lift ( blitz::Array< tp_Type, 1 > &  s,
blitz::Array< tp_Type, 1 > &  d,
ExtensionMode  be = CONSTANT_EXT 
) const

Apply the lifting scheme on the data channels s and d.

Parameters:
susually initialised with the even original data values, contains the scaling coefficients after lifting.
dusually initialised with the odd original data values, contains the wavelet coefficients after lifting.
beextension method to use for boundary handling.

References bwave::Wavelet::LiftingStep::apply(), liftingStep(), and steps().

const LiftingStep& bwave::Wavelet::liftingStep ( int  i) const [inline]

Get a step of the lifting scheme.

Parameters:
iindex of the step to get (0 <= i < steps()).

Referenced by invLift(), lift(), and operator==().

Query if wavelet and scaling coefficients are normalized after lifting.

Returns:
true if normS() and normD() both equal 1, false if not.
double bwave::Wavelet::normD ( ) const [inline]

Get the normalization factor for the wavelet coefficients.

See also:
normS().

Referenced by operator==().

double bwave::Wavelet::normS ( ) const [inline]

Get the normalization factor for the scaling coefficients.

Wavelet and scaling coefficients are not automatically normalized after lifting, otherwise integer applications would not be possible.

Referenced by operator==().

bool bwave::Wavelet::operator== ( const Wavelet w) const

Compare with another wavelet.

Parameters:
wthe wavelet to compare with.
Returns:
true if the wavelets are equal, false if not.

References equals(), liftingStep(), normD(), normS(), and steps().


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