# Analysis of the Quantization Noise in Discrete Wavelet Transform Filters for 3D Medical Imaging
## 2 Materials and Methods  
DWT is a signal transform using a filter bank, which is a convolution of the input data with wavelet filters that translate them from a time representation into a time-frequency domain. Wavelet filters \(F\) of filter bank consist of coefficients \(f_{F,i}\), where \(i=1,\ldots,k\) and \(k\) is the number of coefficients. Coefficients of lowpass and highpass wavelet filters of decomposition \((LD,HD)\) and reconstruction \((LR,HR)\) are related by equation [27]  
\[f_{HD,i}=(-1)^{i+1}f_{LD,k-1-i},\ f_{LR,i}=f_{LD,k-1-i},\ f_{HR,i}=(-1)^{i}f_{ LD,i}. \tag{1}\]  
We shall consider only wavelets with compact support [46]. Daubechies wavelets \(db(k/2)\) (where \(db1\) with \(k=2\) is Haar wavelet), symlets \(sym(k/2)\) and coiflets \(cofi(k/6)\) are the most common ones. Consider a 3D digital medical image \(I\) of \(X\) rows, \(Y\) columns and \(Z\) frames as a function \(I(x,y,z)\), where \(0\leq x\leq X-1,0\leq y\leq Y-1\) and \(0\leq z\leq Z-1\) are the spatial coordinates of \(I\). Thus, voxel values (analogues of 2D pixels for 3D space) are represented as \(I(x,y,z)\) for grayscale images and as \(I(x,y,z,c)\) for color images, where \(c\) is the color number (for example, \(c=1,2,3\)--red, green and blue colors respectively for RGB images). We assumed that all image voxels are isotropic [47], hereinafter. Convolution of a 3D image with wavelet filters is performed by formulas  
\[I^{\prime}(x,y,z)=\sum_{i=1}^{k}I(x-i,y,z)\cdot f_{F,i},\ I^{\prime\prime}(x,y, z)=\sum_{i=1}^{k}I^{\prime}(x,y-i,z)\cdot f_{F,i},\]  
\[I^{\prime\prime}(x,y,z)=\sum_{i=1}^{k}I^{\prime\prime}(x,y,z-i)\cdot f_{F,i},\]  
where \(I^{\prime}\), \(I^{\prime\prime}\) and \(I^{\prime\prime\prime}\) is the convolution results by strings, columns and frames respectively. 3D image DWT is performed by sequential convolution with wavelet filters (Figure 2) in the steps below. 1. Row analysis is performed by decomposing the original image \(I\) by rows with lowpass \(LD\) and highpass \(HD\) wavelet filters and downsampling, indicated by the symbol \(\downarrow\) 2 (for example, the array \([2,8,5,1,-1,3]\) is transformed into an array \([2,5,-1]\) after the operation \(\downarrow\) 2). 2. Column analysis is performed by columns similar to the row analysis for coefficients obtained at stage 1. 3. Frame analysis is performed by frames similar to the row analysis for coefficients obtained at stage 2. We get 8 sets of coefficients, \(LLL,LLH,LHL,LHH,HLL,HLH,HHL\) and \(HHH\), of image decomposition as a result of original image \(I\) analysis. These sets can be divided into approximating \((LLL)\) and detailing \((LLH,LHL,LHH,HLL,HL,HHL,HHL\) and \(HHH)\). Approximating coefficients correspond to the lowpass part of the signal and contain main information about the image \(I\). Detailing coefficients to correspond to the highpass part of the signal and contain detailed information about the image \(I\). 3D image denoising and compression are carried out by manipulating detailing coefficients \((LLH,LHL,LHH,HLL,HLH,HHL\) and \(HHH)\) of image decomposition. Figure 2: The scheme of 3D image discrete wavelet transform (DWT). Frame synthesis is performed by upsampling, indicated by the symbol \(\uparrow 2\) (for example, the array \([2,5,-1]\) is transformed into an array \([2,0,5,0,-1,0]\) after the operation \(\uparrow 2\)), of image decomposition coefficients by frames, reconstructing with lowpass \(LR\) and highpass \(HR\) wavelet filters and summation of the corresponding results. 5. Column synthesis is performed by columns similar to the frame synthesis for coefficients obtained at Stage 4. 6. Row synthesis is performed by rows similar to the frame synthesis for coefficients obtained at Stage 5. We get the reconstructed image \(\widetilde{I}\) as a result of image decomposition coefficients synthesis. Theoretically, the original image should be fully reconstructed since the scheme in Figure 2 has the perfect reconstruction property [48].