Introduction

Magnetic resonance imaging (MRI) is a noninvasive medical test that helps physicians to diagnose and treat medical conditions. MRI images of the heart are generally clearer and more detailed than some other imaging methods such as X-ray, ultrasound, or computed tomography. This detail makes MRI an invaluable tool in early diagnosis and evaluation of cardiac abnormalities, especially those involving the heart muscle. The left ventricle and in particular the endocardium are a structure of particular interest, since it performs the task of pumping oxygenated blood to the entire body [1]. Therefore, the segmentation of the left ventricle is a task with important diagnostic power. At present, the estimation of the left ventricular (LV) volumes and ejection fraction from cine MR images requires manual tracings of the LV cavity. This manual process introduces considerable latitude for the observer to include varying amounts of endocardial trabeculae and papillary muscles as part of the LV cavity, both at end-diastole as well as end-systole.

This paper is, thus, addressed to the elimination of the observer’s uncertainty. This is achieved by automating the whole segmentation process. We aim to carry out an approximation of the left ventricle’s contours through a level set segmentation algorithm. This algorithm is efficient at finding object edges, from the left ventricle in this case. The major inconvenient of the level set segmentation approach is that the initial points must be introduced manually. In this work, we propose to solve this problem by using an initialization process based on a thresholding operation applied to the original image and, after this, using the obtained binary image as initial mask for the level set method.

The remaining of this paper is organized as follows: We present some related work in left ventricle segmentation in “Related Works in Left Ventricle Segmentation” section. In “Proposed Method” section, we describe and detail the segmentation approach that we propose in this paper. Finally, the database used and the experimental results are given in “Experimental Results” section.

Related Works in Left Ventricle Segmentation

Recently, a number of automatic segmentation algorithms have been developed to detect LV in MRI or echocardiographic images. Some automatic approaches were based on the concept of conserved myocardial volume [2]. In [3], the authors use a complex border detection process, followed by the application of a generalized Hough transform to detect curves and ended up through an active-contour algorithm.

Many algorithms have been proposed for the segmentation of the LV in MRI images. Some methods are based on classification techniques using the grayscale level information [4], in order to segment the endocardium. However, the inclusion of the papillary muscles in the cavity of the mid-ventricular sections remains an open problem [5]. This is due to the fact that the methods using grayscale or gradient information do not make distinction between papillary muscles and myocardium. Indeed, the papillary muscles are areas of low gray level (close to the myocardium intensity), in contrast to the cavity which presents a high gray level value. Furthermore, the methods based on mathematical morphology [6] for segmenting the ventricle reduce the manual intervention but still suffer from parameters adjustment. Some other techniques incorporating prior information in the segmentation process of the left ventricle are also used. A fully automated deformable model technique for myocardium segmentation in 3D MRI technique is presented in [7]. In this work, the authors integrate various sources of prior knowledge learned from annotated image data into a deformable model. Inter-individual shape variation is represented by a statistical point distribution model, and the spatial relationship of the epi- and endocardium is modeled by adapting two coupled triangular surface meshes. To robustly accommodate the variation of gray value appearance around the myocardiac surface, a prior parametric spatially varying feature model is established by using a classification of the gray value surface profiles.

Another automatic atlas-based segmentation algorithm for 4D cardiac MR images is proposed in [8]. This algorithm is based on the 4D extension of the expectation maximization (EM) algorithm. The EM algorithm uses a 4D probabilistic cardiac atlas to estimate the initial model parameters and to integrate prior information into the classification process. The probabilistic cardiac atlas has been constructed from the manual segmentations of 3D cardiac image sequences of 14 subjects. In [9], the authors proposed an improved Markov random field segmentation model, which integrates region prior knowledge and boundary information of the image and this for segmenting LV boundary from cardiac MR image.

