VAPoR
0.1
|
A base class for a Matlab-like wavelet bank. More...
#include <MatWaveBase.h>
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 WaveFiltBase * | wavelet () 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) |
A base class for a Matlab-like wavelet bank.
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.
Enumerated boundary extension modes
Enumerator | |
---|---|
INVALID | |
ZPD | |
SYMH | |
SYMW | |
ASYMH | |
ASYMW | |
SP0 | |
SP1 | |
PPD | |
PER |
Definition at line 29 of file MatWaveBase.h.
VAPoR::MatWaveBase::MatWaveBase | ( | const string & | wname, |
const string & | mode | ||
) |
Create a wavelet filter bank
[in] | wname | Name of wavelet. |
[in] | mode | The boundary extension mode. |
VAPoR::MatWaveBase::MatWaveBase | ( | const string & | wname | ) |
|
virtual |
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
.
[in] | sigInLen | Length of input signal (number of samples) |
length | On success returns the number of coefficients. A negative int is returned on failure. |
|
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
.
[in] | sigInLen | Length of input signal (number of samples) |
length | Returns the number of coefficients. |
Definition at line 150 of file MatWaveBase.h.
|
inline |
Definition at line 154 of file MatWaveBase.h.
|
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
.
[in] | sigInLen | Length of input signal (number of samples) |
length | Returns the number of coefficients. |
int VAPoR::MatWaveBase::dwtmode | ( | const string & | mode | ) |
Set the discrete wavelet extension transform mode
[in] | mode | Valid values for mode are: "zpd", "symh", "symw", "asymh", "asymw", "sp0", "sp1", "spd", "ppd", and "per". |
status | a non-negative int is returned on success |
int VAPoR::MatWaveBase::dwtmode | ( | dwtmode_t | mode | ) |
Set the discrete wavelet extension transform mode
[in] | mode |
status | a non-negative int is returned on success |
const string VAPoR::MatWaveBase::dwtmode | ( | ) | const |
Get the current discrete wavelet extension transform mode
[out] | mode | Current mode |
status | a non-negative int is returned on success |
|
inline |
Get the current discrete wavelet extension transform mode
mode |
Definition at line 84 of file MatWaveBase.h.
|
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.
flag | A 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
.
[in] | wname | Name of wavelet. |
status | a non-negative int is returned on success |
|
inline |
Get the current discrete wavelet
wavelet |
Definition at line 106 of file MatWaveBase.h.
|
inline |
Get the current discrete wavelet name
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
[in] | Length | of input signal |
length | Returns the maximum number of decompositions. |