• No results found

Liver Tumor Segmentation Using Level Sets and Region Growing

N/A
N/A
Protected

Academic year: 2021

Share "Liver Tumor Segmentation Using Level Sets and Region Growing"

Copied!
82
0
0

Loading.... (view fulltext now)

Full text

(1)

Institutionen för systemteknik

Department of Electrical Engineering

Examensarbete

Liver Tumor Segmentation Using Level Sets and

Region Growing

Examensarbete utfört i Datorseende vid Tekniska högskolan vid Linköpings universitet

av

Viola Thomasson LiTH-ISY-EX--11/4485--SE

Linköping 2011

Department of Electrical Engineering Linköpings tekniska högskola

Linköpings universitet Linköpings universitet

(2)
(3)

Liver Tumor Segmentation Using Level Sets and

Region Growing

Examensarbete utfört i Datorseende

vid Tekniska högskolan i Linköping

av

Viola Thomasson LiTH-ISY-EX--11/4485--SE Handledare: Kristian Köpsén Sectra Imtec AB Maria Magnusson

Datorseende, isy, Linköpings universitet Examinator: Michael Felsberg

Datorseende, isy, Linköpings universitet Linköping, 13 June, 2011

(4)
(5)

Avdelning, Institution

Division, Department

Division of Computer Visionl Department of Electrical Engineering Linköpings universitet

SE-581 83 Linköping, Sweden

Datum Date 2011-06-13 Språk Language  Svenska/Swedish  Engelska/English   Rapporttyp Report category  Licentiatavhandling  Examensarbete  C-uppsats  D-uppsats  Övrig rapport  

URL för elektronisk version

http://www.control.isy.liu.se http://www.ep.liu.se ISBNISRN LiTH-ISY-EX--11/4485--SE

Serietitel och serienummer

Title of series, numbering

ISSN

Titel

Title

Levertumörsegmentering Baserad på Level Set och Region Growing Liver Tumor Segmentation Using Level Sets and Region Growing

Författare

Author

Viola Thomasson

Sammanfattning

Abstract

Medical imaging is an important tool for diagnosis and treatment planning to-day. However as the demand for efficiency increases at the same time as the data volumes grow immensely, the need for computer assisted analysis, such as image segmentation, to help and guide the practitioner increases.

Medical image segmentation could be used for various different tasks, the local-ization and delineation of pathologies such as cancer tumors is just one example. Numerous problems with noise and image artifacts in the generated images make the segmentation a difficult task, and the developer is forced to choose between speed and performance. In clinical practise, however, this is impossible as both speed and performance are crucial. One solution to this problem might be to in-volve the user more in the segmentation, using interactivite algorithms where the user might influence the segmentation for an improved result.

This thesis has concentrated on finding a fast and interactive segmentation method for liver tumor segmentation. Various different methods were explored, and a few were chosen for implementation and further development. Two methods appeared to be the most promising, Bayesian Region Growing (BRG) and Level Set. An interactive Level Set algorithm emerged as the best alternative for the interactivity of the algorithm, and could be used in combination with both BRG and Level Set.

A new data term based on a probability model instead of image edges was also explored for the Level Set-method, and proved to be more promising than the original one. The probability based Level Set and the BRG method both provided good quality results, but the fastest of the two was the BRG-method, which could segment a tumor present in 25 CT image slices in less than 10 seconds when implemented in Matlab and mex-C++ code on an ACPI x64-based PC with two 2.4 GHz Intel(R) Core(TM) 2CPU and 8 GB RAM memory. The interactive Level Set could be succesfully used as an interactive addition to the automatic method, but its usefulness was somewhat reduced by its slow processing time ( 1.5 s/slice) and the relative complexity of the needed user interactions.

Nyckelord

(6)
(7)

Abstract

Medical imaging is an important tool for diagnosis and treatment planning today. However as the demand for efficiency increases at the same time as the data volumes grow immensely, the need for computer assisted analysis, such as image segmentation, to help and guide the practitioner increases.

Medical image segmentation could be used for various different tasks, the local-ization and delineation of pathologies such as cancer tumors is just one example. Numerous problems with noise and image artifacts in the generated images make the segmentation a difficult task, and the developer is forced to choose between speed and performance. In clinical practise, however, this is impossible as both speed and performance are crucial. One solution to this problem might be to in-volve the user more in the segmentation, using interactivite algorithms where the user might influence the segmentation for an improved result.

This thesis has concentrated on finding a fast and interactive segmentation method for liver tumor segmentation. Various different methods were explored, and a few were chosen for implementation and further development. Two methods appeared to be the most promising, Bayesian Region Growing (BRG) and Level Set. An interactive Level Set algorithm emerged as the best alternative for the interactivity of the algorithm, and could be used in combination with both BRG and Level Set.

A new data term based on a probability model instead of image edges was also explored for the Level Set-method, and proved to be more promising than the original one. The probability based Level Set and the BRG method both provided good quality results, but the fastest of the two was the BRG-method, which could segment a tumor present in 25 CT image slices in less than 10 seconds when implemented in Matlab and mex-C++ code on an ACPI x64-based PC with two 2.4 GHz Intel(R) Core(TM) 2CPU and 8 GB RAM memory. The interactive Level Set could be succesfully used as an interactive addition to the automatic method, but its usefulness was somewhat reduced by its slow processing time ( 1.5 s/slice) and the relative complexity of the needed user interactions.

(8)

Bilddiagnostik är ett viktigt verktyg som används alltmer inom medicinen idag. På senare tid har datamängden som en radiolog behöver processa ökat markant, sam-tidigt som kravet på ökad effektivitet alltid är närvarande. Detta gör att behovet av datorstödd analys av datamängderna ökar.

Medicinsk bildsegmentering kan användas för många olika uppgifter, där loka-lisering av patologier såsom tumörvävnad bara är ett exempel. Flertalet problem såsom brus och artefakter i bildmaterialet från datortomografen gör dock seg-menteringen till ett svårlöst problem, och utvecklaren blir ofta tvingad att välja mellan prestanda och resultat. I den kliniska praktiken är ett sådant val oaccep-tabelt eftersom både prestanda och resultat avgörande. En väg som skulle kunna lösa problemet kan vara att använda interaktiva algoritmer där användaren snabbt och enkelt kan påverka resultatet.

Det här examensarbetet har varit koncentrerat på att hitta en snabb och inter-aktiv segmenteringsmetod. Flera olika metoder undersöktes, och ett fåtal blev ut-valda för implementation och vidareutveckling. Två av metoderna framträdde som de mest lovande av de metoder som undersökts, Bayesian Region Growing(BRG) och Level Set. En interaktiv Level Set-metod föreföll samtidigt som den algoritm som det bästa alternativet för algoritmens interaktivitet, och kunde då användas ihop med både BRG och Level Set.

Det faktum att den bildkant-baserade Level Set-metoden krävde en nära ini-tialisering för att ge goda resultat ledde till att en ny data term undersöktes, en data term som var baserad på en sannolikhetsmodel istället för bildkanter. Den sannolikhets-baserade Level Set-metoden och BRG-metoden gav båda två likvär-digt goda resultat, men BRG-metoden framstod som den absolut snabbaste av de två, och kunde segmentera en tumör med en utbredning i 25 datortomografi-snitt på under 10 sekunder när den implementerades i delvis Matlab och delvis mex-C++ kod på en ACPU x64-baserad PC med två 2.4 GHz Intel(R) Core(TM) 2CPU:er och ett RAM-minne om 8 GB. Den interaktiva Level Set-metoden kunde användas för att förbättra segmenteringen med goda utfall, men dess användbar-het minskades något av dess långa processtid (ca 1.5 s/snitt) och kraven på en relativt komplicerad användarinteraktion.

