Left Ventricle Segmentation in Cardiac MRI Images

Imaging of the left ventricle using cine short-axis MRI sequences, considered as an important tool that used for evaluating cardiac function by calculating different cardiac parameters. The manual segmentation of the left ventricle in all image sequences takes a lot of time, and therefore the automatic segmentation of the left ventricle is main step in cardiac function evaluation. In this paper, we proposed an automatic method for segmenting the left ventricle in cardiac MRI images. We applied pixel classification method by using number of features and KNN classifier for segmenting the left ventricle Cavity, and from its output we can get the endocardial contour. Then, we transformed image pixels from Cartesian to polar coordinates for segmenting the epicardial contour. This method was tested on large number of images, and we achieved good results reached to 95.61% sensitivity, and 98.9% specificity for endocardium segmentation, and 93.32% sensitivity, and 98.49% specificity for epicardium segmentation. The results of the proposed method show the availability for fast and reliable segmentation of the left ventricle.


Introduction
Cardiovascular diseases cause 17.5 million deaths every year in the world [1]. The early diagnosis of the cardiovascular diseases plays an important role in the recovery.
Cardiac MRI imaging using cine MRI sequences, considered as an important tool that used for evaluating cardiac function. Evaluation of cardiac function requires calculation of different cardiac parameters (i.e. ejection fraction (EF), left ventricle mass (LVM), left ventricle volume, wall thickness, or wall thickening). All of these parameters depend on segmenting the endocardial, and epicardial contours of the left ventricle from the image sequences that are acquired from cardiac imaging technique. The manual segmentation of these contours from all dataset (i.e. all time frames per all slices) takes a lot of time and effort from the cardiologist. Therefore, the automatic segmentation is very important, and can be considered as a challenging task.
In the short-axis MRI image, the blood pools (i.e. of the right and left ventricle) appear bright and all their surrounding structures appear dark (i.e. myocardium, lung, and liver) with different intensities, as shown in fig. 1. Also the left ventricle looks like a circular in the short-axis image.
In this paper, we concentrate on the pixel classification technique. Image segmentation by using this technique, partitioning the image to regions by classifying the pixels to different classes according to their features. The classification part is done by using supervised or unsupervised algorithms. Usually in the cardiac segmentation, the features used are the gray level intensities, and the classification is done by clustering methods, or Gaussian Mixture Model (GMM).
Pednekar et al. in [7], used the localization of the heart as an initial step to estimate the LV region, which used to get the intensity statistics for the LV blood and myocardium by using Expectation-Minimization (EM) algorithm that followed by Gaussian Mixture learning step.
Lynch et al. in [8], used the diffusion-based filter to smooth the cardiac images while maintaining the important edges information. Then he used the k-means clustering algorithm. From the resulting labels, the LV cavity is detected by using the approximation to a circle, and the closest region to a circle considered as the LV cavity. Then the closest blood pool to the LV cavity is the RV blood pool, which help to know the thickness of the myocardium that used for segmenting the epicardium.
Gering in [16], used a new contextual dependency network (CDN) in the cardiac segmentation. This network doing classification in different stages. In the beginning, the pixels classified by using EM algorithm, then used a Markov random field to take into consideration the neighbourhood interaction between pixels, then take the region properties and relationship between regions to complete the segmentation process.
This paper is structured as follows. The next section presents the localization method of the region of interest (ROI) from cardiac MRI images to reduce the working area, because the cardiac MRI image contains a lot of structures in it. The third section will be focus on the segmentation of the left ventricle which consists of two main steps. It starts with segmenting the endocardium area, and then ends with segmenting the epicardium area. The segmentation of the endocardium depends on a pixel classification method that extracts different features from the dataset (i.e. gradient magnitude, largest eigenvalue, output of median filter, and the gray value) and uses the KNN in the classification of the target object. The segmentation of the epicardium contour depends on transforming the ROI from Cartesian to polar coordinates, and using the results of the endocardium segmentation as a mask to remove unwanted edges to achieve our goal of segmenting the epicardium contour.

