Abstract
Estimation of the pleural effusion’s volume is an important clinical issue. The existing methods cannot assess it accurately when there is large volume of liquid in the pleural cavity and/or the patient has some other disease (e.g. pneumonia). In order to help solve this issue, the objective of this study is to develop and test a novel algorithm using B-spline and local clustering level set method jointly, namely BLL. The BLL algorithm was applied to a dataset involving 27 pleural effusions detected on chest CT examination of 18 adult patients with the presence of free pleural effusion. Study results showed that average volumes of pleural effusion computed using the BLL algorithm and assessed manually by the physicians were 586 ml±339 ml and 604±352 ml, respectively. For the same patient, the volume of the pleural effusion, segmented semi-automatically, was 101.8% ±4.6% of that was segmented manually. Dice similarity was found to be 0.917±0.031. The study demonstrated feasibility of applying the new BLL algorithm to accurately measure the volume of pleural effusion.
Introduction
Pleural fluid is physiologically present in the human’s pleural cavity [1, 2]. In normal conditions, the unilateral volume is 8.4±4.3 ml [3]. As the fluid amount increasing, the lung compliance reduces due to the increased lung capillary pressure. It may lead to patient dyspnea [4]. However, pleurocentesis provides a relief from dyspnea. The estimation of the pleural effusion’s volume may directly affect the therapeutic evolution of the disease and supports the decision whether to perform pleurocentesis or not [5]. Meanwhile, the medical treatment will be adjusted based on the change of pleural effusion volume. Therefore, accurate calculation of pleural effusion volume plays an important role in patient management.
There are several approaches to detect and evaluate the volume of pleural effusion. A typical method is posteroanterior chest radiograph. Pleural effusion is visible on the posteroanterior projection as a meniscus at about 200 ml. The hemidiaphragm will obliterate at approximately 500 ml. Effusion which is lower than 200 ml can be detected only when a lateral chest radiograph is taken. Pleural effusion becomes visible as a meniscus in the posterior costophrenic sulcus at approximately 50 ml [5].
Sonography is a good choice for detecting pleural effusions in supine patients, especially for the patient in intensive care unit. The volume of pleural effusion can be quantified by the equation y = 47.6×x-837, where y is the predicted pleural effusion volume in milliliters and x is the maximal thickness of the pleural effusion lamella in millimetres [6].
Computed tomography (CT) is the most suitable method for detection and evaluation of pleural effusion [7–10]. On CT scans, the effusion dimensions can be obtained easily and the volume of pleural effusion can be evaluated using a variety of methods. Mergo. PJ, Helmberger. T et al. assessed the volume of pleural effusion by the equation V = d2 × l, where d is the greatest depth of the effusion on a single CT scan, l is the greatest length of the effusion [8]. Hazlinger. M, Ctvrtlk. F, et al. devised a method with single measurement, the greatest depth of effusion, to evaluate the volume of effusion. The volume can be quantified by their recommended tabular [10].
However, all of the methods may be not accurate enough when the fluid amount is over 300 ml. Large deviation may be occurred under this condition. For example, in M. Hazlinger’s research [10], though the volume of pleural effusion is approximately 900 ml in a patient, the predicted volume is only about 600 ml using the recommended equation. This evaluation may lead the inappropriate treatment. The major limitations of these methods are: firstly, there is an implicit supposition on regression equations. The shape of pleural effusion has geometric similarity. For example, the shape of pleural effusion was often described as meniscus while the volume of pleural effusion can be evaluated by several measurements. However, this supposition may be inappropriate in some situations. The shape of pleural effusion may deform irregularly and cannot be described as meniscus. Thus, the dispersion of the dataset will be increased. The unavoidable errors may be occurred. This deviation would be significant while the measurement of the equations is limited. Secondly, the deviation will be induced when the physician(s) get the equation measurement(s). The shape of pleural effusion may be irregular in some conditions. It is difficult to obtain the measurements precisely. As the result, the deviation will occur. It will be enlarged while there are more measurements required.
Above problems can be avoided using the image segmentation technology [11–15]. There are several prior efforts to segment and measure the volume of pleural effusion in CT scans [16–21]. In most of these segmentation methods, the region in inner chest wall and diaphragm was countered in the first step and some of the organs and tissue contained in this region (e.g. lung, heart, etc.) was excluded based on the gray-level of the CT image. After that, the remaining section was the area of the pleural effusion. These methods can be named as “excluding segmentation methods”. However, these methods may be not accurate enough under the following conditions:
First, there is large volume (e.g. over 900 ml) of pleural effusion in the pleural cavity. The shape of the lung will deformed obviously. In some of the CT scans which near the diaphragm, all the air in the lung will be compressed out by the pleural effusion. The gray-level of the lung will be changed significantly. As a result, the boundary of lung and diaphragm will be delineated improperly. The volume of the pleural effusion will be calculated imprecisely, especially when the boundary of lung is an important input parameter for the method.
Second, the patient may have some other disease (e.g. pneumonia) at the same time. The gray-level of the pneumonia is much higher than lung and approximate to the effusion. The region of the pneumonia may be separated as a part of the effusion. Then the errors will be occurred in the calculations.
This study aims to develop and test a novel semi-automatic segmentation algorithm based on B-spline and local clustering level set (LCLS) method, namely BLL, to evaluate the volume of pleural effusion. Comparing with the “excluding segmentation methods”, BLL will focus on the area of pleural effusion and delineate the boundary directly. The above limitations are removed in the present study. The procedure of BLL is as follows:
First, the B-spline method generates the inner chest wall boundary by the interior points of the thoracic cage image. Then images in the boundary were extracted. Based on these images, the LCLS method segments the pleural effusion region into four phases [22]. The region of pleural effusion is assembled by the novel criterions that include analyzing the intensity, location and the shape of the image within each phase. Finally, the pleural effusion volume is calculated using the CT scans parameters.
Materials and methods
Patient population and device
A dataset involving 27 free pleural effusions detected by physicians from 18 adult patients on chest CT images during the period January 2015 to December 2015 was used in this study. There were 11 men and 7 women (mean age: 51 years, age range: 18–75 years). 9 patients were with unilateral pleural effusions (4 right-sided, 5 left-sided) and another 9 patients were with bilateral. Philips Brilliance CT Big Bore Systems (Philips Medical System, Cleveland, OH) performed the CT examinations with 64 detector rows. The tube voltage and tube current were fixed as 120 keV and 200mAs, respectively. The thickness of scans was 5 mm. Meanwhile, the resolution was 512×512 pixel, almost 1mm×1 mm for each pixel, roughly.
Extraction of the image within the inner chest wall
Thoracic cage consists of ribs, sternum, and thoracic vertebrae. Suppose that the inner chest wall boundary can be delineated by the interior points of the thoracic cage. Then the images within the boundary can be obtained. There are three major steps for this purpose: Extract the interior points of thoracic cage from the CT scans. Delineate the inner chest wall boundary based on the thoracic cage images. Extract the images within the inner chest wall boundary.
Extraction of interior points of thoracic cage
In a patient’s CT scan, the effective area of patient can be countered by a cubic, with the help of three parameters, height (H), width (W) and length (L). We can get the scans and represent the image within the cubic as I = {I s |s = 1, 2,..., N} (N is the last scan number). Figure 1 shows the patient CT scans.

