VAPoR  0.1
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 VetsUtil::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 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 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 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 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 idwt3d (const double *C, const size_t L[27], double *sigOut)
 Single-level inverse discrete 3D wavelet transform. More...
 
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)
 
- 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 VetsUtil::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 VetsUtil::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- 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

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 22 of file MatWaveDwt.h.

Constructor & Destructor Documentation

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()
VAPoR::MatWaveDwt::MatWaveDwt ( const string &  wname)
virtual VAPoR::MatWaveDwt::~MatWaveDwt ( )
virtual

Member Function Documentation

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()
int VAPoR::MatWaveDwt::dwt ( const float *  sigIn,
size_t  sigInLength,
float *  C,
size_t  L[3] 
)
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 *  cA,
float *  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.

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 [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()
int VAPoR::MatWaveDwt::dwt2d ( const float *  sigIn,
size_t  sigInX,
size_t  sigInY,
float *  C,
size_t  L[10] 
)
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 *  cA,
float *  cDh,
float *  cDv,
float *  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::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()
int VAPoR::MatWaveDwt::idwt ( const float *  C,
const size_t  L[3],
float *  sigOut 
)
int VAPoR::MatWaveDwt::idwt ( const double *  cA,
const double *  cD,
const size_t  L[3],
double *  sigOut 
)
int VAPoR::MatWaveDwt::idwt ( const float *  cA,
const float *  cD,
const size_t  L[3],
float *  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.

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()
int VAPoR::MatWaveDwt::idwt2d ( const float *  C,
const size_t  L[10],
float *  sigOut 
)
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 *  cA,
const float *  cDh,
const float *  cDv,
const float *  cDd,
const size_t  L[10],
float *  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 float *  C,
const size_t  L[27],
float *  sigOut 
)
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 *  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 
)

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