ALGORITHM FOR BRAIN TUMOUR DETECTIONS

Medical research is the sphere of interest all around the world, creates and presents new methods for diagnostics and treatment of the patient. Cancer in whatever form is very dangerous, only soon diagnostics and proper treatment can help the patient. The aim of the "Brain tumour detection" project is to detect and locate the anomalies and tumours inside the head. 26 standard markers and unlimited amount of own markers defined in the application allow detecting wide range of anomalies. Tumour can be visualized in 2D, 3D models to show everything strange coloured. It also allows monitoring the progress in time.


INTRODUCTION
Cancer diseases belong to the most serious problem the medicine deals with.In the centre of the interest of experts such as molecular biologists, IT specialists, medicine researchers is early diagnostics and the accurate treatment, which can get the patient possibility to become more healthy and improve the quality of life.This is the main idea of our project -Hospital information system -Brain tumour detection.
The main aim is to detect, localize anomalies (e.g.tumours) of the brain.The user can easily see anomalies coloured and modeled inside the head.Our application offers two-and three-dimensional models of the brain.It brings also the possibility to process the measurement error and get more reliable value.
The results of this application can be used not only for the brain tumour recognition, but also in the diagnostics of the other diseases affecting the brain.
The input for our application is results of the magnetic resonance imaging (MRI) -the descriptive file and snapshots of the layers of the brain, too.
The quality is the critical factor of the snapshot, because the quality determines the amount of the information inside the picture, for example, too dark, too light or blurred picture changes the character of the object.These problems can be solved, but it is difficult process and the quality of the result can be even only a bit better than the original one.
The most important thing is to distinguish between objects and the "background".There are many types of colour-models, which work with pictures, each has some pros and cons and due to requirements, we have to choose the appropriate one.

STATE OF THE ART -OBJECT DETECTION
Successful detection of the object located in the picture is not easy and trivial problems.There exists tenths of various algorithms and techniques for this purpose with their pros and limitations.

Artificial neural network
Artificial neural network (ANN) is a mathematical model inspired by biological neural network and consists of neurons and synapses.Neurons (artificial nodes) are connected together through synapses to create a network of the nodes like a biological neural network.
ANN can have many forms of architecture (forward, backward).The most distinguished models are perceptions, multilayer perceptions and Hopfield neural network.Multilayer perceptron consists of neurons (Fig. 1) structured in layers (one neuron only in one layer) -one is called input layer, one is called output layer and the rest of them are called hidden layers (Fig. 2).There can be one or more hidden layers.The input information starts at input layer, it is then moved to hidden layers and then to output layer (output neuron).At each neuron, this input information is multiplied by strength -significance and if the value is higher than threshold, neuron is activated.For good functionality of the network, it is necessary to teach it -it means to set the right value of significance of each parameter, e.g.synaptical weights and thresholds.Many algorithms can be used to teach the network.The quality of input information is determining factor during teaching, because incorrectly taught network does not work properly.[2]

Adaboost
The aim of this method is to improve precision of the qualification of self-teaching algorithms.The root of it is to create weak classifiers from samples of the information used during teaching.Weak classifier has bad precisiononly a bit better than random.These weak classifiers are connected together to create strong classifiers, that are more successful (boosted).It is iteration method; T-weak classifiers are chosen or created, then connected together to minimize the error of the processing.In this step, the value "T" has to be set very carefully.Too high values can cause the problems of generalization -it is strongly fixed to features of the picture.The quality of classifier can be calculated as a proportion of well/wrong detected objects to all detected objects.[7] [11]

Decision tree
Decision tree classification algorithms mostly uses the binary tree structure as a predictive model (set of decision rules).Decision trees are easy to understand, modify and identify variables of significance.More descriptive names for such tree models are classification trees or regression trees.In these tree structures, leaves represent classifications and branches represent conjunctions of features that lead to those classifications.The movement in the tree is based on values distinction of data separation.[1] [12]

Algorithm K-Nearest Neighbours
Algorithm K-Nearest Neighbours (KNN) is one of the simplest classifier for detection.Its principle is to select the region of finding objects.Searched objects are set as objects with the best probability of appearance.Memory and time consumption are the main disadvantages.[7] [11]

Support Vector Machine
Support Vector Machine (SVM) can be used only for linear data classifying.If the input data are not linear, they must be transformed.SVM works with linear class separator (hyperplane) and transformation itself is realized through the support vectors.[2] [7]

Static and dynamic image processing for biomedical applications
The work deals with static image.Percentage of the dermahaemia is detected computer-aided.It offers complete sequence of algorithms and can be considered as the basics of this project.Development environment LabVIEW was used for analysis and algorithms testing.
Fig. 3 Dermahaemia -original and processed pictures [4] Problem of dynamic image preprocessing is solved by the automatic detection of the lack of the illumination and by using LED diode to lighten scanned images.[10]

IMAGE PREPROCESSING
Image preprocessing is the step of the processing to prepare the image for detection.The aim is to improve quality:  Brightness and contrast -to define main parameters, we often use histograms, which expresses the frequency of the brightness levelse.g. the picture can be too light or too dark.If the frequency does not approximately equal each other, histogram equalization is used to improve details of the objects.[3] [6]  Smooth and blur -Gauss filter is one of the main filters used before image processing.It uses the kernel -array of numbers, which are from Gauss curve and modifies the value of the pixels.There are many modifications of this filters based on the changes of the values inside the kernel.[3] [6] The most important part of the detection is to locate the potential objects of interests and remove those objects, which can not be categorized.