The patient CT scans.
Because the gray-level of the bones is much higher than the others, almost 1400 HU in average, the images of bones
The RG method is used twice from two directions and with different mask, Imask1 and Imask2, respectively. In the top to bottom processing, Imask1 is with two triangle areas in the sides of the image, as shown in Fig. 2(a). The humeri and shoulder blade image in the first scan
Use the ith seed image and the RG method to find the intersection image
Set

The green areas in (a) and (b) are Imask1 and Imask1 for the RG method, respectively. (a) h is the distance between the top of the clavicle and the top line of the scan.
The humeri and shoulder blade images Use the ith seed image and the RG method to find the intersection image
It is worth nothing that the shoulder blades are contacted with the ribs in the middle of shoulder blades only in few of the CT scan. As a result, no more than three slices in

The thoracic image.
If the thorax is divided into two parts, namely the left one and the right one, the centroids can be set as

Schematic representation of extracting interior points of thoracic cage. (a) shows the established coordinate system. (b) shows the detail of selecting process.

The extracted bone boundary points.
After
Where
The knot vector U and V can be expressed as:
The surface approximation process can be implemented in two steps: The inner chest wall boundary in each CT scan is approximated by the control point
In the first step, the weighted least squares curve approximate
The constraint data is described as
The error vector of the unconstraint data is
If take the derivative of (9), and define it equal to zero,
Premultiplying (10) with
Substituting
In this study, we used 13 control points to approximate the inner chest wall boundary in each scan, as shown in Fig. 6.