(9)

Acknowledgments

This thesis would not have been made possible if not for a number of people that have supported and helped me during the project. First of all a great thanks to Sectra Imtec AB for giving me the opportunity to work with this interesting project. I want to express my gratitude to everyone at PD RADIT for all the good ideas and input you have given me, but a special thanks to my supervisor Kristian Köpsén.

I would also like to express my gratitude to my university supervisor Maria Magnusson and examiner Michael Felsberg for guideance and support through the thesis process.

A thanks should also be directed to the people at CMIV that upheld both room and material for me when I needed it, and to the two radiologists Mischa Woisetschläger and Maria Lindblom that have supported me with user feedback, liver tumor data sets and crucial information for the understanding of the world of medicine.

(10)
(11)

Contents

1 Introduction 3

1.1 About this thesis . . . 3

1.2 Background . . . 3

1.3 Aim . . . 4

1.3.1 Limitations . . . 4

1.4 Outline of the report . . . 4

2 Basic Concepts 5 2.1 The Liver . . . 5

2.2 Liver Tumors . . . 6

2.3 Computed Tomography . . . 8

2.3.1 Basic Principle and Background . . . 8

2.3.2 CT Image Noise and Artefacts . . . 9

2.3.3 Contrast Media . . . 12

2.4 Segmentation of Medical Images . . . 12

3 Methods for Medical Image Segmentation 15 3.1 General Overview . . . 15

3.2 Level Set . . . 16

3.3 Graph Cut . . . 18

3.3.1 Watershed and Graph Cut . . . 19

3.4 Random Walker . . . 21

3.5 Superparamagnetic Clustering . . . 23

3.6 Region Growing . . . 23

3.7 Conclusions From the Method Evaluation . . . 25

4 Detailed Descriptions of the Main Segmentation Methods 27 4.1 Level Set . . . 27

4.1.1 Level Set Evolution Without Re-initialization . . . 29

4.1.2 Interactive Level Set . . . 31

4.2 Bayesian Region Growing . . . 31 ix

(12)

5 Implementation 35

5.1 General Algorithm . . . 35

5.2 Level Set . . . 36

5.2.1 Interactive Level set . . . 36

5.2.2 Probability Based Level Set . . . 37

5.3 Bayesian Region Growing . . . 41

5.4 Combining Level Set and Region Growing . . . 42

5.5 Measuring Area and Volume . . . 43

5.6 The Guided User Interface . . . 43

6 Results and Discussion 47 6.1 Results Using Level Set . . . 47

6.1.1 Results Using the Image Edge Based Level Set . . . 47

6.1.2 Results Using the Probability Based Level Set . . . 49

6.1.3 Results Using the Interactive Level Set . . . 52

6.2 Results Using Region Growing . . . 55

6.3 Results Using Level Set and Region Growing Combined . . . 57

6.4 A Comparison Between the Different Algorithms . . . 57

6.5 User evaluation . . . 57

7 Conclusions and Future Work 61 7.1 Conclusions . . . 61

7.2 Future Work . . . 62

7.2.1 Speeding Up the Level Set method . . . 62

7.2.2 Correcting for the Beam Hardening Effect . . . 62

7.2.3 Improving the Smoothness of Level Set . . . 62

7.2.4 Improving the Intensity Distribution Model . . . 63

7.2.5 Improving the interactive Level Set . . . 63

7.2.6 Improving the Robustness of the Region Growing method . 63 7.2.7 Improving the Interactivity of the Region Growing method 64 7.2.8 GUI Improvements . . . 64

(13)

Definitions

Below follow some of the main concepts and definitions used throughout this thesis

Glossary

Morphological operation - binary dilation and erosion. An image processing

tech-nique that dilates and erodes binary images and thus remove holes, thin gulfs or small objects from the foreground. See for example [24].

Seed points - User marked points used for the initialization for some segmentation

algorithms.

Transversal plane - A plane that divides the body in the lower and upper portion,

with axes pointing from left to right and from back to front of the body.

Coronal plane - A plane that divides the body in the back and front portions, with

axes pointing from toe to head and from left to right of the body.

Sagittal plane - A plane that divides the body in the left and right sides, with axes

pointing from toe to head and from back to front of the body.

Cirrhosis - A liver condition that is a consequence of a chronic liver disease or a

constant exposure to toxic substances. The liver tissue is replaced by scarred and regenerated nodules. It is a common cause for liver cancer.

Parenchyma - The parenchyma is the functional part of an organ in the human

body. Here it will be used to describe the healthy, functioning liver tissue as opposed to the diseased tumor tissue.

Abbreviations

CT Computed Tomography MRI Magnetic Resonance Imaging HU Hounsfield Units

SNR Signal to Noise Ratio PVE Partial Volume Effect HCC Hepatocellular Carcinoma

BRG Bayesian Region Growing (only used in this thesis)

Coordinate system

The coordinate system used in this thesis is a right-oriented and directed as fol-lowing:

(14)

x - the x-axis ponts from a patient’s left to right, and is perpendicular to the

"sagittal plane".

y - the y-axis points from a patient’s front to back, and is perpendicular to the

"coronal plane".

z - the z-axis points from the patient’s feet to head, and is perpendicular to the

"transverse plane".

(15)

Chapter 1

Introduction

This chapter outlines the aims and limitations of this project, and also includes a brief description of the background of this work.

1.1

About this thesis

This project work has been performed by Viola Thomasson for Sectra Imtec AB, at the Computer Vision Division of the Department of Electrical Engineering at Linköping University. The thesis is the final part of a Master’s degree in Applied Physics and Electrical Engineering, with focus on Signal and Image Processing. The general goal of the project has been to investigate the possibility to create a new user guided segmentation tool which is fast and stable enough for medical practice. The focus has mainly been on liver tumor segmentation.

1.2

Background

Medical imaging is today an invaluable tool for diagnosis and treatment plan-ning. Imaging modalities such as computed tomography (CT), magnetic resonance imaging (MRI) and digital mammography has greatly improved the possibility to examine the human body without using invasive methods. Imaging technology has seen a great development in spatial resolution and scan time, resulting in growing data volumes that the medical practitioner has to analyze. As the demand for increased efficiency is always present, the need for computer assisted analysis to help and guide the practitioner increases.

Image segmentation, a group of computer algorithms for extraction and delineation of regions of interests in images, are particularly interesting. Segmentation could be used for various tasks, such as diagnosis and study of anatomical structures or localization of pathologies such as cancer tumors. However, although image segmentation is a well studied area of image analysis, there are still numerous problems in its application to medical images. Noise and artifacts in the gener-ated images make the simplest algorithms difficult to apply on medical images,

(16)

and the developer is forced to choose between speed and robustness. As both speed and robustness are crucial for medical practice, this results in solutions not fitted for the medical reality.

