Semi-Automatic Integrated Segmentation Approaches and Contour Extraction Applied to Computed Tomography Scan Images

We propose to segment two-dimensional CT scans traumatic brain injuries with various methods. These methods are hybrid, feature extraction, level sets, region growing, and watershed which are analysed based upon their parametric and nonparametric arguments. The pixel intensities, gradient magnitude, affinity map, and catchment basins of these methods are validated based upon various constraints evaluations. In this article, we also develop a new methodology for a computational pipeline that uses bilateral filtering, diffusion properties, watershed, and filtering with mathematical morphology operators for the contour extraction of the lesion in the feature available based mainly on the gradient function. The evaluations of the classification of these lesions are very briefly outlined in this context and are being undertaken by pattern recognition in another paper work.


INTRODUCTION
Segmentation is crucial for image analysis. The segmented features can be used for presurgery planification or diagnostic purposes as referred to Ciofolo and Barillot [1]. For instance, an irregular boundary of a segmented subdural haematoma in the parietal lobe indicates the severity of the traumatic brain injury as acute stage. Parametric Segmentation approaches such as feature extraction, hybrid, levelsets, watershed and region-growing are experimented. These evaluations are performed for traumatic brain injuries such as brain atropy, subdural hygroma, subdural haematoma, nonhaemorrhagic contrecoup contusion, and extracranial haematoma.
Parametric hybrid approaches such as deformable models, fuzzy connectedness, and fuzzy voronoi have been experimented, but the resultant output of the segmented pathological features is less efficient than those of the nonparametric segmentation approaches. In the case of the deformable models, the vector field lacks precision to identify the boundary of the feature. Whilst for the fuzzy connectedness, the binary template has generated quite effectively some results but not the exact representation of the segmented lesion. Any voronoi diagram is obtained by the fuzzy voronoi approach. The feature extraction approach such as hough transform 2D lines shows no effective result as the hough filter cannot compute the maxima in the hough map to define a geometry to locate the lesion.
The nonparametric segmentation approaches such as region growing approaches for confidence connected, connected threshold, neighbourhood connected are experimented.
Level-sets' approaches for threshold segmentation, fast marching, and shape detection mainly compute and analyse the motion of the feature under a velocity field which depends on the position, time, and geometry of the lesion as described in the work of Hong-Kai et al. [2]. Various results have been obtained with various ranges of constraints. The watershed-based segmentation approach is applied where the gradient magnitude of intensities of the pixels in the feature undergoes a transform. The contour extraction of the brain atrophy, subdural haematoma, nonhemorrhagic contusion, and subdural hygroma is performed by a computational pipeline from the raw CT scans. Section 2 is the state of the art related to segmentation. Section 3 describes the various approaches of segmentation applied to the traumatic brain injuries with the validations and evaluations of constraints. Section 4 describes our approach for the computational pipeline for the contour extraction. Section 5 concludes part of the work accomplished.

STATE OF THE ART
Basically, segmentation is the partitioning of the image into nonoverlapping constituent regions which are homogeneous with respect to some characteristics such as intensity or texture as described in the work of Bazin and Pham [3]. The identification of the pixels for a particular lesion is inherently built-in the segmentation method which can further allow for a pixel classification and labelling of the structure.
The dimensionality of the image is a crucial factor to be considered before segmentation process because image intensities are independent of the image domain. As described in the work of Mahrous et al. [4], the original vector field can be replaced by a derived segmented data set. The derived set is used to produce separating surfaces in the vector field whereas the CT scans are used for single scalar field.
Contour based surface extraction and isosurface extraction models have been considered for the purpose of implicit segmentation which is based on intensity threshold where points are classified as either greater or less than a given intensity as referred to Pham et al. [5]. The above is compared to an explicit segmentation using deformable models by reffering to the works of Giachetti and Zanetti [6], Colliot et al. [7]. The purpose is not to modify the image surface by an image vector and an internal image force.
Regarding the work of Hassouna et al. [8], these slight ambiguities have been encountered by the intensity regions based on the Hounsfield scale for CT scans. The purpose is to identify the grayscale range within the lesions. As stated in the works of Ritter et al. [9] and Heuberger et al. [10], the threshold segmentation is efficient for bone segmentation from CT scans. Since bone tissue attenuates significantly more x-rays during acquisition. Therefore, these attenuations are represented by much higher values on the Hounsfield scale compared to soft tissues. Weber et al. [11] developed an algorithm to modify a segmentation based on visual examination and obtained additional information about incorrectly segmented objects.

