## 2 Materials and Methods
### Image Segmentation Methods for the Identification of Regions of Interest
#### 2.4.1 Image Segmentation with Threshold and Level Set Methods (TLSM)  
In this approach, each region of interest was segmented using different image segmentation methods. Division of the MR Image (Preprocessing)  
The original MR image was divided into two parts: the upper part where the air, gel-pad and tissue regions are located and the lower part where the water and the transducer regions are located as shown in Figure 6a,b, respectively. The user is required to perform this division in order to facilitate the application of segmentation methods. Figure 4: Main regions in the sagittal MR image. Figure 5: Ground truth image generated from the delineation of regions in the MR image. Segmentation of Air Region  
The air region in the upper part of the MR image, shown in Figure 6a, appeared as an almost homogeneous dark region, so it was easily identifiable using the threshold method [5] as follows:  
\[g(x,y)=\left\{ \begin{array}{ll}1&\text{if }f(x,y)>T\\ 0&\text{if }f(x,y)\leq T\end{array} \right. \tag{1}\]  
where:  
\(f(x,y)\) is the two-dimensional image. \(g(x,y)\) is the two-dimensional segmented image. \(T\) is the threshold that separates the image into two dominant modes. The value of this parameter can be varied, so it was considered in the parametric study described in Section 2.6. Hereinafter this parameter will be called \(T\_air\). From the upper part of the MR image, shown in Figure 7a, a binary image was generated with the application of the threshold method as shown in Figure 7b, with an area corresponding to a water-based heating pad appearing as multiple separate areas around the tissue region. These areas were removed by using the region growing algorithm (RGA). The RGA works on the original input image \(I(x,y)\), using a similarity criterion \(Q\) and a set of seed points [5]. The RGA used in the current study was a MATLAB(r) (2017 MathWorks, Inc., Natick, MA, USA) implementation that worked on the grayscale input MR image \(I(x,y)\), a similarity criterion and a single seed point [6]. The RGA yielded a binary image \(J(x,y)\) with the segmented region [5,6]. In the current study the seed point was set inside the largest separate area in the binary image, shown in Figure 7b, and the binary image could be obtained without the areas corresponding to the heating pad as shown in Figure 7c. The RGA had a similarity criterion defined as the difference between the intensity value of the pixel and the mean intensity of the region. The pixels with a difference between their intensity values and the mean intensity below a fixed value of 0.1 on a normalized image were considered to meet this criterion. Figure 6: Original transverse MR image: (**a**) the upper part with the air, gel-pad and tissue regions; (**b**) the lower part with the transducer and water regions. Figure 7: Segmentation of Air Region: (**a**) original transverse MR image (upper part); (**b**) binary image obtained after thresholding with the heating pad appearing as multiple distinct areas around the tissue region; (**c**) new binary image obtained after the application of the RGA where the heating pad was successfully eliminated. Segmentation of Gel-Pad Region  
The gel-pad region in the upper part of the MR image, shown in Figure 6a, was segmented using two level set methods independently: the Geodesic Active Contours (GAC) method [7] and the Distance Regularized Level Set Evolution (DRLSE) method [8]. These methods are useful for the detection of boundaries. The GAC method [8] is defined as follows:  
\[\frac{\partial u}{\partial t}=|\
abla u|\text{div}\left(g(I)\frac{\
abla u}{| \
abla u|}\right)+cg(I)|\
abla u| \tag{2}\]  
where:  
\(u\) is the level set function. The initial form of this function is the initial contour, denoted as \(u_{0}\). Its shape can be varied, so it will be considered in the parametric study described in Section 2.6. Hereinafter this parameter will be called \(u_{-}0\). \(c\) is the constant velocity.