## 2 Materials and Methods
### Definition of Markers for Transducer and Water Regions  
To obtain the marker of the transducer region, a binary image was obtained from the lower part of the original MR image, shown in Figure 6b, after the application of the threshold method in inverted threshold configuration type. A median blur filter was used to remove pixels surrounding the transducer region in the binary image. In the same way as in the definition of the marker for the tissue region, the border following algorithm [16; 17], the Ramer-Douglas-Peucker algorithm [18; 19; 20] and the 'drawContours' function in OpenCV [21] were used for the detection of contours, for the calculation of a curve with fewer points from the detected contours and for the drawing of the obtained curve, respectively. A rectangular region was extracted for the definition of an image with the marker of the transducer region.  
To obtain the marker of the water region, these algorithms were also used followed by the application of the threshold method in inverted threshold configuration type [23]. Finally, the extraction of a rectangular region and an erosion [24] were performed for the definition of an image with the marker for the water region.  
To obtain the marker of the hole inside the transducer region, a binary image was obtained from the lower part of the original MR image, shown in Figure 6b, after the application of the threshold method in inverted threshold configuration type. Holes in the image were filled, and a maximum rectangle inside the arbitrary shape in the resulting binary image was calculated [14]. A rectangular region with the hole was extracted from the original MR image using the calculated maximum rectangle, and a binary image was obtained after the application of the threshold method in inverted threshold configuration type. The pixels of the hole region are identified, and the marker was defined after the application of a median blur filter (kernel of 3).  
Elements of the Definition of Markers in OpenCV  
The border following algorithm was used in the definition of markers for the air, tissue, transducer and water regions. The retrieval mode was set to CV_RETR_CCOMP to retrieve and organize the contours in a hierarchy of two levels, and the contour approximation method was set to CV_CHAIN_APPROX_SIMPLE to obtain the end points of encoded linear segments.  
The Ramer-Douglas-Peucker algorithm was used in the definition of markers for the air, tissue, transducer and water regions The parameter of accuracy was 0, and a closed curve was considered for the approximation.  
The 'drawContours' function was used in the definition of markers for the air, tissue, transducer and water regions. The thickness was set to a value of 1 in the definition of the markers of the tissue and transducer regions, to a value of \(-1\) for the marker of the air region and to a value of CV_FILLED for the marker of the water region. The maximal level of drawn contours was set to 8.  
The threshold method in inverted threshold configuration type was used in the definition of markers for the air, hole, transducer and water regions. The threshold was set to a value of 0 in the definition of the markers of the air and water regions, to a value of 13 for the marker of the hole region and to a value of 10 for the marker of the transducer region. The maximum values of the grayscale were 1 in the definition of the air region marker, 255 for the markers of the hole and transducer regions and 2 for the marker of the water region. An erosion filter was used in the definition of the markers for the air and the water regions. A fixed ellipse was used as structuring element with size \(8\times 8\) for the air region and \(9\times 9\) for the water region.