SEGMENTATION
The segmentation of these features must be considered based upon either a geometric approach or a diffusion approach or a fuzzy segmentation with a statistical approach as stated by Petersch et al., Vidal et al., and John et al. [12][13][14]. In the case of nonparametric level set segmentation methods, for each pixel value from seed points, extract sigmoid function and propagation term. for each image intensity, apply edge filter, provide threshold, adjust intensity scaling.
Algorithm 1: Algorithmic representation of level sets procedure. a geometric approach such as the distance function with a fast sweeping function is considered where the distance transform is calculated from the number of pixels as referred to Sifakis and Tziritas [15]. These segmentation approaches with different functionalities are experimented using opensource software insight toolkit [16] and a viewer.

Level sets
Based upon the excellent review of Osher and Fedkiw [17] on level sets, the surface Γ is represented as the zero isocontour of a scalar function (x), that is, which represents the curve or boundary of the feature. The various approaches such as fast marching, threshold, and shape detection use basically the algorithmic representation of the level set procedure as described in Algorithm 1.

Fast marching approach
The FastMarchingImageFilter is used in the Reinitialize Lev-elSetImageFilter object to create a signed distance function from the zero level set as referred to [16].
The lower threshold is set to a default value of 0.0 and the upper threshold defines the time snapshot which is taken from the time crossing map which is set to 85. The Cur-vatureAnisotropicDiffusionImageFilter requires TimeStep, NumberOfIterations, and ConductanceParameter are set as 0.125, 5, and 9 so as to detect the boundary of the structures. The SigmoidImageFilter class requires two parameters, alpha and beta, to define the linear transformation to the sigmoid argument as illustrated in By increasing the value of β to 4.00 and decreasing the value α to −0.575 as referred to in Table 1, the size of the B. Dhalila S. Y. Khoodoruth et al. illustrate almost identical features. Since the extracranial haematoma is outside the skull and has a homogeneous tissues density throughout resulting in no variation of the gradient intensities, the brain atrophy is at the rim of the right frontal lobe of the skull where the variation of gradient intensities is almost stagnant. Consequently, the most crucial factor in these features (iii) and (iv) is the time crossing map, which is set at 0.125 due to the coil rotation inside the CT scanner.
The fast marching level set segmentation is deduced to be the most appropriate feature extraction for the extracranial haematoma and the brain atropy.
The extracranial haematoma is homogeneously hyperdense, sharply marginated, and consists of solid blood clots found on the outside border of the skull as referred to [18]. The pixel intensities within this feature are constant throughout. So, the gradient magnitude intensities computed do not

Threshold approach
A range of intensity values are defined for the feature in the threshold level set segmentation. A propagation term is applied on the level set equation for the intensity range as referred to [16] and illustrated in Figure 2.
The initial level set generates the distance map, and a distance function is computed by applying the lower and upper threshold. In case, the lower threshold is less than 150, as referred to in Table 2, and the higher threshold is greater than 205, the range of intensities for the feature does not determine an initial surface for the gradient flow resulting in no segmentation.
Values below 4 or greater than 7 for the distance map result in a reduction or expansion of the initial contour, the zero level set of the feature as the surrounding region is white matter of homogeneous tissues density. There is very slight change of segmented feature as illustrated in Figures 2(U), 2(V), 2(W), 2(X) and Figures 2(Y), 2(Z), 2(A1), 2(B1) by applying the range of 4 to 7 for the distance map.
The threshold level set segmentation is the appropriate procedure for segmenting the subdural haematoma and the nonhemorrhagic contusion. Since the subdural haematoma is in an acute stage, it is hyperdense because of the attenuating properties of the haemoglobin molecules found in the blood clots. The stage of density takes weeks before being isodense. The lower and upper limits of the thresholds are set at 140 and 205 so as to consider only gradient magnitude intensities within the feature forbidding surrounding regions which can be hypodense or isodense. By lowering the limit of the threshold, lower gradient magnitude densities are acquired for which the distance function does not clearly mark the edge of the feature. The hyperdense area of the feature can be clearly demarcated by the proper threshold setting. When the threshold is increased to the corresponding gradient magnitude densities applied to the distance function, a proper segmented feature is obtained without any distortion of the initial surface of the zero level set.
Whilst the nonhemorrhagic contrecoup contusion is an area of higher densities of tissues sorrounded by areas of lower densities of tissues, the varying range of the minimum and maximum of the threshold values is adjust to the varying range of gradient magnitude densities. Consequently, the initial zero level set surface is computed by the adjustments of the corresponding densities and distance map resulting in a proper feature extraction.

