## 3 Materials and Methods
### The Proposed Analysis
#### 3.2.2 Pre-Processing  
In order to improve segmentation results, some pre-processing operations are applied after the ROI selection (Figure 3). In particular, the aim of this preliminary phase is to perform denoising and data pre-processing, allowing us to achieve reliable results during the segmentation phase.  
The first pre-processing operation deals with noise reduction [47]. The use of median or average (with Gaussian or flat kernels) filters is a common choice in MR image processing. For instance, median filtering was applied to facilitate the ROI identification by reducing the outlier introduced by anatomical peculiarities [48] or also deal with small patient shifts [49]. We used Gaussian kernels having the form in Equation (13), which are the only circular  
Figure 2: Flow diagram of the proposed analysis for breast lesion segmentation.  
symmetric kernels that are also separable and that allow you to reduce noise by altering the image less than the average filter.  
\[G(r)=ke^{-\frac{r^{2}}{2\sigma^{2}}}, \tag{13}\]  
where \(r\), \(\sigma\) and \(k\) represent the radius, the standard deviation and the normalization factor of the Gaussian function \(G\), respectively. Kernel normalization, obtained by multiplying its coefficients by \(k\)--obtained as the inverse of the sum of all kernel coefficients--has two purposes: _(i)_ the average value of an area of constant intensity would equal that intensity in the filtered image (as it should) and _(ii)_ it prevents the introduction of biases during filtering (i.e., the sum of the pixels in the original and filtered images will be the same). For the purpose of this work, a Gaussian kernel with \(r=5\) and \(\sigma=0.6\) was chosen: this standard deviation value performed denoising without an excessive blurring of the original image.  
The next pre-processing step subtracts the mean value from the original image. This is a very helpful step in signal processing because it emphasizes signal variations by shifting its mean to zero. For this reason, during the pre-processing phase, the algorithm removed this bias from the original image amplifying gray level variations. Once the mean value subtraction, the pixels resulting in a negative value have to be clipped to zero in order to avoid visualization problems in the following steps.  
After noise reduction and mean subtraction, the last step performs a modified gamma-transformation to stretch the original image histogram. The general form of a gamma transformation is defined in Equation (14):  
\[s=cr^{\gamma}, \tag{14}\]  
where \(c\) and \(\gamma\) are positive constants. Power-law curves with fractional values of \(\gamma\) map a narrow range of dark input values into a wider range of output values, and vice versa for bright input values. When \(c=\gamma=1\) the gamma transformation reduces to the identity transformation. The modified gamma transformation proposed in this work used \(c=1\) and \(\gamma=0.7\), by means a piece-wise function in which the final value of each pixel depends on a certain threshold value \(\theta\). In particular, the function mapping the initial value of a pixel \(r(x,y)\) into its final value \(s(x,y)\) is defined in Equation (15). The value of \(\theta\), used for the piece wise gamma selection, is the one suggested by the [PERSON]'s thresholding method [30]. Figure 4 shows the results of each pre-processing step applied on two (one per row) DCE-MRI breast lesions.  
\[s(x,y)=\begin{cases}r(x,y)&\text{if}\quad r(x,y)\leq\theta\\ r(x,y)^{\gamma}&\text{if}\quad r(x,y)>\theta\end{cases}\quad. \tag{15}\]  
Figure 3: Flow diagram of the pre-processing steps approach.