The distribution of the control points in a CT scan. The last control is the same as the first one.
The second step of approximation the surface is similar with the first one. The rth points in all scans P
r
= {
According to (9, 10), the control point
Calculate the distance
Determine whether
The convergence condition is set as
After all, the control points

The inner wall chest boundaries in different CT scans.
As described above, the image within inner chest wall boundary I
Th
is obtained (as shown in Fig. 8). However, many tissues and organs, heart, lung, liver, artery vessels, etc., are still in I
Th
. Furthermore, the distribution, component and volume of pleural effusion are quite different from one patient to the other. Thus, the LCLS method is employed to segment the pleural effusion image. Two assumptions about the CT scans are introduced as follows:
The CT scans has suitable signal to noise ratio. It is not necessary to reduce the image noise. The gray-scale of pleural effusion is approximate for same patient.

The images with the inner chest wall boundary in different CT scans.
In this paper, we consider the CT image is intensity inhomogeneous. I
Th
is divided into multiphase. Each phase has intensity constant and contains several image regions. All the regions are assessed by their intensity, location, and the geometric information. Hence, the effusion region is assembled by the part of the selected region. The procedures of the algorithm are as follows: Segment I
Th
by the image intensity, preliminarily. Then the region of interest (ROI) is obtained. Divide ROI into four phases using the LCLS method [22]. Select and assemble the regions in all phases. Then, extract the region of effusion.
The ROI is obtained in two steps: I
Th
is segmented by their intensity preliminarily. The region will be removed if their intensity is quite different from the effusion. the intensity of image is enhanced for the following segmentation.
In the ith scan ITh,i, Physician(s) will delineate one or several sub-regions of effusion in only one CT scans, namely Ω
m
= {Ωm,j|j = 1, 2,..., n}, where n is the last number of the sub-region (shown as Fig. 9a). The delineation can be easily finished in few second. Let Ω
M
= ⋃
i
Ω
m
, i, the mean gray-scale Y
m
and standard deviation Y
s
td will be calculated among the points in Ω
M
. Because the component of effusion is almost same, the mean gray-scale Y
m
and standard deviation Y
std
will change a little when the different Ω
M
is obtained. Then extracting the points which gray-scale is in the range of [Y
m
- 100, Y
m
+ 100], the origin ROI

ROI of pleural effusion. (a) shows image within the inner chest wall. The ellipses are the sub-regions delineated by the physician(s). (b) shows the image which enhanced by (14).
We hope that each ROI can be segmented into four kinds of regions. The first one’s gray-scale is greater than the pleural effusion’s. The second one’s gray-scale is approximated. The third one’s gray-scale is less than the effusion. And the last one is the background, in which gray-scale should be close to zero. As the result, the tissues and organs around the effusion (e.g. pneumonia) are distinguished by these regions. The LCLS method is employed to achieve it.
LCLS formulation
As aforementioned, the CT image is intensity inhomogeneous. The observed image I is defined on a continuous domain Ω, and modeled as
We believed that, the true image J can be separated into disjoint regions Ω = Ω1, …, Ω
N
by N distinct constant values
In (15), the data term is of the most important. The local intensity cluster property is introduced in this term. The standard K-means clustering is allowed to classify these local intensities, which is defined as
Minimizing E
y
for all
The regularization terms in (15) is rewritten as the level set function,
Then the energy function F in multiphase level set formulation is defined by
The minimization of the energy F (Φ,
1) Energy minimization with respect to Φ: For fixed
2) Energy minimization with respect to
3) Energy minimization with respect to b: For fixed Φ and
In this study, the ROI is separated into four disjoint regions Ω1, …, Ω4 with the intensity constant
For the four-regions case, M i is defined as M1 (φ1, φ2) = H (φ1) H (φ2), M2 (φ1, φ2) = H (φ1) (1 - H (φ2)), M3 (φ1, φ2) = (1 - H (φ1)) H (φ2), and M4 (φ1, φ2) = (1 - H (φ1)) (1 - H (φ2)).
The level set evolution in (24) is implemented using the finite difference scheme as for the distance regularized level set evolution formulation provide in the previous study [31]. The Heaviside function H is replaced by a smoothed Heaviside function H
ɛ
, which is defined by
The parameters in the level set function are chose as follow: the parameters μ and the time step Δt can be fixed as μ = 0.5 and Δt = 0.1. The parameter ν is set to 0.0002×2552. The parameter σ is set to 4. And the kernel K is constructed as a ω×ω mask, with ω being the smallest odd number such ω≥4*σ+1. When σ = 4, the mask size is 17×17. Fig. 10 shows the regions segmented by the level set method.