Shape detection approach
Finally in the shape detection level set segmentation method, fast marching level set segmentation is used to define the initial level set based upon a distance map as referred to [16].
Though a wide range of parameter values are set for this approach, no exact segmented feature is obtained, as referred to in Table 3. The relative weightings of the propagation and curvature terms between these two parameters do not adjust to produce the shape boundaries of the feature. Consequently, zero level set leaks may have been produced through the feature's regions of low gradient along the boundaries of the pathological feature itself as illustrated in

Watershed
As described in the work of Grau et al. [19], and the excellent review of Roerdink and Meijster [20], the method is based on the topographical distance applied on these discrete two-  dimensional medical images where basically the algorithmic representation is used. Two important parameters, threshold and level control the output of this watershed segmentation, as referred to in Table 5. The purpose of the threshold parameter is to set the absolute minimum height value. The level parameter controls the depth of metaphorical flooding of the image. Raising and lowering the level influence the number of segments in the basic segmentation that are merged to produce the final output. A level of 1.0 is analogous to flooding the image up to a depth that is 100 percent of the maximum value in the image. Level values of interest are typically low as illustrated in Figure 4, that is, less than about 0.40 since higher values will quickly undersegment the image.
The threshold parameter cannot exceed the value of 0.1 as illustrated in Figure 4(K1) to represent the gradient  magnitude of intensities which are a percentage of the maximum depth of the feature so as to avoid oversegmentation.

Region growing
In this approach, a seed is selected from the data set manually, and the algorithm engulfs the relevant region up to its boundary using some connectedness approach to the surrounding pixels as referred to [16]. Basically, the algorithmic representation of the region growing procedure is used for the confidence connected, connected threshold, and neighbourhood approaches. The NumberOfIterations and TimeStep which are set as default values of 5 and 0.125 for 2D images, as referred to in Table 6. The itkConfidenceConnectedImageFilter class is used for the segmentation itself. This requires the definition of two parameters. The factor f which determines the extent of the range of intensities and the number of iterations specifies the homogeneity of the structure to be segmented. In this context, the multiplier factor is more important than the number of iterations, to avoid the region to engulf the entire image as illustrated in Figure 5(L1).
The range of values for the lower threshold and upper threshold varies between the minimum of 140 and maximum of 205. This allows for the usage of various pixel intensities to be identified for the computation of the gradient magnitude intensities due to its sensitivity to thresholds. As illustrated in Figure 5 range, but still a compressed segmented feature is obtained with the minimum of 160 and maximum of 195 as illustrated in Figure 5(S1). The nonhemorrhagic contusion is well segmented by the neighbourhood connected threshold approach. The varying range of minimum and maximum values of threshold of 140 and 205 allows the neighbouring filter to consider neighbouring pixels intensities instead of only the current pixel intensity. This is done by also accepting or rejecting small structures found inside or outside the lesion. Since the lesion is heterogeneous, the structuring element of the feature is well surrounded by the exact evaluation of gradient magnitude densities resulting in the exact segmented feature.

Constraints
The influence of each constraint has a direct impact on each lesion type, which is the most crucial part of the work undertaken. The segmented lesions types vary differently or constantly depending upon the range of the applied constraint. These variations are also assessed by the numerical evaluations and comparisons of the results.

Numerical constraints evaluations
Herewith is the sets of constraints associated to the segmented lesion types after segmentation process.