In recent years there have been a number of articles published in the area of uncertainty-aware methods which concentrates on finding ambiguities in the seg-mentation to which the user is directed, to give him/her the choice of intervening and changing the segmentation. There are also a number of interactive algorithms that gives the user the possibility to change the segmentation result, although without the use of probabilities. This thesis has concentrated on finding an effi-cient algorithm suitable for rapid, interactive segmentation, where the radiologist has the possibility to intervene in the segmentation.

1.3

Aim

The main goal of this thesis is to develop an interactive tool for liver tumor seg-mentation. Given CT image data and user input, the solution should be able to identify the extent of tumors and metastases found in liver tissue. The prototype should give the user a possibility to easily modify the segmentation result and also alert the user of regions with higher uncertainties.

1.3.1

Limitations

As different imaging modalities and applications require different image segmen-tation procedures and as the time for a master’s thesis is limited, the subject has been restricted to an application of delineating liver tumors.

1.4

Outline of the report

After this introductory chapter there are three chapters that treat background, basic concepts and descriptions of the methods used in this thesis. After that follow the Implementation chapter that thoroughly describes the implementation of the main algorithms, Level Set and Region Growing. The final two chapters accounts for the results and conclusions drawn from this work.

(17)

Chapter 2

Basic Concepts

This chapter concentrates on giving a more detailed background description and a description of the fundamental concepts and methods that form a basis for this thesis.

2.1

The Liver

As this thesis will concentrate on the segmentation of liver tumors a simple back-ground of the liver and its function in the body seems like a good starting point. The liver is the biggest gland in the body as it can weigh up to 1.5 kg in an adult human. It has a central role in the body’s metabolism as it secretes bile, a se-cret that metabolizes many of the essential nutrients for our survival. Moreover it stores glycogen, vitamins and other nutrients that can be portioned out into the blood when needed, synthesizes blood-clotting factors and other important amino acids, regulates the blood volume and removes wastes (such as old red blood cells) and toxic substances. This means that a large amount of blood must pass through the liver at every moment of the day, and all the blood of the body will have passed through the organ in just three minutes.

The organ is situated mostly in the upper right quadrant of the human ab-domen and it is divided into two lobes; the larger right lobe and the smaller left lobe. It has a spongy consistency and a triangular form. The extraordinary re-generating ability of the liver should also be mentioned, patients have for example been known to survive despite the loss of 80% of the liver after a liver resection. Aside from the extra capacity that the liver has it is also known to regain its original size very quickly. A patient who is forced to remove half of the liver, can expect to have a fully functioning and fully regrown liver in just six months [20], [8].

(18)

Figure 2.1. A schematic picture of the triangular liver and its two lobes.

(a) A CT image showing a cross section of the liver transversal plane. 1. Liver, 2. Aorta, 3. Stomach, 4. Spleen

(b) A CT image showing a cross section of the liver in the coronal plane. 1. Liver, 2. Stomach, 3. Lungs, 4. In-testines, 5. Aorta

(c) A CT image showing a cross section of the liver in the sagittal plane. The arrow points at the liver

Figure 2.2. The liver shown in different cross-sections

2.2

Liver Tumors

Healthy cells reproduce and die in a stable and orderly manner, under some cases however, a group of cells start to grow uncontrollably and produce a tumor. Tu-mors can be benign, lacking the capacity to spread to other organs, or malignant. The malignant tumor display uncontrollable growth and may invade and destroy healthy surrounding tissue or even spread to other organs and continue the de-struction there. Spread tumors are called metastases. Tumors in the liver may belong to the same categories [21].

The most common primary hepatic tumor is Hepatocellular carcinoma or HCC which accounts for 80-90% of the cases. The prevalence of HCC vary considerably

(19)

2.2 Liver Tumors 7