The regions segmented by the level set method.
In Sec.2.3.2, the ROI is divided into four regions. Each region contains several sub-regions, as shown in Fig. 11a. Then we select the sub-regions for assembling the pleural effusion region by the following experiential criterion:

The result of the selecting process in each step. (a) is the image region segmented by LCLS method. (b) is the chosen image sub-region which adjoined the lower boundary of inner chest wall. (c) shows the assembled region and the cross in (c) are the separated points. (d) shows the final region, which will be obtained.
choose one sub-region Ω S ,0, which intensity constant c is close to the mean gray-scale of the pleural effusion Y m , from the sub-regions adjoined the lower boundary of the inner chest wall, as shown in Fig. 11b.
find all sub-regions adjacent to Ω
S
,0, denoted by Ω
S
,1,...,Ω
S
,n, where n is last number of the adjacent sub-region. The mean gray-scale of Ω
S
,i, i = 1,...,n is calculated, denoted by Ys,1, … Ys,n. The Ω
S
,i is selected to assemble the pleural effusion area if its gray-scale is in the range of [Y
m
–3·Y
std
, Y
m
–2.5·Y
std
]. Then the origin area of pleural effusion
Two separated lines are used to divide the effusion area. We define the line with the top point of the spinal column as base line. Two separated lines are defined upon base line 15 and 30 pixels. Both of the lines are half wide of the image, as shown in Fig. 11c. From line 1, if the image can be divided into two parts by it, the upper part will be eliminated and the lower part will be selected as the new
If there were holes in the image domain, the mean gray-scale of the image within the holes are evaluated. And the hole will be filled while its intensity is in the range of [Y m –3·Y std , Y m –2.5·Y std ].
After all, the area of pleural effusion Ω E can be obtained, as shown in Fig. 11d.
Counting the number of pixel in Ω E , the volume of pleural effusion is quantified by the parameters of the scans. Figure 12 shows the segmentation of the pleural effusion.