The sigma constraint
The sigma "σ" constraint is efficient for the segmentation of the brain atrophy, extracranial haematoma, subdural haematoma and nonhemorrhagic contrecoup contusion. The edge of the segmented feature is kept linearly constant by the proper assignment of its numerical value.
Two ranges of values such as 0.0005 ≤ σ ≤ 0.325 and 0.45 ≤ σ ≤ 1.1 have been experimented. Negative and null values are forbidden resulting in leakages at the edges of the feature since the pixel type is of unsigned short type. Values less than 0.0005 result in expansion and values greater than 1.1 result 6 International Journal of Biomedical Imaging in reduction of the segmented feature. According to Figure 1, the most appropriate result for the segmented feature lies in columns (B, F, J, N) and (C, G, K, O) within a range of 0.0125 to 0.0225.
As illustrated in Figure 1, these four lesions types are located either at the rim of the dura matter or just at the outline of the bone skull with a slight varying range of pixels intensities within each lesion type. The very slight range for an efficient segmented lesion is 0.0100 which explains the closeness and narrowness of the lesion to an edge.

The alpha constraint
The alpha "α" constraint is efficient for the segmentation of the brain atrophy, extracranial haematoma, subdural haematoma, and nonhemorrhagic contrecoup contusion. The edge of the segmented feature is kept linearly constant by the proper assignment of its numerical value till a threshold is applied to a time crossing map to the white matter.
Two As illustrated in Figure 1, these four lesions types are located either at the rim of the dura matter or just at the outline of the bone skull with a slight varying range of pixels intensities within each lesion type. The very slight range for an efficient segmented lesion is −0.360 which explains the closeness and narrowness of the lesion to an edge.

The beta constraint
The beta "β" constraint is efficient for the segmentation of the brain atrophy, extracranial haematoma, subdural haematoma, and nonhemorrhagic contrecoup contusion. The edge of the segmented feature is kept linearly constant by the proper assignment of its numerical value.
Two ranges of values such as 0.0005 ≤ β ≤ 4.00 and 1.85 ≤ β ≤ 3.2 have been experimented. Negative and null values are forbidden resulting in leakages at the edges of the feature since the pixel type is of unsigned short type. Values less than 0.0005 result in expansion, and values greater than 4.00 result in reduction of the segmented feature. According to Figure 1, the most appropriate result for the segmented feature lies in columns (B, F, J, N) and (C, G, K, O) within a range of 0.0025 to 0.2255.
As illustrated in Figure 1, these four lesions types are located either at the rim of the dura matter or just at the outline of the bone skull with a slight varying range of pixels intensities within each lesion type. The very slight range for an efficient segmented lesion is 0.2230 which explains the closeness and narrowness of the lesion to an edge.

The distance constraint
The initial distance "initial distance" constraint is efficient for the segmentation of the subdural haematoma and nonhemorrhagic contrecoup contusion. The initial distance is the distance between the initial surface and the boundary of the feature which is assigned a numerical value.
Two ranges of values such as 4 ≤ initial distance ≤ 7 and 3 ≤ initial distance ≤ 9 have been experimented. Negative and null values are forbidden because this constraint is a crucial requirement to locate the lesion. Values less than 3 result in expansion, and values greater than 9 result in reduction of the segmented feature. According to Figure 2, the most appropriate result for the segmented feature lies in columns (W, A1) and (X, B1) within a range of 6 to 7.
As illustrated in Figure 2, these two lesion types are located at the rim of the dura matter with a slight varying range of pixels intensities within each lesion type. The very slight range for an efficient segmented lesion is 1 which explains the closeness and narrowness of the lesion to an edge.

The lower threshold constraint
The lower threshold "lower" constraint is efficient for the segmentation of the subdural haematoma, and nonhemorrhagic contrecoup contusion has been experimented. The lower threshold accesses current pixel intensities within the feature.
The ranges of values such as 150 ≤ lower ≤ 175 and 140 ≤ lower ≤ 175 have been experimented. Negative and null values are forbidden because if not the feature will not be selected at all. Values less than 150 result in expansion, and values greater than 175 result in reduction of the segmented feature. According to Figure 2, the most appropriate result for the segmented feature lies in columns (W, A1) and (X, B1) within a range of 160 and 175.
As illustrated in Figure 2, these two lesions types are located at the rim of the dura matter with a slight varying range of pixels intensities within each lesion type. The very slight range for an efficient segmented lesion is 15, which explains the closeness and narrowness of the lesion to an edge.

