VAPOR3 3.9.4
|
Implements a single level wavelet filter. More...
#include <MatWaveDwt.h>
Public Member Functions | |
MatWaveDwt (const string &wname, const string &mode) | |
MatWaveDwt (const string &wname) | |
virtual | ~MatWaveDwt () |
int | dwt (const double *sigIn, size_t sigInLength, double *C, size_t L[3]) |
int | dwt (const float *sigIn, size_t sigInLength, float *C, size_t L[3]) |
int | dwt (const double *sigIn, size_t sigInLength, double *cA, double *cD, size_t L[3]) |
int | dwt (const float *sigIn, size_t sigInLength, float *cA, float *cD, size_t L[3]) |
int | dwt (const long *sigIn, size_t sigInLength, long *C, size_t L[3]) |
int | dwt (const int *sigIn, size_t sigInLength, int *C, size_t L[3]) |
int | dwt (const long *sigIn, size_t sigInLength, long *cA, long *cD, size_t L[3]) |
int | dwt (const int *sigIn, size_t sigInLength, int *cA, int *cD, size_t L[3]) |
int | idwt (const double *C, const size_t L[3], double *sigOut) |
int | idwt (const float *C, const size_t L[3], float *sigOut) |
int | idwt (const double *cA, const double *cD, const size_t L[3], double *sigOut) |
int | idwt (const float *cA, const float *cD, const size_t L[3], float *sigOut) |
int | idwt (const long *C, const size_t L[3], long *sigOut) |
int | idwt (const int *C, const size_t L[3], int *sigOut) |
int | idwt (const long *cA, const long *cD, const size_t L[3], long *sigOut) |
int | idwt (const int *cA, const int *cD, const size_t L[3], int *sigOut) |
int | dwt2d (const double *sigIn, size_t sigInX, size_t sigInY, double *C, size_t L[10]) |
int | dwt2d (const float *sigIn, size_t sigInX, size_t sigInY, float *C, size_t L[10]) |
int | dwt2d (const double *sigIn, size_t sigInX, size_t sigInY, double *cA, double *cDh, double *cDv, double *cDd, size_t L[10]) |
int | dwt2d (const float *sigIn, size_t sigInX, size_t sigInY, float *cA, float *cDh, float *cDv, float *cDd, size_t L[10]) |
int | dwt2d (const long *sigIn, size_t sigInX, size_t sigInY, long *C, size_t L[10]) |
int | dwt2d (const int *sigIn, size_t sigInX, size_t sigInY, int *C, size_t L[10]) |
int | dwt2d (const long *sigIn, size_t sigInX, size_t sigInY, long *cA, long *cDh, long *cDv, long *cDd, size_t L[10]) |
int | dwt2d (const int *sigIn, size_t sigInX, size_t sigInY, int *cA, int *cDh, int *cDv, int *cDd, size_t L[10]) |
int | idwt2d (const double *C, const size_t L[10], double *sigOut) |
int | idwt2d (const float *C, const size_t L[10], float *sigOut) |
int | idwt2d (const double *cA, const double *cDh, const double *cDv, const double *cDd, const size_t L[10], double *sigOut) |
int | idwt2d (const float *cA, const float *cDh, const float *cDv, const float *cDd, const size_t L[10], float *sigOut) |
int | idwt2d (const long *C, const size_t L[10], long *sigOut) |
int | idwt2d (const int *C, const size_t L[10], int *sigOut) |
int | idwt2d (const long *cA, const long *cDh, const long *cDv, const long *cDd, const size_t L[10], long *sigOut) |
int | idwt2d (const int *cA, const int *cDh, const int *cDv, const int *cDd, const size_t L[10], int *sigOut) |
int | dwt3d (const double *sigIn, size_t sigInX, size_t sigInY, size_t sigInZ, double *C, size_t L[27]) |
int | dwt3d (const float *sigIn, size_t sigInX, size_t sigInY, size_t sigInZ, float *C, size_t L[27]) |
int | dwt3d (const long *sigIn, size_t sigInX, size_t sigInY, size_t sigInZ, long *C, size_t L[27]) |
int | dwt3d (const int *sigIn, size_t sigInX, size_t sigInY, size_t sigInZ, int *C, size_t L[27]) |
int | idwt3d (const double *C, const size_t L[27], double *sigOut) |
Single-level inverse discrete 3D wavelet transform. | |
int | idwt3d (const float *C, const size_t L[27], float *sigOut) |
int | idwt3d (const double *cLLL, const double *cLLH, const double *cLHL, const double *cLHH, const double *cHLL, const double *cHLH, const double *cHHL, const double *cHHH, const size_t L[27], double *sigOut) |
int | idwt3d (const float *cLLL, const float *cLLH, const float *cLHL, const float *cLHH, const float *cHLL, const float *cHLH, const float *cHHL, const float *cHHH, const size_t L[27], float *sigOut) |
int | idwt3d (const long *C, const size_t L[27], long *sigOut) |
int | idwt3d (const int *C, const size_t L[27], int *sigOut) |
int | idwt3d (const long *cLLL, const long *cLLH, const long *cLHL, const long *cLHH, const long *cHLL, const long *cHLH, const long *cHHL, const long *cHHH, const size_t L[27], long *sigOut) |
int | idwt3d (const int *cLLL, const int *cLLH, const int *cLHL, const int *cLHH, const int *cHLL, const int *cHLH, const int *cHHL, const int *cHHH, const size_t L[27], int *sigOut) |
Public Member Functions inherited from VAPoR::MatWaveBase | |
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 Wasp::MyBase | |
MyBase () | |
const string & | getClassName () const |
Additional Inherited Members | |
Public Types inherited from VAPoR::MatWaveBase | |
enum | dwtmode_t { INVALID = -1 , ZPD , SYMH , SYMW , ASYMH , ASYMW , SP0 , SP1 , PPD , PER } |
Public Types inherited from Wasp::MyBase | |
typedef void(* | ErrMsgCB_T) (const char *msg, int err_code) |
typedef void(* | DiagMsgCB_T) (const char *msg) |
Static Public Member Functions inherited from Wasp::MyBase | |
static void | SetErrMsg (const char *format,...) |
Record a formatted error message. | |
static void | SetErrMsg (int errcode, const char *format,...) |
Record a formatted error message and an error code. | |
static const char * | GetErrMsg () |
static void | SetErrCode (int err_code) |
Record an error code. | |
static int | GetErrCode () |
Retrieve the current error code. | |
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. | |
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 bool | GetEnableErrMsg () |
Static Public Attributes inherited from Wasp::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 Wasp::MyBase | |
void | SetClassName (const string &name) |
Implements a single level wavelet filter.
The MatWaveDwt class provides single-level wavelet filters similar to those provided by the Matlab dwt and idwt functions. 1D, 2D, and 3D transforms are provided. The API for dwt and idwt more closely matches the MatLab wavedec and waverec functions than the MatLab functions of the same name.
Definition at line 23 of file MatWaveDwt.h.
VAPoR::MatWaveDwt::MatWaveDwt | ( | const string & | wname, |
const string & | mode | ||
) |
Create a wavelet filter bank
[in] | wname | The name of the wavelet to apply. |
[in] | mode | The boundary extension mode. |
VAPoR::MatWaveDwt::MatWaveDwt | ( | const string & | wname | ) |
|
virtual |
int VAPoR::MatWaveDwt::dwt | ( | const double * | sigIn, |
size_t | sigInLength, | ||
double * | C, | ||
size_t | L[3] | ||
) |
Single-level discrete 1D wavelet transform
This method performs a single-level, one-dimensional wavelet decomposition with respect to the current wavelet and boundary extension mode.
[in] | sigIn | The discrete signal |
[in] | sigInLength | The length of sigIn |
[out] | C | The wavelet decompostion vector. The length of C , must be equal to the value returned by MatWaveWavedec::coefflength(). |
[out] | cA | The wavelet decompostion vector approximation coefficients |
[out] | cD | The wavelet decompostion vector detail coefficients |
[out] | L[3] | The book keeping vector. The length of L , must be equal to 3. L [0] provides the length of the approximation coefficients, L [1] provides the length of the detail coefficients, and L [2] is equal to sigInLength . |
status | A negative number indicates failure. |
int VAPoR::MatWaveDwt::dwt | ( | const double * | sigIn, |
size_t | sigInLength, | ||
double * | cA, | ||
double * | cD, | ||
size_t | L[3] | ||
) |
int VAPoR::MatWaveDwt::dwt | ( | const float * | sigIn, |
size_t | sigInLength, | ||
float * | C, | ||
size_t | L[3] | ||
) |
int VAPoR::MatWaveDwt::dwt | ( | const float * | sigIn, |
size_t | sigInLength, | ||
float * | cA, | ||
float * | cD, | ||
size_t | L[3] | ||
) |
int VAPoR::MatWaveDwt::dwt | ( | const int * | sigIn, |
size_t | sigInLength, | ||
int * | C, | ||
size_t | L[3] | ||
) |
int VAPoR::MatWaveDwt::dwt | ( | const int * | sigIn, |
size_t | sigInLength, | ||
int * | cA, | ||
int * | cD, | ||
size_t | L[3] | ||
) |
int VAPoR::MatWaveDwt::dwt | ( | const long * | sigIn, |
size_t | sigInLength, | ||
long * | C, | ||
size_t | L[3] | ||
) |
int VAPoR::MatWaveDwt::dwt | ( | const long * | sigIn, |
size_t | sigInLength, | ||
long * | cA, | ||
long * | cD, | ||
size_t | L[3] | ||
) |
int VAPoR::MatWaveDwt::dwt2d | ( | const double * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
double * | C, | ||
size_t | L[10] | ||
) |
Single-level discrete 2D wavelet transform
This method performs a single-level, two-dimensional wavelet decomposition with respect to the current wavelet and boundary extension mode.
[in] | sigIn | The discrete signal |
[in] | sigInX | The length of the X dimension of sigIn |
[in] | sigInY | The length of the Y dimension of sigIn |
[out] | C | The wavelet decompostion vector. The length of C , must be equal to the value returned by MatWaveWavedec::coefflength2(). |
[out] | cA | The wavelet decompostion vector approximation coefficients |
[out] | cDh | The wavelet decompostion vector horizontal detail coefficients |
[out] | cDv | The wavelet decompostion vector vertical detail coefficients |
[out] | cDv | The wavelet decompostion vector diagonal detail coefficients |
[out] | L[10] | The book keeping vector. The length of L , must be equal to 6 + 4. L [0] and \L[1] provide the dimensions of the approximation coefficients, L [2] and L [3] provides the dimension of the horizontal detail coefficients, L [4] and L [5] the horizontal coefficients, L [6] and L [7] the diagonal detail coefficients, and L [8] L [9] are equal to sigInX and sigInY , respectively. |
status | A negative number indicates failure. |
int VAPoR::MatWaveDwt::dwt2d | ( | const double * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
double * | cA, | ||
double * | cDh, | ||
double * | cDv, | ||
double * | cDd, | ||
size_t | L[10] | ||
) |
int VAPoR::MatWaveDwt::dwt2d | ( | const float * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
float * | C, | ||
size_t | L[10] | ||
) |
int VAPoR::MatWaveDwt::dwt2d | ( | const float * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
float * | cA, | ||
float * | cDh, | ||
float * | cDv, | ||
float * | cDd, | ||
size_t | L[10] | ||
) |
int VAPoR::MatWaveDwt::dwt2d | ( | const int * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
int * | C, | ||
size_t | L[10] | ||
) |
int VAPoR::MatWaveDwt::dwt2d | ( | const int * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
int * | cA, | ||
int * | cDh, | ||
int * | cDv, | ||
int * | cDd, | ||
size_t | L[10] | ||
) |
int VAPoR::MatWaveDwt::dwt2d | ( | const long * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
long * | C, | ||
size_t | L[10] | ||
) |
int VAPoR::MatWaveDwt::dwt2d | ( | const long * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
long * | cA, | ||
long * | cDh, | ||
long * | cDv, | ||
long * | cDd, | ||
size_t | L[10] | ||
) |
int VAPoR::MatWaveDwt::dwt3d | ( | const double * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
size_t | sigInZ, | ||
double * | C, | ||
size_t | L[27] | ||
) |
Single-level discrete 3D wavelet transform
C is partitioned in the order: LLL, LLH, LHL, LHH, HLL, HLH, HHL, HHH
int VAPoR::MatWaveDwt::dwt3d | ( | const float * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
size_t | sigInZ, | ||
float * | C, | ||
size_t | L[27] | ||
) |
int VAPoR::MatWaveDwt::dwt3d | ( | const int * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
size_t | sigInZ, | ||
int * | C, | ||
size_t | L[27] | ||
) |
int VAPoR::MatWaveDwt::dwt3d | ( | const long * | sigIn, |
size_t | sigInX, | ||
size_t | sigInY, | ||
size_t | sigInZ, | ||
long * | C, | ||
size_t | L[27] | ||
) |
int VAPoR::MatWaveDwt::idwt | ( | const double * | C, |
const size_t | L[3], | ||
double * | sigOut | ||
) |
Single-level inverse discrete 1D wavelet transform
This method performs a single-level, one-dimensional wavelet reconstruction with respect to the current wavelet and boundary extension mode.
[in] | C | The Wavelet decomposition vector, dimensioned according to L . |
[in] | cA | The wavelet decompostion vector approximation coefficients |
[in] | cD | The wavelet decompostion vector detail coefficients |
[in] | L[3] | The Wavelet decomposition book keeping vector. |
[out] | sigOut | Single-level reconstruction approximation based on the approximation and detail coefficients (C ). The length of sigOut is must be L [2]. |
status | A negative number indicates failure. |
int VAPoR::MatWaveDwt::idwt | ( | const double * | cA, |
const double * | cD, | ||
const size_t | L[3], | ||
double * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt | ( | const float * | C, |
const size_t | L[3], | ||
float * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt | ( | const float * | cA, |
const float * | cD, | ||
const size_t | L[3], | ||
float * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt | ( | const int * | C, |
const size_t | L[3], | ||
int * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt | ( | const int * | cA, |
const int * | cD, | ||
const size_t | L[3], | ||
int * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt | ( | const long * | C, |
const size_t | L[3], | ||
long * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt | ( | const long * | cA, |
const long * | cD, | ||
const size_t | L[3], | ||
long * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt2d | ( | const double * | C, |
const size_t | L[10], | ||
double * | sigOut | ||
) |
Single-level inverse discrete 2D wavelet transform
This method performs a single-level, two-dimensional wavelet reconstruction with respect to the current wavelet and boundary extension mode.
[in] | C | The Wavelet decomposition vector, dimensioned according to L . |
[in] | cA | The wavelet decompostion vector approximation coefficients |
[in] | cDh | The wavelet decompostion vector horizontal detail coefficients |
[in] | cDv | The wavelet decompostion vector vertical detail coefficients |
[in] | cDv | The wavelet decompostion vector diagonal detail coefficients |
[in] | L[10] | The Wavelet decomposition book keeping vector. |
[out] | sigOut | Single-level reconstruction approximation based on the approximation and detail coefficients (C ). The length of sigOut is must be L [8] * L [9]. |
status | A negative number indicates failure. |
int VAPoR::MatWaveDwt::idwt2d | ( | const double * | cA, |
const double * | cDh, | ||
const double * | cDv, | ||
const double * | cDd, | ||
const size_t | L[10], | ||
double * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt2d | ( | const float * | C, |
const size_t | L[10], | ||
float * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt2d | ( | const float * | cA, |
const float * | cDh, | ||
const float * | cDv, | ||
const float * | cDd, | ||
const size_t | L[10], | ||
float * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt2d | ( | const int * | C, |
const size_t | L[10], | ||
int * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt2d | ( | const int * | cA, |
const int * | cDh, | ||
const int * | cDv, | ||
const int * | cDd, | ||
const size_t | L[10], | ||
int * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt2d | ( | const long * | C, |
const size_t | L[10], | ||
long * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt2d | ( | const long * | cA, |
const long * | cDh, | ||
const long * | cDv, | ||
const long * | cDd, | ||
const size_t | L[10], | ||
long * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt3d | ( | const double * | C, |
const size_t | L[27], | ||
double * | sigOut | ||
) |
Single-level inverse discrete 3D wavelet transform.
int VAPoR::MatWaveDwt::idwt3d | ( | const double * | cLLL, |
const double * | cLLH, | ||
const double * | cLHL, | ||
const double * | cLHH, | ||
const double * | cHLL, | ||
const double * | cHLH, | ||
const double * | cHHL, | ||
const double * | cHHH, | ||
const size_t | L[27], | ||
double * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt3d | ( | const float * | C, |
const size_t | L[27], | ||
float * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt3d | ( | const float * | cLLL, |
const float * | cLLH, | ||
const float * | cLHL, | ||
const float * | cLHH, | ||
const float * | cHLL, | ||
const float * | cHLH, | ||
const float * | cHHL, | ||
const float * | cHHH, | ||
const size_t | L[27], | ||
float * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt3d | ( | const int * | C, |
const size_t | L[27], | ||
int * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt3d | ( | const int * | cLLL, |
const int * | cLLH, | ||
const int * | cLHL, | ||
const int * | cLHH, | ||
const int * | cHLL, | ||
const int * | cHLH, | ||
const int * | cHHL, | ||
const int * | cHHH, | ||
const size_t | L[27], | ||
int * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt3d | ( | const long * | C, |
const size_t | L[27], | ||
long * | sigOut | ||
) |
int VAPoR::MatWaveDwt::idwt3d | ( | const long * | cLLL, |
const long * | cLLH, | ||
const long * | cLHL, | ||
const long * | cLHH, | ||
const long * | cHLL, | ||
const long * | cHLH, | ||
const long * | cHHL, | ||
const long * | cHHH, | ||
const size_t | L[27], | ||
long * | sigOut | ||
) |