Abstract
We develop an adaptive active contour tracing algorithm for extraction of spinal cord from MRI that is fully automatic, unlike existing approaches that need manually chosen seeds. We can accurately extract the target spinal cord and construct the volume of interest to provide visual guidance for strategic rehabilitation surgery planning.
Index Terms: Contour tracing, rehabilitation surgery, segmentation, spinal cord
I. Introduction
In this paper, we focus on injury close to the lower part of the spinal cord, which controls walking and stepping of the legs. In order to restore some functions of the legs after injury, intraspinal microstimulation (ISMS) has been studied in our Heritage Medical Research Centre. ISMS require the implant of microwires from the back of the spinal cord to stimulate nerve cells. It is therefore important to minimize the damage to the spinal cord system during an operation by identifying an optimal path to insert the microwires. A traditional solution is to obtain computed tomography (CT) or MRI scans for visual identification by the clinicians. In this paper, we propose a novel spinal cord segmentation technique as a preprocessing step to assist rehabilitation surgery planning. Our technique is based on the detection of reflective symmetry to dynamically trace the boundary of the target region. MRI scans of a cat were used in our experiments because of the similar size of their spinal cord relative to that of humans [1].
One of the early attempts on spinal cord image segmentation is semiautomatic, where edge pixels are tracked to recover the spinal cord canal [2]. A knowledge-guided, anatomy-based, and task-oriented image-processing plan is proposed in [3]. In [4], a combination of manually initialized active contour and region-growing-based segmentation detects central canal region of a particular slice, and then, propagates that segment information in subsequent slices in order to reconstruct 3-D volumetric view. McIntosh and Hamarneh introduce 3-D deformable organism, tubular crawler, which grows and deforms to take the tubular structure of a 3-D spinal cord [5]. In contrast, our segmentation approach evolves an image-gradient-based open-ended contour, which we refer to as an active trace of a segment boundary, utilizing a dynamic-programming-based energy-minimization technique.
Next, we present the image segmentation technique followed by the description of the evolution of an active trace. Finally, Section IV presents results followed by the conclusions.
II. Proposed Segmentation Technique
An image of a typical 2-D spinal cord slice is shown in Fig. 1(a). The contrast of the pixels representing the spinal cord in a 2-D slice is distinctly different with respect to the pixel values of the vertebra bone and muscles seen in the image. The segmentation result of the spinal cord is shown in Fig. 1(b). Given that the spinal cord is identified, we first present a technique for the image unskewing process, which is a precursor to the segmentation of other target regions.
Fig. 1.
(a) Slice 1. (b) Segmentation of spinal cord. (c) Vertical symmetry axis. (d) Unskewed image.
We draw a circle at the center of mass of the spinal cord region. Any diameter of this circle partitions the circle into two half circles. From the anatomy, the axis of symmetry of the image is a unique diameter of the circle that creates reflective symmetry to the half circles. These half circles are divided into N sectors. To match two sectors, we consider the Bhattacharya coefficient (BC) between the intensity histograms of the sectors; the matching score between two half circles C1 and C2 is as follows:
| (1) |
where and are two intensity histograms on two corresponding sectors C1 and C2, respectively. The choice of number of sectors N is discussed in Section IV. The diameter that yields the highest score value is considered as symmetry axis. Alignment of the symmetry axis with the vertical y-axis through rotation unskews the image. The result of unskewing the image of Fig. 1(a), using the symmetry line of Fig. 1(c), is shown in Fig. 1(d). Given the unskewed image, the challenge is to segment the muscle region using the active tracing algorithm described next.
Fig. 2(a) shows the result of active tracing of the left and the right lobe muscles for the image shown in Fig. 1(a). The start and end points are marked using star-shaped markers. Segment boundary detection is posed as a problem of active tracing of pixel points satisfying certain local image-gradient-based energy constraint. Consider two neighboring pixels p and q in an eight-neighborhood setting. The cost c(p, q) of tracing pixel p to q is given by
Fig. 2.
(a) Traced contour of the muscle of Fig. 1(d). (b) Vertebra bone region. (c) Failure of tracing in slice 2. (d) Correct segmentation.
| (2) |
The cost in (2) has two components, gradient magnitude |∇I| and gradient orientation |∇Iθ| at every pixel of the image I. and |∇Iθ| = tan−1 Iy/Ix, where Ix and Iy are the partials of the Gaussian convolved image I in the x and y directions, respectively. The parameter Sm = 0.1 scales edge gradient magnitude with respect to the range of edge orientation values. The active tracing using minimum cost path c(p, q) can be posed as a problem of directed graph search for an optimal or shortest path in the energy surface defined by c(p, q). For the points between which tracing is not desirable, c (p, q) = ∞ forces disconnection.
The shortest path active tracing process is sensitive to image noise, as shown for slice 2 in Fig. 2(c). Even though the initial and terminal points are disconnected in this case, the shortest path found does not match the desired boundary. This necessitates introduction of an additional set of disconnection such that the shortest path traces the desired segment boundary. Fig. 2(b) shows the segmented vertebra bone region. The bounding box of the vertebra bone region and the vertical symmetry line provide the necessary disconnection in c(p, q) space so that successful automatic tracing of the image shown in Fig. 2(c) is achieved, as shown in Fig. 2(d).
Since our objective is to run the active tracing algorithm for all the slices and create a 3-D visualization of the entire spinal cord, we need to make sure that the shortest path tracing for muscle segmentation works for all the slices. However, this is not the case in some of the slices due to the presence of anatomical irregularities, as shown in Fig. 3(a) and (b). Note that while for slice 1 [see Fig. 3(a)], the active trace works perfectly, for slice 5 [see Fig. 3(b)], the active trace finds the shortest path through a region outside the left lobe. At the same time, it is almost impossible to introduce disconnection at all such points. Therefore, we need to evolve the active trace results (for one slice) along the normal direction of the contour to counter abnormalities (in other slices), which we elaborate next.
Fig. 3.
(a) and (b) Partial active trace on slices 1 and 5. (c) Normals across active trace of Fig. 3(a) overlaid on slice 5. (d) Corresponding symmetry points of active trace for the left lobe overlaid on the right. (e) Convergence of active trace on slice 5 after dynamic programming. (f) Muscle region segmentation result on slice 5, using initial active trace from slice 2.
III. Evolution of Active Trace
The objective at this point is to take a successful active trace output of a particular slice image and evolve it to segment the muscle region in subsequent slices. We can assume that an active trace is a collection of points pi, with pn + 1 = p1. Given an initial active trace, its final position in a neighboring slice seeks the minimum energy of the discrete function
| (3) |
The internal contour energy is given by Eint (pi) = αi |pi − pi− 1|2 + βi|pi + 1 − 2pi + pi −1|2, where αi and βi are local weights influencing first- and second-order continuity terms, respectively. The external energy term Eext (pi) evaluates the image gradient oriented along the direction normal to the active trace or its current position. With (nx, ny) as the normal direction at a point (x, y) on the active trace, Eext (pi) = (Ix, Iy) (nx, ny). A set of such normals across the initial active trace derived from slice 1 [see Fig. 3(a)], overlaid on slice 5, is shown in Fig. 3(c).
The term Esym (pi) imposes global symmetry constraints between the shapes of the left and right lobes of active traces exploiting symmetry information. For every point (xL, yL) on the active trace of the left lobe, a corresponding point (xR, yL) is determined on the active trace of the right lobe having same yL value. Note that (xL, yL) and (xR, yL) are almost equidistant (along the x-axis) from the vertical symmetry line. The symmetry constraint minimizes the separation between symmetry point along yL and the mean ordinate of xL and xR. The same constraint is put for all the points on both the active traces, left and right lobes, provided a corresponding point is detected. Fig. 3(d) shows the corresponding symmetry points of the active traces of the left lobe on the right for the active trace of Fig. 2(a).
Given m possible positions or states on each of the n contour points pi to find the new position of pi in another slice, the minimization of (3) may look for global minima after computationally prohibitive mn number of exhaustive searches. However, the computationally attractive alternative is to use a technique, such as dynamic-programming-based energy minimization, as proposed in [6]. The forward pass of the algorithm for dynamic-programming-based minimization is as follows [6]:
| ∀j ∈ [1, m], E(1, j) = 0 | |
| for i = 2 to n {n number of contour points} | |
| for j = 1 to m {m number of states of each contour point} | |
|
| |
| P(i, j) = l for min E(i, j); {stores minimum energy state} | |
| end | |
| end |
The overall complexity is O(nm3). At any point in time, the current active trace point is dependent on two of its neighboring points on the active trace. The evolution of a contour using dynamic programming can be repeated until consecutive evolutions of a contour result in insignificant changes. The result of dynamic-programming-based successful evolution of active trace [see Fig. 3(a)] with symmetry constraint is shown in Fig. 3(e), as compared to Fig. 3(b). Fig. 3(f) shows the result of evolution of active trace of slice 2 on slice 5 following (3), enforcing symmetry constraint.
Use of active trace of one slice to initiate curve evolution of another slice raises an important question of deciding which slice should be used for initialization. Considering symmetry between the left and right lobes of the spinal cord to be an important characteristic, we find the most symmetric active trace obtained using a shortest path energy minimization approach. We calculate the first-order moments of all points on the left lobe active trace and right lobe active trace against the vertical symmetry axis. The active trace configuration that generates the minimum difference between the left and right lobe moments provides the initial contour for dynamic-programming-based contour evolution.
While evolving the active trace of one slice for segmenting another, the morphological change in slice anatomy can be incorporated using a temporal constraint. The motivation for temporal constraint is clear if we look at the example image in Fig. 4(a). The active trace result in Fig. 4(a) for slice 1 between the two star-marked points on the edge fails to capture the concavity details for slice 5, as shown using red contours in Fig. 4(b). The initial active trace in Fig. 4(a) is evolved using the dynamic-programming-based edge energy minimization procedure of (3). The failure of correct tracing in Fig. 4(b) is clearly caused by the uniform search region of each active trace point along its normal direction, which is shown in Fig 4(b) using magenta straight lines. Therefore, the motivation for using a temporal constraint is to introduce a variable search space for each active trace point along its orthogonal direction, depending on the spatial distortion between the slice from where the initial contour is generated and the slice for which the active trace is to be found. Lines connecting the midpoint of the bitangent of the concavity and the initial active trace points provide variable search length for active trace evolution, as shown in Fig. 4(c). This variable search space finds the correct active trace for slice 5, as shown in Fig. 4(d) from the initial active trace of slice 1 [see Fig. 4(a)].
Fig. 4.

