C09ACF returns the details of the chosen threedimensional discrete wavelet filter. For a chosen mother wavelet, discrete wavelet transform type (singlelevel or multilevel DWT) and end extension method, this routine returns the maximum number of levels of resolution (appropriate to a multilevel transform), the filter length, the total number of coefficients and the number of wavelet coefficients in the second and third dimensions for the singlelevel case. This routine must be called before any of the threedimensional transform routines in this chapter.
Threedimensional discrete wavelet transforms (DWT) are characterised by the mother wavelet, the end extension method and whether multiresolution analysis is to be performed. For the selected combination of choices for these three characteristics, and for given dimensions (
$m\times n\times \mathit{fr}$) of data array
$A$, C09ACF returns the dimension details for the transform determined by this combination. The dimension details are:
${l}_{\mathrm{max}}$, the maximum number of levels of resolution that would be computed were a multilevel DWT applied;
${n}_{f}$, the filter length;
${n}_{\mathrm{ct}}$ the total number of wavelet coefficients (over all levels in the multilevel DWT case);
${n}_{\mathrm{cn}}$, the number of coefficients in the second dimension for a singlelevel DWT; and
${n}_{\mathrm{cfr}}$, the number of coefficients in the third dimension for a singlelevel DWT. These values are also stored in the communication array
ICOMM, as are the input choices, so that they may be conveniently communicated to the threedimensional transform routines in this chapter.
None.
 1: WAVNAM – CHARACTER(*)Input
On entry: the name of the mother wavelet. See the
C09 Chapter Introduction for details.
 ${\mathbf{WAVNAM}}=\text{'HAAR'}$
 Haar wavelet.
 ${\mathbf{WAVNAM}}=\text{'DB}\mathit{n}\text{'}$, where $\mathit{n}=2,3,\dots ,10$
 Daubechies wavelet with $\mathit{n}$ vanishing moments ($2\mathit{n}$ coefficients). For example, ${\mathbf{WAVNAM}}=\text{'DB4'}$ is the name for the Daubechies wavelet with $4$ vanishing moments ($8$ coefficients).
 ${\mathbf{WAVNAM}}=\text{'BIOR}\mathit{x}$.$\mathit{y}\text{'}$, where $\mathit{x}$.$\mathit{y}$ can be one of 1.1, 1.3, 1.5, 2.2, 2.4, 2.6, 2.8, 3.1, 3.3, 3.5 or 3.7
 Biorthogonal wavelet of order $\mathit{x}$.$\mathit{y}$. For example ${\mathbf{WAVNAM}}=\text{'BIOR3.1'}$ is the name for the biorthogonal wavelet of order $3.1$.
Constraint:
${\mathbf{WAVNAM}}=\text{'HAAR'}$, $\text{'DB2'}$, $\text{'DB3'}$, $\text{'DB4'}$, $\text{'DB5'}$, $\text{'DB6'}$, $\text{'DB7'}$, $\text{'DB8'}$, $\text{'DB9'}$, $\text{'DB10'}$, $\text{'BIOR1.1'}$, $\text{'BIOR1.3'}$, $\text{'BIOR1.5'}$, $\text{'BIOR2.2'}$, $\text{'BIOR2.4'}$, $\text{'BIOR2.6'}$, $\text{'BIOR2.8'}$, $\text{'BIOR3.1'}$, $\text{'BIOR3.3'}$, $\text{'BIOR3.5'}$ or $\text{'BIOR3.7'}$.
 2: WTRANS – CHARACTER(1)Input
On entry: the type of discrete wavelet transform that is to be applied.
 ${\mathbf{WTRANS}}=\text{'S'}$
 Singlelevel decomposition or reconstruction by discrete wavelet transform.
 ${\mathbf{WTRANS}}=\text{'M'}$
 Multiresolution, by a multilevel DWT or its inverse.
Constraint:
${\mathbf{WTRANS}}=\text{'S'}$ or $\text{'M'}$.
 3: MODE – CHARACTER(1)Input
