# Semi-Automatic Segmentation of Vertebral Bodies in MR Images of Human Lumbar Spines
## 2 Materials and Methods
### ROI Detection  
The first part of our algorithm requires minimal user inputs regarding the location of one of the vertebral bodies and the size of the rectangular ROI window (width: lx and height: ly); the automated algorithm then searches other locations with the same window for the remaining vertebral bodies. This ROI detection step is necessary to increase the efficiency of the subsequent segmentation process by setting uniform ROIs, each of which contains only one vertebral body. When the user defines a rectangular area containing a single vertebral body along with some of the surrounding tissues, as shown in Figure 1a, the correlation algorithm [31] obtains a correlation map (Figure 1b) between the user-defined ROI and other candidate ROIs throughout the image.  
When examining the correlation map (Figure 1b), the highest correlation value is easily found at the center position (p1) of the user specified ROI. The next vertebral body location is searched by finding the second highest correlation value. However, the pixels in the immediate vicinity of p1 tend to have high correlation values that are close to the correlation value of p1. Therefore, correlation values in the immediate neighborhood of p1 (equivalent to 1/3 of the ROI size) are disregarded. Then, the search continues for the next highest correlation value and the corresponding location of the next vertebral body, p2. After finding p2, the neighborhood of p2 in the correlation map is also disregarded to search for the next vertebral body locations. In this case, we use a reference distance, d, defined as the distance between p1 and p2 (Figure 1c) for subsequent searches. The searching area can be reduced  
Figure 1: Protocol to find vertebral body region of interest (ROIs) using minimum user input. (a) T2-weighted spin echo MR image of a cadaveric lumbar spine and a user-defined ROI placement. (b) Correlation map and the location of the user-defined ROI (the first location, p1 by the maximum value). (c) Determination of the second location, p2, of the next closest vertebral body and the reference distance, d. (d) Detection of the other remaining ROI locations utilizing the reference distance, p1, and p2. Black pixels in (c,d) are disregarded pixels for the next ROI search.  
to the small area whose width and height are lx and ly, respectively, because the reference distance provides the approximate locations of the upper or lower vertebral bodies. Through this process, vertebral body positions are found in the entire image and each ROI for the individual vertebral body is set for subsequent fine segmentation, as described in the next section.  
The information on the intervertebral disc can also be used to further refine the vertebral body location. The searched locations are corrected again using these intervertebral discs that are sandwiched between the vertebral bodies. Assuming that an intervertebral disc ROI exists in the lx/2 portion just above the vertebral body ROI, locations of other intervertebral discs can also be obtained in the same manner (Figure 1). The horizontal locations of the vertebral bodies and the intervertebral discs are generally similar. Therefore, if the horizontal location of a searched vertebral body ROI is significantly different from the horizontal location of the surrounding intervertebral disc, the horizontal location of a searched vertebral body ROI needs to be adjusted. When the difference between the horizontal locations of the searched vertebral body and the intervertebral disc is larger than 10% of ly, the horizontal location of the searched vertebral body ROI is replaced with that of the searched intervertebral disc ROI.