The segmentation of pleural effusion.
An experienced radiologist manually contoured the pleural effusions on each CT scan using the Philips EBW 4.5.3.40140 image workstation. Based on the manual boundaries, volume of pleural effusion was calculated in milliliters and the resulted range of the effusion volume was 64 ml to 1475 ml, whereas the effusion volume (mean±standard) was 586 ml±339 ml. Meanwhile, the regression equation used here was designed by Martin Hazlinger, Filip Ctvrtlik, et al. [10], assessed the effusion volume, the effusion volume (mean±standard) was about 646 ml±455 ml. (Table 1 showed the conversing tabular recommended by Martin Hazlinger’s method. One may quantify the volume of pleural effusion basing on the thickness of the effusion, shown as in Fig. 13). Using BLL, the effusion volume (mean±standard) was 604 ml±352 ml. Comparing the results from the assessment, the volume of the pleural effusion segmented by our method was 101.8% ±4.6% of that segmented manually. The maximum error was 11.2% and the minimum error was –6.68%. The Dice coefficient of the segmentation between BLL and the manual one was 0.917±0.031. The volume of pleural effusion segmented by the regression equation was 118.9% ±94.4% of that segmented manually. The maximum error was 462.6%, and the minimum error was –35.3%. The details of the results are shown in Table 2.
Conversion of pleural effusion’s thickness to volume*
Conversion of pleural effusion’s thickness to volume*
*: Martin Hazlinger, Filip Ctvrtlik, et al. [10].

Assessment procedures designed by Hazlinger et al. d is the greatest depth of the effusion on a single CT scan.
The results of the pleural effusion volume
*: The greatest depth of the effusion is out of the evaluation range of recommended tabular. The effusion volume cannot be assessed.
The computer with Intel(R) Core(TM) i7-2600 was used for the calculations. The frequency of the CPU is 3.40 GHz and the memory is 8 G. It would spend no more than 8 second for calculating one CT scan. For one patient with 45 scans, the whole processing will be finished in almost 6 minutes.
The analytical results showed that the algorithm proposed in this study is a feasible way to assess the volume of pleural effusion. The algorithm can assess the volume of the pleural effusion effectively and precisely. In most of the tests, the volume error between BLL and the manual one is less than 10%.
In the published papers, the regression equations may imprecise because of insufficient sample space and the dispersion of the samples. Meanwhile, the pleural effusion images vary from patient to patient, the shape of effusion deformed irregularly (shown in Fig. 14) which is difficult to extract precise measurements for the equations. Therefore, additional error may occur. The existing (semi-)automatic methods also could not segment the image accurately, especially when the fluid amount is large and/or the patient having some other disease (e.g. pneumonia) at the same time. Thus, it is necessary to develop the new quantification algorithm for the pleural effusion calculation.

Images of the pleural effusion. The images of pleural effusion vary from patient to patient. It is then difficult to extract the measurement precisely. However, the algorithm in this paper can delineate their boundaries to evaluate the volume.
The images of pleural effusion vary from patient to patient. It is then difficult to extract the measurement precisely. However, the algorithm in this paper can delineate their boundaries to evaluate the volume.
In this study, we developed a novel semi-automatic algorithm BLL to assess the volume of pleural effusion. The algorithm is designed in two major steps: In the first step, the image within the inner chest wall was obtained by the B-spline method. In the second step, the region of pleural effusion was segmented by the LCLS method and obtained by the novel selecting and assembling criterion. Compared to existing methods, the volume of pleural effusion was calculated precisely by BLL. Moreover, the variation of the effusion volume was estimated within a period of time. So that physician(s) can assess patient’s new condition and adjust their medical treatment.
The limitations of our study consist of quantifying pleural effusion by several factors. First, in this study, authors believed that the CT scans were with good signal to noise ratio, because the physicians selected and detected the scans at the very beginning. As a result, scans with serious image problems which could not be detected had been dropped. However, in the everyday medical practice, CT scans may have different signal to noise levels and/or some “little” image problem. Authors did not consider these issues in this period of work. Thus, it should be completed in future. Second, this algorithm was semi-automatic and it still needed a manual input. It may lead some manual deviations. Therefore, it should be solved in following studies. In summary, the BLL algorithm developed and tested in this study can be applied in different areas to evaluate the volume of pneumothorax after several changes.
This study demonstrated the feasibility and advantages of applying a new semi-automatic algorithm namely, BLL, to segment the volume of pleural effusion on CT scans. This algorithm can also quantify the volume of pleural effusion precisely. It is widely applicable in patients with free pleural effusion.
Footnotes
Acknowledgments
This research is supported a Grant No.201402013 from National Health and Family Planning Commission of the People’s Republic of China.
