# Automatic Method for Bone Segmentation in Cone Beam Computed Tomography Data Set
## 2 Materials and Methods
### Description of Proposed Method  
The proposed method was based on the finding of an optimal threshold by using [PERSON]'s method in a sliding 3D window. However, [PERSON]'s method works most accurately when the analyzing histogram is bimodal. This means that the intensity values of voxels must be divided into two basic classes \(C_{0}\) with intensity range [1,..., _T_] and \(C_{1}\) with intensity range [_T_ + 1,..., _L_] (where L is the upper limit of intensity in the volume), T representing the threshold optimally separating modes in bimodal histogram. The number of voxels with intensity threshold \(i\) is denoted by \(n_{i}\). A probability of intensity threshold \(i\) in an image is  
\[p_{i}=\frac{n_{i}}{N} \tag{1}\]  
\(N\)--the total number of voxels. Then, the probabilities that a randomly selected voxels belong to one of the classes \(C_{0}\) or \(C_{1}\) are  
\[C_{0}:\omega_{0}(T)=\sum\limits_{i=0}^{T}p_{i} \tag{2}\]  
\[C_{1}:\omega_{1}(T)=\sum\limits_{i=T+1}^{L}p_{i}. \tag{3}\]  
The average of classes is defined  
\[C_{0}:\mu_{0}=\frac{\sum\limits_{i=1}^{T}i\cdot p_{i}}{\omega_{0}(T)} \tag{4}\]  
Figure 1: The framework of the current study. The study was performed using preoperative and postoperative Cone Beam Computed Tomography (CBCT) data sets. Four metrics (Root Mean Square (RMS), Dice Similarity Coefficient (DSC), Average Distance Error (ADE) and Time) were used to evaluate the proposed method. \[C_{1}:\mu_{1}=\frac{\sum\limits_{i=T+1}^{L}i\cdot p_{i}}{\omega_{1}(T)}. \tag{5}\]  
The intensity average of the total image is defined by  
\[\omega_{0}\mu_{0}+\omega_{1}\mu_{1}=\mu_{T} \tag{6}\]  
\[\omega_{0}+\omega_{1}=1. \tag{7}\]  
Using discriminant analysis, [PERSON]'s method defines both classes variance of the thresholded image  
\[\sigma_{B}^{2}=\omega_{0}(\mu_{0}-\mu_{T})^{2}+\omega_{1}(\mu_{1}-\mu_{T})^{2}. \tag{8}\]  
Then the optimal threshold value is calculated by  
\[T^{*}=Arg\quad Max\quad\{\sigma_{B}^{2}(T)\} \tag{9}\]  
\[C_{0}:\omega_{0}(T)=\sum\limits_{i=0}^{T}p_{i} \tag{2}\]0  
The illustration of the proposed method is presented in \[C_{0}:\omega_{0}(T)=\sum\limits_{i=0}^{T}p_{i} \tag{2}\]1  
The typical histogram of CBCT data set is not bimodal and [PERSON]'s method does not work accurately in order to find optimal threshold value. The typical histogram of CBCT data set is presented in \[C_{0}:\omega_{0}(T)=\sum\limits_{i=0}^{T}p_{i} \tag{2}\]2  
\[C_{0}:\omega_{0}(T)=\sum\limits_{i=0}^{T}p_{i} \tag{2}\]3 Implementation of segmentation by using the proposed automatic method. In order to perform an accurate segmentation using [PERSON]'s method, a histogram filter was involved. The purpose of the filter is to remove irrelevant areas and to make analysed histograms bimodal. The optimal threshold was found after filtration, that is, removal of the 1 st, 2 nd and 5 th areas in the histogram (Figure 3). Intensity values for histogram filtering areas were defined by the results of studies published in References [18,19]. [PERSON] et al. [18] determined that the intensity of cortical bone of mandible is 1250 HU and it cover about 8% of the volume of mandible, trabecular bone intensity of mandible is 850-1250 HU, 350-850 HU levels corresponds to trabecular bone intensity of maxilla, levels of 150-350 HU limit posterior maxilla and levels of 150 HU could be found in sinus areas where the bone is very soft. The study performed by [PERSON] et al. [19] divided the intensity scale of bone into these ranges of HU: anterior mandible 850 HU, posterior mandible/anterior maxilla 500-850 HU, posterior maxilla 0-500 HU, tuberosity region 0 HU. Air intensity is \(-\)1000 HU and internal anatomical areas such as cavity of maxillary sinuses, nasal cavities, airways are between \(-\)950 HU and \(-\)500 HU. This analysis was used to set which areas of the histogram are useful for the segmentation and which areas should be filtered out.