naginterfaces.library.wav.dim3_​coeff_​ext

naginterfaces.library.wav.dim3_coeff_ext(ilev, cindex, c, comm)[source]

dim3_coeff_ext extracts a selected set of discrete wavelet transform (DWT) coefficients from the full set of coefficients stored in compact form, as computed by dim3_sngl_fwd() (single level three-dimensional DWT) or dim3_multi_fwd() (multi-level three-dimensional DWT).

For full information please refer to the NAG Library document for c09fy

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/c09/c09fyf.html

Parameters
ilevint

The level at which coefficients are to be extracted.

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 extract. 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 available only for , where is the value used in a preceding call to dim3_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

DWT coefficients, as computed by dim3_sngl_fwd() or dim3_multi_fwd().

commdict, communication object, modified in place

Communication structure.

This argument must have been initialized by a prior call to dim3_init().

Returns
dfloat, ndarray, shape

The requested coefficients.

If the DWT coefficients were computed by dim3_sngl_fwd() then

if , the approximation coefficients are stored in , for , for , for ;

if , the detail coefficients, as indicated by , are stored in , for , for , for .

If the DWT coefficients were computed by dim3_multi_fwd() then

if and , the approximation coefficients are stored in , for , for , for ;

if , the detail coefficients, as indicated by , for level are stored in , for , for , for .

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 the preceding call to dim3_sngl_fwd().

(errno )

On entry, and .

Constraint: , where is the number of DWT coefficients computed in the preceding 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_ext is intended to be used after a call to either dim3_sngl_fwd() (single level three-dimensional DWT) or dim3_multi_fwd() (multi-level three-dimensional DWT), either of which must be preceded by a call to dim3_init() (three-dimensional wavelet filter initialization). Given an initial three-dimensional data set , a prior call to dim3_sngl_fwd() or dim3_multi_fwd() computes the approximation coefficients (at the highest requested level in the case of dim3_multi_fwd()) and seven sets of detail coefficients (at all levels in the case of dim3_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 following dim3_multi_fwd()) into a three-dimensional data set stored in .

If a multi-level DWT was performed by a prior call to dim3_multi_fwd() then the dimensions of the three-dimensional data stored in depend on the level extracted and are available from the arrays , and as returned by dim3_multi_fwd() which contain the first, second and third dimensions respectively.

If a single level DWT was performed by a prior call to dim3_sngl_fwd() then the dimensions of the three-dimensional data stored in can be determined from , and as returned by the setup function dim3_init().

See the C09 Introduction for a discussion of the three-dimensional DWT.