VAPOR3 3.9.4
Public Member Functions | List of all members
VAPoR::MatWaveDwt Class Reference

Implements a single level wavelet filter. More...

#include <MatWaveDwt.h>

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

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 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 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)
 

Detailed Description

Implements a single level wavelet filter.

Author
John Clyne
Version
$Revision$
Date
$Date$

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.

Constructor & Destructor Documentation

◆ MatWaveDwt() [1/2]

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

Create a wavelet filter bank

Parameters
[in]wnameThe name of the wavelet to apply.
[in]modeThe boundary extension mode.
See also
dwtmode()

◆ MatWaveDwt() [2/2]

VAPoR::MatWaveDwt::MatWaveDwt ( const string &  wname)

◆ ~MatWaveDwt()

virtual VAPoR::MatWaveDwt::~MatWaveDwt ( )
virtual

Member Function Documentation

◆ dwt() [1/8]

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.

Parameters
[in]sigInThe discrete signal
[in]sigInLengthThe length of sigIn
[out]CThe wavelet decompostion vector. The length of C, must be equal to the value returned by MatWaveWavedec::coefflength().
[out]cAThe wavelet decompostion vector approximation coefficients
[out]cDThe 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.
Return values
statusA negative number indicates failure.
See also
MatWaveBase::coefflength(), idwt()

◆ dwt() [2/8]

int VAPoR::MatWaveDwt::dwt ( const double *  sigIn,
size_t  sigInLength,
double *  cA,
double *  cD,
size_t  L[3] 
)

◆ dwt() [3/8]

int VAPoR::MatWaveDwt::dwt ( const float *  sigIn,
size_t  sigInLength,
float *  C,
size_t  L[3] 
)

◆ dwt() [4/8]

int VAPoR::MatWaveDwt::dwt ( const float *  sigIn,
size_t  sigInLength,
float *  cA,
float *  cD,
size_t  L[3] 
)

◆ dwt() [5/8]

int VAPoR::MatWaveDwt::dwt ( const int *  sigIn,
size_t  sigInLength,
int *  C,
size_t  L[3] 
)

◆ dwt() [6/8]

int VAPoR::MatWaveDwt::dwt ( const int *  sigIn,
size_t  sigInLength,
int *  cA,
int *  cD,
size_t  L[3] 
)

◆ dwt() [7/8]

int VAPoR::MatWaveDwt::dwt ( const long *  sigIn,
size_t  sigInLength,
long *  C,
size_t  L[3] 
)

◆ dwt() [8/8]

int VAPoR::MatWaveDwt::dwt ( const long *  sigIn,
size_t  sigInLength,
long *  cA,
long *  cD,
size_t  L[3] 
)

◆ dwt2d() [1/8]

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.

Parameters
[in]sigInThe discrete signal
[in]sigInXThe length of the X dimension of sigIn
[in]sigInYThe length of the Y dimension of sigIn
[out]CThe wavelet decompostion vector. The length of C, must be equal to the value returned by MatWaveWavedec::coefflength2().
[out]cAThe wavelet decompostion vector approximation coefficients
[out]cDhThe wavelet decompostion vector horizontal detail coefficients
[out]cDvThe wavelet decompostion vector vertical detail coefficients
[out]cDvThe 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.
Return values
statusA negative number indicates failure.
See also
MatWaveBase::coefflength(), idwt()

◆ dwt2d() [2/8]

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] 
)

◆ dwt2d() [3/8]

int VAPoR::MatWaveDwt::dwt2d ( const float *  sigIn,
size_t  sigInX,
size_t  sigInY,
float *  C,
size_t  L[10] 
)

◆ dwt2d() [4/8]

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] 
)

◆ dwt2d() [5/8]

int VAPoR::MatWaveDwt::dwt2d ( const int *  sigIn,
size_t  sigInX,
size_t  sigInY,
int *  C,
size_t  L[10] 
)

◆ dwt2d() [6/8]

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] 
)

◆ dwt2d() [7/8]

int VAPoR::MatWaveDwt::dwt2d ( const long *  sigIn,
size_t  sigInX,
size_t  sigInY,
long *  C,
size_t  L[10] 
)

◆ dwt2d() [8/8]

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] 
)

◆ dwt3d() [1/4]

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

◆ dwt3d() [2/4]

int VAPoR::MatWaveDwt::dwt3d ( const float *  sigIn,
size_t  sigInX,
size_t  sigInY,
size_t  sigInZ,
float *  C,
size_t  L[27] 
)

◆ dwt3d() [3/4]

int VAPoR::MatWaveDwt::dwt3d ( const int *  sigIn,
size_t  sigInX,
size_t  sigInY,
size_t  sigInZ,
int *  C,
size_t  L[27] 
)

◆ dwt3d() [4/4]

int VAPoR::MatWaveDwt::dwt3d ( const long *  sigIn,
size_t  sigInX,
size_t  sigInY,
size_t  sigInZ,
long *  C,
size_t  L[27] 
)

