naginterfaces.library.wav.dim3_coeff_ins¶
- naginterfaces.library.wav.dim3_coeff_ins(ilev, cindex, c, d, comm)[source]¶
dim3_coeff_ins
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 functionsdim3_sngl_inv()
ordim3_mxolap_multi_inv()
.For full information please refer to the NAG Library document for c09fz
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/c09/c09fzf.html
- Parameters
- ilevint
The level at which coefficients are to be inserted.
If , it is assumed that the coefficient array was produced by a preceding call to the single level function
dim3_sngl_fwd()
.If , it is assumed that the coefficient array was produced by a preceding call to the multi-level function
dim3_multi_fwd()
.- cindexint
Identifies which coefficients to insert. The coefficients are identified as follows:
The approximation coefficients, produced by application of the low pass filter over columns, rows and frames of (LLL). After a call to the multi-level transform function
dim3_multi_fwd()
(which implies that ) the approximation coefficients are present only for , where is the value used in a preceding call todim3_multi_fwd()
.The detail coefficients produced by applying the low pass filter over columns and rows of and the high pass filter over frames (LLH).
The detail coefficients produced by applying the low pass filter over columns, high pass filter over rows and low pass filter over frames of (LHL).
The detail coefficients produced by applying the low pass filter over columns of and high pass filter over rows and frames (LHH).
The detail coefficients produced by applying the high pass filter over columns of and low pass filter over rows and frames (HLL).
The detail coefficients produced by applying the high pass filter over columns, low pass filter over rows and high pass filter over frames of (HLH).
The detail coefficients produced by applying the high pass filter over columns and rows of and the low pass filter over frames (HHL).
The detail coefficients produced by applying the high pass filter over columns, rows and frames of (HHH).
- cfloat, array-like, shape
Contains the DWT coefficients inserted by previous calls to
dim3_coeff_ins
, or computed by a previous call to eitherdim3_sngl_fwd()
ordim3_multi_fwd()
.- dfloat, array-like, shape
The coefficients to be inserted.
If the DWT coefficients were computed by
dim3_sngl_fwd()
thenif , the approximation coefficients must be stored in , for , for , for ;
if , the detail coefficients, as indicated by , must be stored in , for , for , for .
If the DWT coefficients were computed by
dim3_multi_fwd()
thenif and , the approximation coefficients must be stored in , for , for , for ;
if , the detail coefficients, as indicated by , for level must be stored in , for , for , for .
- commdict, communication object, modified in place
Communication structure.
This argument must have been initialized by a prior call to
dim3_init()
.
- Returns
- cfloat, ndarray, shape
Contains the same DWT coefficients provided on entry except for those identified by and , which are updated with the values supplied in , inserted into the correct locations as expected by one of the reconstruction functions
dim3_sngl_inv()
(ifdim3_sngl_fwd()
was called previously) ordim3_mxolap_multi_inv()
(ifdim3_multi_fwd()
was called previously).
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: following a call to the single level function
dim3_sngl_fwd()
.- (errno )
On entry, .
Constraint: following a call to the multi-level function
dim3_multi_fwd()
.- (errno )
On entry, and .
Constraint: , where is the number of levels used in the call to
dim3_multi_fwd()
.- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, and .
Constraint: , where is the number of DWT coefficients computed in a previous call to
dim3_sngl_fwd()
.- (errno )
On entry, and .
Constraint: , where is the number of DWT coefficients computed in a previous call to
dim3_multi_fwd()
.- (errno )
On entry, and , but .
Constraint: when in the preceding call to
dim3_multi_fwd()
.- (errno )
Either the initialization function has not been called first or [‘icomm’] has been corrupted.
- Notes
dim3_coeff_ins
inserts a selected set of three-dimensional DWT coefficients into the full set of coefficients stored in compact form in a one-dimensional array . It is required thatdim3_coeff_ins
is preceded by a call to the initialization functiondim3_init()
and either the forwards transform functiondim3_sngl_fwd()
or multi-level forwards transform functiondim3_multi_fwd()
.Given an initial three-dimensional data set , a prior call to
dim3_sngl_fwd()
ordim3_multi_fwd()
computes the approximation coefficients (at the highest requested level in the case ofdim3_multi_fwd()
) and, seven sets of detail coefficients (at all levels in the case ofdim3_multi_fwd()
) and stores these in compact form in a one-dimensional array .dim3_coeff_ext()
can then extract either the approximation coefficients or one of the sets of detail coefficients (at one of the levels followingdim3_multi_fwd()
) into a three-dimensional array, . Following some calculation on this set of coefficients (for example, denoising), the updated coefficients in are inserted back into the full set usingdim3_coeff_ins
. Several extractions and insertions may be performed.dim3_sngl_inv()
ordim3_mxolap_multi_inv()
can then be used to reconstruct a manipulated data set . The dimensions of depend on the level extracted and are available from either: the arrays , and as returned bydim3_multi_fwd()
if this was called first; or, otherwise from , and as returned bydim3_init()
. See the C09 Introduction for a discussion of the three-dimensional DWT.