MARKERS
Brain tumour marker is the substance, mostly protein and its presence indicates the tumour in the human body.This substance can be the product of tumour cells, also the normal part of the cell in specific time or amount.
The term marker for our application is defined as the substance located in the monitored tissue.Importance of the monitoring is before starting the treatment to get biomedical and immunological "profile" of the tumour, during the treatment and also after the treatment to judge the effect of treatment.If the value of the marker is growing, it shows new appearance of the tumour -growing the primary tumour or metastases presence.[9] [13]

BRAIN TUMOUR DETECTION
The output MRI data files belong to root documents and files used during implementation.Data were taken from University hospital in Martin and transformed to the special kind of file -database table.This file consists of three main parts -position data, data values and measurement error.Data represent values of all markers taken during MRI scan (e.g.Ala, Cho, Gln, Glu).It is given also the error, which appears in the particular columns (e.g.Ala_SD, Cho_SD, Gln_SD, Glu_SD): Fig. 4 The pattern of the input data All these markers can be processed using our application.This application also enables to create new markers from existing ones using the "marker calculator", which represents the next picture.In the right part of the screenshot (Fig. 5) is the definition of the error values.Creating new markers is important for developing new advanced markers or values from not very significant results of the measurement.This kind of values often can not strictly show anomalies; only combination of them can do that.The main formula for the new value is written in the formulae 1, new_value is a result and M represents used existing markers (not only standard markers, but also created in the application sooner) and the w m is the strength of the marker m and c is constant added to formulae: The error of the processing represents the weighted mean of the used markers, error is the new value of the error of the processing, m represents used existing markers and the w m is the strength of the marker m: Before loading the input file with position data and data values, markers, which should be monitored, have to be chosen.Then, it is important to choose type of normalization because we have the wide range of the values of markers.Application has two main types of normalization -normalization using range and normalization using maximum value: The left part of the form (Fig. 7) is the twodimensional visualization of the selected marker.The right part is the results of the processing default marker.In the bottom part of the screen is the measurement error.The user can set the threshold value for the measurement error.Values of the voxels with higher values of error are unknown (blue colour).If the user wants to compute the values of unknown voxel, it is realized by the linear approximation.

3D model
Another type of the presentation is three-dimensional model (Fig. 9), which groups all two-dimensional models.Each layer can be considered as a slice of the cuboid.The slices are defined by the user and can be processed arbitrarily to show colour anomalies, which represent potencial anomalies.This model also allows rotations and keyboard controlled zoom for better visualization and uses XNA -graphic library with the hardware acceleration.The main part of the model is based on textures, each edge is a texture computed from the data source.
The used library is "XNA Game Studio 4.0 Refresh", because of its interoperability with the modern technologies, such as Silverlight and can be processed to create the XML file from the source data.[5] [8]

Graphs
Graph session consists of two graphs -the actual marker and the default marker (Fig. 13).Our application allows changing this default marker, but only in the administrator module.User (doctor) can choose the type of the shown graphs -line, bar graph or both.The fusion of two graphs is also possible to see the difference between actual and default marker (Fig. 11; Fig. 12).For better visualization, the colour of the graphs can be changed, too.

Comparison
During the treatment, it is necessary to observe progress of the tumour.Monitoring process of the patient is long-time activity; the user can compare the changes of the tumour using values obtained by MRI scan from the history.The older data from MRI are loaded and the doctor can see values of the selected layer.The blue voxels show that the error of the measurement is higher than the threshold value (maximal accepted value of the error processing) (Fig. 14).For the better orientation, the user sets up the critical value of marker; the values greater than critical value are shown with the mark exclamation (Fig. 15) and also the tolerance value used to compare actual and older values of patient.Default value of the critical value is 0,9.It can be changed in admin module, which is password protected.
The next figure shows the main window of the application.The red cross sign warns the user, that anomalies were detected and the position of the detected anomalies is in the datagrid in the left part of the form.Sign of the exclamation represents existence of the values higher than threshold, so the user should process them to decrease the error of them.

Fig. 16 The main window of the application
The main problem of the localization and detection is to decrease the error of the processing, which is mostly located in the border of the processed area.This problem is solved in "Measurement error data processing module" (Fig. 17), which approximates the value of the marker and error.There can be used a lot of functions, so the application has interface to do that, the example is shown in formulae 3; x represents the value of the marker in the surroundings, w is the weight of the object, sets A, B, C include the cells in particular axes.

CONCLUSIONS
The tumour detection and visualization is one part of our project -Hospital information system.Nowadays, the cancer is one of the main reasons of the death.
This application is mostly developed for the University hospital in Martin, where is tested using the scans of volunteers.Scans were realized in standard conditions using MRI Siemens Symphony 1,5 Tesla.Reflections and suggestions were continuous processed.It offers displaying using 4 monitors; all data flows in the windows are synchronized.
The next request defined by the Hospital is to develop the interface for the DICOM viewer.The important part could be also database of the patients -tumour type, prognoses and their treatment.
The Application is compatible with wide range of MRI devices.

Fig. 5
Fig. 5 Marker calculator for creating new markers from existing

Fig. 8
Fig.82D model -section of the brain

Fig. 14
Fig. 14 Comparison data from actual and old MRI scan

Fig. 15
Fig. 15 Mark exclamation of higher value than critical

Fig. 17
Fig. 17 Measurement error data processing module