## 3 Materials and Methods
### Feature Extraction
In the case of having images, 1D-DWT can be applied iteratively, obtaining four sub-bands: Low-Low, Low-High, High-High and High-Low, denoted as LL, LH, HH and HL, respectively, LL being the approximation coefficients of the image, while LH, HH and HL are the detailed coefficients. Different levels of decomposition can be obtained, performing the transformation to the approximation coefficients. As the level of decomposition is increased, further sub-bands are computed and more compact yet coarser approximation coefficients are acquired. For example, Figure 3 shows a two-level decomposition for a brain image. If we assume that the initial image has a size of N \(\times\) N, in the first level decomposition, the size of the approximation coefficients would be reduced to N/2 \(\times\) N/2, and the size of the second level will be reduced to N/4 \(\times\) N/4. Traditionally, slices of the brain are fetched and used to extract features [20; 43; 44], using, for example, the 2D-DWT Daubechies family on a sagittal slice [45]. One of the main novelties of the methodology presented in this document is the extension of the 2-D image field to the 3-D volumetric analysis, using a three-dimensional volumetric feature extraction (wavelet transform), instead of two-dimensional wavelet transform of the slices selected by an expert neurologist. The main goal of the volumetric analysis is finding those regions of the brain that will have more relevance in the characterization of the different classes analyzed in order to obtain a precise classifier. Additionally, a better understanding of the disease is expected by characterizing the most relevant regions of the brain for the construction of the classifier. In this paper, the three-dimensional wavelet transformation (3D-DWT) has been used in order to extract features for each of the selected volumes of interest (VOI). The 3D-DWT wavelet transform can be considered as an extension to an additional dimension [46], of the one existing for two-dimensional spaces (being the two-dimensional, an extension of spaces with a single dimension). Figure 4 shows a block diagram of how the 3D-DWT transform is performed on a selected brain volume (VOI). Initially, there is a decomposition, using the 1D-DWT transform along the columns, which assumes the wavelet transform in the X dimension. This gives the volumes L and H (green boxes) corresponding to the low-pass volume and a volume high pass, respectively. The amount of data in each of these volumes is reduced. If we assume that the original volume has a data number of \(N_{x}\), \(N_{y}\) and \(N_{z}\) pixels, corresponding to each of the dimensions \((x,y,z)\) in the low-pass volume L(x,y,z), the number of pixels would be \((N_{x}/2*N_{y}*N_{z})\). After this application of the wavelet transform in the x dimension, the decomposition is performed in the rows (y axis), with the generation of new subvolumes (the orange boxes): HH, HI, LH and LL. As in the previous decomposition, the amount of data is also reduced, being for these volumes: \((N_{x}/2*N_{y}/2*N_{z})\). The final phase is the decomposition along the cuts (z axis), obtaining eight sub-bands (blue boxes): HHH, HHL, HLH, HLL, LHH, LHL, LHH and LLL, with the number of data: \((N_{x}/2*N_{y}/2*N_{z}/2)\). In the specialized wavelet literature and its applications in images [47; 48], there are a large number of variants for the determination of the mother wavelet, opting in this paper for the use of the biorthogonal 3.3 up to level 2. When a volumetric magnetic resonance image is being processed, various filtering procedures must be performed, some of them to select the type of matter to be analyzed. In this work, the whole matter (W) and the gray matter (C1) of the brain are used, thus performing a wavelet transform on each of these matters for each of the volumes analyzed. Figure 5 shows the feature matrix of 3D-DWT wavelet coefficients obtained for each specific VOI, in whole and gray matter. Figure 3: Operating mode of the 2D wavelet transform applied to images.