C09FZF inserts a selected set of three-dimensional discrete wavelet transform (DWT) coefficients into the full set of coefficients stored in compact form, which may be later used as input to the reconstruction routines
C09FBF or
C09FDF.
C09FZF inserts a selected set of three-dimensional DWT coefficients into the full set of coefficients stored in compact form in a one-dimensional array
C. It is required that C09FZF is preceded by a call to the initialization routine
C09ACF and either the forwards transform routine
C09FAF or multi-level forwards transform routine
C09FCF.
Given an initial three-dimensional data set
$A$, a prior call to
C09FAF or
C09FCF computes the approximation coefficients (at the highest requested level in the case of
C09FCF) and, seven sets of detail coefficients (at all levels in the case of
C09FCF) and stores these in compact form in a one-dimensional array
C.
C09FYF can then extract either the approximation coefficients or one of the sets of detail coefficients (at one of the levels following
C09FCF)
into a three-dimensional array,
D. Following some calculation on this set of coefficients (for example, denoising), the updated coefficients in
D are inserted back into the full set
C using C09FZF. Several extractions and insertions may be performed.
C09FBF or
C09FDF can then be used to reconstruct a manipulated data set
$\stackrel{~}{A}$. The dimensions of
D depend on the level extracted and are available from either: the arrays
DWTLVM,
DWTLVN and
DWTLVFR as returned by
C09FCF if this was called first; or, otherwise from
NWCT,
NWCN and
NWCFR as returned by
C09ACF. See
Section 2.1 in the C09 Chapter Introduction for a discussion of the three-dimensional DWT.
None.
Note: the following notation is used in this section:
- ${n}_{\mathrm{cm}}$ is the number of wavelet coefficients in the first dimension. Following a call to C09FAF (i.e., when ${\mathbf{ILEV}}=0$) this is equal to ${\mathbf{NWCT}}/\left(8\times {\mathbf{NWCN}}\times {\mathbf{NWCFR}}\right)$ as returned by C09ACF. Following a call to C09FCF transforming NWL levels, and when inserting at level ${\mathbf{ILEV}}>0$, this is equal to ${\mathbf{DWTLVM}}\left({\mathbf{NWL}}-{\mathbf{ILEV}}+1\right)$.
- ${n}_{\mathrm{cn}}$ is the number of wavelet coefficients in the second dimension. Following a call to C09FAF (i.e., when ${\mathbf{ILEV}}=0$) this is equal to NWCN as returned by C09ACF. Following a call to C09FCF transforming NWL levels, and when inserting at level ${\mathbf{ILEV}}>0$, this is equal to ${\mathbf{DWTLVN}}\left({\mathbf{NWL}}-{\mathbf{ILEV}}+1\right)$.
- ${n}_{\mathrm{cfr}}$ is the number of wavelet coefficients in the third dimension. Following a call to C09FAF (i.e., when ${\mathbf{ILEV}}=0$) this is equal to NWCFR as returned by C09ACF. Following a call to C09FCF transforming NWL levels, and when inserting at level ${\mathbf{ILEV}}>0$, this is equal to ${\mathbf{DWTLVFR}}\left({\mathbf{NWL}}-{\mathbf{ILEV}}+1\right)$
If on entry
${\mathbf{IFAIL}}={\mathbf{0}}$ or
${-{\mathbf{1}}}$, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Not applicable.
Not applicable.
None.
The following example demonstrates using the coefficient extraction and insertion routines in order to apply denoising using a thresholding operation. The original input data has artificial noise introduced to it, taken from a normal random number distribution. Reconstruction then takes place on both the noisy data and denoised data. The Mean Square Errors (MSE) of the two reconstructions are printed along with the reconstruction of the denoised data. The MSE of the denoised reconstruction is less than that of the noisy reconstruction.