across the globe. Incidence is highest in some Asian and sub-Saharan countries (30-150/100.000). In Western Europe, the USA and Australia the incidence is mostly low (around 1-3/100.000), but it seems to be increasing globally. HCC is also much more common in men than in women (male to female ratio is approximately 4-8:1. Risk factors for HCC are chronic liver diseases such as cirrhosis, hepatitis B and C or exposure to chemical toxins such as aflatoxins. This is also the cause for the varying prevalence. In Europe and the USA the most common underlying cause is alcohol caused cirrhosis, while hepatitis B is the cause for the high prevalence in sub-Saharan countries.

The liver is one of the organs where tumor metastases most commonly appear. Liver metastases are 20 times more common than primary malignancies. It is therefore common to screen cancer patients for metastases in the liver as the presence of liver metastasis greatly affects patient survival. Metastasis can appear in all parts of the liver [16].

Surgery to remove the diseased part of the liver is the main and most effective treatment for primary liver cancer in non-cirrhotic liver. The liver has a remarkable property to carry on as normal even if a large part of it is removed. In the case of a cirrhotic liver the best alternative is to transplant the whole liver [26].

There are however many cases when surgery is not possible; when the tumor has grown too large or spread to other parts of the body, or when the liver is in a bad condition, as is often the case for HCC (depending on underlying cirrhosis or other chronic liver diseases). The early signs for tumors in the liver are often hard to detect, either there might not be any symptoms or the symptoms may be very diffuse. Hence, when the affected turns to the hospital with symptoms such as a painful and swollen upper abdomen, weight loss, jaundice and fewer, the tumor might be quite advanced and too large to remove. Neither chemotherapy nor radiotherapy are considered effective as treatments, but can in some cases alleviate the symptoms and even decrease the size of the tumor. The high doses of radiotherapy needed to kill the cancer cells would for example also damage the healthy liver tissue. Local tumor ablation (local destruction of tumor tissue) by heating, cooling or injecting alcohol in the liver can sometimes be effective for small tumors [14].

The estimation of tumor growth is very important to judge how successful a treatment has been. The patient is often examined with a CT-scan, where the tumor appear as a lighter or darker shade in the liver. The tumor might also be heterogeneous, e.g. with a darker core with a surrounding lighter ring. See Figure 2.3 for some examples of different tumors and how they appear in a CT image.

The tumor size is usually approximated as the largest axial diameter of each lesion, a process which is done manually. It lies several different problems in this approach, first of all a 3D measurement is approximated as the 1D diameter, and clinical research has implied that a 3D measurement would give a much better representation of the tumor response. The simplification could be valid only if the tumor always appeared perfectly spherical, which is not the case. Secondly, the process suffers from the same problems that all manual approaches do, such as always being subjective (there is always inter- and intra person variations) and time-consuming [13].

(20)

(a) A primary tumor, Hepatocellular Carci-noma (HCC)

(b) Metastases originating from a breast can-cer tumor

(c) Metastases originating from a bowel cancer tumor

(d) Metastases originating from a colon cancer tumor

Figure 2.3. CT images of different cancer tumors

2.3

Computed Tomography

2.3.1

Basic Principle and Background

The technology for computed tomography (CT) was developed in the 1970s. It was the first technology that made it possible to generate tomographic images of the human body without using invasive methods. The CT technology was initially exclusively used for brain imaging, as it gave the possibility to study the soft brain tissue inside the dense skull, but was soon developed for imaging of the abdomen and thorax, the main areas of interests in this thesis. The greatest technological improvements since the 1970s have primarily been the increase of spatial resolution and a reduction of the scan times. In fact the improvement of the spatial resolution

(21)

2.3 Computed Tomography 9

has been so successful that we today find ourselves close to the theoretical limits of the detectors. This means that it is difficult to improve the contrast resolution more without increasing the radiation dose received by the patient. Today CT-images can be used to see the body from several different angles, cross-sections and also in 3D.

The standard CT technology of today is the spiral-CT, where the detectors and the x-ray tube that emits the x-ray radiation is rotated around the patient at a high speed at the same time as the patient is moved through the CT device. The detectors measure the amount of radiation that reaches them. The image is formed from the calculated attenuation of the radiation as it passes through the body and reaches the different detectors. The attenuation of x-rays passing an inhomogeneous object like the human body can be described as

I = I0e

R

a(x)dx

, (2.1)

where I is the resulting x-ray intensity behind the body, I0 is the original x-ray

intensity, x is the path that the x-ray beam takes through the body and a(x) is the attenuation function for the body.

A CT number in Hounsfield Units (HU) is calculated from the degree of atten-uation for each voxel. The Hounsfield Units are defined as

CT = 1000 ·apatient− awater awater

, (2.2)

where CT is the resulting CT number, apatientis the attenuation of the x-ray beam

after passing through the patient, and awater is the attenuation of the x-ray beam

after passing through water. Consequently, -1000 HU correspond to air and 0 HU correspond to water. The possibility to quantitatively measure and compare the attenuation in different tissues is an important advantage of the CT-technology, and something that is impossible with e.g. MRI [16],[9] and [22].

2.3.2

CT Image Noise and Artefacts

There are a number of image artefacts and imperfections that are associated with CT images. Some are physics-related while others are caused by patient move-ments or physiology, or system-related causes like detector insufficiencies. The images are affected by an unavoidable quantum noise from the statistical vari-ations of the x-ray beam intensity. The noise levels are signal-dependent and can only be reduced by increasing the x-ray intensity or the acquisition time, and thereby increase the dose of radiation that the patient is submitted to. The radiol-ogist may however use different kinds of smoothing filters to increase the low-level detail. Other physical dependent image artifacts are caused by X-ray scattering, beam hardening and partial volume effects.

X-ray scattering is caused by the fact that some photons are reflected by the human body. Solutions to this problem might be to use detectors that can reduce the scatter effect or by using mathematical models that can correct for the effect. Beam hardening on the other hand is caused by the different attenuation of x-rays of different wavelength. Beam hardening is usually mathematically corrected for,

(22)

Figure 2.4. A CT scanner. Image source: http://sv.wikipedia.org/

but as the mathematical model assumes that the object in question only consists of one substance, usually water, the effect might occur for objects that differ largely from water attenuation. See Figure 2.5 for an example of what the beam hardening effect might look like in practise.

The CT number (in HU) for each voxel is essentially a sum of all the partial volume elements that occupy the same voxel.

CT = v1· CT1+ v2· CT2+ v3· CT3+ ..., (2.3)

where the partial volume elements viall add to 1. The same voxel may for example

contain both a blood vessel and lung tissue. This is the cause of the partial volume effect, or partial volume averaging. As the resolution in the z-direction usually is worse than the resolution in the x-y-plane, the problems associated with the partial volume effect is also greater in the z-direction. This may cause small objects to appear diffuse and hard to distinguish, as can be seen in the example in Figure 2.6.

The main patient-related image artifact is artifacts from the movement of the patient or an individual organ, like when the patient breathes. This can appear as stripes and streaks in the image, but is usually quite easy to identify as motion artifacts. The most efficient way to reduce movement artifacts are to speed up the acquisition time. To learn more about CT technology, some good reference litterature are [16],[9] and [22].

(23)

CT-2.3 Computed Tomography 11

Figure 2.5. This image clearly shows some beam hardening artefacts as lighter streaks

and strokes around the bones. The arrows point out the clearest artifacts. Beam hard-ening can also appear as darker areas inside homogeneous tissue, the so called cupping-phenomenon that is not shown here.

Figure 2.6. An illustration of partial volume averaging, and how PVE might blur out

smaller objects in the volume.

imaging the technology of choice when doing follow-up examinations of known liver cancer patients [18].

(24)

2.3.3

Contrast Media

When using CT technology for liver tumor examinations the use of contrast media is important to get the best possible images. Medical contrast medium or contrast agent is used to increase the contrast between normal and abnormal tissues, get a better view of vascular anatomy (vascular = blood vessels) or improve the visu-alization in general for certain organs. The contrast agent causes an increase in x-ray absorption within the organ it passes through. Soft tissues such as organs and some diseased tissue, e.g. tumors, are often hard to distinguish from each other, but as different tissues absorb the contrast medium at different stages, the tissue will be high-lighted in comparison to other organs with a smaller contrast uptake [9]. See Figure 2.7 for an example of the effect of using contrast media.

(a) No contrast media (b) First contrast media phase (c) Second contrast media phase

Figure 2.7. CT images taken without and with contrast media in different phases. The

tumor (left arrow) is barely visible in the image without contrast, while it appears quite clear in the second contrast phase. The effect of the contrast media is most evident for the aorta (right arrow), that clearly changes from a quite dark color in the image without contrast media, to an intensity that is close to bone in the first contrast media phase.

2.4

Segmentation of Medical Images

Segmentation is a technique that subdivides a digital image into multiple segments. They are mostly based on one of two basic properties of intensity: similarity and discontinuity [24]. In the case of medical images the aim is to aid the radiolo-gist or clinician to distinguish between different kinds of tissue or asses size and shape of different pathologies (e.g. cancer tumors). In MRI and CT images re-gions that appear homogeneous have similar anatomical information, while other imaging techniques such as dynamic positron emission tomography (dPET) or dy-namic single photon emission computed tomography (dSPECT) give homogeneous regions with similar functional behavior [29].

To manually segment an image is usually time-demanding and it also suffers from both inter- and intrapersonal variations [6]. Machine guided segmentation

(25)

2.4 Segmentation of Medical Images 13

should in theory be able to both speed up and increase the robustness of the segmentation process.

Segmentation is a well studied field of image processing, however within the area of medical imaging the segmentation techniques of today still lack in perfor-mance and efficiency. The segmentation task often becomes a trade-off between these two qualities which results in a slow but accurate segmentation or a fast but less reliable one. Contributing to this issue is the fact that medical images often have problems such as low signal-to-noise ratio (SNR) and partial volume effects (PVE) that greatly complicates the segmentation [28].

(26)
(27)

Chapter 3

Methods for Medical Image

Segmentation

This chapter consists of an overview of medical image segmentation techniques, and a more thorough description of a few techniques that have been tested and evaluated during the course of this thesis.

3.1

General Overview

The classification used in this section are based on the classification used by Saad, Möller and Hamarneh in there article "Exploration and Visualization of Segmen-tation Uncertainty Using Shape and Appearance Prior Information" [28]. They conclude that there are two main categories of medical image segmentation tech-niques: firstly the automatic methods and then the interactive methods that need more user input. Most of the automatic methods need, despite the name, parame-ter setting and initialization. The segmentation itself, however, is fully automatic, and the user is left passive without the possibility to intervene in the process. If the result is less than satisfactory the user has to change some of the parameters and/or the initialization and redo the segmentation in the hope for a better result. One fully automatic method, without the need for initialization, was tested in this work. You can read more about that in Section 3.5.

Interactive methods on the other hand gives the user the possibility to intervene in the segmentation process, although to a varying extent. These methods can in turn be classified into three different fields, see Figure 3.1. The three classifications are: the kind which lets the user...

1. ... define a complete contour letting it evolve to the desired boundary 2. ... specify a small number of pixels that belong to the boundary

3. ... specify a small number of pixels that belong to the center of the object and background respectively, thus avoiding the problem with diffuse boundaries.

(28)

(a) Initialization (b) Segmented Image

Figure 3.1. An example of different initialization alternatives for image segmentation

algorithms

A few methods from the first and third category of interactive methods and one fully automatic method were tested during the course of this thesis. The following sections will give brief descriptions of the evaluated algorithms. The two methods that were judged as most promising were chosen for further implementation and testing, an argumentation of why they were chosen is found in the last section of this chapter.

It is hard to judge the exact extent of a tumor, even for an experienced radi-ologist as the CT images do not tell the exact truth. That is why it is hard to speak about a "ground truth" for the image segmentations used as examples in this report. The "ground truth" will however be shown for better understanding of the images, but have in mind that they may not be the exact truth of the extent of the liver tumors in the images. They have been drawn with the help of an experienced radiologist.

3.2

Level Set

Level Set is a technique that belongs to the first group of segmentation methods. It is a deformable contour model where the user specifies a starting contour that is evolved to the image contour. As opposed to other contour models, e.g. Snakes [5], where the contour is described in a parametric manner, the Level Set method is a geometric deformable model. The contour is described as a surface developed by partial differential equations, where the contour is the zero level of the surface, see Figure 3.2.

This gives the Level Set-method advantages over other methods, its topology can change, and objects can split and merge, see Figure 3.3.

(29)

3.2 Level Set 17

Figure 3.2. Two examples of Level set functions visualized in 3D and 2D. The green

and turquoise planes mark the zero level.

(a) Initialization (b) Segmented Image

Figure 3.3. An example of the split and merge property of the Level Set algorithm

both supporting a simple user interface. A narrowband implementation of Level Set where the level set function is calculated only on a band around the zero level makes it possible to speed up the algorithm. An example of segmentation results with Level Sets are shown in Figure 3.4(b) and the new segmentation after user feedback is shown in Figure 3.4(c).

The results from the tests were very positive, even if it seemed that the method needed a quite close initialization to give the best result. Another advantage was the simplicity of the interactive Level Set method.

(30)

(a) Initialization (b) Segmented image

(c) Segmented image after user feedback (d) Ground truth image

Figure 3.4. Resulting segmentation using Level Set segmentation

3.3

Graph Cut

The Graph Cut-method views the image as a weighted graph, based on the inten-sity changes between pixels. Each pixel is a node with links to its neighbors and a link to the "source" - the object terminal -and the "terminal" - the background terminal. Graph cuts is a method that belongs to the third category of image seg-mentation methods where a few pixels from the foreground and the background is used as seeds. These seed-nodes are hard-linked to the "source" or "terminal" depending on whether they are marked as foreground or background. A schematic image of a pixel graph can be seen in Figure 3.5.

The segmentation is done by the use of minimum cut/maximum flow optimiza-tion of the image graph. The result is therefore always the optimal soluoptimiza-tion. The

(31)

3.3 Graph Cut 19

Figure 3.5. Graph cuts is a method where every pixel is a node in a graph, connected

to the terminal and source nodes, and also to the neighbouring pixels

technique was proposed by Boykov and Jolly [33]. A variant of Graph Cut that also gives probabilistic results has been proposed by [23], something which could be useful for interactivity and uncertainty visualization.

3.3.1

Watershed and Graph Cut

During the MICCAI (Medical Image Computing and Computed Assisted Inter-vention) conference of 2008 a workshop called "3D segmentation in the clinic: A grand challenge II" during which a liver tumor segmentation challenge was held. The winner of this challenge, J. Stawiaski, E. Decencière and F. Bidault, proposed a segmentation method based on graph cut and watershed [12]. It is a method con-sisting of two phases, where the first phase segments the liver from the background and the second phase segments the tumor from healthy liver tissue. Watershed segmentation is applied to the grayscale morphological gradient of the image (the difference between grayscale morphological erosion and dilation), this results in an over segmented image where each segment is set up as a node in the region graph. Graph cut is applied on the region graph to segment the liver. An example of the liver segmentation can be seen in Figure 3.6.

In the second phase the region graph is rebuilt to only hold the nodes marked as liver tissue. Some seeds are selected from the user to represent tumor and liver tissue and the Graph Cut-method is then applied to the new region graph. An example of the results from the tumor segmentation phase is shown in Figure 3.7.

(32)

(a) Original Image (b) Watershed

(c) Graph Cut (d) Result

Figure 3.6. Liver segmentation using the method proposed by Stawiaski et al. First

phase of the algorithm.

The results from this algorithm was promising but some problems were obvious. If the algorithm is given too few seeds the segmentation might result in only the seeded background regions marked as background, or the opposite that only the seeded foreground regions are marked as foreground, thus the trivial solution. An example of this problem is shown in Figure 3.8. The algorithm also had a problem with the liver border, which is darker than the rest of the liver tissue, and therefore, as the Graph Cut method gives the global solution for the best cut, is marked as tumor. The algorithm also missed a bigger part of the tumor than the Level Set method had done.

(33)

3.4 Random Walker 21

(a) Initialization (b) Segmentation result

(c) Ground truth image

Figure 3.7. Tumor segmentation using the method proposed by Stawiaski et al. Second

phase of the algorithm.

3.4

Random Walker

Random walker is a seeded segmentation method that was proposed by L. Grady in [15]. The image is, just as in Graph cuts, represented with a weighted graph. For each pixel the probability is calculated for the chance of a random walker starting in the pixel to reach the seeded pixels. The edge weights of the graph are often calculated from grayscale differences, and the final segmentation is obtained by labeling the pixel after which of the seed point got the highest probability for the random walker.

Random walker did not work very well for the liver tumor case with ordinary Gaussian filtering. The boundaries were too weak to be segmented correctly. When filtering the image with an anisotropic diffusion filter (a filter that reduces image noise without destroying strong image borders) the result could be somewhat improved, and the method did find some of the tumor, but leaked easily as can be

(34)

Figure 3.8. An example of the small cut problem with Graph cut. Only the seeded

background (marked with light blue points) has been marked as background. The seed points for foreground are symbolized by yellow points in the image

seen in Figure 3.9.

(a) Segmentation using three foreground seeds

(b) Segmentation using four foreground seeds

(c) Ground truth image

Figure 3.9. Result from the test with random walker segmentation. The image was

filtered with an anisotropic diffusion-filter before segmentation. Blue points are seed points for the background, green for the foreground

(35)

3.5 Superparamagnetic Clustering 23

3.5

Superparamagnetic Clustering

Superparamagnetic clustering method [1] is based on the Potts model which de-scribes the behavior of a system of ferromagnetic grains. The segmentation label is translated as the orientation of the grains, and the segmentation is obtained when the equation reaches the equilibrium state. This is a fully automatic method where the initial state of the "grains" are chosen randomly and then evolved with an energy function that takes the image’s gray scale values into account. The reason to implement it in this study was because of the speed of the algorithm. When implemented on the GPU the method has been able to run in real time, processing an image of 256x320 pixels at a frame rate of 30 Hz. Unfortunately, the results on both test images and real images were poor. The algorithm could not seem to handle the high noise level and weak boundaries of the CT-images. The best result from the tests are shown in Figure 3.10. Even on the test image, which is simplified compared to the real image, we can see clearly that the image has been oversegmented.

(a) Original Image (test image) (b) Segmented Image

Figure 3.10. Segmentation result using Paramagnetic Clustering

3.6

Region Growing

Region Growing is a basic segmentation method belonging to the third method category, where the user marks seed points for foreground and background. The marked foreground then functions as an initial segmented region that is expanded by morphological dilation if the surrounding neighborhood fulfill some kind of sim-ilarity criteria. The expansion continues until no more neighboring pixels fulfill the criteria and can be added to the region or until the maximum number of iterations is reached. The similarity criteria used in this thesis is based on a Bayesian rule system, presented by Qi et al. [34]. From this method we get a fast, probability-based method, a fact that could be interesting for uncertainty visualization and

(36)

for interactivity. One result from the tests done on Region Growing is shown in Figure 3.11.

(a) Initialization (b) Segmented Image

(c) Ground Truth Image Image

Figure 3.11. Segmentation result using Region Growing

Two drawbacks of the method should be mentioned. Firstly, the segmented result has an uneven and jagged edge and holes and gulfs appear where pixels do not fulfill the condition for growing. This means that there will be a need for post processing with morphological operators to get a smooth curve. The second problem is a leakage problem, that originates from the same problem causing the liver border to be segmented as tumor in the case with the Graph Cut method. The liver border is darker and if the same goes for the tumor the probability for tumor tissue is high on the border, leading to leakage problems. How this has been solved will be further described in the next chapter.

(37)

3.7 Conclusions From the Method Evaluation 25

3.7

Conclusions From the Method Evaluation

Two of the tested algorithms were rejected quite quickly. Random walker at first seemed interesting as it included a natural probability measure, and had been used in some uncertainty visualization projects (see [11] and [29]). The results and the lack of speed were clear disadvantages with the method. Superparamagnetic Clustering had the advantage of speed but lacked both probability measures in its original form and showed poor results in the testing process. One more algorithm was finally rejected, the Watercut/Graph Cut-algorithm. Despite its success in the liver tumor segmentation challenge it clearly had a "small cut" problem that appeared quite often. A small amount of seed-points were not always enough, and the possibility for interaction was limited. The obvious problem with the segmentation of the image border also weighed into the decision to reject the algorithm. The decision was to continue working with Level Set and Bayesian Region Growing, both as separate algorithms and in combination.

(38)
(39)

Chapter 4

Detailed Descriptions of the

Main Segmentation Methods

This chapter contains a description of how the Level Set and the Bayesian Region Growing methods were implemented.

4.1

Level Set

The Level set method was first developed in the 1980:s by Sethian and Osher[27] as a method of modeling propagating fronts. The basic idea is to represent the moving fronts as zero levels in an implicitly defined higher dimensional function, called the level set function. The level set function can then be evolved by applying a partial differential equation to the function. Sethian and Osher’s work became well known and has influenced various applications in many different research areas such as computational geometry, fluid dynamics, image processing and computer vision. Caselles et al [30] and Malladi et al. [25] independently introduced level sets to image segmentation.

The first active contour model was defined as a parameterized dynamic contour that is evolved according to

∂C(s, t)

∂t = V N (4.1)

where C(s, t) : [0, 1] × [0, ∞) → R2 is the dynamic parameterized contour, N is

the inward normal and V is the speed function that forces the curve to evolve. By embedding the contour as the zero level in the level set function, where all values inside the contour takes negative values and all outside the boundary takes positive values, we have reformulated the parametric model to a level set model. The partial differential equation can then be written as

∂φ

∂t = V |∇φ|, (4.2)

(40)

Figure 4.1. The level set function, where the negative values are situated inside the

object, and the zero level becomes the object border

which is called the Level Set Equation and where the symbol φ denotes the Level Set function. The main advantage of the Level Set method compared to parametric active contour models such as snakes are that they can handle topological changes in the contour, e.g. splitting and merging. A parametric method also has the disadvantage that all numerical computations have to be parameterized for the contour, while they can be performed on a fixed Cartesian grid for level sets. The level set equation can be discretized with the forward difference

φk+1− φk

τ = V (φ

k), (4.3)

where τ is the time difference and V is a speed function. The update function can then finally be approximated as

φk+1= φk+ τ V (φk). (4.4)

The level set function must stay close to a signed distance function as it evolves, otherwise the evolution would drift away and become unstable. Traditionally this has been solved by periodically re-initialize the level set function as a signed distance function. This is, however, not an ideal solution, since the problems of how and when the re-initialization should be done still remains unsolved, which results in the fact that many implementations are done in an ad-hoc manner. In many cases there are also the problem that the re-initialization scheme itself drives the zero level away from the desired boundary [10].

(41)

4.1 Level Set 29

4.1.1

Level Set Evolution Without Re-initialization

A level set method without the need of re-initialization was proposed by C. Li, C. Xu, C. Gui and M.D Fox in 2005 [2], and the idea was later further developed in another article from 2010 [3]. In the first article from 2005 the authors propose a variational level set formulation with an internal and an external energy term. The internal term should penalize deviations from the signed distance function while the external energy term should drive the contour towards desired features in the image. The internal energy term is called the distance regulation term and is denoted by R. See (4.5) for the energy formulation,

(φ) = R(φ) + ext(φ), (4.5)

where extdenotes the external energy term.

The Level set function can be evolved to minimize the energy functional by defining the speed function as minus the Gâteaux derivative, which is the steepest descent flow or the gradient flow. The Gâteaux derivative is a directional derivative and it is linear. Therefore the speed equation becomes

V (φ) = ∂R(φ) ∂φ +

∂ext(φ)

∂φ . (4.6)

As φ has to stay close to a signed distance function to avoid numerical errors, |∇φ| has to stay close to 1. The simplest way to design the distance regularization energy term is therefore to use

R(φ) = 1 2 Z

(|∇φ| − 1)2dx, (4.7)

which is a metric of the distance of |∇φ| to a signed distance function. The simplest way is not always the best, unfortunately, and the simplest definition results in oscillations in φ for some cases. These oscillations may cause the zero level to deviate from the correct evolution. The authors have therefore suggested another distance regularization term in the article from 2010. Instead of the first energy term which can be described as a single well potential function, the authors have chosen a double well potential that avoids the oscillation problem. See (4.8) and Figure 4.2. R(φ) =  1 (2π)2(1 − cos(2π|∇φ|) for |∇φ| < 1 1 2(|∇φ| − 1) 2 for |∇φ| > 1 . (4.8)

The Gâteaux derivative of R(φ) as the double potential is

∂R(φ)

∂φ = −div(dp(|∇φ|)∇φ), (4.9)

where ÷ is the divergence operator and

dp(|∇φ|),

 1

2π(sin(2π|∇φ|) for |∇φ| < 1

(42)

(a) Singel Well Potential (b) Double Well Potential

Figure 4.2. The single well and double well potentials

The distance regularization term of the speed function then becomes

∂R(φ)

∂φ = µ · div(dp(|∇φ|)∇φ), (4.11)

where µ is a constant weighting the distance regulation term against the external energy terms.

There are two external energies that are defined as L , λ · Z gδ(φ)|∇φ|dx, (4.12) A , ν · Z gH(−φ)dx. (4.13)

The first term, L in (4.12), forces the level set function to evolve towards image boundaries. g is an edge indicator function with low values close to borders in the image and is defined as

g , 1

1 + c · k∇Gσ∗ Ik

2, (4.14)

where Gσ∗I denotes the image I smoothed by a Gaussian kernel with the standard

deviation σ. The second term, A in (4.13), computes a weighted area of the object region. It is used to force the level set function to evolve even if it is initialized far away from image borders. ν is a constant that might be chosen as a positive or negative value, where a negative value shrinks the contour while a positive value forces the contour to grow. The terms δ and H denotes the Dirac and Heaviside functions respectively. The speed function becomes

V (φ) = µ · div(dp(|∇φ|)∇φ) + λ · δ(φ)div(g

∇φ

(43)

4.2 Bayesian Region Growing 31

4.1.2

Interactive Level Set

N. Ben-Zadok, T. Riklin-Raviv, C. Gui and N. Kiryati proposed in an article from 2009 an interactive variant of level set [19]. The method consists of two phases one automatic and one where the user may influence the evolution in another direction. The first phase consists of an automatic phase where a Level Set formulation presented by Caselles et al. [31] is applied to the image. It is an alternative to the method described in the previous section and is called the Geodesic Active Contour model (GAC). The user can then simply add some points to the image in areas of disagreement which is formulated as a new energy term in the energy function, that is the GAC-variant of (4.5). This is a simple and intuitive interactive tool where the user can influence the segmentation without having to edit it (which might be time consuming for a large tumor). This also means that it is not needed for the algorithm to be repeated from the beginning. A function F is formulated to represent the user feedback. We can call F the "feedback indicator function". Note that this function is called simply the "indicator function" and noted as L in the original article.

F (x) ,    0 if x is in the foreground 1 if x is in the background H( ˆφ(x)) if x is unmarked . (4.16) ˆ

φ denotes the resulting level set function from the first automatic segmentation

phase and H denotes the Heaviside function. The user feedback energy term is then defined as F (φ) , Z x0∈Ω Z x∈Ω  F (x0) − H( ˆφ(x)) 2 G(x, x0)dx0dx. (4.17) The function G is a Gaussian Kernel and Ω is the set of pixels in the image. This means that the feedback term of the speed function, V (φk) in (4.4), with δ

denoting the Dirac function, becomes

VF B(φ) = 2δ( ˆφ)

Z

x0∈Ω



F (x0) − H( ˆφ(x))G(x, x0)dx0. (4.18)

4.2

Bayesian Region Growing

The Bayesian Region Growing method [34] was another of the methods proposed by a group participating in the Liver Tumor Segmentation Challenge during MIC-CAI 2008 [32]. Although this contribution did not get top scores in the Challenge, it was judged as interesting for this thesis on account of its possibility for speed and the fact that it contained probability measures. It also gave more correct results in the testing process than the three methods that were dismissed.

The method assumes that the intensity distribution of the tumor lesion can be approximated as a single Gaussian, or a sum of Gaussians. In the case of liver tumor segmentation we want to distinguish between two classes; liver tissue,

(44)

which we can call ω1, and tumor tissue, which we can call ω2. Given a pixel with

intensity I the definition of conditional probability states that

p(I|ωj) =

p(I, ωj)

p(ωj)

, j = 1, 2, (4.19)

where p(I, ωj) is the joint probability. We can minimize the error of the

classifi-cation if we follow the Bayesian decision rule :

If p(ω1, I) > p(ω2, I) determine I ∈ ω1, else I ∈ ω2. (4.20)

Given (4.19), (4.20) and that the prior probabilities p(ω1) = p(ω2), we can

reformulate Bayes’ decision rule to

If p(I|ω1) > p(I|ω2) determine I ∈ ω1, else I ∈ ω2. (4.21)

The two probability distributions p(I|ω1) and p(I|ω2) are defined as

p(x|ωj) = 1 √ 2πσj exp −(x − mj) 2 2 j ! , j = 1, 2, (4.22) where m stands for mean and σ denotes standard deviation. Qi et al. used a single seed point in the liver tissue and a 11x11x11 neighborhood around it to estimate the mean and variance for p(x|ω1). Then several seed points in the tumor tissue are

marked and for each seed point an estimation of mean and variance is made. This creates a more salient estimation of a tumor which contains regions of different intensity. An image showing a tumor with a high degree of intensity variation can be seen in Figure 4.3.

Qi et al. then used a 3D region growing algorithm that were allowed to grow on the following two criteria.

1. Equation (4.21) applies for one of the Gaussian distributions estimated for tumor tissue

2. The current pixel should have a similar intensity distribution as one of the intensity distributions from the tumor seed points. The similarity method used for this purpose is the Bhattacharyya distance,

BC(hi, h0) =

X

x

p

hi(x)h0(x), (4.23)

where hi(x) is the frequency histogram for one of the seed-neighborhoods and h0(x)

is the frequency histogram of the current point (the frequency histogram is the his-togram divided by the number of pixels in the neighborhood). The Bhattacharyya distance measures the similarity between two probability distributions.

Finally, a complete example of the different steps of the algorithm, is shown in Figure 4.4. The next chapter describes how the methods were implemented.

(45)

4.2 Bayesian Region Growing 33

Figure 4.3. Both the red and the blue arrow points on tumor tissue, but the intensity

(46)

(a) Tumor probability (b) Liver parenchyma probability

(c) p(I|ω1) > p(I|ω2) (d) Segmented image

(47)

Chapter 5

Implementation

This chapter describes how the two chosen segmentation methods from the previ-ous chapters were implemented in the prototype developed in the context of this thesis.

5.1

General Algorithm

Both Level Set and Bayesian Region Growing have been implemented in a similar way, using the same general algorithm.

The algorithms have been implemented primarily in Matlab, but as both Re-gion Growing and Level Set runs quite slow in Matlab, those two algorithms have been implemented in C++ in the MEX-format to be able to compile and run the code in the Matlab environment.

The algorithm outlined:

1. Initialization. The user initializes the segmentation by marking tumor and liver parenchyma tissue with one stroke each in one of the slices where the tumor has the largest extent. The marked pixels are used to model probability distributions or as seed points for the segmentation method 2. Segmentation. The points of the initial contour/seed points that fulfill

Ptumor > PLiver are appended to the initial Level Set/ Bayesian Region

Growing seed points. The segmentation of one slice is performed.

3. Post processing. Morphological operations followed by smoothing of the contour to improve its appearance. This is done for both algorithms, even though Region Growing needs it more than Level Set.

4. End of iteration? If no tumor tissue is found, the propagation will stop. Otherwise the tumor object is eroded and propagated to the next slice. Go to step 2.

5. User feedback The user marks areas where the segmentation has failed, and a new segmentation using the interactive level set formulation is done.

(48)

There have been ideas on how to design an interactive algorithm based on only Region Growing, but as these ideas have stayed at the conceptual stage, it is the interactive level set function that has been used for user feedback for all of the segmentation methods.

5.2

Level Set

The level set method used in this project is the one proposed by Li et al. [3] and was described in Chapter 4. To save execution time, a narrowband version of the algorithm was used. Narrowband level set confines the computations to a narrow band around the zero level of the level set function, which reduces the computational cost. A more detailed description can be found in [3].

5.2.1

Interactive Level set

Some adaptations to the interactive level set formulation proposed by Ben-Zadok et al. [19] had to be made for this implementation. Firstly, the level set method formulated by Li et al. [3] has been used instead of the GAC formulation, used by Ben-Zadok et al. The feedback term of the speed function was rewritten to simplify the calculations. The reformulated feedback term is shown in (5.1). Notice that it is esentially the same as (4.18) in Chapter 4.

VF B(φ) = 2δ( ˆφ) ·

h

F (x0) − H( ˆφ(x))∗ Gσ

i

. (5.1)

As before, ∗Gσdenote the convolution with a Gaussian with the standard deviation

σ. In practice the Dirac and Heaviside functions are approximated with δε(x) =  0 |x| > ε 1 1 + cos( πx ε )  |x| ≤ ε , (5.2) Hε(x) =      1 +2 arctan(x) π 2 . (5.3)

The update function for the feedback phase of the level set method then be-comes φk+1= φk+ τ V (φk) (5.4) V (φ) = µ · div(dp(|∇φ|)∇φ) + λ · δ(φ) · div  g ∇φ |∇φ|  + ν · gδ(φ) + γ · VF B. (5.5)

Compared to (4.16), the definition of F (x) has been changed, to

F (x) =    1 if x is in the foreground 0 if x is in the background H( ˆφ(x)) if x is unmarked . (5.6)

(49)

5.2 Level Set 37

The thorough reader may notice that the only change is that the values given for foreground and background has been switched. This gives better results for the formulation proposed by Li et al. It may be that Ben-Zadok et al. chose the opposite sign convention for the level set function, that is, positive sign for foreground and negative for background.

The markers that the user puts out in the interactive phase of the level set may be used in several different ways. Here the markers are "propagated" to neighboring slices, that is a feedback indicator term is created also for the neigh-boring slices, although with a smaller weight, as long as the both markers are situated in the same kind of tissue according to the segmentation. The user may remove markers that are misplaced because of the automatic propagation. This is a crude way of doing it and better solutions may exist, but in most scenarios the same circumstances exist on neighboring slices, and the propagation is therefore reasonable.

5.2.2

Probability Based Level Set

The image edge based Level Set needed a close initialization to produce good quality segmentation result. The data term, consisting of the edge indicator term, (4.14), had several local minima inside the tumor, stopping the evolution before it reached the real tumor borders. Another problem was that the evolution was slow and a large number of iteration where needed to produce a good result. See figure 5.1.

This made the image edge based Level Set unstable and depending on the initialization. Other data term approaches had to be explored. An idea was to implement a probability based data term. The probability was modeled in the same way as in the case of Bayesian Region Growing, as a Gaussian or a sum of Gaussians. A probability image was created and the edge indicator function was then applied to the probability image instead of the smoothed image.

˜

g = 1

1 + c · |∇Gσ∗ S|2

, (5.7)

where ˜g denotes the probability based data term and S denotes the probalility

image. This leads to a much less cluttered data term, see Figure 5.2. Notice how the tumor borders appear much clearer in Figure 5.2(d) than in Figure 5.2(c).

A few different ways to calculate the probability image were tested. The most stable one, however, was

S = PT umor

PT umor+ PLiver+ PBackground

, (5.8)

where PT umor, PLiver and PBackgroundare the probability density functions for

tu-mor, liver parenchyma and the tissue outside the liver respectively. The probability density functions are modeled in the same way as for Bayesian Region Growing, as it is described in Chapter 4. The probability density function of the background is set to a constant function to avoid more user input. As one of the main goals of this thesis was to keep user input as easy and few as possible, only two user inputs

(50)

(a) Original image (b) Data term (Edge indicator func-tion)

(c) Initialization 1 (d) After 700 iterations (e) After 2000 iterations

(f) Initialization 2 (g) After 400 iterations (h) After 700 iterations

Figure 5.1. Two examples of initializations and the resulting segmentation. Notice that

the closer initialization gives a good result after only a few hundred iterations, while the other initialization gives a poor result even after 2000 iterations

are used to gather data of tumor and liver parenchyma intensity, one stroke in liver parenchyma and one stroke in tumor tissue. This makes modeling the tumor to a sum of Gaussians tricky. Therefore the tumor intensity has mostly been modeled

(51)

5.2 Level Set 39

(a) Original image (b) S, the probability image

(c) Original data term (d) Probability based data term

Figure 5.2. The original data term described in [3] and (4.14) compared to the

proba-bility based data term, (5.11).

with one Gaussian

PT umor= 1 √ 2πσexp  −(x − m) 2 2  , (5.9)

where σ and m where approximated as mean and standard deviation of the marked pixels and a small neighborhood (3x3) around them. This is a good approximation for small tumors, but may be quite poor for larger tumors with a high intensity variation, as the one shown in e.g. Figure 5.2. Some experiments were performed with PT umor=  Gm,σ if |Q75− Q25| ≤ T GQ25,σ+ GQ75 if |Q75− Q25| > T , (5.10)

(52)

where Gm,σ denotes a Gaussian distribution with mean and variance m and σ,

Qndenotes the n% quantile and T finally denotes a threshold. The results will be

more thoroughly described in Chapter 6. The results were promising but somewhat inconclusive, mostly because of the limited time in the end of the project.

A problem that have not been mentioned is the liver border problem. For the darker tumor, we get the problem of high tumor probability on the darker liver borders, this is visualized in Figure 5.3.

(a) Original image (b) Segmented image

(c) Probability image (with the segmentation marked)

Figure 5.3. Liver border leakage problem.

This could be solved by doing a liver segmentation and removing the liver bor-der, but as this would be both time consuming and adding a whole new dimension of complexity to the problem, a simpler method has been chosen. The edge indi-cator function, applied on the image, is less than perfect at detecting liver tumor

References

Related documents

Möjligheten att även bärga agnarna innebär därför inte nödvändigtvis att den totala potentialen av skörderester för energiändamål i Sverige ökar.. Under de enskilda år

Revisorerna och redovisningskonsulterna som inte tillämpar K2 i denna studie har gemensamma källor för nyheter och diskussioner inom redovisning vilket innebär att deras

För äldre personer är också stödet från maka eller make viktigt för möjligheten att kunna bo kvar hemma om handikapp eller funktionshinder uppstår (Thorslund &amp;

The overall and the ego density of the internal group of the forced entrepreneurial (average degree=10.000, overall density=1.000, ego density=1.00) was higher than the

1776 Mojtaba Hosseini Mo jtab a H os se in i INSTITUTE OF TECHNOLOGY. Linköping Studies in Science and Technology,

The most important thing with the thesis is to simplify the use of real-time text communication over the Internet protocol by designing a solution for making it possible to make

Innehållsanalys är en metod med avsikt att kvantifiera innehållet i texter och dokument utifrån förutbestämda kategorier och regler (Bryman och Bell, 2013). Denna

uppfvller de omständigheter som krävs för att offentlig regi skall kunna motiveras. Det finns nsk att för starka incitament att pressa kostnaderna kan påverka trafiksäkerhet