Extraction of Tumor From CT Brain Images and Its Visualization Using Contour Plot in GUI
Extraction of Tumor From CT Brain Images and Its Visualization Using Contour Plot in GUI
A PROJECT REPORT
Submitted by
May – 2014
School of Computing Science and Engineering
DECLARATION
We hereby declare that the project entitled “Extraction of Tumor from CT Brain Images and
its Visualization using Contour plot in GUI” submitted by us to the School of Computing Science and
Engineering, VIT University, Vellore-14 in partial fulfillment of the requirements for the award of the
degree of Bachelor of Technology in Computer Science and Engineering is a record of bona-fide work
carried out by us under the supervision of Prof. Natarajan P, Assistant Professor (S.G.), SCSE. We
further declare that the work reported in this project has not been submitted and will not be submitted,
either in part or in full, for the award of any other degree or diploma of this institute or of any other
institute or university.
Abha Pandey(10BCE0229)
Alisha Singla(10BCE0233)
Saloni Agarwal(10BCE0272)
2
School of Computing Science and Engineering
CERTIFICATE
The project report entitled “Extraction of Tumor from CT Brain Images and its Visualization using
Contour plot in GUI” is prepared and submitted by Abha Pandey (10BCE0229), Alisha Singla
(10BCE0233) and Saloni Agarwal (10BCE0272). It has been found satisfactory in terms of scope,
quality and presentation as partial fulfillment of the requirements for the award of the degree of Bachelor
of Technology in Computer Science and Engineering in VIT University, India.
3
ACKNOWLEDGEMENT
First of all we would like to thank our project guide, Prof. Natarajan P., Assistant Professor
(S.G.) of SCSE, VIT U, for providing us his time and knowledge during the building and
completion of this project. We would also like to thank our Program Chair, Prof. Hari Seetha and
Dean, Dr. Venkateswaran S, for giving us this opportunity to implement our ideas and learning
into shaping this project. Next we would take the opportunity to pass our thanks to our
educational institute, Vellore Institute of Technology, Vellore campus, for providing ample
opportunities and guidance .
4
CONTENTS
Title Page 1
Declaration 2
Certificate 3
Acknowledgement 4
Table of Contents 5
List of Tables 7
List of Figures 8
List of Abbreviations 9
Abstract 10
1 INTRODUCTION
1.1 General 11
11
1.2 Motivation
12
1.3 Aim & Objective
13
1.4 Related Work
14
1.5 System Requirements
2
OVERVIEW OF PROPOSED SYSTEM
15
2.1 Introduction of problem
16
2.3 Proposed Solution
5
3
ANALYSIS AND DESIGN
16
3.1 Requirement Analysis
17
3.1.1 Functional Requirements
17
3.1.2 Non-Functional Requirements
18
3.2 Design of Proposed System
18
3.2.1 System Architectural Design
19
3.2.2 System Interface Description
20
3.2.3 Considered Design Constraints
4
IMPLEMENTATION
21
4.1 Tools Used
23
4.2 Execution
23
4.2.1 User Interface Design
24
4.2.2 Test Cases
5 25
RESULTS AND DISCUSSION
34
APPENDIX -I
39
APPENDIX -II
6
LIST OF TABLES
System requirements 14
Test Cases 24
7
LIST OF FIGURES
Prototyping 23
Original image 25
Pre-processed image 25
Background estimation 26
Threshold image 27
Boundary detection 27
8
LIST OF ABBREVIATIONS
ABBREVIATIONS EXPANSION
CT Computerized Tomography
GUI Graphical User Interface
PSNR Peak to Signal Noise Ratio
CPU Central Processing Unit
MRI Magneticl Resonance Imaging
9
ABSTRACT
The field of medical imaging is gaining importance with an increase in the demand for
automated, reliable, fast and efficient diagnosis which can provide insight to the image better
than human eyes. Brain tumor is the second leading cause for cancer-related deaths in men in age
20 to 39 and fifth leading cause cancer among women in same age group. Brain tumors are
painful and may result in various diseases if not cured properly. Diagnosis of tumor is a very
important part in its treatment. Identification plays an important part in the diagnosis of benign
and malignant tumors. A prime reason behind an increase in the number of cancer patients
worldwide is the ignorance towards treatment of a tumor in its early stages. This paper discusses
such an algorithm that can inform the user about details of tumor using basic image processing
techniques. These methods include noise removal and sharpening of the image along with basic
morphological functions, erosion and dilation, to obtain the background. Subtraction of
background and its negative from different sets of images results in extracted tumor image.
Plotting contour and c-label of the tumor and its boundary provides us with information related
to the tumor that can help in a better visualization in diagnosing cases. This process helps in
identifying the size, shape and position of the tumor. It helps the medical staff as well as the
patient to understand the seriousness of the tumor with the help of different color-labeling for
different levels of elevation . A GUI for the contour of tumor and its boundary can provide
information to the medical staff on click of user choice buttons.
Keyword- Brain, CT, Contrast Adjust, Structural Element, Erosion, Dilation, Negation,
Tumor Detection, Contour, C-label , GUI.
10
1 Introduction
1.1 General
The driving force of this project is to create a transparent environment where medical staff and
patient can work in complete cooperation to achieve better results. This transparent environment
will help the patient to feel secure as they will understand the treatment-process choice, which in
turn will help the medical staff to handle the situation in a calm order giving them more time to
think and work.
1.2 Motivation
A brain tumor is defined as abnormal growth of cells within the brain or central spinal canal.
Some tumors can be cancerous thus they need to be detected and cured in time. The exact cause
of brain tumors is not clear and neither is exact set of symptoms defined, thus, people may be
suffering from it without realizing the danger. Primary brain tumors can be either malignant
(contain cancer cells) or benign (do not contain cancer cells) [7].
Brain tumor oc11curred when the cells were dividing and growing abnormally. It is appear to be
a solid mass when it diagnosed with diagnostic medical imaging techniques. There are two types
of brain tumor which is primary brain tumor and metastatic brain tumor. Primary brain tumor is
the condition when the tumor is formed in the brain and tended to stay there while the metastatic
brain tumor is the tumor that is formed elsewhere in the body and spread through the brain [4].
The symptom having of brain tumor depends on the location, size and type of the tumor. It
occurs when the tumor compressing the surrounding cells and gives out pressure. Besides, it is
also occurs when the tumor block the fluid that flows throughout the brain. The common
symptoms are having headache, nausea and vomiting, and having problem in balancing and
walking. Brain tumor can be detected by the diagnostic imaging modalities such as CT scan and
MRI. Both of the modalities have advantages in detecting depending on the location type and the
purpose of examination needed. In this paper, we prefer to use the CT images because it is easy
to examine and gives out accurate calcification and foreign mass location [4].
11
The CT image acquired from the CT machine give two dimension cross sectional of brain.
However, the image acquired did not extract the tumor from the image. Thus, the image
processing is needed to determine the severity of the tumor depends on the size [4].
The reasons for selecting CT images upon MRI images are as follows:
1. CT is much faster than MRI, making it the study of choice in cases of trauma and other
acute neurological emergencies. CT can be obtained at considerably less cost than MRI.
2. CT can be obtained at considerably less cost than MRI.
3. CT is less sensitive to patient motion during the examination.
4. The imaging can be performed much more rapidly, so CT may be easier to perform in
claustrophobic or very heavy patients.
5. CT can be performed at no risk to the patient with implantable medical devices, such as
cardiac pacemakers, ferromagnetic vascular clips and nerve stimulators.
The focus of this project is CT brain images’ tumor extraction and its representation in
simpler form such that it is understandable by everyone. Humans tend to understand colored
images better than black and white images, thus, we are using colors to make the
representation simpler enough to be understood by the patient along with the medical staff.
Contour plot and c-label of tumor and its boundary is programmed to give 3D visualization
from 2D image using different colors for different levels of intensity. A user-friendly GUI is
also created which helps medical staff to attain the above objective without getting into the
code.
12
The focus of this project is CT brain images’ tumor extraction and its representation in simpler
form such that it is understandable by everyone. Humans tend to understand colored images
better than black and white images, thus, we are using colors to make the representation simpler
enough to be understood by the patient along with the medical staff.
The objective of this work is to bring some useful information in simpler form in front of the
users, especially for the medical staff treating the patient. Aim of this paper is to define an
algorithm that will result in extracted image of the tumor from the CT brain image. The resultant
image will be able to provide information like size, dimension and position of the tumor, plotting
contour and c-label of the tumor and its boundary provides us with information related to the
tumor that can prove useful for various cases, which will provide a better base for the staff to
decide the curing procedure. Plotting contour-f plot and c-label plot of the tumor and its
boundary will give easy understanding to the medical staff because humans comprehend images
better with the help of different colors for different levels of intensity, giving 3D visualization
from a 2D image.
The paper “Tumor Detection using Threshold operation in MRI Brain Images” by Natarajan P.
et.al, [10] states that Primary brain tumors include any tumor that starts in the brain. Primary brain
tumors can start from brain cells, the membranes around the brain (meninges), nerves, or glands.
Tumors can directly destroy brain cells. They can also damage cells by producing inflammation,
placing pressure on other parts of the brain, and increasing pressure within the skull. A metastatic
brain tumor is a cancer that has spread from elsewhere in the body to the brain.
13
According to R. Rajeswari, P. Anadhakumar, in “Image segmentation and identification of brain
tumor using FFT techniques of MRI images”, published in “ACEEE International Journal on
Communication, Vol. 02” [6]
the conventional definition of brain tumor includes neoplasms
originating from brain parenchyma as well as from meninges and even tumors of the pituitary
gland or of osseous intracranial structure that can indirectly affect brain tissues [4].
However, most of the technique used is more on MRI modality compared to CT images because
it is higher resolutions. CT images of human body parts help medical doctors in diagnosing
illness like brain tumor, colon cancer, lung cancer and so forth. However, it is quite difficult to
obtain the important features in the images because it is limited by the image processing level
and also doctor’s experience. This is expressed in “Automatic Classification and segmentation of
brain tumor in CT images using optimal dominant gray level run length texture features,” by A.
Padma and R. Sukanesh [13].
Windows 7
14
Mac OS X 10.5.5 All Intel-based Macs 1 GB for MATLAB 1024 MB
(Leopard) and above only, (At least 2048 MB
3–4 GB for a typical recommended)
Mac OS X 10.6.x (Snow installation
Leopard)
Ubuntu 8.04, 8.10, 9.04, Any Intel or AMD x86 1 GB for MATLAB 1024 MB
and 9.10 processor supporting only, (At least 2048 MB
Red Hat Enterprise Linux SSE2 instruction set 3–4 GB for a typical recommended)
5.x installation
SUSE Linux Enterprise
Desktop 11.x
Debian 5.x
In the existing solution of extraction of brain tumor from CT scan images tumor part is detected
from the CT scan of the brain. The proposed solution also do the same thing , inform the user
about details of tumor using basic image processing techniques. The methods include noise
removal and sharpening of the image along with basic morphological functions, erosion and
dilation, to obtain the background. Subtraction of background and its negative from different sets
of images results in extracted tumor image. The difference in the proposed solution with existing
solution is plotting contour and c-label of the tumor and its boundary which provides us with
information related to the tumor that can help in a better visualization in diagnosing cases. This
15
process helps in identifying the size, shape and position of the tumor. It helps the medical staff as
well as the patient to understand the seriousness of the tumor with the help of different color-
labeling for different levels of elevation
A GUI is created in the MATLAB offering the proposed application of extracting the tumor from
selected brain image and its visualization using contour plot. Without having to deal with the
code, medical staff can select the CT image and study the extracted tumor along with its
boundary from contour and c-label options. The GUI also contains options for zoom-in, zoom-
out, data cursor for co-ordinates, and prints the selected image.
1. Patient
2. Doctor
1. Patient can use the software to see the size of the tumor. It’s easy for the laymen to
understand the size and position of the tumor.
16
2. Doctor are using for extracting of tumor from CT scan images of brain and visualization of
tumor using contour plot.
17
3.2.1 System Architectural Design
18
3.2.2 System Interface Description
Pre-Processing
(Grey-scale; Noise Removal; Sharpening)
Background Estimation
(Erosion and Dilation)
19
3.2.3 Considered Design Constraints
3.2.3.1 User Interface Constraints
Using this system is fairly simple and intuitive. A user familiar with basic
computer operability skills should be able to understand all functionality provided
by the system.
20
4 Implementation
C. Negation
The estimated background, obtained by the previous step, will contain the eroded tumor
region as our aim was to remove the skull boundary and radius of structuring element
was kept as such. Negative of the image can be calculated by subtracting [11] the image
from 255 which the highest value any pixel can have.
D. Subtraction
Subtracting background and negative of background from eroded image will result in
images with and without tumors [11]. These images will contain skull’s boundary along
with the tumor region and thus will be imperfect for use [6].
E. Contrast Adjustment
21
In order to provide a clear and well-defined image to work upon, this operation is further
applied to the result of subtracting images in previous step. This operation involves
increasing the contrast of the filtered image, which is accomplished by performing
contrast adjustment techniques [6]. These contrast images will further be subtracted from
dilated image [6] [11].
F. Threshold
Next step in this algorithm is to calculate global image threshold using Otsu's method [10],
which chooses the threshold to minimize the intra-class variance of the black and white
pixels. Thus we will get a clear image of the tumor region [6].
G. Boundary Detection
In earlier times without aid of medical imaging tumors were identified manually and
boundaries were drawn around it by an expert which always contained issues related to
manual-error. Thus, to remove this error, the next step includes producing a clear
boundary of the identified tumor using the morphological operation ‘remove’, which
removes all the interior pixels, thus leaving only the boundary pixels on.
22
4.2 Execution
23
4.2.2 Test Cases
Initial image Expected Output Obtained Output
24
This paper focuses upon the detection and visualization of a tumour in the brain from CT
images. By developing the proposed architecture, the demarcation of the tumour in the CT
image is obtained. The following results showcase the outputs received after each step in the
algorithm.
After the original image undergoes pre-processing transformations we get figure 5.2 from
figure 5.1. These basic pre-processing transformations include:
1. Changing the image to greyscale, as we need to find contour of the final image which
works on greyscale images.
2. Applying low pass filter, to remove any noise, if present, in the image.
3. Applying high pass filter, to obtain sharpened image with clear-defined boundaries.
Series of steps that lead to figure 5.3 from figure 5.2 are:
25
1. Eroding with structural element of big radius, say 6, to erode more.
2. Dilating with structural element of small radius, say 3, to dilate lesser than erode.
3. Use morphological open to get same amount of erosion and dilation, to estimate
background
Transitions from figure 5.3 to figure 5.4 and figure 5.5 happens by following steps mentioned
below:
1. Negate background.
2. Delete background from eroded iamge.
3. Delete negative of background form eroded image.
4. Find contrast of both subtracted images.
26
Fig. 5.5. Contrast adjustment when negative Fig. 5.6. Subtraction of images to result in
of background is subtracted tumor region
In order to obtain figure 5.7 from figure 5.6 we take threshold of tumor region image (figure
5.7), in this process we convert the image to binary.
27
Fig. 5.9. Contour of original image Fig. 5.10. Contour of tumour region
Finally, we find contour of grey image, tumor region (figure 5.10) and tumor boundary
(figure 5.11).
28
A GUI, programmed in MATLAB shows the following step by step user interfaces.
29
Fig 5.14. Contour of selected image in GUI
30
Fig 5.16.C-label of selected image in GUI
31
6 Conclusion and Future Enhancements
The proposed algorithm is inputted with gray scale images of brain that contain tumour/s. The
image is processed through various stages of morphological operations like filtering, contra
adjustment, erosion, dilation etc. through MATLAB programming. Hence, the tumour is outlined
in the original image and clearly demarcated. Contour plot and c-label plot is created to provide
3D visualization from the 2D image. A GUI is also developed which enables the above
application with a user friendly interface.
6.2656 +25.84 db
4.0156 +25.25 db
6.7344 +26.70 db
32
4.7188 +25.73 db
Possible extension of the presented work could use more features. It would be beneficial to
connect the system to cloud storage of patient’s information in hospital. The application can be
extended to accessibility and usability through mobile phones.
7 References
[1] W.Gonzalez, “Digital Image Processing”, 2nd ed. Prentice Hall, Year of Publication 2008.
[2] Rafael C. Gonzalez, Richard E. Woods, Digital Image Processing, Second Edition.
[3] Rafael C. Gonzalez, Richard E. Woods, Steve L. Eddins, Digital Image Processing Using MATLAB, 2003.
[4] Rania Hussien Al-Ashwal, Eko Supriyanto, et.al., “Digital Processing for Computed Tomography Images:
Brain Tumor Extraction and Histogram Analysis”, Mathematics and Computers in Contemporary Science,
2013
[5] J. Selvakumar, A. Lakshmi and T. Arivoli, “Brain Tumor Segmentation and its area calculation in Brain
MR images using K-means clustering and fuzzy C-mean algorithm”, Imternational Conference on
Advances in Engineering, Science and Management, 2012
[6] R. Rajeswari, P. Anadhakumar, “Image segmentation and identification of brain tumor using FFT
techniques of MRI images”, ACEEE International Journal on Communication, Vol. 02, No. 02, July 2011
[7] Mustaqeem, Anam, Ali Javed, and Tehseen Fatima, “An efficient brain tumor detection algorithm using
watershed and thresholding based segmentation”, International Journal 4, 2012
[8] P.Dhanalakshmi, T.Kanimozhi, “Automated Segmentation of Brain Tumor using K-Means Clustering and
its area calculation”, IJAEEE, 2013.
[9] Q.Hu, G. Quian, A. Aziz, W.L.Nowinski,”Segmentation of Brain from Computed Tomography head
images,” Engineering in Medicine and Biology 27 th Annual Conference, 2005.
[10] Natrajan P. , Krishnan N. , Natasha Sandeep kenkre and et.al ,”Tumor Detection using Threshold operation
in MRI Brain Images,” IEEE International Conference on Computational Intelligence and Computing
Research, 2012.
[11] P. Natrajan, Debsmita Ghosh, kenkre Natasha Sandeep, Sabiha Jilani, ”Detection of Tumor in
Mammogram Images using extended Local Minima Threshold,” International Journal of Engineering and
Technology, Vol. 5, No . 3, jun-jul 2013.
[12] X. Zang, J.Yang, D.Weng, Y. Liu and Y. Wang, “A novel anatomical Structure segmentation method of
CT head images,” International Conferences on complex medical Engineering, 2010.
[13] A. Padma and R. Sukanesh, “Automatic Classification and segmentation of brain tumor in CT images using
optimal dominant gray level run length texture features,” International journal of Advanced Computer
Science and Applications, 2011.
[14] R.C. Patil and Dr. A.S. Bhalachandra, “Brain tumour extraction from MRI images using MATLAB,”
International Journal of Electronics, Communication &Soft Computing Science and Engineering,vol. 2, pp.
1-4.
33
APPENDIX-I
MATLAB
MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment
and fourth-generation programming language. It uses the L-shaped membrane logo. Developed
by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data,
implementation of algorithms, creation of user interfaces, and interfacing with programs written
in other languages, including C, C++, Java, and FORTRAN.
GUIDE
GUIs (also known as graphical user interfaces or UIs) provide point-and-click control of
software applications, eliminating the need to learn a language or type commands in order to run
the application.
34
MATLAB apps are self-contained MATLAB programs with GUI front ends that automate a task
or calculation. The GUI typically contains controls such as menus, toolbars, buttons, and sliders.
Many MATLAB products, such as Curve Fitting Toolbox, Signal Processing Toolbox, and
Control System Toolbox, include apps with custom user interfaces. You can also create your own
custom apps, including their corresponding UIs, for others to use.
MATLAB supports developing applications with graphical user interface features. MATLAB
includes GUIDE (GUI development environment) for graphically designing GUIs. It also has
tightly integrated graph-plotting features. For example the function plot can be used to produce a
graph from two vectors x and y.
To create GUI in MATLAB follow the steps listed below.
1. Click on GUIDE button on toolbar in MATLAB launch pad.
2. Make your choice of the type of GUI you need.
3. Make buttons and/or menus from the tools in GUIDE.
4. Double click on menu that is created in grey area of the GUIDE, property manager will
open.
5. Change properties according to requirement and change the code if needed.
THRESHOLD
Thresholding is the simplest method of image segmentation. From a grayscale image,
thresholding can be used to create binary images. Sezgin and Sankur (2004) categorize
thresholding methods into the following six groups based on the information the algorithm
manipulates.
1. Histogram shape-based methods, where, for example, the peaks, valleys and curvatures
of the smoothed histogram are analyzed
2. Clustering-based methods, where the gray-level samples are clustered in two parts as
background and foreground (object), or alternately are modeled as a mixture of two
Gaussians
3. Entropy-based methods result in algorithms that use the entropy of the foreground and
background regions, the cross-entropy between the original and binarized image, etc.
6. Local methods adapt the threshold value on each pixel to the local image characteristics.
35
We have considered Otsu’s method of thresholding in the proposed algorithm. The algorithm
assumes that the image to be thresholded contains two classes of pixels or bi-modal histogram
(e.g. foreground and background) then calculates the optimum threshold separating those two
classes so that their combined spread (intra-class variance) is minimal.
CONTOUR
A contour line (also isoline, isopleth, or isarithm) of a function of two variables is a curve along
which the function has a constant value. In cartography, a contour line (often just called a
"contour") joins points of equal elevation (height) above a given level, such as mean sea level.
A contour map is a map illustrated with contour lines, for example a topographic map, which
thus shows valleys and hills, and the steepness of slopes. The contour interval of a contour map
is the difference in elevation between successive contour lines.
More generally, a contour line for a function of two variables is a curve connecting points where
the function has the same particular value. The gradient of the function is always perpendicular
to the contour lines. When the lines are close together the magnitude of the gradient is large: the
variation is steep. A level set is a generalization of a contour line for functions of any number of
variables.
Contour lines are curved, straight or a mixture of both lines on a map describing the intersection
of a real or hypothetical surface with one or more horizontal planes. The configuration of these
contours allows map readers to infer relative gradient of a parameter and estimate that parameter
at specific places. Contour lines may be either traced on a visible three-dimensional model of
the surface, as when a photogrammetrist viewing a stereo-model plots elevation contours, or
interpolated from estimated surface elevations, as when a computer program threads contours
through a network of observation points of area centroids. In the latter case, the method
of interpolation affects the reliability of individual isolines and their portrayal of slope, pits and
peaks.
36
CONTOUR-F
Contour-f can be explained through its name, ‘contour-filled’. A filled contour plot displays
isolines calculated from matrix Z and fills the areas between the isolines using constant colors
corresponding to the current figure's colormap. It is filled two-dimensional contour plot.
Contourf (Z) draws a filled contour plot of matrix Z, where Z is interpreted as heights with
respect to the x-y plane.Z must be at least a 2-by-2 matrix that contains at least two different
values. The number of contour lines and the values of the contour lines are chosen automatically
based on the minimum and maximum values of Z. The ranges of the x- and y-axis
are [1:n] and [1:m], where [m,n] = size(Z).
C-LABEL
C-label stands for ‘Contour plot elevation labels’. In other words, the clabel function adds height
labels to a two-dimensional contour plot.
37
CT IMAGES
X-ray computed tomography (x-ray CT) is a technology that uses computer-processed x-rays to
produce tomographic images(virtual 'slices') of specific areas of the scanned object, allowing the
user to see what is inside it without cutting it open. Digital geometry processing is used to
generate a three-dimensional image of the inside of an object from a large series of two-
dimensional radiographic images taken around a single axis of rotation. Medical imaging is the
most common application of x-ray CT. Its cross-sectional images are used for diagnostic and
therapeutic purposes in various medical disciplines. The rest of this article discusses medical-
imaging x-ray CT; industrial applications of x-ray CT are discussed at industrial computed
tomography scanning.
As x-ray CT is the most common form of CT in medicine and various other contexts, the
term computed tomography alone (or CT) is often used to refer to x-ray CT, although other types
exist (such as positron emission tomography [PET] and single-photon emission computed
tomography [SPECT]). Older and less preferred terms that also refer to x-ray CT are computed
axial tomography (CAT scan) and computer-assisted tomography. X-ray CT is a form
of radiography, although the word "radiography" used alone usually refers, by wide convention,
to non-tomographic radiography.
There are several advantages that CT has over traditional 2D medical radiography. First, CT
completely eliminates the superimposition of images of structures outside the area of interest.
Second, because of the inherent high-contrast resolution of CT, differences between tissues that
differ in physical density by less than 1% can be distinguished. Finally, data from a single CT
imaging procedure consisting of multi-planar reformatted imaging.
38
APPENDIX-II
PSEUDO CODE
function varargout = simple_gui(varargin)
% SIMPLE_GUI M-file for simple_gui.fig
% SIMPLE_GUI, by itself, creates a new SIMPLE_GUI or raises the existing
% singleton*.
% H = SIMPLE_GUI returns the handle to a new SIMPLE_GUI or the handle to
% the existing singleton*.
% SIMPLE_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SIMPLE_GUI.M with the given input arguments.
% SIMPLE_GUI('Property','Value',...) creates a new SIMPLE_GUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before simple_gui_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to simple_gui_OpeningFcn via varargin.
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
% See also: GUIDE, GUIDATA, GUIHANDLES
39
% End initialization code - NOT TO BE EDITED
40
Sub ((Dilate (Contrast (Sub (Background from Eroded image)))) from (Contrast (Sub (Negative
of background from Eroded image))))
Tumor = Resulting image
Threshold (Tumor)
Tumor_Boundary = Boundary (Threshold (Tumor))
Current Data = Original Data
Show(Original Image);
% --- Outputs from this function are returned to the command line.
function varargout = simple_gui_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
41
% Hints: contents = cellstr(get(hObject,'String')) returns disp_type contents as cell array
% contents{get(hObject,'Value')} returns selected item from disp_type
42
% --- Executes on button press in clabel.
function clabel_Callback(hObject, eventdata, handles)
% hObject handle to clabel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clabel(contour(Current Data));
43
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
simple_gui_OpeningFcn(~,~, handles);
44