## 2 Materials and Methods
### Mass Irregularity Feature Extraction  
Initially, control points are selected from the segmented tumor boundary, and shape attributes are derived using a Fourier descriptor based on the centroid shape context function (CSCF). The CSCF analysis commences with the selection of N points along the shape's contour. This process involves generating a set of vectors from a designated starting point to each subsequent point along the contour, thereby encapsulating the overall shape configuration relative to a reference point. The CSCF method captures the shape's entirety in relation to the mass's centroid through a log-polar representation, and it is depicted via a shape histogram.  
In the log-polar histogram, bins are uniformly spaced to enhance sensitivity to the positioning of adjacent points rather than distant ones. For instance, a log-polar histogram, such as illustrated in Figure 8a, might include 5 bins for the radial direction (\(r\)) and 12 bins for the angular direction (\(\theta\)). By centering the histogram at the mass's centroid, each bin accumulates the count of contour points that fall within its spatial domain. The histogram data from each bin is organized into a two-dimensional (2-D) histogram. When centered on the centroid, this 2-D histogram can be reorganized into a one-dimensional (1-D) histogram (Figure 8b,c). This conversion is achieved by sorting the data based on decreasing polar distance.  
The Fourier descriptor (FD) is subsequently employed to analyze and represent the closed plane curves. This descriptor is derived through the Fourier transform applied to the shape's boundary coordinates, resulting in normalized coefficients from this transformation. This FD is acquired by conducting a Fourier transform on a shape signature, which originates from the coordinates along the shape's boundary. The Fourier descriptors refer to the normalized coefficients that result from this Fourier transform process. The discrete Fourier transform of the signature function is given by  
\[a_{n}=\frac{1}{N}\sum_{t=0}^{N-1}r(t)e^{-j2\pi\frac{\mu t}{N}},\ n=0,1,\ldots,N-1 \tag{1}\]  
Given that the centroid shape context function (CSCF) is unaffected by changes in position or orientation, adjustments to the Fourier coefficients are necessary to ensure they are independent of the scale and the initial point of the shape descriptors. The mathematical expression linking the Fourier coefficients of the shape in its original form to its version altered by scaling, and modifications in the starting point are maintained as  
\[a_{n}=\exp\ (jn\varphi)\cdot s\cdot a_{n}^{0} \tag{2}\]  
where \(\varphi\) denotes the angle adjustments resulting from altering the starting point, and \(s\) represents the scaling factor. Following this, the normalized Fourier coefficients \(b_{n}\) for the shape after transformation are derived by  
Figure 8: (**a**) Log-polar diagram, (**b**) two-dimensional histogram of boundary points included per bin, (**c**) histogram converted into one-dimensional.  
\[b_{n}=\frac{a_{n}}{a_{1}}=\frac{a_{n}^{0}}{a_{1}^{0}}\exp\left[j(n-1)\varphi\right]= b_{n}^{0}\text{exp}\left[j(n-1)\varphi\right] \tag{3}\]  
where \(b_{n}^{0}\) represents the normalized Fourier coefficients pertaining to the shape's original form. Based on Equation (3), it becomes evident that disregarding the phase component allows the magnitudes \(b_{n}\) and \(b_{n}^{0}\) to remain identical. This implies that \(b_{n}\) maintains its consistency across changes in translation, rotation, scale, and the initial starting point. The magnitude values \(b_{n}\) are utilized as the distinguishing features for classifying breast tumors in our study.