BMC Musculoskeletal Disorders BioMed Central Research article

Background The purpose of this study is to present an automated system that analyzes digitized x-ray images of small animal spines identifying the effects of disc degeneration. The age-related disc and spine degeneration that occurs in the sand rat (Psammomys obesus) has previously been documented radiologically; selected representative radiographs with age-related changes were used here to develop computer-assisted vertebral visualization/analysis techniques. Techniques presented here have the potential to produce quantitative algorithms that create more accurate and informative measurements in a time efficient manner. Methods Signal and image processing techniques were applied to digitized spine x-ray images the spine was segmented, and orientation and curvature determined. The image was segmented based on orientation changes of the spine; edge detection was performed to define vertebral boundaries. Once vertebrae were identified, a number of measures were introduced and calculated to retrieve information on the vertebral separation/orientation and sclerosis. Results A method is described which produces computer-generated quantitative measurements of vertebrae and disc spaces. Six sand rat spine radiographs illustrate applications of this technique. Results showed that this method can successfully automate calculation and analysis of vertebral length, vertebral spacing, vertebral angle, and can score sclerosis. Techniques also provide quantitative means to explore the relation between age and vertebral shape. Conclusions This method provides a computationally efficient system to analyze spinal changes during aging. Techniques can be used to automate the quantitative processing of vertebral radiographic images and may be applicable to human and other animal radiologic models of the aging/degenerating spine.


Background
In the past, animal models in the study of disc degeneration have most commonly involved dogs, monkeys, and sheep, but in recent years the sand rat (Psammomys obesus) has been used because of the economic advantages of rodent models. The spontaneous age-related degeneration of the sand rat spine avoids the need for chemonucleolysis or surgical injury to induce disc degeneration. The age-re-lated disc degeneration in the sand rat has been shown to be reliable and predictable, and has been well characterized in previous radiologic studies [1][2][3][4][5][6][7][8][9]. The present work extends the previous radiological studies in [1] to develop an automated computer-assisted procedure that analyses digitized lateral x-rays of the sand rat spine.
To create such a system, the task of locating the vertebrae in the image is vital. For this task, previous works in x-ray analysis were consulted and several possibilities were initially considered. The main techniques in previous research used active shape models, both customized and deformable. Extensive research has been done by Long [10][11][12] to automatically identify and classify spinal vertebrae. Others whose work includes the use of active shape models for vertebrae analysis are Smyth [13] and Zamor [14]. Although the adaptability of active shape models is important, b-spline techniques are also valuable [15]. These techniques (which are adequate in the analysis of human spines) were not selected in the present study because they still require user intervention, and our objective was to develop a completely automated approach to the study of lateral films.
The specific goal of this study was to create an efficient automated method of identifying the overall angle of curvature of the spine, the angles between individual vertebrae, the distance between vertebrae, and a scoring index for sclerosis present in the vertebral end plates (which may be a major factor in reducing the nutrition available to the aging disc). Resultant representative data are presented both graphically and numerically to illustrate the computer methods which are utilized. The major emphasis of this pilot study was to accurately identify each of the vertebrae and then to obtain selected measurements. The techniques presented here may have potential to produce quantitative algorithms that create more accurate and informative studies and measurements in a time efficient manner.