On entry: the end extension method.
 ${\mathbf{MODE}}=\text{'P'}$
 Periodic end extension.
 ${\mathbf{MODE}}=\text{'H'}$
 Halfpoint symmetric end extension.
 ${\mathbf{MODE}}=\text{'W'}$
 Wholepoint symmetric end extension.
 ${\mathbf{MODE}}=\text{'Z'}$
 Zero end extension.
Constraint:
${\mathbf{MODE}}=\text{'P'}$, $\text{'H'}$, $\text{'W'}$ or $\text{'Z'}$.
 4: M – INTEGERInput
On entry: the number of elements, $m$, in the first dimension (number of rows of each twodimensional frame) of the input data, $A$.
Constraint:
${\mathbf{M}}\ge 2$.
 5: N – INTEGERInput
On entry: the number of elements, $n$, in the second dimension (number of columns of each twodimensional frame) of the input data, $A$.
Constraint:
${\mathbf{N}}\ge 2$.
 6: FR – INTEGERInput
On entry: the number of elements, $\mathit{fr}$, in the third dimension (number of frames) of the input data, $A$.
Constraint:
${\mathbf{FR}}\ge 2$.
 7: NWL – INTEGEROutput

On exit: the maximum number of levels of resolution,
${l}_{\mathrm{max}}$, that can be computed if a multilevel discrete wavelet transform is applied (
${\mathbf{WTRANS}}=\text{'M'}$). It is such that
${2}^{{l}_{\mathrm{max}}}\le \mathrm{min}\phantom{\rule{0.125em}{0ex}}\left(m,n,\mathit{fr}\right)<{2}^{{l}_{\mathrm{max}}+1}$, for
${l}_{\mathrm{max}}$ an integer.
If
${\mathbf{WTRANS}}=\text{'S'}$,
NWL is not set.
 8: NF – INTEGEROutput
On exit: the filter length, ${n}_{f}$, for the supplied mother wavelet. This is used to determine the number of coefficients to be generated by the chosen transform.
 9: NWCT – INTEGEROutput

On exit: the total number of wavelet coefficients, ${n}_{\mathrm{ct}}$, that will be generated. When ${\mathbf{WTRANS}}=\text{'S'}$ the number of rows required (i.e., the first dimension of each twodimensional frame) in each of the output coefficient arrays can be calculated as ${n}_{\mathrm{cm}}={n}_{\mathrm{ct}}/\left(8\times {n}_{\mathrm{cn}}\times {n}_{\mathrm{cfr}}\right)$. When ${\mathbf{WTRANS}}=\text{'M'}$ the length of the array used to store all of the coefficient matrices must be at least ${n}_{\mathrm{ct}}$.
 10: NWCN – INTEGEROutput
On exit: for a singlelevel transform (${\mathbf{WTRANS}}=\text{'S'}$), the number of coefficients that would be generated in the second dimension, ${n}_{\mathrm{cn}}$, for each coefficient type. For a multilevel transform (${\mathbf{WTRANS}}=\text{'M'}$) this is set to $1$.
 11: NWCFR – INTEGEROutput
On exit: for a singlelevel transform (${\mathbf{WTRANS}}=\text{'S'}$), the number of coefficients that would be generated in the third dimension, ${n}_{\mathrm{cfr}}$, for each coefficient type. For a multilevel transform (${\mathbf{WTRANS}}=\text{'M'}$) this is set to $1$.
 12: ICOMM($260$) – INTEGER arrayCommunication Array
On exit: contains details of the wavelet transform and the problem dimension which is to be communicated to the twodimensional discrete transform routines in this chapter.
 13: IFAIL – INTEGERInput/Output

On entry:
IFAIL must be set to
$0$,
$1\text{ or}1$. If you are unfamiliar with this parameter you should refer to
Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
$1\text{ or}1$ is recommended. If the output of error messages is undesirable, then the value
$1$ is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
$0$.
When the value $\mathbf{1}\text{ or}\mathbf{1}$ is used it is essential to test the value of IFAIL on exit.
On exit:
${\mathbf{IFAIL}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see
Section 6).
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.
None.