The active-contour algorithms are also widely used for the segmentation of cardiac images. However, using these approaches presents some problems associated to the lack of contrast between the myocardium and the cavity, the inclusion of pillars, and the heterogeneity of the cavity due to flow artifacts. On the other hand, the contour initialization is the key to its success. Bad initialization can draw the curve away from the left ventricle to edges that best fit its predefined parameters. To solve this problem, some alternatives approaches have been proposed. As presented in [10], a new approach to magnetic resonance image segmentation with a gradient-vector-flow (GVF)-based approach, applied to selective smoothing filtered images, was developed using non-linear anisotropic diffusion filtering. The system allows automated image segmentation in the presence of gray scale inhomogeneity, as in cardiac magnetic resonance imaging.

Another approach to detect endocardial border on cardiac magnetic resonance images was presented in [11]. This method consists on filtering the short-axis CMR images using connected operators (area-open and area-close filters) to homogenize the cavity, prior to the segmentation which is performed using GVF-snake algorithm.

Proposed Method

In this paper, we propose an automatic method for endocardial border detection using a level set formulation. As mentioned above, the initialization of the active contour and level set algorithms is a very important task. Bad initialization can draw the segmentation resulted curve away from the left ventricle. That is why an automatic initialization is required. To this aim and in order to automate the initialization of the segmentation process, we propose a method based on a thresholding operation of the original image and using the binary image obtained as initial mask for the level set method. This initialization process is based on two steps. First, the image is thresholded using the Otsu filter method. Second, we propose an automatic approach to detect the spatial position corresponding to the region of left ventricular cavity by the evaluation of a metric that indicate object’s roundness. The binary mask is used for initialization of the level set algorithm. For this task, this mask is posed on the circular region detected, in order to initiate the segmentation process.

Initialization with Binary Mask

The method that we propose in this paper is based on the initialization of the level set algorithm by using the binary image obtained from the thresholding operation. For the localization of the left ventricular cavity, we use a method based on the evaluation of a simple metric indicating the roundness of an object because we approximate that the left ventricular cavity has a round shape. To determine if an object is round, we estimate each object area and perimeter and this for all unconnected regions on the image. The metric roundness was defined by the following equation:

$$ {\text{metric}} = \frac{{4 \times pi \times {\text{area}}}}{{{\text{perimete}}{{\text{r}}^2}}} $$
(1)

This metric is equal to one only for a circle and is less than one for any other shape.

On the short-axis images, the LV endocardial border is not always defined at locations with maximum intensity gradients. That is why we have proposed to smooth the input image with a Gaussian kernel filter to homogenate the LV endocardial border. In Fig. 1, we show an example that illustrates the difference between the left ventricular cavity detected from the original image and from the smoothing image.

Fig. 1
figure 1

a A cardiac MR image. b The binary image of the input image. c Labeling of the left ventricular cavity and the other regions. d The input image after smoothing. e The binary image of the smoothing image (Fig. 1d). (f) Labeling of the left ventricular cavity and the other regions

We can clearly notice that the LV metric obtained before smoothing (0.6478) is less than the LV metric obtained after smoothing (0.8638). Figure 2 shows the metric of the LV for 18 images before and after smoothing. The proposed segmentation method in this paper starts by thresholding the input image using OTSU method. After this step, we eliminate the smallest regions (see Fig. 3).

Fig. 2
figure 2

The metric evaluated for 18 images before and after smoothing

Fig. 3
figure 3

a A cardiac MR image. b The input image after smoothing. c The binary image of the smoothing image. d The binary image after elimination of the smallest regions. f Labeling of the left ventricular cavity and the other regions

Image Segmentation

In image segmentation, the methods based on active contours present dynamic curves that move toward object’s boundaries. To achieve this goal, these approaches explicitly define an external energy that can move the zero-level curve toward the object’s boundaries [12].

For our segmentation process, we propose to use a variational level set formulation of active contours without re-initialization. We describe here this method [12]. Let I be an image and g be the edge indicator function defined by:

$$ g = \frac{1}{{1 + {{\left| {\nabla {G_{\sigma }} \times I} \right|}^2}}} $$
(2)

where G σ is the Gaussian kernel with standard deviation σ. We define an external energy for a function ϕ(x,y) as below:

$$ {\varepsilon_{{g,\lambda, \nu }}}\left( \phi \right) = \lambda {L_g}\left( \phi \right) + \nu {{\rm A}_g}\left( \phi \right) $$
(3)

where λ > 0 and ν are constants and the terms L g (ϕ) and A g (ϕ) are defined by

$$ {L_g}\left( { \phi } \right) = \int\limits_{\Omega } {g\delta \left( \phi \right)} \left| {\nabla \phi } \right|{\rm d} x{\rm d} y $$
(4)

And

$$ {A_g}\left( { \phi } \right) = \int\limits_{\Omega } {gH\left( { - \phi } \right)} {\rm d} x{\rm d} y $$
(5)

where δ is the univariate Dirac function and H is the Heaviside function. Now, we define the following total energy functional

$$ \varepsilon \left( \phi \right) = \mu {\rm P}\left( \phi \right) + {\varepsilon_{{g,\lambda, \nu }}}\left( \phi \right) $$
(6)
$$ P\left( \phi \right) = \int\limits_{\Omega } {\frac{1}{2}} {(\left| {\nabla \phi } \right| - 1)^2}{\rm d} x{\rm d} y $$
(7)

The external energy drives the zero-level set toward the object boundaries, while the internal energy μP(ϕ) penalizes the deviation of ϕ from a signed distance function during its evolution. By variations calculating, the gâteaux [13] derivative (first variation) of the functional ε in Eq. 6 can be written as:

$$ \frac{{\partial \varepsilon }}{{\partial \phi }} = - \mu \left[ {\Delta \phi - {\text{div}}\left( {\frac{{\nabla \phi }}{{\left| {\nabla \phi } \right|}}} \right)} \right] - \lambda \delta \left( \phi \right){\text{div}}\left( {g\frac{{\nabla \phi }}{{\left| {\nabla \phi } \right|}}} \right) - \nu g\delta \left( \phi \right) $$
(8)

where Δ is the Laplacian operator. Therefore, the function ϕ that minimizes this functional satisfies the Euler–Lagrange equation \( \frac{{\partial \varepsilon }}{{\partial \varphi }} = 0 \). The steepest descent process for minimization of the functional ε is the following gradient flow:

$$ \frac{{\partial \phi }}{{\partial t}} = \mu \left[ {\Delta \phi - {\text{div}}\left( {\frac{{\nabla \phi }}{{\left| {\nabla \phi } \right|}}} \right)} \right] + \lambda \delta \left( \phi \right){\text{div}}\left( {g\frac{{\nabla \phi }}{{\left| {\nabla \phi } \right|}}} \right) + \nu g\delta \left( \phi \right) $$
(9)

This gradient flow is the evolution equation of the level set function in the proposed method. The second and the third term in the right-hand side of Eq. 9 correspond to the gradient flows of the energy functional λL g (ϕ) and νA g (ϕ), respectively, and are responsible of driving the zero-level curve toward the object boundaries. To explain the effect of the first term, which is associated to the internal energy μP(ϕ), we notice that the gradient flow Eq. 10 has the factor \( \left( {1 - \frac{1}{{\left| {\nabla \phi } \right|}}} \right) \) as diffusion rate.

$$ \Delta \phi - {\text{div}}\left( {\frac{{\nabla \phi }}{{\left| {\nabla \phi } \right|}}} \right) = {\text{div}}\left[ {(1 - \frac{1}{{\left| {\nabla \phi } \right|}})\nabla \phi } \right] $$
(10)

If |Δϕ| >1, the diffusion rate is positive and the effect of this term is the usual diffusion, i.e., making φ more even and therefore reduce the gradient |Δϕ|. If |Δϕ| <1, the term has effect of reverse diffusion and therefore increases the gradient.

Experimental Results

We present here the results given by the implementation of the left ventricular segmentation algorithm proposed in this paper. This segmentation approach is summarized as follows:

  • First, we threshold the original image by an automatic thresholding algorithm (Otsu algorithm [14]). We obtain a binary image that we use as initial mask for the level set formulation used in our work.

  • On the second step, we apply the level set algorithm to find the final endocardiel border.