Localization of the Cardiac
For localizing the general position of the heart in cardiac MRI images, we applied the algorithm mentioned in [17]. This algorithm depends on calculating the standard deviation between all images for different time frames in the middle slice, to compute the standard deviation map, that used to determine the general position of the heart. The flowchart that describe the steps of this algorithm shown in fig. 2.
As mentioned, to get the standard deviation map, we should determine the middle slice that we will work on it. This is because the cardiac has different views along the long-axis (i.e. from apex to base), as shown in fig. 3. In the middle slice, we can see the left ventricle as a circular shape, so there will be a great standard deviation between the myocardium, and the blood pool, according to the movement of the heart.
After getting the standard deviation map, this image is convereted to binary image. The threshold that used in binarization, is calculated after plotting the probability density function of the standard deviation values, and take the threshold value that gets 80% of the area under the probability density curve function.

Left Ventricle Segmentation
As shown in fig. 1, segmenting the left ventricle depends on segmenting two different contours. The interior contour is called endocardium that surrounds the left ventricle blood pool, and the external contour that is called epicardium. There are some difficulties in segmenting these contours [3]. For segmenting the endocardium, there are some difficulties according to the presence of the papillary muscles and trabeculations inside the heart chamber, that has the same intensity of the myocardium. Also, there are some gray value inhomogeneities inside the left ventricle cavity itself. For the epicardium, the difficulties generated because around the epicardium there are different tissues (i.e. fat, and lung) that have different intensities, and there are poor contrast between these tissues and the myocardium.
To segment these contours, we will begin in segmenting the endocardium because it is easier in segmentation due to the good contrast of the LV cavity and the myocardium. In the segmentation of the endocardium, we will applied the algorithm mentioned in [18]. After segmenting the endocardium, we will used the output of segmentation as a mask to help us in segmenting the epicardium.

Endocardium Segmentation
The segmentation of the endocardium, depends on segmenting the LV cavity, by extracting different features (i.e. the gradient magnitude, the largest eigenvalue, the output of median filter, and the gray value) from each pixel in the image. Then, we apply the principal component analysis (PCA) to reduce the feature space dimension, and getting the final feature vector that used with the KNN classifier for segmenting the pixels to blood or not. This part of segmentation, needs a training stage to help in learning the classifier the main characteristics of each class. So, we applied our algorithm on 13 different patient [19]. We took randomly 20 images from each patient for training.
During preparing the training dataset, we will need to label the LV cavity as class 1 and its surrounding area as class 2. So, we did that by using the manual segmentation of the inner contour that attached with the dataset.
We chose the features (used in the segmentation) due to the nature of the LV cavity that we want to segment it. The LV cavity appears bright and the myocardium that surrounds it appears dark. So, we need to improve edges that surround the LV cavity. For that we chose to take the gradient magnitude, and the largest eigenvalue as features. We get the gradient magnitude, and the largest eigenvalue at different scales (i.e. 1,2,4,8,16) and take the maximum over all scales. Although the MRI provides high contrast between the blood and the myocardium, but there is gray inhomogeneites inside the LV cavity. Because of that we chose to take the output of applying the median filter as features, and we applied different window sizes (i.e. 3, 5, and 7), and took all these outputs as features. We took all of these features beside the gray value of the pixel itself.
Although, we reduced the processing area on the image by determining the ROI. But still we have a lot of pixels in the training dataset that will be used as instances. To reduce the dimension of the training samples, we applied image patches technique that used in object recognition in images. Image patches are squared subimages extracted from an image. We applied image patches on training dataset un-overlaped, and on testing dataset overlapped to scan all pixels in the image.
We took image patches for different reasons, the first one to reduce the training samples that will be used in the training stage. The second one because the patches divide the image to different subimages, so it will take the neighborhood characteristics of each pixel in describing the features of each subimage, and because of that it considered as local features.
After applying patches, we reduced the training samples, but in the same time we increased the feature vector of each sample. We used 6 different features, and for each one we applied the patch technique with size (7X7). So, for each sample, we will have 7 2 components multiplied by the number of features. Therefore, we applied the principal component analysis (PCA) on the feature space to reduce its dimension. After applying PCA, we tested different numbers of the resulting components as features (i.e. 5, 10, ….., etc.) with the KNN classifier with K=1, and for each number of features we evaluate the output by different evaluation parameters, to choose which one is the best.
The detection of the LV cavity from the output of the KNN classifier, will be done after doing post-processing stage to determine the most circular connected component in the image, because the LV cavity appears circular as mentioned before, and we did that by calculating the circularity of each connected component as Eq. 1, and chose the most circular object.
Where A is the area and P is the perimeter of the object.