Methods
This method of computer aided vertebral visualization and analysis was developed using representative lateral radiographs of the aging sand rat, Psammomys obesus, a rodent model of disc degeneration. Ages and genders of the animals studied are presented in the respective legends. Radiographs were obtained from a study which had received Institutional Animal Care and Use Committee approval at Carolinas Medical Center.
Major steps taken in our approach include: 1. Developing a method by which the program could identify the spine in the digitized lateral radiographic image; 2. Segmenting the image based on orientation of the objects to create rectangles of interest that define where the vertebrae are located; 3. Performing edge detection to define the boundaries of the vertebrae; 4. Performing line and shape detection to obtain hard definitions of vertebral locations and boundaries, and 5. Defining and calculating measures of intervertebral distance and indices of end plate sclerosis.
It is important to note that the above steps depend on one another and that complete implementation of the process will require an iterative approach. All images used to develop and test this process (such as the one shown in Figure 1) were obtained from the radiologic studies reported in [1].
The entire process for a typical image takes approximately 5-8 minutes on a 1.3 GHz PC using MATLAB. This is significant because even though the time for making manual measurements depends on the individual, the running time of this automated process should still be less than that of being done manually. In addition, this process has the ability to perform measurements that cannot easily be made manually, allowing data to be collected more accurately and in a shorter amount of time.

Finding the Location of the Spine in the Image
In order to analyse the vertebrae, first the location of the spine in the image must be found. In each of the images, the location and angle of the spine can be clearly detected by finding the well-defined soft-tissue boundary of the body itself. The first step in finding this boundary was to de-noise the image using an adaptive Wiener filter [16][17][18]. The goal was to minimize the amount of noise in the black area corresponding to the area outside the body. Next, Canny edge detection [19] was applied to obtain a binary image representing the edges in the X-ray. The reason the Canny edge detector was chosen over other edge detectors is because it is still a basic filter, but also applies a Gaussian smoothing filter before its edge detection algorithm. The strength of the edges detected is also controlled with this detection system, which helps to enhance precision. The Canny edge detector can be briefly described using Equation 1 developed to detect the local maxima in the direction perpendicular to the edge.
In Equation 1, ƒ represents the image, G is a 2D Gaussian filleting operation, and the second directional derivative is taken along the normal vector n. Using this edge-detected image, the boundary was traced and the angles of its curvature recorded, as shown in Figure 2.
The process to this point generated two important sets of information. First, a set of points along the body's boundary was obtained, which gives a good estimate for locating the vertebrae. Second, a set of angles that gives an estimate of how the underlying vertebrae are oriented was obtained.
Segmenting the Image Next, with the data that provided the position and orientation of the spine, it was necessary to segment the image based on orientation. The purpose of this segmentation was two-fold. First, the image must be broken into smaller portions for histogram equalization and contrast adjustment. Because the image varies in quality and clarity in different portions of the image, details visible in one portion of the image may not be clearly identifiable in other portions. The second purpose segmentation served was to limit the search space for line segments (see below).
The boundary points from the previous step were used to determine where the image was to be segmented. The locations of these points for segmentation and their angles of curvature are shown in Table 1. Figure 3 shows the results of Canny edge detection [19] before the image was segmented. The edges of the end plates were not clearly visible because different threshold values needed to be used for separate portions of the image. A threshold value applied to the entire image can neglect needed information and may detect more noise than the true edges.
The image was segmented in locations where the change in orientation of the detected boundary became greater than twenty degrees ( Figure 4). A ten-pixel overlap between segments was used to avoid accidentally missing features that lie near segment boundaries. From this point, each segment was processed independently ( Figure  5).

Reductions or Elimination of Segment Background
In order to obtain an image where the vertebrae were clearly defined, it was necessary to eliminate as much of the background noise and other objects in the image as  [20] were both tested for this process. While both techniques required some logic to determine the best values for filtering the image, histogram equalization appeared to be the stronger of the two techniques as it allowed an analysis of the distribution of intensities in the image and adjusted the histogram accordingly. Histogram equalization can be briefly described using Equation 2: where g is the original grey level, ƒ(g) is the equalized G m is the maximum grey level, A 0 is the area of the image and H (u) is the histogram. Figure 6 shows the effects of the histogram equalization. The equalization highlighted the distinction of vertebrae vs. the surrounding tissues, making the vertebrae more visible and the boundaries more identifiable. This step also normalized the images, reducing the variance among the images for the measuring of sclerosis, and helped increase the accuracy of the edge detection, Hough transform [21] discussed below.

