# Analysis of the Quantization Noise in Discrete Wavelet Transform Filters for 3D Medical Imaging
## 3 Results
### Theoretical Analysis of the Maximum Error of the 3D Medical Images DWT
** Let us calculate the errors \(E_{8,F,\varepsilon}\) of sums \(E_{7,F,\varepsilon}\), \(\varepsilon=1,2,3,4\). \[E_{1,L}=\sum\limits_{i=1}^{k}\Bigl{(}\left[2^{n}f_{L,i}\right]-2^{n}f_{L,i} \Bigr{)},E_{1,H}=\sum\limits_{i=1}^{k}\Bigl{(}\left[2^{n}f_{H,i}\right]-2^{n} f_{H,i}\Bigr{)},\]6  
**Stage 9. Row reconstruction. ** Let us calculate the errors \(T_{9,\varepsilon}\) and errors \(E_{9,F,\varepsilon}\) of column reconstruction with filters \(L\) and \(H\). \[E_{1,L}=\sum\limits_{i=1}^{k}\Bigl{(}\left[2^{n}f_{L,i}\right]-2^{n}f_{L,i} \Bigr{)},E_{1,H}=\sum\limits_{i=1}^{k}\Bigl{(}\left[2^{n}f_{H,i}\right]-2^{n} f_{H,i}\Bigr{)},\]7  
\[E_{1,L}=\sum\limits_{i=1}^{k}\Bigl{(}\left[2^{n}f_{L,i}\right]-2^{n}f_{L,i} \Bigr{)},E_{1,H}=\sum\limits_{i=1}^{k}\Bigl{(}\left[2^{n}f_{H,i}\right]-2^{n} f_{H,i}\Bigr{)},\]8  
\[E_{1,L}=\sum\limits_{i=1}^{k}\Bigl{(}\left[2^{n}f_{L,i}\right]-2^{n}f_{L,i} \Bigr{)},E_{1,H}=\sum\limits_{i=1}^{k}\Bigl{(}\left[2^{n}f_{H,i}\right]-2^{n} f_{H,i}\Bigr{)},\]9  
\[E_{1,L,1}=\sum\limits_{i=1}^{\frac{k}{2}}\Bigl{(}\left[2^{n}f_{L,2(i-1)} \right]-2^{n}f_{L,2(i-1)}\Bigr{)},E_{1,L,2}=\sum\limits_{i=1}^{\frac{k}{2}} \Bigl{(}\left[2^{n}f_{L,2i-1}\right]-2^{n}f_{L,2i-1}\Bigr{)},\]0  
\[E_{1,L,1}=\sum\limits_{i=1}^{\frac{k}{2}}\Bigl{(}\left[2^{n}f_{L,2(i-1)} \right]-2^{n}f_{L,2(i-1)}\Bigr{)},E_{1,L,2}=\sum\limits_{i=1}^{\frac{k}{2}} \Bigl{(}\left[2^{n}f_{L,2i-1}\right]-2^{n}f_{L,2i-1}\Bigr{)},\]1  
\[E_{1,L,1}=\sum\limits_{i=1}^{\frac{k}{2}}\Bigl{(}\left[2^{n}f_{L,2(i-1)} \right]-2^{n}f_{L,2(i-1)}\Bigr{)},E_{1,L,2}=\sum\limits_{i=1}^{\frac{k}{2}} \Bigl{(}\left[2^{n}f_{L,2i-1}\right]-2^{n}f_{L,2i-1}\Bigr{)},\]2\[E_{1,L,1}=\sum\limits_{i=1}^{\frac{k}{2}}\Bigl{(}\left[2^{n}f_{L,2(i-1)} \right]-2^{n}f_{L,2(i-1)}\Bigr{)},E_{1,L,2}=\sum\limits_{i=1}^{\frac{k}{2}} \Bigl{(}\left[2^{n}f_{L,2i-1}\right]-2^{n}f_{L,2i-1}\Bigr{)},\]3  
\[E_{1,L,1}=\sum\limits_{i=1}^{\frac{k}{2}}\Bigl{(}\left[2^{n}f_{L,2(i-1)} \right]-2^{n}f_{L,2(i-1)}\Bigr{)},E_{1,L,2}=\sum\limits_{i=1}^{\frac{k}{2}} \Bigl{(}\left[2^{n}f_{L,2i-1}\right]-2^{n}f_{L,2i-1}\Bigr{)},\]4  
\[E_{1,L,1}=\sum\limits_{i=1}^{\frac{k}{2}}\Bigl{(}\left[2^{n}f_{L,2(i-1)} \right]-2^{n}f_{L,2(i-1)}\Bigr{)},E_{1,L,2}=\sum\limits_{i=1}^{\frac{k}{2}} \Bigl{(}\left[2^{n}f_{L,2i-1}\right]-2^{n}f_{L,2i-1}\Bigr{)},\]5  
**Stage 10. Row summation. ** Let us calculate the errors \(E_{10,\varepsilon}\) of sums \(E_{9,F,\varepsilon}\), \(\varepsilon=1,2,3,4,5,6,7,8\). \[E_{1,L,1}=\sum\limits_{i=1}^{\frac{k}{2}}\Bigl{(}\left[2^{n}f_{L,2(i-1)} \right]-2^{n}f_{L,2(i-1)}\Bigr{)},E_{1,L,2}=\sum\limits_{i=1}^{\frac{k}{2}} \Bigl{(}\left[2^{n}f_{L,2i-1}\right]-2^{n}f_{L,2i-1}\Bigr{)},\]6  
**Stage 11. Normalizing. ** Let us calculate the errors \(E_{11,\varepsilon}\) of rounding downscaled \(E_{10,\varepsilon}\) by \(2^{-6n}\), \(\varepsilon=1,2,3,4,5,6,7,8\). \[E_{1,L,1}=\sum\limits_{i=1}^{\frac{k}{2}}\Bigl{(}\left[2^{n}f_{L,2(i-1)} \right]-2^{n}f_{L,2(i-1)}\Bigr{)},E_{1,L,2}=\sum\limits_{i=1}^{\frac{k}{2}} \Bigl{(}\left[2^{n}f_{L,2i-1}\right]-2^{n}f_{L,2i-1}\Bigr{)},\]7  
The obtained values \(E_{11,\varepsilon}\) (\(\varepsilon=1,2,3,4,5,6,7,8\)) represent the resulting error of the method and allow for the calculation of the PSNR  
\[E_{1,L,1}=\sum\limits_{i=1}^{\frac{k}{2}}\Bigl{(}\left[2^{n}f_{L,2(i-1)} \right]-2^{n}f_{L,2(i-1)}\Bigr{)},E_{1,L,2}=\sum\limits_{i=1}^{\frac{k}{2}} \Bigl{(}\left[2^{n}f_{L,2i-1}\right]-2^{n}f_{L,2i-1}\Bigr{)},\]8  
where \(MSE_{gnsyscale}=MSE_{color}=\frac{1}{8}\sum\limits_{\varepsilon=1}^{8}E_{11, \varepsilon}^{2}\). Formula (5) allows determining the minimum quality of a 3D image \(db3\), obtained as a result of DWT of the original image \(I\), depending on the maximum brightness and selected bit-width \(r=n+1\) of wavelet filters coefficients \(f_{F,i}\).