Epicardium Segmentation
There are different tissues (i.e. fat, lung, and liver) that surround the myocardium, and these tissues have different intensity values. Also, the part of the epicardium in front of the right ventricle is thin in thickness. All of these issues make the segmentation of the epicardium is difficult.
For segmenting the epicardium, we convert the subimage (extracted from ROI image) that centered in the center of the left ventricle cavity, and its radius equal 30 pixels, from cartesian to polar coordinates.
After getting the polar image of these pixels that cover this area, we apply Canny [20]edge detection on this image, to get polar edge map image. Also, we convert the same subimage of the binary image of the left ventricle cavity (resulted from the previous stage) to polar coordinates with the same center and for the same radius. Then we used this image as a binary mask (after inverting it) to delete all unwanted edges (i.e. inside left ventricle cavity, and endocardium too) from the polar edge map image to help us determining the edge map of the epicardium only.
As we mentioned before of that, there are low contrast between myocardium and its surrounding tissues, this make small edges inside and outside the myocardium. For this reason, we deleted the small connected components in the edge map to reach to the edges that represent the epicardium contour at different parts.
The first point at each column in the resulting image considered as edge point. After determining all the edge points, we inverse the transform of the edge points coordinates from polar to cartesian, then get the convex hull of these points, and get its boundary border that represent the epicardial contour.

Evaluation
To evaluate our work, we calculate different parameters that used to measure the performance of the segmentation algorithm. These paramers are sensitivity, specificity, and dice metric. Beside these parameters we calculated the ejection fraction (EF), and compared its values from the automatic segmentation algorithm, and the manual segmentation by correlation analysis.

Sensitivity, and Specificity
The sensitivity is the proportion of true positivies of the automatic segmentation output to the manual segmentation output (i.e. reference output).
The specificity is the proportion of true negativies of the automatic segmentation output to the manual segmentation output.
These parameters were calculated as in Eq. (2) Where S is the sensitivity, and SP is the specificity. TP is the true positive area (correctly classified as object), FP is the false positive area (classified as object, but in fact it is background), TN is the true negative area (correctly classified as background), and FN is the false negative area (classified as background, but in fact it is object).

Dice Metric
The dice metric, DM, was calculated as in Eq.
It is a measure of contour overlap utilizing the contour areas automatically segmented (A a ), manually segmented (A m ), and their intersection (A am ). DM is always between 0 and 1, with higher DM indicating better match between automatic and manual segmentations.

Results
The automatic method of segmenting the left ventricle was tested on 13 different patients (i.e. 3 different slices, 20 phases for each slice). The automatic segmentation results can be seen in Fig. 4. For the endocardium segmentation, we tested different number of features, the first 25 features give the highest accuracy.
As shown in Table. 1, the average sensitivity , and specificity, for segmenting the endocardium area are 0.9561 ± 0.0625, and 0.9890 ± 0.0089. The segmentation of the epicardium area achieved 0.9332 ± 0.0766, and 0.9849 ± 0.0092 sensitivity, and specificity.
We achieved good results by evaluating our algorithm by dice metric. It reached to 0.8937 ± 0.0747 for endocardium area segmentation, and 0.9161 ± 0.0473 for epicardium area segmentation.  Beside the previous results, we calculated the ejection fraction (EF) from the automatic, and manual segmentation. The correlation between the automatic ejection fraction results to the manual ones reach to 0.88, as shown in Fig. 5.

Conclusions
Fully automatic algorithm for detecting and segmenting the left ventricle from cardiac MRI images was proposed in this paper. The algorithm used the standard deviation variations between different phases in a specific slice to localize the global position of the heart. The automatic segmentation method divided to two parts. The first part concentrated to segment the endocardium area by a pixel classification method, that depends on extracting different features (i.e. gradient magnitude, largest eigenvalue, output of median filter, and gray value) with the KNN classifier. The secod part concentrated to segment the epicardial area by tracing the edge points after converting image from cartesian to polar coordinates and deleting all edges of the endocardium by using the output of the first part to help us. The results of the proposed method show the availability for fast and reliable segmentation of the left ventricle.