VAPOR3 3.9.4
|
A class for managing data set metadata. More...
#include <Compressor.h>
Public Member Functions | |
Compressor (std::vector< size_t > dims, const string &wname, const string &mode) | |
Compressor (std::vector< size_t > dims, const string &wname) | |
virtual | ~Compressor () |
int | Compress (const float *src_arr, float *dst_arr, size_t dst_arr_len, SignificanceMap *sigmap) |
int | Compress (const double *src_arr, double *dst_arr, size_t dst_arr_len, SignificanceMap *sigmap) |
int | Compress (const int *src_arr, int *dst_arr, size_t dst_arr_len, SignificanceMap *sigmap) |
int | Compress (const long *src_arr, long *dst_arr, size_t dst_arr_len, SignificanceMap *sigmap) |
int | Decompress (const float *src_arr, float *dst_arr, SignificanceMap *sigmap) |
int | Decompress (const double *src_arr, double *dst_arr, SignificanceMap *sigmap) |
int | Decompress (const int *src_arr, int *dst_arr, SignificanceMap *sigmap) |
int | Decompress (const long *src_arr, long *dst_arr, SignificanceMap *sigmap) |
int | Decompose (const float *src_arr, float *dst_arr, const vector< size_t > &dst_arr_lens, vector< SignificanceMap > &sigmaps) |
int | Decompose (const double *src_arr, double *dst_arr, const vector< size_t > &dst_arr_lens, vector< SignificanceMap > &sigmaps) |
int | Decompose (const int *src_arr, int *dst_arr, const vector< size_t > &dst_arr_lens, vector< SignificanceMap > &sigmaps) |
int | Decompose (const long *src_arr, long *dst_arr, const vector< size_t > &dst_arr_lens, vector< SignificanceMap > &sigmaps) |
int | Reconstruct (const float *src_arr, float *dst_arr, vector< SignificanceMap > &sigmaps, int l) |
int | Reconstruct (const double *src_arr, double *dst_arr, vector< SignificanceMap > &sigmaps, int l) |
int | Reconstruct (const int *src_arr, int *dst_arr, vector< SignificanceMap > &sigmaps, int l) |
int | Reconstruct (const long *src_arr, long *dst_arr, vector< SignificanceMap > &sigmaps, int l) |
void | GetSigMapShape (std::vector< size_t > &dims) const |
size_t | GetNumWaveCoeffs () const |
size_t | GetSigMapSize (size_t num_entries) const |
void | GetDimension (vector< size_t > &dims, int l) const |
int | GetNumLevels () const |
size_t | GetMinCompression () const |
bool & | KeepAppOnOff () |
bool & | ClampMinOnOff () |
double & | ClampMin () |
bool & | ClampMaxOnOff () |
double & | ClampMax () |
bool & | EpsilonOnOff () |
double & | Epsilon () |
Public Member Functions inherited from VAPoR::MatWaveWavedec | |
MatWaveWavedec (const string &wname, const string &mode) | |
MatWaveWavedec (const string &wname) | |
virtual | ~MatWaveWavedec () |
int | wavedec (const double *sigIn, size_t sigInLength, int n, double *C, size_t *L) |
int | wavedec (const float *sigIn, size_t sigInLength, int n, float *C, size_t *L) |
int | wavedec (const long *sigIn, size_t sigInLength, int n, long *C, size_t *L) |
int | wavedec (const int *sigIn, size_t sigInLength, int n, int *C, size_t *L) |
int | waverec (const double *C, const size_t *L, int n, double *sigOut) |
int | waverec (const float *C, const size_t *L, int n, float *sigOut) |
int | waverec (const long *C, const size_t *L, int n, long *sigOut) |
int | waverec (const int *C, const size_t *L, int n, int *sigOut) |
int | wavedec2 (const double *sigIn, size_t sigInX, size_t sigInY, int n, double *C, size_t *L) |
int | wavedec2 (const float *sigIn, size_t sigInX, size_t sigInY, int n, float *C, size_t *L) |
int | wavedec2 (const long *sigIn, size_t sigInX, size_t sigInY, int n, long *C, size_t *L) |
int | wavedec2 (const int *sigIn, size_t sigInX, size_t sigInY, int n, int *C, size_t *L) |
int | waverec2 (const double *C, const size_t *L, int n, double *sigOut) |
int | waverec2 (const float *C, const size_t *L, int n, float *sigOut) |
int | waverec2 (const long *C, const size_t *L, int n, long *sigOut) |
int | waverec2 (const int *C, const size_t *L, int n, int *sigOut) |
int | wavedec3 (const double *sigIn, size_t sigInX, size_t sigInY, size_t sigInZ, int n, double *C, size_t *L) |
int | wavedec3 (const float *sigIn, size_t sigInX, size_t sigInY, size_t sigInZ, int n, float *C, size_t *L) |
int | wavedec3 (const long *sigIn, size_t sigInX, size_t sigInY, size_t sigInZ, int n, long *C, size_t *L) |
int | wavedec3 (const int *sigIn, size_t sigInX, size_t sigInY, size_t sigInZ, int n, int *C, size_t *L) |
int | waverec3 (const double *C, const size_t *L, int n, double *sigOut) |
int | waverec3 (const float *C, const size_t *L, int n, float *sigOut) |
int | waverec3 (const long *C, const size_t *L, int n, long *sigOut) |
int | waverec3 (const int *C, const size_t *L, int n, int *sigOut) |
int | appcoef (const double *C, const size_t *L, int n, int l, bool normal, double *sigOut) |
int | appcoef (const float *C, const size_t *L, int n, int l, bool normal, float *sigOut) |
int | appcoef2 (const double *C, const size_t *L, int n, int l, bool normal, double *sigOut) |
int | appcoef2 (const float *C, const size_t *L, int n, int l, bool normal, float *sigOut) |
int | appcoef3 (const double *C, const size_t *L, int n, int l, bool normal, double *sigOut) |
int | appcoef3 (const float *C, const size_t *L, int n, int l, bool normal, float *sigOut) |
int | appcoef (const long *C, const size_t *L, int n, int l, bool normal, long *sigOut) |
int | appcoef (const int *C, const size_t *L, int n, int l, bool normal, int *sigOut) |
int | appcoef2 (const long *C, const size_t *L, int n, int l, bool normal, long *sigOut) |
int | appcoef2 (const int *C, const size_t *L, int n, int l, bool normal, int *sigOut) |
int | appcoef3 (const long *C, const size_t *L, int n, int l, bool normal, long *sigOut) |
int | appcoef3 (const int *C, const size_t *L, int n, int l, bool normal, int *sigOut) |
size_t | coefflength (size_t sigInLen, int n) const |
size_t | coefflength (const size_t *L, int n) const |
size_t | approxlength (size_t sigInLen, int n) const |
void | approxlength (const size_t *L, int n, int l, size_t *len) const |
size_t | coefflength2 (size_t sigInX, size_t sigInY, int n) const |
size_t | coefflength2 (const size_t *L, int n) const |
void | approxlength2 (const size_t *L, int n, int l, size_t *lenx, size_t *leny) const |
size_t | coefflength3 (size_t sigInX, size_t sigInY, size_t sigInZ, int n) const |
size_t | coefflength3 (const size_t *L, int n) const |
void | approxlength3 (const size_t *L, int n, int l, size_t *lenx, size_t *leny, size_t *lenz) const |
void | computeL (size_t sigInLen, int n, size_t *L) const |
void | computeL2 (size_t sigInX, size_t sigInY, int n, size_t *L) const |
void | computeL3 (size_t sigInX, size_t sigInY, size_t sigInZ, int n, size_t *L) const |
Public Member Functions inherited from VAPoR::MatWaveDwt | |
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 |
Static Public Member Functions | |
static bool | CompressionInfo (vector< size_t > dims, const string wavename, bool keepapp, size_t &nlevels, size_t &maxcratio) |
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 () |
Friends | |
std::ostream & | operator<< (std::ostream &o, const Compressor &rhs) |
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 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) |
A class for managing data set metadata.
This class performs either lossy compression decomposition on an array with an arbitrary number of dimensions (up to 3 presently). Compression is performed by transforming data with a wavelet transform, sorting the resulting coefficients, and returning the n largest magnitude coefficients.
Definition at line 28 of file Compressor.h.
VAPoR::Compressor::Compressor | ( | std::vector< size_t > | dims, |
const string & | wname, | ||
const string & | mode | ||
) |
Constructor for compressor class
This construct initializes a Compressor class object for use in compression or decomposition. The parameter wname
specifies the name of the wavelet to use for subsequent wavelet transforms. The parameter wmode
specifies the boundary extention mode to employ for transforms. For non-periodic data the biorthogonal wavelets with a with an appropriate symetric extension are recommended.
[in] | dims | Vector specifying dimensions of arrays to be compressed |
[in] | wname | Name of wavelet to use in transform |
[in] | wmode | Boundary extention mode |
VAPoR::Compressor::Compressor | ( | std::vector< size_t > | dims, |
const string & | wname | ||
) |
|
virtual |
|
inline |
Set or get the maximum range clamp value
Definition at line 320 of file Compressor.h.
|
inline |
Set or get the max range clamping attribute
When set, this attribute will clamp the maximum data value reconstructed to the value of ClampMax(). I.e. all data values reconstructed by Decompress() or Reconstruct() will be less than or equal to the value returned by ClampMax(). By default clamping is disabled.
Definition at line 314 of file Compressor.h.
|
inline |
Set or get the minimum range clamp value
Definition at line 302 of file Compressor.h.
|
inline |
Set or get the min range clamping attribute
When set, this attribute will clamp the minimum data value reconstructed to the value of ClampMin(). I.e. all data values reconstructed by Decompress() or Reconstruct() will be greater than or equal to the value returned by ClampMin(). By default clamping is disabled.
Definition at line 296 of file Compressor.h.
int VAPoR::Compressor::Compress | ( | const double * | src_arr, |
double * | dst_arr, | ||
size_t | dst_arr_len, | ||
SignificanceMap * | sigmap | ||
) |
int VAPoR::Compressor::Compress | ( | const float * | src_arr, |
float * | dst_arr, | ||
size_t | dst_arr_len, | ||
SignificanceMap * | sigmap | ||
) |
Compress an array
This method compresses an input array and returns a compressed version of the data. Compression is performed by wavelet transforming the data and sorting the resulting wavelet coefficients. Only the largest dst_arr_len
coefficients are returned.
[in] | src_arr | The input array. The dimensions are determined by the constructor's dims parameter. |
[out] | dst_arr | The output array that will contain the largest dst_arr_len coefficients from the transformed input array. dst_arr must point to enough space to contain dst_arr_len elements. |
[out] | dst_arr_len | Length of dst_arr . |
[in,out] | A | signficance map that, upon return, will provide the coordinates of the output coefficents returned. |
status | A negative value indicates failure |
int VAPoR::Compressor::Compress | ( | const int * | src_arr, |
int * | dst_arr, | ||
size_t | dst_arr_len, | ||
SignificanceMap * | sigmap | ||
) |
int VAPoR::Compressor::Compress | ( | const long * | src_arr, |
long * | dst_arr, | ||
size_t | dst_arr_len, | ||
SignificanceMap * | sigmap | ||
) |
|
static |
int VAPoR::Compressor::Decompose | ( | const double * | src_arr, |
double * | dst_arr, | ||
const vector< size_t > & | dst_arr_lens, | ||
vector< SignificanceMap > & | sigmaps | ||
) |
int VAPoR::Compressor::Decompose | ( | const float * | src_arr, |
float * | dst_arr, | ||
const vector< size_t > & | dst_arr_lens, | ||
vector< SignificanceMap > & | sigmaps | ||
) |
Decompose an array into a series of approximations of increasingly better fidelity.
This method performs a wavelet decomposition of an array, sorts the resulting coefficients from largest to smallest, and returns the sorted coefficients as a collection of n
sets, Si. The absolute value of each element of a set Si will be less than each element of a set Si+1.
[in] | src_arr | The input array. The dimensions are determined by the constructor's dims parameter. |
[out] | dst_arr | The output array that will contain all of the sorted coefficients for each collection Si. |
[in] | dst_arr_lens | A vector whose size determines the number of collections Si, and whose elements specify the number of elements in each collection Si. The sum of all elements of dst_arr_lens must be less than or equal the total number of wavelet coefficients generated by the wavelet transform. The total is given by the size of the vector returned by GetSigMapShape(). |
[out] | sigmaps | An array of significance maps, one map for each coefficient collection, Si |
status | A negative value indicates failure |
int VAPoR::Compressor::Decompose | ( | const int * | src_arr, |
int * | dst_arr, | ||
const vector< size_t > & | dst_arr_lens, | ||
vector< SignificanceMap > & | sigmaps | ||
) |
int VAPoR::Compressor::Decompose | ( | const long * | src_arr, |
long * | dst_arr, | ||
const vector< size_t > & | dst_arr_lens, | ||
vector< SignificanceMap > & | sigmaps | ||
) |
int VAPoR::Compressor::Decompress | ( | const double * | src_arr, |
double * | dst_arr, | ||
SignificanceMap * | sigmap | ||
) |
int VAPoR::Compressor::Decompress | ( | const float * | src_arr, |
float * | dst_arr, | ||
SignificanceMap * | sigmap | ||
) |
Decompress an array previously compressed with Compress()
[in] | src_arr | The input array containing the coefficients previsously computed by Compress(). |
[out] | dst_arr | The output array that will contain uncompressed array. dst_arr must point to enough space to contain The entire uncompressed array |
[in] | The | signficance map that returned by Compress() for src_arr |
status | A negative value indicates failure |
int VAPoR::Compressor::Decompress | ( | const int * | src_arr, |
int * | dst_arr, | ||
SignificanceMap * | sigmap | ||
) |
int VAPoR::Compressor::Decompress | ( | const long * | src_arr, |
long * | dst_arr, | ||
SignificanceMap * | sigmap | ||
) |
|
inline |
Set or get the epsilon value
Definition at line 338 of file Compressor.h.
|
inline |
Set or get the epsilon attribute
When set, this attribute will compare the absolute value of reconstructed data with Epsilon(). If abs(v) is less than epsilon the value of v is set to 0.0. By default the epsilon comparison is disabled.
Definition at line 332 of file Compressor.h.
void VAPoR::Compressor::GetDimension | ( | vector< size_t > & | dims, |
int | l | ||
) | const |
Returns the dimensions of a reconstructed array
This method returns the dimensions of an array reconstructed with either the Reconstruct() or Decompress() methods. The parameter l
specifies the number of inverse transformation passes applied in the range -1 to max, where max is the value returned by GetNumLevels(). A value of -1 corresponds to max levels. A value of zero implies no inverse transformations are performed (the dimensions returned are those of the wavelet approximation coefficients).
[out] | dims | The dimensions of the reconstructed array. |
[in] | l | The number of inverse transforms to apply |
size_t VAPoR::Compressor::GetMinCompression | ( | ) | const |
Returns the number of coefficients in the smallest allowable compression
Returns the minimum number of wavelet coefficients allowable after compression. The minimum number of of coefficients is determined by a combination of the wavelet, the boundary extension handling method, the dimensions of the array, and the setting of KeepAppOnOff()
nlevels | Number of transformation levels |
|
inline |
Returns the number of transformation levels
Returns the number of forward or inverse wavelet transformations applied to compress or fully reconstruct an array. The number of of transforms is determined by a combination of the wavelet, the boundary extension handling method, and the dimensions of the array.
nlevels | Number of transformation levels |
Definition at line 262 of file Compressor.h.
|
inline |
Returns the number of wavelet coefficients resulting from a forward wavelet transformation of an array.
Returns the number of wavelet coefficients resulting from a forward wavelet transformation of an array based on the parameters supplied to the class constructor. The number of coefficients resulting from a wavelet transform is a function of the dimensions of the array, the wavlet familiy used, the boundary handling method, and the number of transformation levels.
Definition at line 219 of file Compressor.h.
|
inline |
Return true if the given grid array is compressible
Return true if the given grid array is compressible based on it's dimension and the requested wavelet. I.e. returns true if at least one dimension is wide enough for a single wavelet transform
[in] | dims | Vector specifying dimensions of arrays to be compressed |
[in] | wname | Name of wavelet to use in transform |
[in] | wmode | Boundary extention mode |
This method returns the shape of any significance maps configured by the Compress() or Decompose() method based on parameters passed to the class constructor.
[out] | dims | A vector describing the shap (dimensions) of a significance map |
Definition at line 195 of file Compressor.h.
|
inline |
Returns the size of an encoded SignficanceMap()
Returns the size in bytes of an encoded SignificanceMap() used to store num_entries
entries.
Definition at line 228 of file Compressor.h.
|
inline |
Set or get the keep approximations attribute
When set, this attribute ensures that all wavelet approximation coefficients are retained during compression or decomposition. Setting this attribute will decrease the maximum possible compression, but may significantly improve the fidelity of the approximation
Definition at line 284 of file Compressor.h.
int VAPoR::Compressor::Reconstruct | ( | const double * | src_arr, |
double * | dst_arr, | ||
vector< SignificanceMap > & | sigmaps, | ||
int | l | ||
) |
int VAPoR::Compressor::Reconstruct | ( | const float * | src_arr, |
float * | dst_arr, | ||
vector< SignificanceMap > & | sigmaps, | ||
int | l | ||
) |
Reconstruct a signal decomposed with Decompose()
This method reconstructs a signal previosly decomposed with Decompose(). Partial reconstructions are possible using one of two methods, both of which may be combined. In the first the a subset of coefficient collections Si may be used for reconstruction. In this case missing coefficients are simply treated as having value zero. Note that arbitrary Si cannot be specified: the collections must be ordered with i less than or equal to the total number of collections returned by Decompose().
The second method of partial reconstruction is to limit the number of inverse wavelet transforms applied to the coefficients. In this case the reconstructed array will be coarsened (contain fewer elements) than the original. The dimensions of the reconstructed array are given by GetDimension().
[in] | src_arr | The input array containing the coefficients previsously computed by Decompose(). |
[out] | dst_arr | The output array containing reconstructed signal. The dimensions of dst_arr are determined by GetDimension(). If l is -1, the dimensions will be the same as those specified by the class constructor's dims parameter |
[in] | sigmaps | An array of significance maps previosly returned by Decompose() |
[in] | l | The refinement level. l must be in the range -1 to max, where max is the value returned by GetNumLevels(). If is -1 its value will be set to max. A value of zero coresponds to the approximation level coefficients. |
status | A negative value indicates failure |
int VAPoR::Compressor::Reconstruct | ( | const int * | src_arr, |
int * | dst_arr, | ||
vector< SignificanceMap > & | sigmaps, | ||
int | l | ||
) |
int VAPoR::Compressor::Reconstruct | ( | const long * | src_arr, |
long * | dst_arr, | ||
vector< SignificanceMap > & | sigmaps, | ||
int | l | ||
) |
|
friend |