Locating Vertebral End Plates
The image was segmented such that each segment contained vertebrae of similar orientation. Each segment's histogram was also manipulated such that the vertebrae were well defined. The remaining processing steps can be described as follows:

Figure 3
Edge Detected Image. This is the result of Canny edge detection when the image has not been segmented. Note that most of the edges required are missing from this image.  1. First, Canny edge detection [19] was performed on the image segment. This time, threshold values that specifically eliminated the false edges were used. The false edges were a result of noise and other edges in the image that were not part of the spine. These threshold values were based on the segment's histogram from the previous step.
The objective was to preserve the edges of the end plates while at the same time eliminating as many of the other extraneous edges as possible.
2. Once the edge image was produced, it underwent a Radon transform [22]. The Radon transform of a binary image is essentially a Hough transform [21]. The Hough transform (Figure 7) gives an idea of where lines are located in an image by counting consecutive points in each direction. The Hough transform was used because it was originally designed to detect straight lines with no prior knowledge of the region being necessary. The theory behind the Hough transform is as follows [19]. All lines going through a given point can be represented by one equation for some values of k and q. Meaning that Eq. 3 can be taken as an equation in the parameter space k, q, thus all the lines through a given point A can be represented by and all the lines passing through a given point B can be represented by q = -x 2 k + y 2 Equation 5 Then the only common point on both lines in the k, q parameter space is the point in the image that represents the only existing line between points A and B. The goal is to determine all possible line pixels, and transform the lines that go through the pixels into points in k, q space, and to detect the points (a, b) that result from the Hough transform of lines y = ax + b in the image.
The directions searched in the Hough transform were constrained by using the angles that provided the basis for segmentation. This eliminated many of the false line detections by limiting the orientations allowed.
3. The best line candidates of all those produced by the Hough transform were selected ( Figure 8). These lines matched the location and orientation of each of the vertebral end plates. The line candidates located near each selected candidate intersect near or at the midpoint of the end plate edge. This allowed accurate estimation of the midpoint of each end plate. These midpoints were then used for accurately finding the orientation and location of individual vertebrae.

A new index of sclerosis to describe the amount of calcification on each vertebra was introduced as:
This index is a relation between the intensity of the vertebra at an end plate, and the intensity of the vertebra at the   center. In the image, the higher the intensity value, the more bony sclerosis is present (i.e., the degree of sclerosis is greater). As a note, this index is only a measurement; no interpretations are made at this point.

Results
The results shown here are from a series of six images. Even though the image resolutions are acceptable for extracting the needed information, the low quality (due to the small skeletal size of the rodent model) of these images provides a challenging test for the computer process. In general, to reduce the error, the images should have very little of the surrounding body visible and should provide good contrast between the vertebrae and the background soft tissues. Tables 2 and 3 summarize the results generated from the processes described in section 2. The data are presented by image, and then by the vertebral segment in the image. The units that are being used are either degrees for angles, and pixels for distance or space.

Overall Curvature
Overall curvature was determined as the difference between the orientations of the beginning and ending vertebra and is shown in Table 3. (This measurement could have also been modelled with circle detection where the spine represents a segment of the circle.)

Angles of Individual Vertebra
An estimation of this measurement was obtained by using the output of the line detection method described in section 2 and shown in Figure 9. This gives an indication of the midpoints of the end plates as well as the orientation of those end plates. This information resulted to the slope from the midpoint of one end plate to the midpoint of the other. The angles of the vertebrae are given by the 'Orientation Angle" column, in Table 2. Since not every end plate could be found with the line detection method, the shape detection methods provide a more reliable basis for this measurement.

Distances Between Vertebras
The distance between the vertebrae was determined by finding the pixel length of the vertebrae and the pixel length of the gap between their left neighbouring vertebrae. In Table 2, the vertebral length and the pixel space between vertebrae are given by the 'Vertebra Length' and 'Space', respectively.

