162 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 Abstarct When soft tissue planning is important, usually, the Magnetic Resonance Imaging (MRI) is a medical imaging technique of selection. In this work, we show a modern method for automated diagnosis depending on a magnetic resonance images classification of the MRI. The presented technique has two main stages; features extraction and classification. We obtained the features corresponding to MRI images implementing Discrete Wavelet Transformation (DWT), inverse and forward, and textural properties, like rotation invariant texture features based on Gabor filtering, and evaluate the meaning of every property in the classification. The classifier is according to Feed Forward Back Propagation Artificial Neural Network (FP-ANN) in the classification stage. The properties thereafter derived to be implemented to teach a neural network based binary classifier that will be automatically able to conclude whether the image is that of a pathological, suffering from brain lesion, or a normal brain. The proposed algorithm obtained the sensitivity of 97.50%, specificity of 82.86% and accuracy of 94.3% for clinical Brain MRI database. This outcome proofs that the presented algorithm is robust and effective compared with other recent techniques. Keywords: Magnetic Resonance Imaging, Neural Network, Dsictete Wavelet Transform, FeatureExtraction, Gabor Filter. 1. Introduction Magnetic Resonance Imaging is used for in vivo imaging of soft tissue in the body. By using magnetic fields together with physical properties of atoms in the body, different tissue types can be distinguished and visualized. MRI is especially suited for imaging the brain, since the magnetic fields not are hindered by the dense skull surrounding the brain, which may cause problems in other medical imaging modalities. After acquiring images of the brain, a wide range of analytical operations can be performed in order to reveal important physical and physiological Ibn Al Haitham Journal for Pure and Applied Science Journal homepage: http://jih.uobaghdad.edu.iq/index.php/j/index Department of Basic Sciences, College of Nursing, University of Baghdad, Baghdad, Iraq Ahmed Shihab Ahmed ahmedshihabinfo@conursing.uobaghdad.edu.iq Doi: 10.30526/33.1.2363 ON-Line MRI Image Selection and Tumor Classification using Artificial Neural Network Article history: Received 4 May 2019, Accepted 10 July 2019, Publish January 2020. mailto:ahmedshihabinfo@conursing.uobaghdad.edu.iq 163 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 characteristics. One such analytical operation is segmentation, which aims to partition the brain Into segments (like tissue types or by anatomical function) using image information (like intensity value or spatial location). Segmentation of the brain into large compartments, such as the left and right hemispheres, the cerebellum and the brain stem are of interest both in order to study the regions separately but also to help locate inner brain structures, to monitor development and to aid surgical planning [1]. Using the result from the segmentation, volume calculation is possible for the compartments. Monitoring volume change over time is of interest since some neurological diseases are associated with a higher rate of brain atrophy (tissue loss) than normal. The brain tumors have different types that made the diagnostic decision very difficult, while sorting for tumor is very remarkable for sorting what kind of brain tumor truly the patients experienced from. The perfect sorting process heads to the right resolution and present perfect treating. Treating differs based on the kinds of brain tumor that are typically specified by first: Age, medical history, and total health; second: kind, location, and the tumor size; third: The range of the status, and forth: toleration for particular medications and treatment [2]. Magnetic field and radio waves are used to find the reply intensity from several tissues [3]. Almost, the public technology to scan the inside structure of the skeleton is MRI where all brain MRI are T1- W and gathered by 0.5 MR modalities. The data set of MRI images of patients created by [4, 5]. Is used in this work. This brain tumor dataset contains 3064 T1-weighted contrast-enhanced images with three brain tumor types (the dataset information can be found in) [5]. Then a reprocessing technique is used in the first step to remove the noise and enhance the images. Three main kinds of tumor; Benign, Pre-Malignant, and Malignant are known. Benign Tumor: It does not extend in a sharp way; it doesn’t effect its neighboring healthy tissues and also does not extend to tissues which are non-adjacent. Moles are the main examples of benign tumors. The second type of the tumor is Pre-Malignant Tumor: it is a stage prior the cancer, if it is not properly treated, it might be led to cancer. The last type of the tumor is Malignant Tumor: Malignancy (mal- = ”bad” and -ignis =”fire”) grows worse with the passage of time and at the end leads to the person death. Basically, malignant is medical terms that specify a significant progressing disease. It is a term implemented to describe a cancer [6]. In this work, we create a novel algorithm to MRI features extraction and classification using a data set of MRI segmented images of patients created by [4]. Implementing DWT (inverse and foreword) and textural characteristics and FP-ANN. Different researchers have proposed related research of MRI brain tumor segmentation and classification. A short modern survey is presented in section 2. This paper is divided as presented below: In section 2, the literature survey corresponding to the proposed method is presented. In section 3, the system model is presented. The experimental activities are offered in section 4. Section 5 presents the outcomes and discussion related to the presented work and the last, section 6 offers a conclusion. 2. Related Works In this section, related works corresponding with the work implemented in this paper is presented as shown below. Ehab et al., 2010, presented a computer-based method for specifying tumor region in the 164 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 brain implementing MRI images. First, they classified a brain into healthy brain or a brain having a tumor. Then, in the next step, additional classification is done for specifying the tumor into benign or malignant. This algorithm specifies whether an input image of MRI brain performs a tumor or health brain as percentage. In addition, it identifies the tumor type; benign or malignant tumor [7]. In 2012, Chan and Gal, presented a supervised machine-learning based technique to detect an artery voxels in DCE-MRI of the brain. This algorithm uses a group of kinetic and local structural properties with a logistic retraction classifier to identify if the arterial voxels is in the image. The evaluation results showed that the presented technique has the prospect to be implemented as a gadget for a precise prediction of Arterial Input Function (AIF) in Dynamic Contrast-Enhanced (DCE)-MRI of the brain [8]. Chaddad et al., 2014, presented modern properties type of Glioblastoma (GEM) detection depending on the Gaussian Mixture Model (GMM). To identify the brain tumor using the Tl, T2 weighted and FLAIR MR Images, the new properties are used. Tree classifier is used on GMM features minimized implementing three prime ingredient to assess the rendering of cancer and normal area segregation Decision. The recognition between the typical area and GEM containing the images was compared implementing three rendering pointers called accuracy, false alarm, and missed detection. Also, three modes of MRI images Tl, T2 and Flair were performed. The features of GMM expounded the best rendering overall. The accuracy rendering was 100% with 0% missed detection and 0% false alarm for the Tl and T2 weighted images respectively. The accuracy reduces to 94.11% with 2.95% missed detection and 2.95% false alarm in flair mode [9]. Shobana and Balakrishnan, 2015, an examination of transform algorithms called Discrete Wavelet Transform (DWT) and Discrete Cosine Transform (DCT) each combined detachable with the Probabilistic Neural Network (PNN) is implemented for the brain tumor classification. For the diagnosis of brain tumor, the algorithm includes three stages: i- remove the noise and sharpen the image, ii- for feature extraction, DWT and DCT is implemented, and iii- the brains abnormality is distinguished by Probabilistic Neural Network with Radial Basis Function [10]. In 2016, Subramaniam and Radhakrishnan, suggested classification of MRI brain images, where consisted of 4th steps: Pretreatment, identification of Region of Interest (ROI), advantage extraction and classification. To beneficent quality for image, (PDE) ”Partial Differential Equations” method was presented and its outcome is contrast with another algorithms such as block analysis method starting by reconstruction and histogram equalization methods implementing statistical factors such as carrier S/R, peak S/R, structural same index measure, figure of merit, MSE. The improved image is converted into bi-level image, which is implemented to sharp the regions and padding the fissures in the binaries image utilizing morphological operators. ROI is identified using region growing method to extort the five features. The classification performance depending on the extracted image features to specify whether the brain image normal or abnormal is done. Therefore, hybridization of Neural Network (NN) with bee colony optimization for the classification and estimation of cancer effect on given MRI image is provided. The authors contrast the rendering of the created classifier with conventional NN classifier implementing statistical measures such as accuracy, sensitivity, and specificity. The work is utilized over 100 MRI brain images [11]. 165 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 Sonavane et al., 2017, presented a system uses neural network based method for brain and breast image classification. The feature extraction such as texture feature, method named gray level co-occurrence matrix (GLCM) is implemented. The created algorithm obtained the sensitivity of 82.50%, specificity of 42.6% and accuracy of 68.85% for breast cancer database while it obtains sensitivity of 81.82%, specificity of 77.53% and accuracy of 79.35% for database of clinical Brain MRI [12]. 3. System Model We present the data sets of MRI images used in this work in this section then the system architecture of the proposed algorithm. A. Data Sets In this work, the data set of MRI is divided into two parts. The first part is for segmented images of MRI for patients age between 30 and 65 years old. The second part of the data set is from segmented images of MRI for patients from 0 month to 12 months. These data sets and there segmentation method is provided by [4]. B. System Architecture The proposed method has different steps to obtain the goal of this paper which is to classify a tumor of a brain of a patient into Benign, Pre-Malignant, and Malignant Tumor. First, the segmented image is enhanced and reprocessed to eliminate an expected noise. Two different types of enhancement methods are implemented on every input image then we select the enhanced image having better mean square error to be taken for the next step of the algorithm. After selecting the best enhanced image, the features extraction using the wavelet transformation (forewarned and inverse technique). The extracted features are processed into a deep learning back propagation neural network to classify for classification purpose. The algorithm 1 explains the steps of the proposed algorithm. Algorithm 1 Tumor Classification 1: Procedure preprocessing 2: Input a segmented image 3: Denoising method using Gabor Filter 4: Hierarchical correlation histogram analysis and histogram adaptive enhancements 5: End procedure 6: Procedure SELECT ON-LINE THE BEST ENHANCED IMAGE. Compute peak signal to noise ratio. {‖ ̂ ‖ } 7: Select the enhanced image having minimum PSNR. 8: End procedure. 9: Procedure features extraction 10: Using wavelet transformation method. 11: Using genetic algorithm. 12: End procedure 13: Procedure tumor classification 14: Deep learning back propagation neural network. 15: PNN classifier. The classifier is for both feature extraction methods 166 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 16: end procedure. 4. Experimental Activities In this section, different activities shown in algorithm 1 are explained as below. A. Pre-processing The purpose of this step is for minimizing the expected noise that impacts the input image when downloaded from the internet. Basically, in this step, to enhance the image and the image fineness to obtain more security and simple in extracting features of the tumor. It consists, three stages that are resizing the image, image filtering, and contrast improvement of an image by Histogram equalization.  Re sizing the segmented image Image resizing is for avoiding complications may happen in the further stage. Image resizing is very important stage and one of the main stages in image processing.  Gabor Filter For evaluating stereo disparity, analyze the texture, and removing noises, the band pass filter implicit on an image processing. Through Gabor filter processing, we may observe that the basic function minimizes the space (time)-ambiguity product. By putting these functions to 2D, it turns into easy to evolve filters for orientation. The resulted image from Gabor filter is highly acceptable in term of Peck Signal to Noise Ratio (PSNR), Entropy, Energy, Variance, Correlation and Contrast [13]. Suppose (x,y) be the coordinates of an image. The impulsive response of a Gabor filter (x, y) is then given by the Equation (1). Gabor ̆ (1) ̆ - +  Image Enhancement Two different methods of image enhancement are use in this work to select the best enhancement to be used in the next steps of this work. The first enhancement method is called Contrast limited Adaptive Histogram Equalization (CLAHE) [14]. It is implemented for enhancing the over noise amplification issue resulted from the method of histogram equalization. It differs from standard histogram modification in which it implements on small areas in the MRI image are named as tiles and calculates different histograms, each compared to a specific region of the picture and implements them for redistributing the contrast estimation or brightness of the image. CLAHE enhance contrast of an image higher than standard histogram equalization in which it provides more detail but still has inclination to increase noise. The second enhancement method is called Hierarchical Correlation Histogram Analysis (HCHA). It depends on the grayscale distribution degree of intensity of pixel by building a correlation histogram, which can enhance the adaptive contrast enhancement for specific object [15]. Figure 1. below depicts the 167 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 enhancement procedure done by the HCHA algorithm. Figure 1. A: Input image B: Enhanced image. B. Image Selection In this phase of the work, we online select the proper image after preprocessing techniques using Peak Signal to Noise Ratio (PSNR). The PSNR depends on a Mean Square Error (MSE) evaluation method. In this work the input image is obtained from a data set downloaded from the internet. So, when we implement different enhancement techniques, we will choose the image obtained from the technique that provides higher MSE value. Thus, the PSNR of the selected enhanced image should be lower than the non-selected enhanced image. Equation (2) and Equation (3) present the mathematical expression of the PSNR and MSE respectively. (2) Where, denotes the maximum pixel value in the original image. ∑ ∑ (3) Where, ^ h; h denote the enhanced and original image respectively. Also, and denote the dimension of the image. C. Features Extraction The features extraction phase is spited into two methods. The first method named the Discrete Wavelet Transformation (DWT) method and the second method called a Genetic Algorithm (GA) are explained below.  Feature Extraction Using DWT For feature extraction, Wavelet transform is an efficient gadget because they permit images analysis at different levels of resolution. This method acquires a huge stockpiling and computationally it is more expensive [16, 7]. Hence an alternative technique for dimension reduction scheme is implemented. For minimizing the dimension of the feature vector and 168 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 maximizing the distinctive power, the Principal Component Analysis (PCA) has been implemented. Principal component analysis is appealing since it effectively and efficiently. As a feature vector, the coefficients of Discrete Wavelet Transform (DWT) are implemented by the proposed algorithm. The wavelet is a strong mathematical gadget for feature extraction implemented to extract the wavelet coefficient from MR images. The wavelets are positioned basis functions shifted and scaled versions of some fixed mother wavelets. Figure 2. DWT schematically from [14]. The main benefit of wavelets is that they present information of localized frequency about the function of a signal, which is significantly useful for classification [16, 9]. Figure 2. depicts the fundamental of the DWT. Where, h(n), g(n) denote the functions acts the high-pass and low-pass coefficients filters respectively. { ∑ ∑ (4) The DWT is a linear transformation that rolls on a data vector whose length is an integer power of two, transferring it into a numerically varies vector of the similar length. It divides data into several parameters of the frequency then examines every component with resolution matched to its scale. DWT can be expressed as shown in Equation (4) [16, 14]. Where, the coefficients aj;k and dj;k corresponding to the approximation components and detail parameters in signal x(n) related to the wavelet function. Whilst parameters i and j refer to wavelet scale and translation factors. The main feature of DWT is a function multiscale representation. Along the x and y direction, the original image is a processed by h(n) and g(n) filters which, is the row representation of the original image. In Figure 2. There are 4 sub-band (LL, LH, HH, HL) images at each scale as a result of this transform. Sub-band image LL is only implemented for DWT computation at the next scale. To measure the wavelet features in the first step, the coefficients of the wavelet are computed for the LL sub-band utilizing Haar wavelet function. The mean and stranded deviations of the sub-bands are computed to represent the supervised data that will be processed in the Probabilistic Neural Network (PNN) classifier stage.  Feature Extraction Utilizing Genetic Algorithm (GA) The GA is a search technique via populations. It implements a fixed length binary string to act 169 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 a possible solution or individual for a problem domain. The extracted features implementing the GA are Intensity and texture based features. These features are i) Skewence, ii) Mean, iii) variance, iv) Stander deviation and v) Entropy. D. Probabilistic Neural Network (PNN) The extracted features from DWT and GA are classified into two classes then every class becomes as a class input. The PNN is corresponding to pdf estimator of the Parzen window. A PNN consists of different sub-networks, each of which is a pdf estimator of the Parzen window for each of the classes. This network presents a solution to pattern classification problems by following a technique evolved in statistics, named Bayesian classifiers [3, 7]. The most essential benefit of PNN is that training is simple and instantaneous [9]. The weights are assigned instead of ”trained”. The available weights must never be immediate, but only new vectors are integrated into weight matrices when training. Then, it could be utilized in real-time. While the training and running process could be used by matrix manipulation, the PNN speed is very speedy. In this work, the set of measurements is the input nodes. Figure 3. depicts the PNN of two classes. Utilizing the Gaussian window function with σ = 1, the Parzen pdf for class i is presented in Equation (5) below. ∑ √ ( ) (5) Where, x, n, and i denote the input data, total number of the sampled data, and the index of the class respectively. In this work, three layers are implemented in the PNN: Radial Basis Layer, the Input layer, and the Competitive Layer. Radial Basis Layer asses vector distances between row weight vectors and input vector in a weight matrix. By Radial Basis Function non linearly, these distances are scaled. Thereafter, Competitive Layer detects the closest distance among them, and thus detects the training pattern closest to the input pattern based on their distance. Figure 3. A schematic illustration of a PNN. The structure of the network is illustrated in Figure 4. The symbols and notations are mentioned as implemented in the book Neural Network Design [9]. i) Input Layer: The vector of the input expressed as p is the black vertical bar in Figure 4. Its dimension is R ×1. In this work, R = 5 for GA and 4 for DWT. 170 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 ii) Radial Basis Layer: The distances vector between the p vector and the vector of weight created of each row of weight matrix W are computed. In this situation, the distance of the vector is identified as the dot product between two vectors [11]. Suppose the W dimension is Q × R. The dot product between W i ـــ th row and the p produces the i ـــ th member of the distance vector ‖ ‖, that has a dimension of Q × 1, as depicted in Figure 4. A combination, n, between the bias vector b and ‖ ‖ is done using multiplication process of element by element as denoted in the expression below. Figure 4. Network structure [7]. ‖ ‖ In this work, in PNN, the transfer function is constructed into a distance criterion with respect to a center as shown in Equation (6). (6) Every parameter of n is substituted into Equation (6). and results related element of a, the output vector of Radial Basis Layer. The i ـــ th element of a can be represented as shown in Equation (7). ‖ ‖ (7) Where is the vector made of the i ـــ th row of W and is the i ـــ th parameter of bias vector b. iii) Competitive Layer: In this Layer, the layer weight matrix M is multiplied with the vector a, producing an output vector d and it has no bias. The function of competition, expressed as C in Figure 2. Results a 1 related to the higher parameter of d, and 0s elsewhere. The index of 1 in c is the tumor number that could be classified by the system. In this work, the output dimension vector, K, is 5. 5. Results and Discussion In this work, we implemented different experiments. For the classification accuracies, the training size and testing sets were specified and they have been taken into consideration. The data set was separated into two separated data sets: the testing set (20 subjects) and the training set (30 subjects). The set of training is utilized in the network training, whereas the set testing is utilized to validate the effectiveness and the trained network accuracy for the brain tumors classification. 171 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 The proposed classification algorithm is assessed through our work and the sensitivity and specificity algorithm is implemented to evaluate the PPN accuracy. The True Position Rate (TPR), sensitivity, recall, and True Negative Rate (TNR) and specificity (SPC), respectively are denoted in the equations. ∑ ∑ ∑ (8) ∑ ∑ ∑ (9) Then, the accuracy (ACC) is. ∑ ∑ ∑ ∑ (10) Specificity computes the method ability to specify normal situations. Sensitivity measures the method ability to specify abnormal cases. The accuracy is the proportion of correct classifications to the total number of classification tests. The proposed method of brain tumor classification has been implemented on different normal, benign and malignant real MR images and the specificity, sensitivity and the PNN accuracy classifier has been measured, implementing the equations given above. Table 1 depicts the accuracy of the proposed method compared to the accuracy of the systems created by [12]. Table 1. illustrated the accuracy of the proposed method compared with other accuracy. Method Accuracy specificity Sensitivity The system created by [12] 79.35 % 77.53 % 81.82 %, The proposed system 94.3 % 82.86 % 97.50 % 6. Conclusion An online selection of the enhanced MRI image is implemented to have this image in the proposed method which is to extract the features of the image using two feature extraction methods (GA and DWT) to classify the brain tumor into benign or malignant using PPN method. In this work, two different image enhancement techniques are implemented and the PSNR evaluation method is used to select the optimum image to be processed in the next step of this work. In this paper, the proposed algorithm shows its results can reach a brain tumor classification accuracy, specificity and sensitivity of 94.3 %, 82.86%, and 97.50% respectively. References 1. Pessoa, L. Understanding brain networks and brain organization. Physics of life reviews. 2014, 11, 3, 400-435. 2. Peer, M.; Salomon, R.; Goldberg, I.; Blanke, O.; Arzy, S. Brain system for mental orientation in space, time, and person. Proceedings of the National Academy of Sciences. 2015, 112, 35, 11072-11077. 3. Eric, J.H.; James, D. Cox. Physical and Biologic Basis of Radiation Therapy, Radiation Oncology; 9th ed.; Publishing Elsevier Inc: Philadelphia. 2010, ISBN 978-0-323-04971- 9. 4. Loizou, C.P.; Murray, V.; Pattichis, M.S.; Seimenis, I.; Pantziaris, M.; Pattichis, C.S. Multiscale amplitude-modulation frequency-modulation (AM–FM) texture analysis of https://www.sciencedirect.com/book/9780323049719 https://www.google.com/search?biw=1600&bih=764&q=Elsevier+Inc&spell=1&sa=X&ved=0ahUKEwi-uoey0_XhAhXRLFAKHa7zCeAQkeECCCcoAA 172 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (1) 2020 multiple sclerosis in brain MRI images. IEEE Transactions on Information Technology in Biomedicine.2011, 15, 1, 119-129. 5. Jun, C. Brain tumor dataset.2017, https://figshare.com/articles/brain_tumor_dataset/1512427/5. 6. Samah, A.A.; Fauzi, M.F.A.; Mansor, S. Classification of benign and malignant tumors in histopathology images. IEEE International Conference on Signal and Image Processing Applications (ICSIPA).2017, 102-106. 7. Ehab, F. Badran.; Mahmoud, E. G.; Hamdy, N. An algorithm for detecting brain tumors in MRI images. IEEE International Conference on Computer Engineering and Systems. 2010, 368-373. 8. Chan, S.L.S.; Gal, Y. Automatic Detection of Arterial Voxels in Dynamic Contrast- Enhanced MR Images of the Brain. IEEE International Conference on Digital Image Computing Techniques and Applications (DICTA).2012, 1-7. 9. Chaddad, A.; Zinn, P.O.; Colen, R.R. Brain tumor identification using Gaussian Mixture Model features and Decision Trees classifier. IEEE 48th annual conference on information sciences and systems (CISS).2014, 1-4. 10. Shobana, G.; Balakrishnan, R. Brain tumor diagnosis from MRI feature analysis-A comparative study. IEEE International Conference on Innovations in Information, Embedded and Communication Systems (ICIIECS).2015, 1-4. 11. Subramaniam, S.; Radhakrishnan, M. Neural Network with Bee Colony Optimization for MRI Brain Cancer Image Classification. International Arab Journal of Information Technology (IAJIT). 2016, 13, 1. 12. Sonavane, R.; Sonar, P.; Sutar, S. Classification of MRI brain tumor and mammogram images using learning vector quantization neural network. IEEE Third International Conference on Sensing, Signal Processing and Security (ICSSS).2017, 1-7. 13. Seetha, J.; Raja, S.S. Denoising of MRI images using filtering methods. IEEE International Conference on Wireless Communications, Signal Processing and Networking (WiSPNET).2016,765-769. 14. Kaur, H.; Rani, J. MRI brain image enhancement using Histogram equalization Techniques. IEEE International Conference on Wireless Communications, Signal Processing and Networking (WiSPNET).2016,770-773. 15. Chen, C. M.; Chen,C. C.; Wu, M.C.; Horng, G.; Wu, H.C.; Hsueh, S.H.; Ho, H.Y. Automatic contrast enhancement of brain MR images using hierarchical correlation histogram analysis. Journal of medical and biological engineering 2015, 35, 6, 724-734. 16. Chaikla, N.; Qi, Y. Genetic algorithms in feature selection. In IEEE SMC'99 Conference Proceedings. IEEE International Conference on Systems, Man, and Cybernetics.1999, 5, 538-540.