Image Acquisition

For our experiments, we used a free database available for research purposes [15]. The original images in this database consist of short-axis 2D sequences (between eight and 13 sequences of 25 images per patient), with breath-held, ECG-gated acquisitions from base to apex. The most basal slices included in the analysis were located just above mitral valve within LVC. To be included, the basal myocardium had to be visible in the entire circumference at end-systole. The most apical slice was chosen as the one with the smallest visible LVC at end-systole. The sequences were registered on the heart cycle, and thus, they can be stacked to construct 3D sequences. Each 3D sequence is made of 25 volumes and covers a complete heart cycle. A conventional 2D manual segmentation of the LV myocardium was performed by two independent and blinded expert cardiologists. They used a software package that is well established for the post-processing of medical images (Analyze R, Biomedical Imaging Resource, Mayo Clinic Foundation, Rochester, MN, USA). These two experts are called E1 and E2 in the sequel. The cine MR dataset was analyzed as a succession of 2D LV short-axis planes. For each slice location, the experts manually overlaid the endocardial and epicardial contours both at end-diastolic and end-systolic times. During manual tracing, papillary muscles and LV trabeculae were included within the LV myocardium. Then, the segmented slices were stacked to rebuild a 3D object for quantification. The time spent by the experts to manually segment one volume of a 3D + t sequence ranged from 15 to 20 min. For this reason, a manual segmentation is not available at every time-step.

Endocardial Border Detection

In this section, we present the results of endocardial border detection in cardiac magnetic resonance images using our segmentation approach. The proposed method produces good results, but sometimes some intensity inhomogeneities often occur in left ventricular MRI images and may cause considerable difficulties in image segmentation. As we show in Fig. 4a, heterogeneities in discussion can appear inside of the LVC or be attached with the myocardium muscle. In order to overcome the difficulties caused by intensity heterogeneities, we convoluted the original image with a Gaussian kernel filter. A typical example is given in Fig. 4 with (σ = 1). We notice here that it is necessary to examine the influence of the parameter sigma on the segmentation results.

Fig. 4
figure 4

a A cardiac MR image. b Image with final contour. c Segmentation result without convolution. d Segmentation result after convolution

For this purpose, we apply our method using different sigma parameters. The most accurate segmentation result is obtained with the parameter σ = 1.

Evaluation

The segmentation results were evaluated quantitatively using an error metric [16, 17].

$$ E = \frac{{{\text{Area}}\left( {A \otimes B} \right)}}{{{\text{Area}}(B)}} = \frac{{\left( {A \cup B} \right) - \left( {A \cap B} \right)}}{{\left( {A \cup B} \right)}} $$
(11)

where A is a binary images such all pixels inside the curves produced by a clinical expert and B is the set of all pixels inside the curves produced by a segmentation algorithm.

  • ε = 3.5: the parameter in the definition of smoothed Dirac function

  • μ = 0.1: coefficient of the internal (penalizing) energy term P(ϕ)

  • λ = 1: coefficient of the weighted length term L g (ϕ)

  • ν = −0.5: coefficient of the weighted area term A g (ϕ)

The Fig. 5 shows the results of the two expert segmentation (b and c) and illustrates the method segmentation results (d). The Fig. 6 shows the results of the segmentation method (d) and illustrates the initial and the final contour (the endocardial border) (b and c).

Fig. 5
figure 5

a A cardiac MR image. b Segmentation result expert1. c Segmentation result expert2. d Segmentation result proposed method

Fig. 6
figure 6

a A cardiac MR image. b Image with initial contour. c Image with final contour. d Segmentation result

As shown in Fig. 6, the proposed method works efficiently. Others segmentation results are given in Fig. 7.

Fig. 7
figure 7

Segmentation results for different MRI images

