Using prior knowledge captured in ASM for segmentation is both more computationally efficient and robust to image inconsistencies. ASM represents the global shape information with the dominant shape variations in the training dataset. In this study, the training dataset includes a set of bone contours aligned to each other with the following method. First, a manual segmentation is performed of the objects of interest in the original x-ray images. The manually segmented landmarks are defined on the bone boundary that is segmented from the x-ray images by an operator. Ten equally spaced points were sampled between successive manual landmarks. The number of manually segmented landmarks is determined by the operator, with a range of the number of points from 92 to 150. These manually segmented landmarks are then interpolated by cubic spline to get contours. Finally, corresponding points between contours are identified from the interpolated contour points by first aligning centroids, then using rigid alignment using a standard vertex-to-vertex iterative closest point algorithm. This is followed by a general affine transformation to align the training contour to the new contour using 12 degrees of freedom (rotations, translations, scaling, and shear). New points on the new contour are created with similar local spatial characteristics to the template contour.20 Thus, the generated training set consists of training contours denoted as , each contour has a set of landmark points , where and where denotes the coordinates of the ’th landmark point in The contours before and after alignment are shown in Fig. 2. The number of landmarks is 603 points for femur and 1470 points for tibia.