# Wavelia Breast Imaging: The Optical Breast Contour Detection Subsystem
## 2 Materials and Methods
### Optical Breast Contour Detection (OBCD) Subsystem: The 3D Breast Surface Reconstruction Procedure
#### 2.3.1 Linear Stretching Procedure  
The aim of this processing step is to transform the point cloud \(Pc_{B}\), obtained after removal of the ring as explained in the previous sub-section, into an elevation point cloud to ensure the generation of a surface with no overlaps (see illustration in the right-hand images in Figure 11a-c). A surface with no overlaps is defined as a surface where there is one single z coordinate for each coordinates pair (x, y). Figure 11: Linear stretching transformation: (**a**) example of stretching procedure applied to a surface with overlaps, the result is a surface without overlaps; (**b**) stretching procedure applied to a breast phantom point cloud; (**c**) stretching procedure applied to Patient 002 breast point cloud. Overlaps, as defined below, are naturally very common in the geometry of the pendulum breast, especially in the case of elder patients. The stretching of the breast surface, such that it has no overlap, is a processing step which enables the use of 2D image processing methods for de-noising of the point cloud, before meshing. Obviously, the stretching operation is compensated before meshing, such that the original breast shape is ultimately reconstructed. To perform this transformation, a new origin point \(p_{str}\) needs to be defined. This point must be located at the bottom of the breast (close to the chest wall) and the z axis starting from it must intersect the non-stretched surface only once, to successfully stretch the x and y coordinates of the point cloud, as illustrated graphically in Figure 12.  
In the following, the procedure put in place to define a linear stretching function \(Sf(z)\) and compute the stretching factor for the x and y coordinates of each point as a function of the z coordinate (see Figure 13b), is detailed. The function is defined in the Wavelia reference coordinate system (see Figure 13a) and it is specified in Equation (11), where \(s_{max}\) is the maximal stretching factor, \(z_{min}\) and \(z_{max}\) are the minimum and maximum z coordinates of the bounding box of \(Pc_{B}\), and z is the z coordinate of the point to be stretched. \(z_{max}\) is equal to zero, as shown in Figure 13b. \[Sf(z)=\frac{(s_{max}-1)}{(z_{max}-z_{min})}.z+s_{max} \tag{11}\]  
Figure 12: (a) Example of a bad choice of origin point (illustrated with yellow color): the resulting surface after the stretching process was applied is shown on the right; (b) example of a good choice of origin point (illustrated with yellow color): the resulting surface after the stretching process was applied is shown on the right. The following processing steps are applied to compute \(s_{max}\):  
1. the number of points of the point cloud is reduced by voxelization (Figure 14a). 2. the points associated to the chest wall are removed from the voxelized point cloud, by removing the points where the z-coordinate is in range from 0 to \(z_{chest}\) (white points in Figure 14b); \(z_{chest}\) has been empirically determined, considering a series of tests on both human and phantom breasts. The aim of this step is to preserve the points corresponding to the pendulum breast. 3. the point cloud obtained in the previous step is divided in five vertical sections (red, blue, cyan, magenta and yellow in Figure 14b). 4. the orientation axis of the breast is computed, by applying a LS method on the centroids of the five vertical sections (see Figure 14c). 5. the 0 angle between this axis and the z axis of the Wavelia reference coordinate system is computed (see Figure 14d). 6. Finally, \(p_{str}\) is determined, by projecting the centroid of the middle section on the orientation axis of the breast (cyan sphere in Figure 14e) and setting to 0 the z coordinate of the projected point. The result corresponds to \(p_{str}\) (orange sphere in Figure 14e). Figure 13: Linear stretching function \(Sf(z)\): (**a**) the Wavelia reference coordinate system; (**b**) graphical representation of the \(Sf(z)\) function.