## 2 Description of the algorithm  
The first filtering step is the convolution of the original image by a suitable set of oriented fractals with maximal gray distribution and a flat histogram. Fractal masks are obtained by the logical operation XOR applied to two orthogonal copies of a gray gradient image. This results in an image with a Menger sponge-like structure [25]. These filters can be controlled by three parameters: size, angular orientation, and grayscale. From another point of view, this filtering procedure can be considered a type of diffusion filter with an anisotropic kernel, and it produces a directional blurring of the image. However, while other filters, such as the Gaussian filter, are linear and space-invariant, fractal diffusion is nonlinear and space-variant in the general case [26]. Due to this blurring effect, nearest neighborhood zooming of the original image has previously been performed to avoid any loss of resolution. The larger the fractal mask, the more pronounced the blurring is. If the directional effect is not desired, it is canceled using masks with a 180-degree difference in orientation. The number of pixels in both dimensions is multiplied by the dimension of the square fractal mask in pixels. For example, if the fractal mask has \(5\times 5\) pixels, the original mammogram is multiplied by 5 in both dimensions. The simplest approach is a single convolution between the image and the fractal kernel:  
\[F_{XOR}=\left[ \begin{array}{ccccc}0&51&102&153&204\\ 51&0&85&170&255\\ 102&85&0&255&170\\ 153&170&255&0&85\\ 204&255&170&85&0\end{array} \right] \tag{1}\]  
This mask convolution produces a new image, similar to an interpolated one, but with minimal histogram alteration. Instead of solving the complete diffusion equation (2), a scale space of the image can be created using fractal kernels of varying pixel sizes [27; 28]. Rotational gradients can also be analyzed utilizing rotated kernels of the same size and subtracting the resulting images, whose outcome is a multi-angle analysis approach. In this work, only the multi-angle study was performed. The full scale space approach will be developed in future works. \[\frac{\partial I}{\partial t}=div(c(x,y,t)\
abla I)=\
abla c\cdot\
abla I+c(x,y, t)\cdot\Delta I \tag{2}\]  
As previously described, the set of fractal masks is generated by combining two orthogonal grayscale ramp images using the XOR logical operation. The final masks are obtained by rotating the original fractal to the desired angle with no interpolation and allowing the black extra pixels to cover the entire image. The resultant filtering images can be seen in Figure 1.  
The XOR fractal has a flat histogram so that the convolution with these masks for image zooming maintains the original image histogram with minimal changes, as seen in Figure 2. Due to this property, the histogram is completely black. Mask convolution with this set of fractals can be used for zooming and denoising, as shown in a previous study [13]. In this work, all the aforementioned properties of these masks are applied to produce tunable edges, zooming, and the segmentation of microcalcifications to enhance their main features. Figure 1: Complete set of oriented fractal masks with angular increments of 45 degrees. Figure 2: Histogram of a 1024 \(\times\) 1024 pixel fractal mask. The main algorithm is divided into two parts:  
1. A preprocessing step to detect and localize microcalcifications. 2. The isolation, enhancement and segmentation of a particular microcalcification. The first part of the algorithm begins with edge enhancement. This is achieved by calculating the standard deviation of all the fractal convolved images from 0 to 360 degrees in increments of 45 degrees. According to the ImageJ user guide [29], the Z project operation calculates the standard deviation of a stack of slices using an image with a real number of pixel values. ImageJ calculates the standard deviation of the set of the same position pixels in a set of images.