i
Static Segmentation of Thoracic Structures for the Quantification of
Pulmonary Aeration in 3D CT Images in presence of Acute Respiratory
Distress Syndrome
by
Juan Sebastián Torres González
Master Report
Master of Science in Systems and Computing Engineering
Presented to the Faculty of the Graduate School of
University de los Andes (Bogotá, Colombia)
and
The University Claude Bernard Lyon 1 (Lyon, France)
Supervisor: Marcela Hernández
Co-supervisor: Maciej Orkisz
ii
Table of Contents
List of Tables ... iii
List of Figures...iv
1. Introduction ...6
1.1 Clinical Context...6
1.2 Project Context ...9
1.2.1 Research teams ...9
1.2.2 Main Problematic ...10
1.2.3 Internship ...13
2. Related Work...14
2.1 Automatic lung segmentation in well-constrated images...15
2.2 Extraction of static structures in the thoracic region ...17
2.3 movement in the thoracic region ...17
3. Methodology...22
3.1 Automatic lung segmentation in well-constrasted images ...22
3.2 Rib cage segmentation...30
3.3 movement in the thoracic region ...32
4. Results ...36
4.1 Automatic lung segmentation in well contrasted images ...36
4.2 Rib cage segmentation...40
4.3 movement in the thoracic region ...41
5. Conclusions and Discussion ...43
iii
List of Tables
Table 1. Classification of lung aeration...7
Table 2. Voxel discrimination. ...16
Table 3. Description of Figure 17...29
iv
List of Figures
Figure 1. Different aeration regions of the lung. ...7
Figure 2. Comparison of CT pig images with different pressure conditions. ...8
Figure 3. Comparison of non-pathological and ARDS lung. ...8
Figure 4. Teamwork of CreaSDRA project...9
Figure 5. Mask of lung segmentation with TurtleSeg software. ...10
Figure 6. Cuevas’ method...11
Figure 7. Procedure of the main project. ...12
Figure 8. Structure of CreaSDRA project. ...14
Figure 9. Gray-level histograms between pig and human CT images...16
Figure 10. Respiratory Cycles, breathing mechanism. ...18
Figure 11. Lungs and ribs motion...19
Figure 12. Sliding motion discontinuity. ...20
Figure 13. The Motion Mask...21
Figure 14. Vandemeulebroucke’s method in poorly-contrast images. ...21
Figure 15. Schema of the method proposed for an automatic lung segmentation.23 Figure 16. Automatic lung segmentation method. ...25
Figure 17. Level set results for different parameters set up. ...28
Figure 18. Schema of the method proposed for a rib cage segmentation...30
Figure 19. Rib cage segmentation process. ...32
Figure 20. 2D ray tracing technique. ...33
Figure 21. Approximation of rib interior points to fill the intercostal space...35
Figure 22. Building the Motion Mask. ...36
v
Figure 24. Comparison between lung masks...38
Figure 25. Improvement of the automatic lung segmentation method...39
Figure 26. Automatic lung mask with the airways remove ...39
Figure 27. Rib cage segmentation results. ...41
1.
Introduction
This section presents the clinical and academic context in which the project was
developed. First, I describe what ARDS means and the importance of research on this
topic; second, I explain all the actors involved in the current project like universities,
research laboratories and their teams; finally, I explain the main problematic and the
context in which this internship was developed. In the second section of this work I
present the related work for the specific objectives for this internship. In the following
sections I present the proposed methods, its results and the conclusion and future work.
1.1CLINICAL CONTEXT
The Acute Respiratory Distress Syndrome (ARDS) is a severe pathology, in
most of the cases, followed by lung injuries such as edemas, intense lung
inflammations, hypoxemias and activation of alveoli’s coagulation.1 The syndrome
causes some alveoli to fill with fluid and/or swell preventing oxygen exchange. This
leads to low levels of oxygen in the blood, which can produce serious damages to other
organs of the body. The standard procedure to manage this syndrome is as follows: once the patient arrives to the emergency room, doctors evaluate the symptoms and take
a chest X-Ray to assess the severity of the injury. Then the patient is connected to a
mechanical ventilator with Positive Expiration Pressure (PEP) technique. Its parameters are set in function of the severity of the lesion and doctor’s expertise. However, a wrong
setup of the ventilator parameters can increase the injury and cause abnormally high
death rate.
The mortality rate of patients with ARDS varies from 10% to 90% [1], however
it can be estimated an average around of 40% [2]. In France, 5% of the entries in the
emergency room are due to ARDS, 40% is the mortality rate of these patients and 25% might avoid death with better setup of mechanical ventilator [3]. This high percentage is
one of the reasons that encourage the research in this particular syndrome with the main
purpose to reduce this rate and improve patients’ prognostic.
In this project, reanimation specialists are studying the physiopathological
behavior of the syndrome and the injuries produced by mechanical ventilators. As is not
possible to make experiments with real patients, they use an animal model. Pigs were
selected as the animal of study due to its similarity to humans anatomically and
physiologically in respiratory matters.
An acquisition protocol has been established to study the pigs under induced
ARDS. The animal is connected to a mechanical ventilator. Different levels of volume
and pressure (P/V) are set (pressures between 2 cmH2O and 18 cmH2O, volumes
between 2 cm3/Kg and 15 cm3/Kg). Then CT chest images are acquired in inspiration
and expiration cycles with the main purpose of identify and quantify the different lung
aeration classes, showed in Table 1 and Figure 1.
Class Over-aerated Normally-aerated Poorly-aerated Non-aerated
HU scale
characteristic -1000 à -900 -900 à -500 -500 à -100 -100 à +100
Table 1. Classification of lung aeration.
(a) (b)
Figure 1. Different aeration regions of the lung.
Image (a) shows the original image acquired in a low P/V condition, pressure of 4cmH2O with a constant volume of 6ml/Kg; (b) Shows the colors that represent the different aeration regions of the lung. Red is associated with over-‐aerated region; blue is normally-‐aerated; yellow is poorly-‐
aerated and green is non-‐aerated.
As a result of P/V combinations (variable pressure and constant volume, and vice versa), we will have some images where the lungs are well contrasted and,
consequently, the boundaries between surrounding structures are well defined (Figure
volume (approx. more than 8 cm3/Kg) are set. Also, we will have the opposite case
where lungs are poorly contrasted and their boundaries are not well defined (Figure 2b),
this occurs when the volume or pressure levels are below the mentioned limit. However,
they can change depending on the severity of the injury. These last images are very
similar to those found in patients with ARDS (Figure 3).
(a) (b)
Figure 2. Comparison of CT pig images with different pressure conditions.
Image (a) shows an image of a pig with high level of pressure, 18cmH2O; (b) shows the same pig as in (a) but with a low level of pressure, 2cmH2O. The red circle indicates the non-‐contrast effect
caused by a low P/V condition.
(a) (b)
The image in (a) shows a patient without ARDS while the image in (b) shows the same patient but with the syndrome. The red circle indicates the typical effect of poorly-‐contrast in the CT images
due to the syndrome.2
1.2PROJECT CONTEXT
1.2.1 Research teams
The project in which the present work is developed is conducted by Prof. Dr.
Claude Guerin and Dr. Jean-Christophe Richard members of the Reanimation Unit of
the Hospital of Croix-Rousse3 (Lyon, France), the Imaging of the Heart-Vessels-Lung
(ICVP)4 research team of the research laboratory CREATIS5 (Lyon, France) and the
research team Imagine6 of the University Los Andes (Bogotá, Colombia). Also, this
project is under the master’s double degree program between the Electric Engineering
department of the University Claude Bernard Lyon 1 (Lyon, France) and the Systems
Engineering department of University Los Andes (Bogotá, Colombia). In the Figure 4 the members of the teamwork are specified.
The main work field of the research teams mentioned above is the signal
processing and medical imaging with the goal of proposing innovative approaches in the pursuit of solutions for health issues.
Figure 4. Teamwork of CreaSDRA project.
2 These images were taken from the website of the Radiology RSNA Journal. URL: http://radiology.rsna.org/content/210/1/29.full
3 URL: http://www.chu-lyon.fr/web/Hopital_Croix_rousse_2279.html
4 ICVP research team of CREATIS. URL: http://www.creatis.insa-lyon.fr/site/fr/icvp 5 Creatis research laboratory. URL: www.creatis.insa-lyon.fr
1.2.2 Main Problematic
At this moment, doctors manually segment the lung in order to quantify the
aeration inside the lung (Figure 1). They use TurtleSeg7 as segmentation tool. This is
general-purpose interactive 3D segmentation software. It assists the user in tracing
contours in various image slices taking into account the gradient of the image. Then the
contours are automatically interpolated in 3D, creating a mask that contains the
segmented lung. The time of this procedure depends on how much detail is wanted, i.e.
a mask made carefully, takes approx. 2 hours. This is one of the disadvantages because
doctors don’t have much time to do this kind of tasks in their daily workflows, reason
why the doctors take approx. 30 minutes to make a mask. As a result, the masks traced
manually, have parts where there is no anatomical correspondence and when the image
doesn't have enough anatomical information (non-contrast image) is almost impossible
to trace the contours so the masks have sharp corners, holes and artifacts lacking of
anatomical sense (Figure 5). These mistakes introduce a lot of errors in the
quantification process.
Figure 5. Mask of lung segmentation with TurtleSeg software.
The image shows in red the manual mask using TurtleSeg. The arrows indicate the places where the mask presents mistakes: the not inclusion of some lung regions and the inclusion of some body
regions.
To improve this procedure it should be proposed an automatic method for lung
segmentation. There are a lot of papers related to cancer and nodules in the lungs but
specifically in ARDS there is not. One particular article [4], proposes automatic lung
segmentation in ARDS cases. The main workflow of this method is presented as
follows:
a) This method makes a preprocessing in which the noise and artifacts are reduced by a
simple median filter.
b) The body and aerated tissues are separated by thresholding where the body region is
extracted from the background and the lung (the aerated part) is extracted from the
body.
c) The airways are segmented by a threshold based region growing algorithm and
different sections are identified by a decision tree algorithm based on shape
parameters, the trachea is dismissed while segments belonging to the bronchi are
accepted.
d) Landmarks for each rib are obtained in the sagittal plane (Figure 6a), after that a 3D
interpolation between all the landmarks of all the ribs are made to define a contour
of the pleura at the dorsal region (Figure 6b).
e) The extracted part of the lung is extended from the lower border of the mask to the
dorsal pleura contour generating the lung segmentation (Figure 6c).
(a) (b) (c)
Figure 6. Cuevas’ method.
Image (a) shows the landmarks found in each rib, which are interpolated in order to find the blue contour in (b) which delimits the pleura at dorsal region; in (c) the final contour, shown in white,
Despite of the explanation of this method, the article lacks of critical information
for its implementation, for example how the lung mask is extended to the dorsal pleura
contour and what kind of 3D interpolation is used over the ribs landmarks.
Inspired by the previous method, the main project proposes a procedure for
quantifying lung aeration by an automatic lung segmentation given the image
information, if this is not enough, the missing information must be inferred. Taking into
consideration that we have all the image transition from well to poorly contrasted in
both respiratory cycles we propose the following procedure (Figure 8).
• In well contrasted images, the lung segmentation is obtained automatically.
• In other image conditions, the contrasted region of the lung is segmented. Additionally, the surrounding structures of the lung are extracted to deduce the
missing regions of the lung. These structures consist in the rib cage that works
like an envelope for the lung, the diaphragm and abdominal organs that delimits
the inferior part of the lung.
• The entire information is analyzed in order to obtain the lung segmentation and
the quantification of its aeration regions in any ventilation condition.
• Finally, the results are visualized and analyzed.
Boxes represent tasks. Arrows represent relationships/dependencies.
In the next section, the specific goals of this internship will be explained.
1.2.3 Internship
This internship is part of the project called CreaSDRA, whose members have
been presented in the section 1.2.1. A previous internship (made by Diana Ortega) was developed within the same project and was focused on the segmentation of bronchial
tree [4]. Additionally, there was a complementary project in which pulmonary vessels
were segmented [5]. There is also one ongoing PhD that is working on lung segmentation in any P/V condition by the registration approach8. All have been oriented
towards the main objective, already mentioned: segment the lung in order to quantify its
aeration at different P/V conditions in any respiratory cycle.
According to all previous, this internship has the purpose to help in the
achievement of the main objective. For this, the internship must be supported by the
work already done and should contribute to the doctoral thesis currently in progress. Taking this into account and based on the procedure of the main project (Figure 7), the
specific objectives of this internship are:
a) Obtain an initial lung mask automatically in the cases of well contrasted images. Also, segment automatically the feasible region of the lung in poorly contrasted
images.
b) Segment the thoracic static structures like the rib cage in poorly contrasted images. This segmentation will be used as anatomical point of reference and for the
extraction of a priori data.
c) Find in the thoracic region the structures that present a strong movement in the respiratory cycles in poorly contrasted images.
The Figure 8 shows how this internship fits into the CreaSDRA project and with
the teams involved (Figure 4).
8 The doctoral student is Alfredo Morales from the University of Los Andes (Bogotá, Colombia) and the University Claude Bernard Lyon 1 (Lyon, France).
Figure 8. Structure of CreaSDRA project.
Boxes represent the task or specific projects of CreaSDRA. Arrows represent
relationships/dependencies. Red boxes correspond to the tasks that I did during this internship. Initials in the upper right corner correspond to the name of the person in charged of that specific task/project, where: MD is the medical team; DO is Diana Ortega; AM is Alfredo Morales and JS is
Juan Sebastian Torres (my self).
In the next section, will be described the related work corresponding to the
specific objectives of this internship, previously mentioned.
2. Related Work
Thanks to the high resolution (sub millimeter measures) and the fast
acquisitions (complete chest image in a single breath hold), for the last 10 years the
computed tomography (CT) has become the principal method for acquisition of thorax
images. Because of this, there has been an increase in research on computer analysis of
thoracic CT scans [6]. This computer analysis consists usually in segmentation of the
bronchial tree (airways), pulmonary vessels and lung itself. Also, a large number of
Based on the objectives of this work, the related work will be divided in three
main sections: automatic lung segmentation methods in well contrasted images,
extraction of static structures in the thoracic region and movement in the thoracic
region.
2.1AUTOMATIC LUNG SEGMENTATION IN WELL-CONSTRATED IMAGES
As the lung is essentially filled of air, it has a low density on CT thorax images
and therefore appears as a dark region. This produces a great contrast between its
surrounding structures (Figure 2 in pigs and Figure 3 in humans). This difference is the
basis of the principal lung segmentation methods [6].
Representative methods of lung segmentation [7] [8] [9] [10] have similar
methodologies:
a) Voxel discrimination within the Hounsfield scale (Table 2) is made. Image
histograms between humans and pigs are very similar as we can see it in Figure 9,
so the same HU values can be used to process pig images. Then, with this
information the background is identified, for example in [7] they find an optimal
threshold value by finding the mean gray-level values corresponding to body and
non-body voxels and in [8] they find the threshold value by analyzing the shape of a
cumulative gray-level profile constructed with the pixels along the diagonal of the
section image.
b) Once the background is identified, usually a connected component analysis and
region-growing algorithm is used to extracts the thorax region and the main lung
volume, generally the lung is identified by size characteristics. After that a
morphological filters are used to fill unwanted “holes”, normally associated to
vessels in parenchyma.
c) Airway segmentation is obtained by 3D region-growing algorithm where the seed is
placed in the trachea (initial slices) and its stopping criterion is the volume
explosion (it means that the airways have merged into the lung-density lung tissue).
This method is already implemented in the project by [5].
d) Left and right lung separation. However, the lungs of pigs have a third lobe, which
e) Smoothing the mask to remove unwanted cavities (i.e., pulmonary vessels and
airways) using morphological operation.
HU value Description
-1024 to -900 Air and cavities fill with it, like the trachea, airways and lungs.
-900 to -200 Almost all the lung tissue.
-200 to 200 Body tissue like the chest wall, cavities fill with blood. Almost all except the bones.
200 to 1000 Bones.
Table 2. Voxel discrimination.
(a)
(b)
As it can be seen, there are not big differences in the discrimination of the HU values between the typical histogram of CT images of pigs (a) and the typical histogram of CT images of human images
in (b).
The method proposed in this work (section 3.1) is very influenced by these main
steps and by the method of [7].
Nevertheless, these automatic lung segmentation methods are not suitable
solutions with images that are poorly contrasted and/or don't have a well-defined border
between the lung and its surrounding structures [6].
2.2EXTRACTION OF STATIC STRUCTURES IN THE THORACIC REGION
In this work the static structure in the thoracic region of greater importance is
the rib cage, which consists of the ribs, spine and sternum. In the PhD work of the
project, the rib cage will be used as anatomical landmark and a basis of the extraction of
a priori information in a deformable registration method.
The articles found in the literature about the segmentation of the rib cage usually
include the segmentation and labeling of the ribs [11] [12] [13], which implies a more
complex method for segmenting the ribs.
For this reason, the method proposed in this work is simpler and focused in
segmentation of ribs. Segmentation of the spine and sternum will be part of the same
method.
2.3 MOVEMENT IN THE THORACIC REGION
The respiratory cycle is divided into two phases, the inspiration and expiration.
During the inspiration, the external intercostals muscles contracts and pull upward the
ribcage, at the same moment the diaphragm contracts and pulls downward, so the rib
cage and therefore the lungs expand. During the expiration, the diaphragm relaxes and
Figure 10. Respiratory Cycles, breathing mechanism.9
During these phases, the motion made by the lungs, diaphragm, rib cage (among
others), is independently with respect of each other. Lungs motion is grater than rib
cage motion, which produces an effect of sliding motion between them [14]. This effect
can be seen in the Figure 11 despite that the figure shows a registration of two images
of the same pig but with different P/V conditions.
9 Image taken from: The Biology Corner. Anatomy: Respiratory System. URL: http://www.biologycorner.com/anatomy/respiratory/notes_respiratory_system.html
Figure 11. Lungs and ribs motion.
Image shows the registration of two images of the same pig but with different P/V conditions: green image corresponds to P1 = 4cmH2O; purple image corresponds to P2 = 18cmH2O; gray color
correspond to common areas between the two images. The yellow arrows indicate the motion of the lung and the light green arrows indicates the motion of the ribs. The same effect can be seen in
respiratory cycle, where the lung motion is greater than the one in the ribs.
If each voxel of the image is associated a vector representing its movement, lung
vectors will have greater magnitude than those of the ribs, which creates a discontinuity
in the motion field (Figure 12).
Moreover, deformable registration aims to find a transformation that minimizes
a similarity measure between two images. This transformation must be smooth implying
a sense of continuity. In this case, the sliding motion becomes a problem due to its
Figure 12. Sliding motion discontinuity.
In the image we can see the blue arrows as vectors associated with the motion of the structures. If the arrows of the lungs and the ribs are compared at the red line, a great difference in magnitude will be seen in the interface of the these structures, which creates the discontinuity of the motion
field.10
To resolve this problem, [14] proposes to separate all the structures having the
sliding motion problem in the thorax image, grouping them into two regions: moving
structures (lungs, mediastinum and abdomen) and less-moving ones (the remainder).
This segmentation is called Motion Mask (Figure 13).
The segmentation proposed by [14] is based on level-set framework which
initially requires the patient body segmentation, obtained by thresholding and connected
component analysis; the bony anatomy, which is obtained from a rib cage segmentation;
and the lung segmentation, obtained by a method based on [15]. All these masks
determine the evolution of the level set, imposing restrictions on the shape and image
information.
Figure 13. The Motion Mask.
The Motion Mask separates the thorax images into moving structures (lungs, mediastinum and abdomen, region in white) and less-‐moving ones (the remainder).11
This method was tested in the case of poorly contrasted images. The results are
shown in the Figure 14. The blue circles in the three images show that the Motion Mask
(in red) included less-motion structures. The lower circle indicates a strange leakage at
the bottom of the image. This errors may be due to full segmentation of the lung is not
possible (in poorly contrasted images), which affects the final aspect of the Motion
Mask, as it is sensitive to the quality of the segmentation mask of the lung [14].
(a) (b) (c)
Figure 14. Vandemeulebroucke’s method in poorly-contrast images.
Motion Mask in red is superposed to the original image. Circles in blue indicate where the Motion Mask presents errors by including less-‐moving structures.
The idea of using this mask for this project is to define the movement of those
structures that are observed in poorly contrasted images to help define the movement of
structures that are not visible (such as the diaphragm) and to identify non-visible parts
of lung. The use of this mask is part of the Alfredo’s doctoral thesis.
11 The figure was taken from [14].
In this paper we propose a different approach to the calculation of the Motion
Mask presented here (section 3.3).
To summarize this section, this paper focuses on proposing methods that provide
the most information that then will be used by a method based on the deformable
registration to suggest a segmentation of lung images well or poorly contrasted. These
methods correspond to the red boxes in the main workflow shown in the Figure 8. In
well-contrasted images, a method for automated segmentation of the lung is proposed
(based on [4]). In poorly contrasted images, a method of segmentation of the rib cage is
proposed (simple method without labeling the ribs), and generating a motion mask
independent on the contrast of the ROI is proposed (based on [14]), to avoid errors in
the deformable registration, due to motion discontinuities structures thoracic region.
3. Methodology
3.1AUTOMATIC LUNG SEGMENTATION IN WELL-CONSTRASTED IMAGES
As it was said in the section 2.1, the method proposed in this work for an
automated segmentation of the lung in well contrasted images is based on the main
common steps found in the literature and the main process of [7], one of the most used.
The main idea is to have an automated mask and more accurate than manual.
Also, in order to compare with these manual masks, the envelop of the lung should be
segmented, this means that vessels and airways should be part of the mask. Anyhow, for
the quantification of the aeration, the option of removing the airways should be
available.
Figure 15. Schema of the method proposed for an automatic lung segmentation.
The arrows indicate the differences between the images in each step of the method.
a) An analysis of the histogram (considering the Table 2 and Figure 9a) has been made
to set the best HU value to divide the image into aerated and non-aerated voxels.
The HU value chosen was T = -200 HU (Figure 16a).
b) To remove the background, a connected threshold region-growing algorithm is used.
Four seed points were automatically placed, one on each corner of the first axial
slice. Normally, one seed in one corner might be enough, but as it can be seen in the
Figure 16b, the table where the pig lies divides the background in more than one
connected component.
c) To extract the lung from the other structures of the image, a 3D connected
component analysis is made. The biggest connected component (should be the lung)
is kept, the others are removed (set to 0), as it’s shown in the Figure 16d.
d) Until now the resulting mask has larger pulmonary vessels Figure 16e. To remove
these vessels a 2D slice-by-slice morphological filling hole strategy is used Figure
16f. To ensure that there is no leakage in this strategy a closing operation is
performed (the size of the structuring element is chosen to attach the closest regions,
about 1mm).
e) Finally, the trachea and airways (segmented by [4]) are removed from the mask
Figure 16g and Figure 16h. To achieve this, the airways mask is dilated because it
followed by an arithmetic operation (subtraction) between the two masks (lung and
airways) is enough to remove the airways and detach the trachea from the lung. To
remove the remaining regions of the trachea and principal airways separated from
the lung, an opening operation is performed.
(a) (b)
(c) (d)
(g) (h)
Figure 16. Automatic lung segmentation method.
(a) Original image; (b) thresholding with T = -‐200 HU; (c) removing background with growing region; (d) extracting the lung with 3D connected component analysis; (e) morphological filling hole in 2D to remove vessels; (f) lung segmentation; (g) lung segmentation without airways; (h) 3D
visualization of the mask without airways.
However, The mask obtained from the method until this point present some
small mistakes, as it can be seen in the Figure 24: portions of the mask overlap some
borders of the ribs and non-lung structures. Although this overlapping occurs in very
small parts, it happens in many places along the volume (in all pigs). These mask are
used in deformable registration methods, so these mistakes introduce a considerable
error in the registration.
Until this point, in the steps where morphological operations are performed no
image information is taken into account to generate the lung mask, reason why the
overlapping occurs. To improve it, this information has to be considered.
As it has been exposed, the problem occurs just in the borders of the current
mask. One possible solution should take into account the image information around the
mask's border. This kind of solution guides us to think in Active Contours methods. So
a local level set method (implemented by Shawn Lankton12 and based on a Chan-Vese
energy function) is implemented [ [16]]. The following equations show the general
expressions of this method.
(1)
(2)
12 http://www.shawnlankton.com/2009/04/sfm-and-active-contours/
€
E(φ,µin,µout)= δ(φ(x ! ))
Ω
∫
β(x ! ,y ! )ECVdy d! x !Ω
∫
ECV =(I−µin)2
+(I−µout)
The first term of the equation (1) allows you to select the pixels belonging to the
contour; the second term calculates the data within a neighborhood centered at each
point belonging to the contour. The equation (2) represents the expression of Chan-Vese
energy function.
The modified parameters to set up the level-set method are: restriction on the
curvature of the contour after each evolution of the level-set (values between 0 and 1
where 1 have the major restriction of curvature), the radius of the local region to be
analyzed (in pixels or voxels) and the number of iterations for convergence.
The main reason for choosing this method is to perform an analysis of the gray
level on the edge of the lung, so the mask would be adjusted to the information of the
image.
The inputs of this method are: the original image and the current mask as
initialization (very close to the wanted one, because it's known that a good initialization
is very important to active contours methods). The following figure shows the tests
done to obtain the best parameters of the level set method (number of iterations, curve
smoothness and local radius).
(d) (e) (f)
(g) (h)
(k) (l) (m)
Figure 17. Level set results for different parameters set up.
Pig Iterations Smoothness Curve Local Ball Radius Image Description
1 250 0.9 10 (a)
It can be seen that the red mask overlaps a small part of the ribs, however this red mask reaches the frontal corners of the lung but not the blue one (the overlapping
between the two mask is presented in purple). Also, there are some regions added by the blue mask near the trachea. 1 250 0.9 5 (b) Related to the last image, the blue part of the mask near the trachea has disappeared.
1 250 0.9 30 (c)
Related to the last two images, all the blue parts added by the blue mask have disappeared. This means that the blue mask is better adjusted to the data of the image. We can infer that bigger the radius
of the local analysis of the energy, more information about the regions would be so it can be possible to adjust better the mask
to the data.
1 250 0.2 10 (d), (e)
In (d) it can be seen that having a low smoothness parameter (not so restrictive) the mask can reach at the pointed corners in comparison with image 1 (all the other parameters are the same between these two images). Also, this obtained mask is more adjusted to the data than image 1. In
(e) the issues around the gastric sonde. The level set mask contains this part but not the lung segmentation. However, apart
of this, the mask fits well all along the other slices.
1 250 0.2 10 (f)
In general, the level set mask fits well the lung along the volume but near the trachea the mask presents an error (the local radius is bigger and the smoothness parameter, as
it is set, permits more flexibility to the contour letting deform enough the initial mask to include some adjacent structures).
5 250 0.9 10 (g), (h)
(g) This and the image below correspond to pig 05. The level set setup is the same as in image 1. This image shows some differences around the principal bronchi.
However, all the structures in the blue mask are structures that present a strong movement. Along the entire volume the
mask fits well the lung information. (h) Here it is shown some issues around
the gastric sonde. Apart of this, as we already said, along all the volume the
mask fit well.
5 250 0.5/0.9 15 (i), (j)
(a) Blue mask: 250 iterations, 0.5 smoothness, 15 radius; (b) red mask: 250 iterations, 0.9 smoothness, 15 radius. Notice the differences at the corners of the
lung and near the trachea.
17 250 0.3/0.5/0.9 15 (k), (l), (m)
(a) Blue mask: 250 iterations, 0.3 smoothness, 15 radius; (b) red mask:
250 iterations, 0.5 smoothness, 15 radius; (c) green mask: 250 iterations,
0.7 smoothness, 15 radius. Notice the differences at the corners of the lung
and near the trachea between the three images.
Table 3. Description of Figure 17.
Based on the results shown in the figure above, it can observed that is very
difficult to find the correct setup of the level set method to segment completely the lung
(reach the corners and hard curvatures). However, this method improves the automatic
lung segmentation method because it doesn’t contains any rib structure and other
non-lung structure in the obtained mask.
By the other hand, it is necessary to improve this level set mask so we can
segment completely the lung. To do this, this mask can be taken as an input of a region
growing method to grow until the gray level is low enough. Based on the
characterization of the aeration (Table 1), the limit values for the region to grow are set
between -1024 HU and -400 HU.
The results of this method (with and without the level set and growing region
3.2RIB CAGE SEGMENTATION
As stated in section 2.2, the following method related to the segmentation of the
rib cage is simpler with respect to literature because it doesn’t require labeling. The
method proposed is described as follows:
Figure 18. Schema of the method proposed for a rib cage segmentation.
a) An analysis of the histogram (considering the Table 2 and the Figure 9) has been
made to set the best HU value that separates the high-density tissues as bones from
others. The threshold value is T = +200 HU (Figure 19b).
b) The ribs and the spine are attached by a closing operation. The structuring element
size is chosen in function of the space between the ribs and the vertebras, about
3mm (Figure 19d).
c) To find a point on the spine (which is a seed point for a threshold-base region
growing algorithm), the nearest “white” region is searched from the point of the
Carina (in the axial slice) towards the bottom of the image. This point is
interactively provided by the user or deduced from the bronchi segmentation.
d) Sometimes the pig is tilted on the table as it’s shown in the Figure 19a. Therefore,
with the points of the Carina and spine, a line of search is established to find the
direction, like a wave front) that grows as it approaches the sternum, until this one is
found (Figure 19f).
e) The points found in (c) and (d) serve as seed points of a threshold-base
region-growing algorithm.
f) Because the bone tissue at the center has lower density (bone marrow) than near the
surface, is necessary to make a closing operation and then a 3D hole-filling strategy
to have a correctly segmentation.
(a) (b)
(e) (f)
Figure 19. Rib cage segmentation process.
(a) Original image where the point of the Carina is indicated (this point is located in the tracheal bifurcation, where the main bronchi unfold); (b) thresholding step with T = +200 HU; (c) shows the
space between the ribs and the spine and (d) the result of attaching operation by morphology; (e) how the spine point is obtained and (f) how the sternum point is obtained.
The result of this method is explained in the section 4.2.
3.3 MOVEMENT IN THE THORACIC REGION
As stated in section 2.4 the method proposed in this part has the objective to
divide the thoracic region as [14] does it, to build its Motion Mask but in poorly
contrasted images. To accomplish this, it’s necessary to find the dorsal border of the
lung. The method is inspired by [9] (already described in the section 1.2.2), where
anatomical information (rib cage) is used to infer this border despite the lack of data.
a) With the rib cage mask, the spine point and sternum point obtained in the previous
section, a central point is defined from which a ray-tracing strategy is implemented.
The rays are launched from this point radially along all 360 degrees each 1 degree
(this step value was experimentally set) in an axial cross section. Along the ray is
sought the first intersection with a “white” region, the rib cage (Figure 22a). This
operation is repeated slice by slice (axial slices) all over the volume. As final result,
we have a cloud points that represent the internal points of the rib cage (Figure
(a) (b)
(c)
Figure 20. 2D ray tracing technique.
Slice-‐by –slice (axial) technique to find the interior points of the ribs. In (a) a schema explaining the technique; in (b) is shown the resulting points (in blue) in a axial slice; in (c) it can be seen some
points (in red) in a 3D view with the rib cage superposed.
b) To deduce the information of the dorsal border of the lung and the intercostal space.
The Figure 21a shows the points found in red and the ribs. Here, we can clearly see
that the intercostal space is empty. An approximation between the points in radial planes is performed (Figure 21b). This approximation is performed by B-Spline
curves [17]. The eq.1 shows the general expression of B-Splines.
C(u)= Ni,p(u)Pi
i=0 n
Where
€
C(u) is the B-Spline curve,
€
Ni,p(u) are the basis functions,
€
p is the B-Spline
degree,
€
n is the total number of control points,
€
Pi are the control points and
€
u is the
parametrical variable.
In this case, the B-Splines approximately fit the points previously found. This raises
a problem of curve fitting, which can be expressed as linear optimization problem. The main idea is to find the control points
€
Pi that minimize the root mean squared
error (RMSE) between the B-Splines and the current points.
The number of control points and the degree of the B-Splines are set experimentally (best combination is
€
n = 25 and
€
p = 3).
As it was previously said, the 2D approximation is performed in the radial planes
with the points found by the ray-tracing technique. The results of this approximation
can be seen in the Figure 21c (the approximated points are in red and as it can be
seen, there’s no empty intercostal space). To fill the space entirely, the same process
is done but now in axial planes where the points to fit are the ones found by the
previous approximation. The Figure 21d shows the schema of this process and
Figure 22e-f show the results.
(d) (e) (f)
Figure 21. Approximation of the points inside the ribs to fill the intercostal space.
(a) interioir rib points (red) obtained by the ray-‐tracing technique; (b) schema of how approximation to these last points is made in radial planes; (c) points obtained applying the schema
in (b); (d) schema of how approximation to the obtained points is made in axial planes; (e) and (f) shows the results of this procedure.
c) Once the intercostal space is filled with points and the dorsal border of the lung is
traced by the “axial B-Splines” (Figure 22a,c), the motion mask is created. In the
abdominal area, where there is no sternum (like in the Figure 22a-b), the 2D contour
is opened and it is extended in a straight line (considering the direction established
by the spine and sternum point) until the border of the image (Figure 22b).
Otherwise, the contour is closed and there is no extension (Figure 22d). All the
pixels that are inside of the "contour" are labeled as part of the motion mask (Figure
22b,d).
d) Finally, a binary operation (AND) is made between the motion mask and the body
mask. A preprocessing is needed in order to obtain this last mask. This can be
derived from the method proposed in the section 3.1 (step b) by taking the image
with the background removed and executing a 3D morphological filling-hole
(a) (b) (c) (d)
(e) (f) (g)
Figure 22. Building the Motion Mask.
(a-‐d) shows the contour obtained and its generated masks; in the image (e) the blue body mask; in (f) the motion mask (yellow) in a preliminary step, the red circle indicates the extension of the mask until the border of the image, like in (b); in (g) the final motion mask (yellow). In the images
(e-‐g) the original image is superposed;
The results of this method are presented in the section 4.3.
4. Results
Due to the imaging protocol developed in this project, we have approximately
480 images (14 pigs*17 P/V conditions*2 respiratory cycles). The images were
acquired by a CT Siemens Biograph 64, with image resolution around 0.5x0.5x0.7
mm3. Most of the analyses made in this project were qualitative and tested in several
images.
4.1AUTOMATIC LUNG SEGMENTATION IN WELL CONTRASTED IMAGES
Once the current method was executed in all images with the highest-pressure
condition (a total of 16 volumes, one per pig), some of the images in some pigs (a total
is lying (at the lower part of the image), called here “bed”. According to the current
process (based on the placement of 4 seed points on each corner to remove the
background and later, the connected component analysis where the biggest connected
component is taken), the lung is not segmented but the bed is (Figure 23). This happens
because, in these cases, the bed is the biggest connected component in the image.
Figure 23. “Bed” segmentation problem.
In this image it can be observe that the “bed” is segmented (blue part of the image) instead of the pig’s lung.
Respecting the lung mask results, some of the manual masks made in this
project have errors with respect to the ideal segmentation. The errors are easily
identifiable. For this reason, qualitative analysis was performed between the manual
mask and the masks obtained by the method proposed in this work.
The Figure 24 show the errors in the manual mask where aerated regions are not
included while the mask resulting from the automated segmentation does it (yellow
arrows). Similarly, the red arrows show when the manual mask includes body tissue
that is not part of the lung while our mask does not include it. However, in
poorly-contrast regions like the ones indicated by the blue arrows, our mask fails not including
lung tissue while the manual mask includes it. This shows the sensitivity of our method
(a) (b) (c)
(d) (e) (f)
Figure 24. Comparison between lung masks.
In the images the yellow arrows indicate the errors in the manual mask where aerated regions are not included; the red arrows indicate when the manual mask includes body tissue; blue arrows
indicate the place where the automatic mask not includes lung tissue.
The next figure shows how the mask in Figure 24 is improved with level set and
growing region methods, considering the image information so all the lung is
segmented. It can be notice that the method proposed generates a mask that fits very
well to the lung, reaching pointy sides and not including non-lung voxels. However, this
method segments the esophagus in almost all processed images, because in some slices
of the volume, the mask automatically obtained contains the esophagus, so the
region-growing algorithm segments it, as it can be seen in (b) and (f) (small region
disconnected from the lung and near the trachea). Nevertheless, the results of the mask
(a) (b) (c)
Figure 25. Improvement of the automatic segmentation of the lung method.
Image (a) shows in blue the lung mask obtained by the automatic method proposed without any improvement; (b) in yellow the level set mask with parameters 250 iterations, 0.9 smoothness and
10 radius; (c) in red the improvement region growing mask. The images are from the pig 05 in maximum pressure condition. Notice the upper corners of the lung and the borders along the lung; the improvement obtained can be seen in (c). However, the esophagus appears as part of the mask
in (c).
As it was stated in the section 3.1, additionally to the segmentation of the lung
envelope for comparative purposes, it is also important to remove the respiratory
airways for purposes of quantifying the aeration. However the option of removing them is up to the experts. The Figure 26, the automatic lung mask is shown with the airways
removed.
(a) (b) (c)
(a) and (b) shows the automatic lung mask in blue without the airways; (c) shows a 3D view of this mask.
4.2RIB CAGE SEGMENTATION
Qualitative analysis was performed as ground truth reference was missing.
Anyhow, the point of this method is the segmentation of all the ribs of pigs. Therefore,
the method is tested in 3 different ventilation conditions in four different pigs. These conditions represent images from poorly contrast to well contrast. The Table 4 and
Figure 27 show the results of the evaluation.
Pig/Condition [P]=cmH2O [V] = cm3/Kg
Condition 1 [P]=cmH2O [V] = cm3/Kg
Condition 2 [P]=cmH2O [V] = cm3/Kg
Condition 3 [P]=cmH2O [V] = cm3/Kg
Results
Pig 4163 V = 5
Inspiration P = 2
Inspiration P = 10
Inspiration, P = 18
All ribs were segmented but in
Condition 1, food from the
stomach were included in the mask
Pig 4277 V = 5
Expiration P = 2
Expiration P = 12
Expiration P = 18
All ribs were segmented
Pig 4443 P = 8
Expiration V = 4
Expiration V = 8
Expiration V = 15
All ribs were segmented
Pig 4610 V = 5
Expiration P = 4
Expiration P = 12
Expiration P = 18
All ribs were segmented
Table 4. Results of the rib cage segmentation.
Given the previous results, we can infer that for all of conditions and for all pigs
this method works. However, the Pig 4163, on the condition that represents
poorly-contrast image, in the segmentation was included a portion of undigested food because
the lower ribs are very near to the stomach. This should be taken into account in the
(a) (b) (c) (d)
(e) (f)
Figure 27. Rib cage segmentation results.
Image in (a) shows the results of the rib cage segmentation in the pig 4610 in inspiration phase with 18cmH2O of pressure; (b) the pig 4610 in expiration phase with 4cmH2O of pressure; (c) the
pig 4277 in expiration phase with 2cmH2O of pressure; (d) the pig 4443 in expiration phase with 4cm/Kg of volume; (e-‐f) the pig 4163 in inspiration phase with 2cmH2O of pressure, in this case the
red arrows show the portion of food attached to the ribs by the segmentation.
4.3 MOVEMENT IN THE THORACIC REGION
A qualitative analysis has been made in order to validate the motion mask
As it has already shown in the section 2.3, the motion mask of [14] (executable
software was obtained from CREATIS’ software VV13) includes less-motion structures
(Figure 14). In the Figure 28 we can observe that the method proposed in this work
doesn’t include less-moving structures. However, the blue arrows in the Figure 28
indicate that in some cases our mask includes some small portions of the intercostal
space or body tissue (at the level of the sternum), also purples arrows indicate portions
of bone included. This is caused by not take into account the image information during
the approximation step to define the contours. An evolution of the contours with image
information constraints must be integrated in future work. Therefore, to adjust the mask
to the image information (i.e. the gradients) a deformable model could be used. The
current mask could be used as an initialization of the model, knowing that this is one of
the greatest difficulties on this topic.
(a) (b) (c) (d)
(d) (e)
Figure 28. Motion Mask improvements and errors.
Images (a) to (d) shows the motion mask obtained by the method proposed in this work. Arrows indicates the errors found; blue arrows show the places where body and intercostal tissue is
included in the mask; purple arrows shows where small portions of the bones are also included. Images (d) and (e) shows a 3D reconstruction of the mask.
5. Conclusions and Discussion
In this work, an automatic method for lung segmentation in CT images of pigs was presented. The input images of this method were always well contrasted.
Additionally, a qualitative comparison between manual segmentation using TurtleSeg
software and the segmentation through the proposed method were carried out, the latter showing an improvement on the accuracy.
Also a segmentation method of the rib cage was proposed which is independent
of the lack of contrast inside the lung and has only one input: the point of the Carina. This method was successfully tested in different pigs with different P/V conditions.
However, in a low P/V condition of the pig 4163 a portion of undigested food was
included in the result mask (ribs near the stomach).
Finally, a method based in [9] [14] that separates the thorax into two structures:
motion structures (like the lungs, diaphragm and liver) and less-motion structures (ribs,
for example) in poorly contrasted images was proposed. This mask not includes less-motion structures as seen in the method of [14]. However, there are some small regions
that should not be in the mask like small portions of bone and body tissue.
The future work could include a quantitative evaluation of the automatic lung segmentation method proposed. This could be realized by taking as reference masks the
ones generated in the PhD work of this project.
Related to the segmentation method of the rib cage, this method must be totally automated by finding the point of the Carina. Also, this method should be more robust
in the cases where artifacts appear near the rib cage.
Finally, the method proposed in this project to build a Motion Mask, should be improved by taking into account constrains of the image as intensity values, shapes,
References
[1] A. Artigas, K.L. Brigham, J. Carlet, K. Falke, L. Hudson, M. Lamy, J.R. LeGall, A. Morris, R. Spragg G.R. Bernard, "Report of the American-‐European consensus conference on ARDS: definitions, mechanisms, relevant outcomes and clinical trial coordination. The Consensus Committee.," Intensive Care Med, vol. 20, no. 3, pp. 225-‐232, 1994.
[2] Foundation ARDS. Facts about ARDS Acute Respiratory Distress Syndrome. [Online]. http://www.ardsusa.org/facts.htm
[3] C. Brun-‐Buisson et al., "Epidemiology and outcome of acute lung injury in european intensive care units," Intensive Care Medicine, vol. 30, pp. 51-‐61, 2004.
[4] L. Cuevas, P. Spieth, A. Carvalho, and M. & Koch, E. Abreu, "Automatic Lung Segmentation of Helical-‐CT Scans in Experimental Induced Lung Injury," in
4th European Conference of the International Federation for Medical and Biological Engineering, vol. 22, Antwerp, Belgium, 2008, pp. 764–767.
[5] D.C. Ortega, "Airway Tree Segmentation Based on CT Images of Patients with Acute Respiratory Distress Syndrome (ARDS) ," Universidad de Los Andes; Université Claude Bernard Lyon 1, Lyon, France, Master's Degree 2012. [6] J.-‐C. Prieto et al., "Segmentation of the pulmonary vascular tree," in 2012
XXXVIII Conferencia Latinoamericana En Informatica (CLEI), Medellin, Colombia, 2012, pp. 1-‐7.
[7] I. Sluimer, A. Schilham, M. Prokop, and B. van Ginneken, "Computer Analysis of Computed Tomography Scans of the Lung: A Survey," IEEE Transactions on Biomedical Imaging, vol. 25, no. 4, pp. 385-‐405, 2006.
[8] S. Hu, Eric A. Hoffman, and Joseph M. Reinhardt, "Automatic Lung
Segmentation for Accurate Quantitation of Volumetric X-‐Ray CT Images,"
IEEE Transactions on Medical Imaging, vol. 20, no. 6, pp. 490-‐498, 2001. [9] S.G. Armato III and H. MacMahon, "Automated lung segmentation and
computer-‐aided diagnosis for thoracic CT scans," in International Congress Series, vol. 1253, London, UK, 2003, pp. 077-‐982.
[10] A. Silva, B. S. Ferreira, C. Silva, J. S. Santos, "Fast Pulmonary Contour
Extraction in X-‐ray CT Images: A Methodology and Quality Assessment," in
Medical Imaging 2001: Physiology and Function from Multidimensional Images, vol. 4321, San Diego, CA, 2001, pp. 216-‐224.
[11] T. Klinder, C. Lorenz, J. Von Berg, S. P. M. Dries, and T. & Ostermann, J. Bülow, "Automated model-‐based rib cage segmentation and labeling in CT images," in Proceedings of the 10th international conference on Medical image
computing and computer-assisted intervention, 2007, pp. 195-‐202.
[12] J. Staal and B. & Viergever, M. A. van Ginneken, "Automatic rib segmentation and labeling in computed tomography scans using a general framework for detection, recognition and segmentation of objects in volumetric data,"
Medical Image Analysis, vol. 11, no. 1, pp. 35-‐46, 2007.
[13] H. Shen, L. Liang, and M. S. & Qing, S. 0001, "Tracing Based Segmentation for the Labeling of Individual Rib Structures in Chest CT Volume Data," in MICCAI
(2), 2004, pp. 967-‐974.
[14] J. Vandemeulebroucke, O. Bernard, S. Rit, J. Kybic, and P. & Sarrut, D. Clarysse, "Automated segmentation of a motion mask to preserve sliding motion in deformable registration of thoracic CT," Med Phys, vol. 39, no. 2, pp. 1006-‐ 1015, Feb 2012.
[15] E. M. van Rikxoort, B. deHoop, M. A. Viergever, M. Prokop, and B. van Ginneken, "Automatic lung segmentation from thoracic computed tomog-‐ raphy scans using a hybrid approach with error detection ," Med. Phys., vol. 36, no. 7, pp. 2934-‐2947, 2009.
[16] Shawn Lankton. (2009, July) Sparse Field Active Contours, Shawn Lankton Online. [Online]. http://www.shawnlankton.com/2009/04/sfm-‐and-‐active-‐ contours/
[17] L. Piegl, T. Wayne, The NURBS book, 2nd ed. New York, NY, USA: Springer-‐ Verlag New York, Inc., 1997.
[18] D. Rueckert et al., "Nonrigid Registration Using Free-‐Form Deformations: Application to Breast MR Images," IEEE Transactions on Medical Imaging, vol. 18, no. 8, pp. 712-‐721, 1999.