The upper threshold constraint
The upper threshold "upper" constraint is efficient for the segmentation of the brain atrophy, extracranial haematoma, subdural haematoma and nonhemorrhagic contrecoup contusion. The upper threshold accesses neighbouring pixel intensities of similar intensities within the feature.
Two ranges of values such as 175 ≤ upper ≤ 205 and 170 ≤ upper ≤ 205 have been experimented. Negative and null values are forbidden because if not the feature won't be selected at all. Values less than 140 result in expansion, and values greater than 175 result in reduction of the segmented feature. According to Figure 2, the most appropriate result for the segmented feature lies in columns (W, A1) and (X, B1) within a range of 195 to 205. define a slope for each pixel for each pixel value, calculate topographical distance estimate gradient for gray-level values. for each image gradient threshold identification, perform edge-preserving, represent gradient magnitude, generate merge tree, access segmented image, acquire segmentation tree.
Algorithm 2: Algorithmic representation of watershed procedure.
As illustrated in Figure 2, these two lesions types are located at the rim of the dura matter with a slight varying range of pixels intensities within each lesion type. The very slight range for an efficient segmented lesion is 10 which explains the closeness and narrowness of the lesion to an edge.

The conductance constraint
The conductance constraint is efficient for the segmentation of the subdural hygroma. This constraint helps for a proper definition of the boundary of the lesion.
The range of values such as 2 ≤ conductance ≤ 7 has been experimented. Negative and null values are forbidden because if not the feature's boundary will not be selected at all. Values less than 2 result in undersegmentation, and values greater than 7 result in oversegmentation of the feature. According to Figure 4, the most appropriate result for the segmented feature lies in column (K1) with a value of 2.5.

The iterations constraint
The iterations constraint is efficient for the segmentation of the brain atrophy, extracranial haematoma, subdural haematoma, and nonhemorrhagic contrecoup contusion. This constraint determines the mean and standard variance of the neighbouring pixels to be calculated and consequently the number of times to repeat the segmentation.
The range of values such as 10 ≤ iterations ≤ 20 has been experimented. Negative and null values are forbidden so as to obtain the best segmentation result. Values less than 0.0005 result in expansion, and values greater than 4.00 result in reduction of the segmented feature.

Comparison of various results for constraints evaluations (i) The sigma constraint
These values 0.0005, 0.0125, 0.0225, and 0.0325 are illustrated in Figure 1, and these values 0.45, 0.65, 0.95, and 1.1 are illustrated in Figure 3.
for each pixel value from seed points, apply edge-preserving, instantiate smoothing, assign pointer for smoothing and edge-preserving.  Figure 3.

Requirements
The traumatic brain injuries segmented are brain atrophy, subdural hygroma, subdural haematoma, nonhemorrhagic contrecoup contusion, and extracranial haematoma obtained from a set of 5 patients. These axial CT scans obtained from Centre Hospitalier De Bayonne are of dimension 512 × 512 and thickness 2.5 mm varying in between 38 to 182 slices effected from different medical practitioners which have been converted into 256 × 256. These slices show varying levels of intensities depending on the intra and intervisual perception of these practitioners.
Before segmentation proceeds, these images are preprocessed by the bilateral image filter which is an edge preserving smoothing filter. Smoothing is performed by using domain and range neighbourhoods. Pixels that are close to a pixel in the image domain and similar to a pixel in the image range are used to calculate the filtered value as referred to Tomasi and Manduchi [21].
International Journal of Biomedical Imaging

CONTOUR EXTRACTION
In our approach, the contour is a feature tracking of the lesions as referred to Loncaric et al., Deriche, and Roover et al. [22][23][24]. CT scans have a static scalar field of vision as mentioned in Sohn and Bajaj [25]. Diffusion properties have been applied in our computational pipeline preceded by smoothing and edge-preserving from a bilateral filter using open-source software insight Toolkit (ITK) [16]. The diffusion data enhances the properties of the components in these CT scan images as mentioned in Breen et al. [26] and Straka et al. [26,27]. The gradient magnitude of the diffusion anisotropy is analysed by the watershed transform by graphing a function to create the merge tree. The gradient magnitude of the watershed pixels is transformed into the gradient magnitude of the diffusion anisotropy.
Mathematical morphology grayscale operators such as dilation and erosion use the merge tree of these connected flood levels of varying values. Each intersection node of the connected flood levels is used to create a graph. The higher values of the flood levels receive the maximum values of the dilation operator as referred to the work of Droogenbroeck [28], Droogenbroeck and Talbot [29], and Vardavoulia et al. [30] and the lower values of the flood levels receive the minimum values of the erosion operator. The nodes connect the intersection points which are linked so as to represent the contours corresponding to their features. Finally, some smoothing has been performed in a viewer for edge-preserving of the eroded output images.

