## 3 Proposed Method
### Principal Component Analysis of Shape Matrix  
A distance transform [22], which assigns positive distances from the surface to the outer of the humerus, is applied to the aligned volume of the humeral region. The 6 neighborhood Manhattan distance is used as the distance function. The Manhattan distance \(d(A,\,B)\) between two points \(A=(x_{0},y_{0},z_{0})\) and \(B=(x_{1},y_{1},z_{1})\) is calculated using the equation below:  
\[d(A,B)=\left|x_{0}-x_{1}\right|+\left|y_{0}-y_{1}\right|+\left|z_{0}-z_{1}\right| \tag{1}\]  
The distance on the humerus bone surface voxel is zero. The obtained 3-D distance image of subject \(i\) is converted to a 1-D vector to create a feature vector matrix \(\mathbf{F_{i}}\) (\(1\times N_{v}\) ). The conversion is applied to all training data, and \(N_{s}\) vectors are obtained. \(N_{v}\) is the number of voxels, and \(N_{s}\) is the number of subjects. Equation (1) shows a feature vector matrix \(\mathbf{F_{i}}\) in which the number of rows equals to the number of voxels in the image \(N_{v}\) (\(256\times 256\times 256\)), and the number of columns equals to the number of subjects \(N_{s}\). \[\mathbf{F}=\left(\mathbf{F_{1}},\cdots,\mathbf{F_{i}},\cdots,\mathbf{F_{N_{s}}}\right)^{\text{ T}}\]  
\[\mathbf{F}=\left( \begin{array}{ccccc}f(1)_{1,1,1}&\cdots&f(i)_{1,1,1}&\cdots&f(N _{s})_{1,1,1}\\ f(1)_{2,1,1}&\cdots&f(i)_{2,1,1}&\cdots&f(N_{s})_{2,1,1}\\ \vdots&\cdots&\vdots&\cdots&\vdots\\ f(1)_{256,256,256}&\cdots&f(i)_{256,256,256}&\cdots&f(N_{s})_{256,256,256}\\ \end{array} \right) \tag{2}\]  
In the next step, the average shape matrix (\(\overline{\mathbf{F}}\)) of all subjects is calculated using the following equation  
\[\tilde{\mathbf{F}}\text{=}\frac{1}{N_{s}}\sum_{i=1}^{N_{s}}\mathbf{F}_{i} \tag{3}\]  
Figure 5: The 3-D coordinate system for the humeral head (A: anterior, P: posterior). where \(\mathbf{F_{i}}\) is the feature vector matrix of \(i\)th subject. Covariance matrix \(\mathbf{C}\) of feature vector matrix \(\mathbf{F}\) is calculated by the equation below  
\[\mathbf{C}\mathbf{=}\frac{1}{N_{s}\mathbf{-}1}\sum_{i=1}^{N_{s}}(\mathbf{F_{i}}\mathbf{-}\mathbf{F})(\bm {F_{i}}\mathbf{-}\mathbf{-}\mathbf{F}) \tag{4}\]  
The eigenvalue decomposition of the covariance matrix (\(\mathbf{C}\)) is used to calculate the eigenvalue (\(\mathbf{\lambda}\)) and the eigenvector (\(\mathbf{V}\)). Covariance matrix \(\mathbf{C}\) can be expressed in terms of the eigenvalue (\(\mathbf{\lambda}\)) and the eigenvector (\(\mathbf{V}\)) using the equation below:  
\[\mathbf{C}\mathbf{V}\mathbf{=}\mathbf{\lambda}\mathbf{V} \tag{5}\]  
where the eigenvalue \(\mathbf{\lambda}\) and the eigenvector \(\mathbf{V}\) can be expressed by the equations below:  
\[\mathbf{\lambda}\mathbf{=}\left[ \begin{array}{cccc}\mathbf{\lambda}_{1}&0&\dots&0\\ 0&\mathbf{\lambda}_{2}&\dots&0\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\dots&\mathbf{\lambda}_{N_{E}}\end{array} \right] \tag{6}\]  
\[\mathbf{V}\mathbf{=}\left[ \begin{array}{cccc}\mathbf{e}_{11}&\mathbf{e}_{12}&\dots&\mathbf{e}_ {1N_{E}}\\ \mathbf{e}_{21}&\mathbf{e}_{22}&\dots&\mathbf{e}_{2N_{E}}\\ \vdots&\vdots&\ddots&\vdots\\ \mathbf{e}_{N_{E}1}&\mathbf{e}_{N_{E}2}&\dots&\mathbf{e}_{N_{E}N_{E}}\end{array} \right] \tag{7}\]  
where \(\mathbf{\lambda}_{1}\), \(\mathbf{\lambda}_{2}\),..., \(\mathbf{\lambda}_{N_{E}}\) refer to the eigenvalues of corresponding ranks, and \(N_{E}\) represents the maximum number of dimensions of the reduced matrix that is determined by the cumulative contribution rate. \(\mathbf{e_{j}}\) = \(\mathbf{[e_{j},e_{2j},\,\dots,\,e_{N_{E}}]^{T}}\) refers to the eigenvector of \(j\)th rank, where each column is arranged by the rate of contribution.