Index of Sclerosis at End Plates
This measurement of sclerosis was a ratio between the average pixel intensity near the center of a vertebra and the pixel intensity at each end plate ( Figure 10) Table 2: This table is a presentation of the data gathered with the proposed method using a set of six digitized X-ray images. Column 1 identifies which image the information was generated from and column 2 identifies which vertebra in the image is being considered.

Figure 8
Line Candidates. This image shows the edge-detected image with the line candidates inserted.
Equation 1. The histogram equalization was essential for these calculations, so there will not be a high degree of variance between subsequent images. The index value for the left end cap compared to the center is the 'Sclerosis Upper Index' column, and the index value for the right end cap compared to the center is the 'Sclerosis Lower Index' column in Table 2.

Discussion
The results generated from this new application of computer analysis applied to a small group of representative xrays indicate that the computer-aided method developed here is practical for automated calculation and analysis of the overall curvature of the spine, individual vertebra angles, vertebral spacing, and sclerosis measurement. The computational techniques can also provide quantitative means that can then be used to explore the relation between age and conformation of the vertebrae. The two most important steps in the process reported here are the location of the edges of the vertebrae and the location of the midpoints of the end plates. Future applications of the techniques developed here could potentially be applied to either human or large animal radiographs. The proposed method can be applied to further our methods of analysis in animal models of important features of spine aging such as sclerosis of the vertebral end plates.
Bernick and Cailliet have suggested that sclerosis of the end plate may act to impede nutrient flow into the disc [23], and that progressive end plate sclerosis with aging contributed to disc degeneration. Concomitantly, however, disc degeneration, by changing stress patterns on end plate bone, may also cause increases in bone density in parts of the end plate subjected to greater stress [24][25][26][27]. Modic et al have provided the major clinical

Figure 9
Using the Line Candidates. This image shows line candidates and lines depicting the detected orientation of the vertebrae.

Figure 10
End Plate Sclerosis. The two circles show the areas of the image that are used to determine the sclerosis index. The intensity near the center of the vertebra is compared to the intensity near each end plate.
study of end plates in degenerating discs [28]. They reported that discs which showed in an MRI a decrease in signal intensity on T1-weighted spin-echo images and increased signal intensity on T2-weighted images (Modic type 1) exhibited disruption and fissuring of the end plates.
Endplates showed woven bone, thick trabeculae with active bone remodeling, and fibrous marrow. Modic type 2 MRI changes, characterized by increased signal intensity on T1-weighted images and isointense or slightly increased signal intensity on T2-weighted images), showed a progression to disrupted end plates and reactive bone tissue and the presence of fatty marrow.

Conclusions
Performing accurate analysis of vertebrae based on radiographic images is a challenging image processing task. The automated system presented here applies robust image processing techniques to find important measures of degeneration in the aging spine, such as separation and angle between vertebrae, measurement of sclerosis, and orientation of vertebrae. The main advantages of this method are that unlike humans, the computer can make exact quantitative measurements, the computer is not subjective (does not depend on the investigator), it provides faster analysis, and the image quality can be improved before analysis to allow more accurate measurements. The main disadvantages are that the X-ray must be digitized producing extra costs and complexity, and humans might use certain heuristics that cannot be directly translated into mathematical methods for the computer to imitate.
Some limitations to the method include, that the overall accuracy is dependant on the quality of data used, the orientation of the spine in the image must be within a certain degree to be analyzed, and a large data set is necessary to be able to usefully interpret the measurements generated. The main sources of error that were identified are the fact that the lower the quality of the input image, the higher the chance for miss-measurements because the identification of the landmark features may be incorrect, and that the overall orientation measurements can be incorrect due to the orientation and location of the spine in the images. In addition, the method can be used to quantitatively study the relation between the age and vertebral changes. This automated system can greatly enhance the research on spine and disc degeneration in sand rats and other rodent models that provide an economically attractive alternative to large animal studies.