# Lenke Classification of Scoliosis Based on Segmentation Network and Adaptive Shape Descriptor
## 2 Methods
### Adaptive Shape Descriptor for Vertebrae
#### 2.4.4 Improving Shape Representation by Symmetric Matching  
In spinal shape matching, another important factor that needs to be considered is symmetric mirror matching. For example, as shown in Figure 10, the left and the right are the same spinal segmentation after flipping. If we only use the above formulas (such as (6), (8), and (11)) to represent and match the two spinal sequences, they are going to be very different, despite being the same. To address this issue, we designed a symmetric matching description method to improve scoliosis shape representation.  
Figure 9: Examples of vertebrae with different tilt angles.  
More formally, consider that \(X\) and \(Y\) are two segmented spinal images. First, we separately calculate the minimum bounding rectangles (MBR) of \(X\) and \(Y\). Then, the distances from each left outline point of the spinal blocks of \(X\) to the right boundary of the corresponding MBR can be calculated and denoted as \(h_{X}=\{h_{0},h_{1},\ldots,h_{m}\}\), as shown in Figure 10. Using the same method, we can obtain the distances of \(Y\) to the right boundary of its MBR, which is denoted as \(d_{y}=\{d_{0},d_{1},\ldots,d_{m}\}\). In addition, the max distances \(h_{\max}=\max\{h_{0},h_{1},\ldots,h_{m}\}\) and \(d_{\max}=\max\{d_{0},d_{1},\ldots,d_{m}\}\) are further defined. Secondly, we horizontally flip \(Y\) to obtain the mirror image \(Y^{\prime}\) of \(Y\). Then, we calculate the same distances from each left outline point of spinal blocks of Y\({}^{\prime}\) to the right boundary of its MBR, denoted as \({d_{y}}^{\prime}=\{d_{0}{}^{\prime},d_{1}{}^{\prime},\ldots,d_{m}{}^{\prime}\}\) and \(d^{\prime}{\max}=\max\{d^{\prime},d^{\prime}_{1},\ldots,d^{\prime}{}_{m}\}\). Finally, the optimal symmetric matching distance between X and Y can be defined as \(sym\_dis(X,Y)\):  
\[sym\_dis(X,Y)=\min(\frac{\sum\limits_{i=0}^{m}|h_{i}-d_{i}|}{h_{\max}+d_{\max}},\frac{\sum\limits_{i=0}^{m}|h_{i}-d_{i}{}^{\prime}|}{h_{\max}+d^{\prime}{}_{ \max}}) \tag{12}\]  
Combining all the above analyse, we finally propose an adaptive shape description and matching method for segmented vertebrae. To match the two segmented spinal images \(X\) and \(Y\), the dissimilarity between \(X\) and \(Y\) can be defined as:  
\[\begin{array}{rl}Dis\text{Similarity}(X,Y)=&\varepsilon\sum\limits_{i=1}^{ m}\{w_{i}\cdot\min((x_{i}-y_{i}+n)\text{mod}n,(y_{i}-x_{i}+n)\text{mod}n)\}\\ +&\lambda\sum\limits_{i=0}^{m}\{|\alpha_{i}-\beta_{i}|\}+\delta sym\_dis(X,Y) \end{array} \tag{13}\]  
where \(\varepsilon\),\(\lambda\) and \(\delta\) are weight factors. \(Dis\text{Similarity}(X,Y)\) means that the smaller the value, the more similar the shape of the segmented spinal image. In fact, compared with the previous methods, we improved the shape representation in three aspects, i.e., adaptive matching weight assignment, tilt angle quantification, and symmetric matching. These technical improvements are designed to capture the spine's microscopic changes that play an important role in Lenke classification in greater detail. In the next section, we will elaborate on the Lenke classification of scoliosis based on the proposed shape descriptor.