VAPoR  0.1
Public Types | Public Member Functions | List of all members
VAPoR::MatWaveBase Class Reference

A base class for a Matlab-like wavelet bank. More...

#include <MatWaveBase.h>

Inheritance diagram for VAPoR::MatWaveBase:
VetsUtil::MyBase VAPoR::MatWaveDwt VAPoR::MatWaveWavedec VAPoR::Compressor

Public Types

enum  dwtmode_t {
  INVALID = -1, ZPD, SYMH, SYMW,
  ASYMH, ASYMW, SP0, SP1,
  PPD, PER
}
 
- Public Types inherited from VetsUtil::MyBase
typedef void(* ErrMsgCB_T )(const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T )(const char *msg)
 

Public Member Functions

 MatWaveBase (const string &wname, const string &mode)
 
 MatWaveBase (const string &wname)
 
virtual ~MatWaveBase ()
 
int dwtmode (const string &mode)
 
int dwtmode (dwtmode_t mode)
 
const string dwtmode () const
 
dwtmode_t dwtmodeenum () const
 
int wavelet (const string &wname)
 
string wavelet_name () const
 
const WaveFiltBasewavelet () const
 
size_t approxlength (size_t sigInLen) const
 
size_t detaillength (size_t sigInLen) const
 
size_t coefflength (size_t sigInLen) const
 
size_t coefflength2 (size_t sigInX, size_t sigInY) const
 
size_t coefflength3 (size_t sigInX, size_t sigInY, size_t sigInZ) const
 
size_t wmaxlev (size_t s) const
 
bool & InvalidFloatAbortOnOff ()
 
- Public Member Functions inherited from VetsUtil::MyBase
 MyBase ()
 
const string & getClassName () const
 

Additional Inherited Members

- Static Public Member Functions inherited from VetsUtil::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message. More...
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code. More...
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code. More...
 
static int GetErrCode ()
 Retrieve the current error code. More...
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message. More...
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 
- Static Public Attributes inherited from VetsUtil::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 
- Protected Member Functions inherited from VetsUtil::MyBase
void SetClassName (const string &name)
 

Detailed Description

A base class for a Matlab-like wavelet bank.

Author
John Clyne
Version
$Revision$
Date
$Date$

The MatWaveBase class is a base class for building Matlab-inspired wavelet filter banks. In many cases the methods provided behave similarly - in some cases indentically - to the Matlab Wavelet Toolbox version 4 command of the same name.

Definition at line 23 of file MatWaveBase.h.

Member Enumeration Documentation

Enumerated boundary extension modes

Enumerator
INVALID 
ZPD 
SYMH 
SYMW 
ASYMH 
ASYMW 
SP0 
SP1 
PPD 
PER 

Definition at line 29 of file MatWaveBase.h.

Constructor & Destructor Documentation

VAPoR::MatWaveBase::MatWaveBase ( const string &  wname,
const string &  mode 
)

Create a wavelet filter bank

Parameters
[in]wnameName of wavelet.
[in]modeThe boundary extension mode.
See also
dwtmode()
VAPoR::MatWaveBase::MatWaveBase ( const string &  wname)
virtual VAPoR::MatWaveBase::~MatWaveBase ( )
virtual

Member Function Documentation

size_t VAPoR::MatWaveBase::approxlength ( size_t  sigInLen) const

Returns length of approximation coefficients generated in a decompostition pass

This method returns the number of approximation coefficients generated by one decomposition pass through the filter bank for a signal of length, sigInLen.

Parameters
[in]sigInLenLength of input signal (number of samples)
Return values
lengthOn success returns the number of coefficients. A negative int is returned on failure.
See also
MatWaveDwt::dwt()
size_t VAPoR::MatWaveBase::coefflength ( size_t  sigInLen) const
inline

Returns length of coefficients generated in a decompostition pass

This method returns the number of coefficients (approximation plus detail) generated by one decomposition pass through the filter bank for a signal of length, sigInLen.

Parameters
[in]sigInLenLength of input signal (number of samples)
Return values
lengthReturns the number of coefficients.
See also
MatWaveDwt::dwt()

Definition at line 150 of file MatWaveBase.h.

size_t VAPoR::MatWaveBase::coefflength2 ( size_t  sigInX,
size_t  sigInY 
) const
inline

Definition at line 154 of file MatWaveBase.h.

size_t VAPoR::MatWaveBase::coefflength3 ( size_t  sigInX,
size_t  sigInY,
size_t  sigInZ 
) const
inline

Definition at line 158 of file MatWaveBase.h.

size_t VAPoR::MatWaveBase::detaillength ( size_t  sigInLen) const

Returns length of detail coefficients generated in a decompostition pass

This method returns the number of detail coefficients generated by one decomposition pass through the filter bank for a signal of length, sigInLen.

Parameters
[in]sigInLenLength of input signal (number of samples)
Return values
lengthReturns the number of coefficients.
See also
MatWaveDwt::dwt()
int VAPoR::MatWaveBase::dwtmode ( const string &  mode)

Set the discrete wavelet extension transform mode

Parameters
[in]modeValid values for mode are: "zpd", "symh", "symw", "asymh", "asymw", "sp0", "sp1", "spd", "ppd", and "per".
Return values
statusa non-negative int is returned on success
int VAPoR::MatWaveBase::dwtmode ( dwtmode_t  mode)

Set the discrete wavelet extension transform mode

Parameters
[in]mode
Return values
statusa non-negative int is returned on success
See also
dwtmode_t
const string VAPoR::MatWaveBase::dwtmode ( ) const

Get the current discrete wavelet extension transform mode

Parameters
[out]modeCurrent mode
Return values
statusa non-negative int is returned on success
dwtmode_t VAPoR::MatWaveBase::dwtmodeenum ( ) const
inline

Get the current discrete wavelet extension transform mode

Return values
mode

Definition at line 84 of file MatWaveBase.h.

bool& VAPoR::MatWaveBase::InvalidFloatAbortOnOff ( )
inline

Set or get the abort-on-invalid-float flag

When set, the presence of input data containing invalid floats - floats for which the math.h isfinite() function does not return true - results in the abnormal termination of the method. If the flag is not set invalid floats are set to zero. By default the flag is not set.

Return values
flagA reference to the abot-on-invalid-float flag

Definition at line 189 of file MatWaveBase.h.

int VAPoR::MatWaveBase::wavelet ( const string &  wname)

Set the current wavelet

Change the current wavelet to the one specified by wname.

Parameters
[in]wnameName of wavelet.
Return values
statusa non-negative int is returned on success
const WaveFiltBase* VAPoR::MatWaveBase::wavelet ( ) const
inline

Get the current discrete wavelet

Return values
wavelet

Definition at line 106 of file MatWaveBase.h.

string VAPoR::MatWaveBase::wavelet_name ( ) const
inline

Get the current discrete wavelet name

Return values
name

Definition at line 100 of file MatWaveBase.h.

size_t VAPoR::MatWaveBase::wmaxlev ( size_t  s) const

Returns maximum wavelet decompostion level

This method returns the maximum level decomposition of a signal of length, s. This is the maximum number of times that a single level decomposition can be applied to a signal

Parameters
[in]Lengthof input signal
Return values
lengthReturns the maximum number of decompositions.
See also
MatWaveDwt::dwt(), MatWaveWavedec::wavedec()

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