Table 1 gives the error metric of 18 patient selected from the data bases used in our study. The error metric was evaluated between the proposed method and the two experts (E1 for expert1 and E2 for expert2). As presented in Table 1, we obtained an overall average similarity area of 97.85% (expert1) and 97.89% (expert2).

Table 1 The error metric for the proposed method at the end-diastole phase

We have also evaluated this error for the automatic algorithm proposed in [6], where the authors developed an automatic algorithm based on watershed segmentation of 4D cardiac MR images. The automatic segmentation results are available in the database used in this work. Table 2 gives the results of the error metric for the same patients selected in Table 1 at the end-diastole phase for this watershed segmentation algorithm.

Table 2 The error metric for the watershed algorithm at the end-diastole phase

We notice also that we obtained an overall average similarity area of 95.93% (expert1) for the automatic method proposed in [6] (Table 2) and 96.75% for expert2. The agreement between manual and the proposed method was assessed on LV area measures, as reported in Table 1. In order to gain a more meaningful data interpretation, the Bland–Altman [18] plots for the expert1 and the proposed method (Fig. 8a) and the expert2 and the proposed method (Fig. 8b) are shown in Fig. 8.

Fig. 8
figure 8

a Bland–Altman plot for expert1 and the proposed method. b Bland–Altman plot for expert2 and the proposed method. c Bland–Altman plot for expert1 and expert2. All area units are in number of pixels

The Bland–Altman plot, or difference plot, is a graphical method used to compare two measurements techniques. In this graphical method, the differences (or alternatively the ratios) between the two techniques are plotted against the averages of the two techniques. Horizontal lines are drawn at the mean difference and at the limits of agreement, which are defined as the mean difference plus and minus 2 times the standard deviation of the differences [19].

We see clearly, from the tow plots, Fig. 8, the agreement between the two experts and the proposed method. This implies that the LV area measured with the new proposed method is in agreement with the LV area obtained with the two experts. The inter-observer variability was shown in Fig. 8c.

To show the robustness of our method, we illustrate the examples presented in Fig. 9. For all the examples, the inclusion of the left ventricular and the left myocardium and pathologies in the myocardium makes the separation of the two regions using any algorithms very difficult.

Fig. 9
figure 9

Segmentation results for different MRI images

Generally pathologies in the myocardium cause a non-circular shape of the left ventricular. Meanwhile based on the metric used in this work, we can say that left ventricular cavity has the biggest value. For more explication, we illustrate the following example.

As shown in Fig. 10, the result of the thresholding operation shows three regions: in the middle the left (0.46) and the right (0.37) ventricular and the other region (0.13). So we see clearly that the left ventricular have not exactly a circular shape but they have the biggest value.

Fig. 10
figure 10

a A cardiac MR image. b Image after thresholding. c Image with final contour. d Segmentation result

We have test our algorithm using MRI images with contrast enhancement and perfusion. Images were obtained with sequences with considerable less S/N and more inhomogeneities (Figs. 11 and 12). The results shown in Figs. 11 and 12 prove that our algorithm can successfully be implemented with this kind of image.

Fig. 11
figure 11

MRI images with contrast enhancement segmentation

Fig. 12
figure 12

MRI images perfusion segmentation

Conclusion

This paper describes a new automatic method to detect the left ventricular chamber and the endocardial border in short-axis MRI view. This method takes into account the intensity inhomogeneities which often occur in left ventricular cavity and may cause considerable difficulties in image segmentation. A Gaussian kernel filter has been used to solve this problem. We proposed to threshold the original image, and we used the binary image obtained as initial mask for a level set segmentation method. For the localization of the left ventricular cavity, we use an approach based on the evaluation of a metric that indicate the object’s roundness.

In order to assess our method, an error metric was evaluated between the proposed method and two expert’s manual segmentation (expert1 and expert2) for 18 end-diastole images. The results obtained prove that the proposed approach is very promising. We have obtained a mean of 97.78% for expert1 and 97.89% for expert2. These results are in the most cases more precise than those obtained with another automated segmentation approach presented in Table 2.