(a) Active trace on slice 1 between the two star-marked points. (b) Failure in using initial active trace (yellow contour) of (a) for slice 5 using dynamic programming (red contour). (c) Variable search regions (green lines) with temporal constraint for each point on the active trace. (d) Correct tracing of the concavity in (b).
IV. Results and Discussions
The two major proposals of this paper are the symmetry line estimation followed by the active tracing approach. The 2-D image slices of spinal cord MRI was acquired with a 2-D spoiled gradient echo sequence operating in multislice mode. Images were T2* weighted to emphasize gray/white matter contrast in the spinal cord. The repetition time was 1600 ms, the echo time was 14 ms, the flip angle was 60°, and the acquisition bandwidth was 50 kHz. We collected 30 interleaved slices, each 1 mm thick with no interslice gap. Fat saturation pulses were applied immediately prior to each excitation pulse. In-plane resolution was acquired at 0.25 × 0.30 mm2 and then interpolated by a factor of 2.
Fig. 5(a) is the plot of the coefficient of variation (standard deviation over mean) of the error in orientation of the estimated symmetry. This error is the absolute difference in orientations of the symmetry lines estimated using (1) and human experts. The error values are averaged for entire MRI dataset and estimated after varying the number of sectors from 1 to 30 to estimate the symmetry line. The plot in Fig. 5(a) shows that the variation in error is marginal when the choice of number of sectors is more than 15. This justifies our selection of number of sectors as N = 16 in (1).
Fig. 5.
(a) Error in orientation of symmetry with respect to expert estimation for different number of sectors N of (1). (b) Manual estimation of muscle and spinal cord boundary of slice 5.
Some successful active trace results are shown in Figs. 2(a) and (d) and 3(f). Fig. 5(b) shows the desired contour obtained after expert-guided manual segmentation for slice 5. We have correlated the area enclosed by the proposed active trace and the area enclosed by the trace generated using manual segmentation. The mean correlation value for the entire dataset under consideration is 0.94.
V. Conclusion and Future Work
We have proposed an automatic spinal cord image segmentation approach in order to assist rehabilitation surgery planning process. Differing from other semiautomatic techniques that extract only the spinal cord, our approach segments the neighboring regions of interest providing better visual guidance for ISMS implant. The methodology introduces a novel application of active tracing of segment boundary, the evolution of which is implemented on a unique contour energy minimization surface. In future work, we will establish a 3-D visualization framework to support intraoperative surgery and measurement for ISMS operation.
Acknowledgments
This work was supported in part by the National Institutes of Health, the Alberta Science and Research Authority, the informatics Circle of Research Excellence (Alberta Innovates), and the Natural Sciences and Engineering Research Council.
Footnotes
Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org.
Contributor Information
Dipti Prasad Mukherjee, Email: dipti@isical.ac.in, Electronics and Communication Sciences Unit, Indian Statistical Institute, Kolkata 700108, India.
Irene Cheng, Email: lin@cs.ualberta.ca, Department of Computing Science, University of Alberta, Edmonton, AB T6G 2E8, Canada.
Nilanjan Ray, Email: nray1@cs.ualberta.ca, Department of Computing Science, University of Alberta, Edmonton, AB T6G 2E8, Canada.
Vivian Mushahwar, Email: vivian.mushahwar@ualberta.ca, Department of Cell Biology and Centre for Neuroscience, University of Alberta, Edmonton, AB T6G 2E8, Canada.
Marc Lebel, Email: marc.lebel@ualberta.ca, Department of Biomedical Engineering, University of Alberta, Edmonton, AB T6G 2E8, Canada.
Anup Basu, Email: anup@cs.ualberta.ca, Department of Computing Science, University of Alberta, Edmonton, AB T6G 2E8, Canada.
References
- 1.Mushahwar VK, Collins DF, Prochazka A. Spinal cord microstimulation generates functional limb movements in charonically implanted cats. Exp Neurol. 2000;163:422–429. doi: 10.1006/exnr.2000.7381. [DOI] [PubMed] [Google Scholar]
- 2.Karangelis G, Zimeras S. An accurate 3 d segmentation method of the spinal canal applied to CT data. Proc Bildverarbeitung fur die Medizin. 2002:370–373. [Google Scholar]; Computer Graphics Topics. 14(1):28–29. [Google Scholar]
- 3.Archip N, Erard PJ, Egmont-Petersen M, Haefliger J-M, Germond J-F. A knowledge-based approach to automatic detection of the spinal cord in CT images. IEEE Trans Med Imag. 2002;21(12):1504–1516. doi: 10.1109/TMI.2002.806578. [DOI] [PubMed] [Google Scholar]
- 4.Nyul LG, Kanyo J, Mate E, Makay G, Balogh E, Fidrich M, Kuba A. Proc CAIP 2005, Lecture Notes in Computer Science. Vol. 3691. Berlin, Germany: Springer-Verlag; 2005. Method for automatically segmenting the spinal cord and canal from 3D CT images; pp. 456–463. [Google Scholar]
- 5.McIntosh C, Hamarneh G. Proc MICCAI, Lecture Notes in Computer Science. Vol. 4190. Berlin, Germany: Springer-Verlag; 2006. Spinal Crawlers: Deformable organisms for spinal cord segmentation and analysis; pp. 808–815. [DOI] [PubMed] [Google Scholar]
- 6.Amini AA, Weymouth T, Jain RC. Using dynamic programming for solving variational problems in vision. IEEE Trans Pattern Anal Mach Intell. 1990 Sep;12(9):855–867. [Google Scholar]