◆ idwt() [1/8]

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.

Parameters
[in]CThe Wavelet decomposition vector, dimensioned according to L.
[in]cAThe wavelet decompostion vector approximation coefficients
[in]cDThe wavelet decompostion vector detail coefficients
[in]L[3]The Wavelet decomposition book keeping vector.
[out]sigOutSingle-level reconstruction approximation based on the approximation and detail coefficients (C). The length of sigOut is must be L[2].
Return values
statusA negative number indicates failure.
See also
MatWaveBase::coefflength(), dwt()

◆ idwt() [2/8]

int VAPoR::MatWaveDwt::idwt ( const double *  cA,
const double *  cD,
const size_t  L[3],
double *  sigOut 
)

◆ idwt() [3/8]

int VAPoR::MatWaveDwt::idwt ( const float *  C,
const size_t  L[3],
float *  sigOut 
)

◆ idwt() [4/8]

int VAPoR::MatWaveDwt::idwt ( const float *  cA,
const float *  cD,
const size_t  L[3],
float *  sigOut 
)

◆ idwt() [5/8]

int VAPoR::MatWaveDwt::idwt ( const int *  C,
const size_t  L[3],
int *  sigOut 
)

◆ idwt() [6/8]

int VAPoR::MatWaveDwt::idwt ( const int *  cA,
const int *  cD,
const size_t  L[3],
int *  sigOut 
)

◆ idwt() [7/8]

int VAPoR::MatWaveDwt::idwt ( const long *  C,
const size_t  L[3],
long *  sigOut 
)

◆ idwt() [8/8]

int VAPoR::MatWaveDwt::idwt ( const long *  cA,
const long *  cD,
const size_t  L[3],
long *  sigOut 
)

◆ idwt2d() [1/8]

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.

Parameters
[in]CThe Wavelet decomposition vector, dimensioned according to L.
[in]cAThe wavelet decompostion vector approximation coefficients
[in]cDhThe wavelet decompostion vector horizontal detail coefficients
[in]cDvThe wavelet decompostion vector vertical detail coefficients
[in]cDvThe wavelet decompostion vector diagonal detail coefficients
[in]L[10]The Wavelet decomposition book keeping vector.
[out]sigOutSingle-level reconstruction approximation based on the approximation and detail coefficients (C). The length of sigOut is must be L[8] * L[9].
Return values
statusA negative number indicates failure.
See also
MatWaveBase::coefflength(), dwt()

◆ idwt2d() [2/8]

int VAPoR::MatWaveDwt::idwt2d ( const double *  cA,
const double *  cDh,
const double *  cDv,
const double *  cDd,
const size_t  L[10],
double *  sigOut 
)

◆ idwt2d() [3/8]

int VAPoR::MatWaveDwt::idwt2d ( const float *  C,
const size_t  L[10],
float *  sigOut 
)

◆ idwt2d() [4/8]

int VAPoR::MatWaveDwt::idwt2d ( const float *  cA,
const float *  cDh,
const float *  cDv,
const float *  cDd,
const size_t  L[10],
float *  sigOut 
)

◆ idwt2d() [5/8]

int VAPoR::MatWaveDwt::idwt2d ( const int *  C,
const size_t  L[10],
int *  sigOut 
)

◆ idwt2d() [6/8]

int VAPoR::MatWaveDwt::idwt2d ( const int *  cA,
const int *  cDh,
const int *  cDv,
const int *  cDd,
const size_t  L[10],
int *  sigOut 
)

◆ idwt2d() [7/8]

int VAPoR::MatWaveDwt::idwt2d ( const long *  C,
const size_t  L[10],
long *  sigOut 
)

◆ idwt2d() [8/8]

int VAPoR::MatWaveDwt::idwt2d ( const long *  cA,
const long *  cDh,
const long *  cDv,
const long *  cDd,
const size_t  L[10],
long *  sigOut 
)

◆ idwt3d() [1/8]

int VAPoR::MatWaveDwt::idwt3d ( const double *  C,
const size_t  L[27],
double *  sigOut 
)

Single-level inverse discrete 3D wavelet transform.

◆ idwt3d() [2/8]

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 
)

◆ idwt3d() [3/8]

int VAPoR::MatWaveDwt::idwt3d ( const float *  C,
const size_t  L[27],
float *  sigOut 
)

◆ idwt3d() [4/8]

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 
)

◆ idwt3d() [5/8]

int VAPoR::MatWaveDwt::idwt3d ( const int *  C,
const size_t  L[27],
int *  sigOut 
)

◆ idwt3d() [6/8]

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 
)

◆ idwt3d() [7/8]

int VAPoR::MatWaveDwt::idwt3d ( const long *  C,
const size_t  L[27],
long *  sigOut 
)

◆ idwt3d() [8/8]

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 
)

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