Methodology
After the raw CT scans are preprocessed by the bilateral filter. The h(x) components of the output image move to the gradient anisotropic diffusion image filter. The anisotropic diffusion measures the diffusion properties of the water molecules in the cerebral tissues C where D is the diffusion coefficient: The invariants are the eigenvalues of diffusion D which are the roots of corresponding characteristic: with coefficients C 1 = λ 1 + λ 2 + λ 3 , which are proportional to the sum of the radii and surface area of the pathological feature. The dataset is described as (C 1 , C 2 , C 3 ) since C i are the coefficients of the character-istic equation. Considering the dimensionless combination where a new dimensionless anisotropy measure is defined as for a linear, directional diffusion (λ 1 λ 2 ≈ λ 3 ) is equal to Thus, C a is always ∼λ max /λ min and measures the gradient magnitude of the diffusion anisotropy.
The watershed transform is calculated on the absolute value of the gradient with high values at features' contours. Calculation of the watershed transform using arc weights in a graph allows the substitution of the usual gradient estimation by absolute differences of gray level calculated directionally during the flooding process to achieve a higher resolution. The lower slope is redefined as where g(p, q) is a new function for the link (p, q). An equivalent function is calculated for the lower neighbours from This condition allows the use of the directional diffusion anisotropy gradient magnitude value in substitution of the absolute value of the gradient resulting in where the neighbor space N is referred to as a set Z in which the component q of the function link is substituted by the component C i . The discrete morphological gradient is The erosion and dilation functions by a gray-scale structuring element as referred to Droogenbroeck, and Darbon et al. [28,31], g : G → Z are applied to the new links {g(p, C i )} such that where , where respectively, where x, y ∈ Z 2 are the spatial coordinates. F, G ⊆ Z 2 are the domains of the grayscale image (function) and grayscale structuring element.

Program flowchart for contour extraction
Let f (x) be the original grayscale image defined in the domain D i and let g(x) be the output image as illustrated in Figure 6.

Implementation and results
The contour extraction traced out the exact feature as illustrated in Figure 7 and Table 6 of constraints.

Reasons for contour extraction technique compared to active contour model
The CT scans are from an "8-barrette" CT scanner. The removal of noise and filtering are a tedious task to get an optimized contrast of these CT images. Since the active econtour geodesic/geometric models as referred to the work of Yoon et al. [32] are sensitive to these above fluctuations, the experimented technique has been implemented and preferred to active contour model because of the varying strength of the edges of these CT scans.
The speed at which the contours have been extracted by the experimented technique is fast compared to another model. Since the calculation of the speed of convergence with active contour model will require other parameters to be implemented.

CONCLUSIONS
We have presented a new methodology through the gradient calculation for the feature sets further enhanced by mathematical morphology grayscale operators. This computational pipeline technique is applied to CT scan images illustrating a subdural haemorrhage, a nonhemorrhagic contusion, a subdural hygroma, and a brain atrophy. In the case of the subdural hygroma, this technique demonstrates similar or superior performance to manual segmentation by experts. Without any doubt, the precision and accuracy of the segmented features in the contour tracking are reliable for diagnostic or presurgery purposes.
The deductions of the particular pathological feature extraction by particular segmentation procedures are mostly relevant in the selection process. The validation of the constraints settings of each segmentation procedure based upon the particular characteristics of trauma lesions is the determinant factors to be considered.
Finally, the substitution of one constituent of the link component in the gradient function of the watershed transform in the computational pipeline by the constituent of linear directional diffusion anisotropy gradient magnitude is one of the new methodology brought forward. The classification of these lesions by pattern recognition is tackled in another paper work.

CLASSIFICATION BY K-MEANS
The k-means model defines classes that represent statistical distribution of intensity values in the pixels as referred to [16].
International Journal of Biomedical Imaging The following results are for the subdural haematoma and contrecoup contusion as illustrated in Figure 7.