Paper received: 2011-10-17, paper accepted: 2012-04-04 © 2012 Journal of Mechanical Engineering. All rights reserved. Competitive Hopfield Neural Network Model for Evaluating Pedicle Screw Placement Accuracy Diana Popescu1* - Catalin Gheorghe Amza1 - Dan Laptoiu2 - Gheorghe Amza1 1 University Politehnica of Bucharest, Romania 2 Colentina Clinical Hospital, Romania In this paper, the application of an X-ray image segmentation algorithm based on a Competitive Hopfield Neural Network (CHNN) model for evaluating the insertion accuracy of pedicle screws is presented. In practice, the evaluation of pedicle screw insertion accuracy is made visually in two planes and is based on postoperative computer tomography scans or radiography. In order to increase the reliability of the assessment, this research proposes a new approach that automates this process and can be used for developing a training system for pedicle screw implantation. The proposed approach implements a training method which allows extracting features of the pedicle screw from X-ray images segmented using a modified HNN algorithm, and compares them with values from a knowledge database. Keywords: medical imaging, pedicle screw, Hopfield neural network, lumbar vertebra 0 INTRODUCTION Posterior stabilization of spine is required in different types of pathologies and can be accomplished by inserting screws in vertebral pedicles and connecting them with rods in order to determine a long-term biological fusion by holding together different segments of the spine. The pedicle screw insertion procedure poses specific problems to spine surgeons due to the vicinity of nerve roots, the particular shape of the pedicle and its patient-dependent dimensions and spatial orientation, and requires preoperative studies based on medical imaging for choosing the proper screw type, diameter and length. Clinical experience and biomedical studies [1] to [3] recommend the screw to be inserted along the pedicle axis starting from an entry point (Fig. 1) established by surgeon considering the bone quality and pedicle anatomy and orientation. Usually, in the free hand techniques, the entry point for pedicle screw is visually chosen by the surgeon and the insertion trajectory is determined by palpation and by mentally reconstructing the position of the vertebra according to the CT/MRI information gathered during the planning stage. However, despite the use, during implantation, of advanced medical imagistic techniques, such as C-arm fluoroscopy, literature [2] and [4] reports screws misplacements up to 8 to 13%, hence the importance of developing training systems for surgeons. Such a training system is described in Fig. 2 and it is based on the use of a Competitive Hopfield Neural Network (CHNN) algorithm for performing X-ray image segmentation required for the automated assessment of the pedicle screw insertion precision. The development of this training system and its interface is part of an on-going interdisciplinary research project of the authors and gathers expertise from different fields such as mechanical engineering, image processing, medical modelling and programming. According to the method presented in Fig. 2, the surgeon establishes the entry point, chooses pedicle screw diameter and length and inserts the screw in the test vertebra manufactured from polyurethane foam based on different CT/MRI real patient data. Fig. 1. Anatomy of a lumbar vertebra (L3) In order to mimic the real surgical conditions as much as possible, the screw is inserted in a vertebra placed in a sand box so that only several landmarks are visible to the trainee. In the next stages, the vertebra is placed on a conveyor and brought into the X-ray inspection unit, and images of the vertebra and screw, in two planes, are acquired using a standard protocol. Image segmentation is performed using a CHNN based algorithm, the vertebra and the screw are extracted as individual objects and calculations are Digital modelling of Manufacturing process Choosing the entry Drilling the vertebra Applying a HNN Image segmentation a lumbar vertebra obtained from CT/ RMN data of a lumbar vertebra test model point and pedicle screw diameter and length and Inserting the screw Acquiring X-ray images in transverse and sagittal planes algorithm for extracting pedicle screw attributes Displaying deviation value and messages of information/evaluation Fig. 2. Training method for pedicle screw insertion based of intelligent processing of X-ray images made for determining the deviation of the screw axis from the pedicle axis - considered as ideal trajectory. The value of the deviation is compared to the safety area limits [4] to [6] and evaluation messages are displayed accordingly. 1 FRAMEWORK FOR AN INTELLIGENT X-RAY TRAINING SYSTEM FOR PEDICLE SCREW INSERTION 1.1 X-Ray Images Processing and Analysis In practice, in most cases, the evaluation of the pedicle screw insertion accuracy is based on postoperative radiography/CT scans took in two planes (transverse and sagittal) and visually analyzed by surgeons, which raises questions regarding the reliability of this assessment method [5]. Therefore, this paper presents a different innovative approach in which the subjectivity is eliminated by using an intelligent segmentation algorithm for X-ray images analysis. Based on this algorithm, dedicated software is developed within a training system for automatically determining the deviation of the screw insertion trajectory from the pedicle axis. Artificial neural networks have applications not only in many engineering fields [7] to [9], but they are also used in the segmentation of medical images, as presented in [10] to [13] for HNN algorithms. In this sense, a literature survey presented in [14] shows that HNN are mostly used in image reconstruction, feed forward neural networks are used for image segmentation, while back propagation neural networks are used for object recognition. However, automatic medical images processing and analysis is still a challenging task related mainly to: (i) the high differences between patients' anatomical structures which localization and shape are hard to be interpreted by computer software, and (ii) the difficulty to find a proper segmentation method for processing images with high noise determined by the human tissue and bones characteristics [15]. Literature reports solutions related to spinal cord automatic detection from CT images [16], virtual endoscopy [17] or mammography [18]. No references about an automated training system based on intelligent X-ray image processing and analysis applied to pedicle screw implantation accuracy are presented in literature, to the best of the authors' knowledge. Regarding advanced training system for pedicle screw implantation, the literature reports a computer-assisted system based on X-ray [19] and several simulators based on augmented or virtual reality [20] and [21]. The system presented in [19] uses markers-based imaging registration and spatial geometric transformation for guiding the trajectory of a 3D digitizer. A senior surgeon indicates the entry point and the optimal trajectory, and then the system guides the trainee in placing the screw within the safety area. For the application presented in this paper, the segmentation algorithm has to be manageable from the point of view of computations involved, therefore suitable for real time use, and it has to be independent of the size of the image. First, classical thresholding algorithms used for image segmentation were comparatively analysed, then segmentation algorithms based on artificial intelligence were applied to the analyzed images and the results were compared. Finally, a competitive HNN algorithm is proposed, developed and implemented in software. 1.2 X-Ray Training System for Screw Insertion in Vertebral Pedicle In the case of pedicle screw insertion, the evaluation process implies taking an X-ray image of a test vertebra. This image is then subsequently automatically analyzed by a computer algorithm and the insertion precision is measured. The proposed system - an implementation of a general pattern recognition system, comprises the following units/ systems (Fig. 3): 1. Image acquisition system for the acquisition of a dual-band energy image of the vertebra; 2. Image pre-processing system for enhancing the X-ray images for intermediate level image processing (contrast enhancement, background removal, noise removal etc.); 3. Image segmentation system for partitioning the X-ray image into meaningful classes for further higher level inspection using a HNN module. This system makes possible to automatically extract the "pedicle screw" as a separate object from the X-ray image; 4. High level detection system - for calculating the deviation from an "ideal" position of a pedicle screw. This module first extracts the segmented "pedicle" and then it compares its position to an ideal position that is incorporated within the system. The object is extracted by using simple back-tracking algorithm (considering an area of same pixel values as resulted from the segmentation process). Then, only for visual purposes for trainees, the original image can be superimposed over the segmented image. The following stages are part of the general X-ray image analysis process: 1. Acquire the X-ray image/images of the vertebra test model. 2. Low-level image processing of the resulting image/images: a) X-ray image or images pre-processing -background removal, contrast enhancement and removal of possible noise; b) X-ray image segmentation using an algorithm based on Competitive Hopfield Neural Network (CHNN); c) Pedicle screw extraction for the obtained segmented image using a simple backtracking algorithm. 3. High-level detection of the insertion precision of pedicle screw: a) Feature extraction for the pedicle screw -position, rotation angle, size, etc.; b) High-level detection of the deviation from an ideal position of the pedicle screw. Human experience has to be incorporated into the design of such a training system. This knowledge is gathered into a database which contains general data about the pedicle screw (such as physical and chemical characteristics, types, dimensions), vertebra morphological data for different populations, data about the possible errors that may appear (such as vertebral wall penetrations), safety limits expressed in grades according to classification used in practice and any other information directly or indirectly related to the training process (such as entry points for pedicle screws, type of instrumentations used in practice, surgical approaches, etc.). Fig. 3. Intelligent X-ray based system for pedicle screw insertion accuracy evaluation 2 X-RAY IMAGE SEGMENTATION ALGORITHM BASED ON A HNN MODEL 2.1 X-Ray Image Segmentation Using Classic and Artificial Intelligence Based Algorithms Image segmentation subdivides a digital image into multiple continuous, disconnected and nonempty subsets (or segments) with uniform and homogenous characteristics, which provides meaningful regions for a certain application, allowing the extraction of the image attributes. These segments should correspond to structural units ("objects") in the scene. There is no universal method that can be successfully applied to all types of images due to a lack of a general mathematical model. Literature reports different categories of image segmentation algorithms: edge-based (such as Canny technique), region-based (Otsu, region growing etc.) and special theory-based (Fuzzy). Fig. 4. The original X-ray image Fig. 5. Otsu thresholding segmentation algorithm Several classical segmentation algorithms and edge detection techniques (Sobel, Canny, Prewwit, Robert, Laplace, Otsu thresholding, Watershed, SIOX, Shanbhag, Huang, gradient etc.) available in dedicated image processing and analysis software (such as the open-source programs: ImageJ [22], ITK [23] or Creaseg [24]) or in other commercial software such as Matlab (Dipimage toolbox), were analyzed to determine if they are suitable for use in segmenting X-ray image of vertebra real/test models (Fig. 4). Using ImageJ different algorithms and edge detection operators were applied to the original X-ray image of the test vertebra, several results being presented in Figs. 5 to 8. Fig. 7. Prewit segmentation algorithm Fig. 8. Gradient segmentation algorithm Fig. 9. Fuzzy segmentation algorithm 3 classes Fig. 10. Fuzzy clustering segmentation algorithm Fig. 11. Hopfield Koss segmentation algorithm This analysis showed that simple thresholding and multi-thresholding algorithms are not good enough for a correct segmentation of vertebra X-ray images due to the images fuzziness and to the fact that the vertebra has variable dimensions/thickness. Also, the use of artificial intelligence image segmentation algorithms (Fuzzy C-means, Fuzzy clustering, Hopfield-Koss etc.) proved unsuitable for the application (see Figs. 9 to 11). 2.2 X-ray Image Segmentation Using HNN -Proposed Algorithm and Implementation HNN was proposed in 1985 by Hopfield as a way of solving optimisation problems. The network for the optimisation application tends to relax into stable states that minimize an energy function of a Lyapunov form [25]. The segmentation process can also be seen as a constraint optimisation problem. The constraints, in this case, are based on the fact that objects extracted from the image need to be homogenous and different from each other. Spatial constraints can also be introduced, i.e. objects over the edges of the image are not important. Starting with a random selection of objects, a HNN should be able to reach a stable state in which all the segmentation constraints are satisfied. Thus, the usual strategy for segmenting X-ray images using HNN comprises two steps [25]: 1. Find a binary representation for the segmentation solution, so that it can be mapped into a HNN stable state. 2. Define the energy function whose minimization will lead to an optimum solution to the problem. The problem of segmenting an image of n*n pixels into k classes is to choose a suitable architecture for the HNN. For this research, considering the above mentioned requirements, the approach presented in [26] was applied, using a grid of N by k neurons, where N is the number of grey-level values found in the input image. The number of neurons is N*k. Using this binary mapping, the segmentation constraints can be summarized as follows: only one neuron per row can be active (output is 1); this puts each grey-level into one class (left term of Eq. (1)); the sum of outputs of all neurons in one row is 1, this ensuring the fact that each grey-level belongs to only and only one class (right term of Eq. (1)), where a and p are constant values: =«Z|Z -1| (1) =1 i=1 j=1 j *i By minimizing the semantic energy (defined in this case as the sum of square distances from each grey-level to the centre of its class), these distances decrease to a minimum leading to a solution for the segmentation. For each vertebra, two images are taken, one high-energy X-ray and one low-energy X-ray image, thus a semantic energy for both images can be defined as follows: 2 =1 V i=1 Ni N k i Esemantic1 = -VxiDISxyhlyV yi + x=1 y=1i=1 Z hlyVyi y=i N n2 k i Z Z^" x=1 y=1i=1 Z hhy (2) -vxiDISyhhyv, y=1 where Nb N2 are the number of grey-levels present in the low-energy respectively high-energy image, 9 and d are constants and hly and hhy are the histogram values of the y grey-level for the low-energy band and high-energy band image respectively and DISxy represent the distance between grey-level lx and grey-level ly. The formula used for calculating DISxy is the following: DlSx ,y = d,^ Jy =(lx - ly )2. (3) Using the above mentioned formulas, the energy can be expressed as presented in Eq. (4): A simplification of the energy equation can be done using a Winner Take All (WTA) scheme transforming HNN into a competitive architecture (CHNN). The input-output function for a neuron is modelled as to satisfy the constraints of the energy function. For every row, only one neuron can be active. The neuron that receives the maximum input from all other neurons is declared a winner and its output is set to 1; the output of the rest of neurons for the same row is set to 0: V x=1,...,N i=l,...,k 1, if u, = max 0, otherwise (5) In other words, only one neuron is assigned 100% to a class. This satisfies the syntactic energy terms, therefore the energy Eq. (4) can be simplified to: 1 = 1 ^ ^ I (hly + hhy )Vyi y=i -VxiDlSxy (hly + hhy )Vyi . (6) E = E + E syntactic semantic x=1 i=1 j=1 1 * (4) 1 N =1 y=1 i=1 £ (hly + hhy )v y=1 where N = maxfNi, N^. -vxi(lx -ly)\hly + hhy)vyi, yi Comparing Eq. (5) with the definition of the Lyapunov energy we can compute the updated equation for the interconnection weights when no bias or threshold is present, where Vxi and Vyi are the binary values for the output of neurons (x,i) and (y,i): 1 (x,i)(y, j) n m:f Z (hi y=i VDSy (hly + hhy )Vyi . (7) y' yi Fig. 12. Implementation of CHNN segmentation algorithm 2 x=1 V i=1 The equation for the total input to the neuron (x,i): 1 N vxi= N-X DISxy (hly + hhy )Vyi. (8) X (hly + hhy )Vyiy=1 y=1 An algorithm was designed and implemented in Borland Delphi™ using the above equations (Fig. 12). Figs. 13 and 14 present the results of applying this segmentation algorithm for 4 classes to the analyzed X-ray image of the test lumbar vertebra. The research focused on a set of 34 different images obtained from various vertebra models with an image resolution of 760x520. The quality of the images was considered high, the images being obtained using a digital X-ray Siemens apparatus from Colentina Clinical Hospital Romania. The deviation value between pedicle axis and screw axis is calculated after applying several simple geometrical computations to the image segmented using CHNN. First, the vertebra is extracted as a single object using a simple backtracking algorithm (as explained in section 1.2). Its centre of gravity is then computed [25] and two axes are then "drawn" from that position. The same type of computations is applied to the screws themselves. The evaluation criteria is based on the difference in position between the axis of the vertebrae and the screw axis, which is compared with theoretically accepted values (grades) based on the safety area limits established from the literature data [4] to [6]. These grades are: I. penetration less than 2 mm (acceptable), II. penetration between 2 to 4 mm (requires screw repositioning), III. penetration more than 4 mm (unacceptable). Fig. 13. CHNN proposed segmentation algorithm - 4 classes Fig. 14. Extraction of vertebra and screw axis 3 FURTHER RESEARCH Further research will consider the design of a user-friendly interface for the training system. This interface will display, for each trainee, the X-ray images of the vertebra and screws, both in sagittal and transverse planes, the segmented images, the deviation values, as well as evaluation messages and scores. All this information can be used for assessing the trainees' performances and their evolution in time. 4 ACKNOWLEDGEMENT This work has been co-funded by the Sectoral Operational Programme Human Resources Development 2007-2013 of the Romanian Ministry of Labour, Family and Social Protection through the Financial Agreement POSDRU/89/1.5/S/62557. 5 REFERENCES [1] Foley, K.T., Gupta, S.K. (2002). Percutaneous pedicle fixation of the lumbar spine: preliminary clinical results. Journal of Neurosurgery: Spine, vol. 97, no. 1 (suppl.), p. 7-12, D0I:10.3171/spi.2002.97.1.0007. [2] Amiot, L.P., Lang, K., Putzier, M, Zippel, H., Labelle, H. (2000). Comparative results between conventional and computer assisted pedicle screw installation in the thoracic, lumbar, and sacral spine. Spine, vol. 25, no. 5, p. 606-614, DOI: 10.1097/00007632-20000301000012. [3] Cook, S.D., Salkeld, S.L., Stanley, T., Faciane, A., Miller, S.D. (2004). Biomechanical study of pedicle screw fixation in severely osteoporotic bone. Spine Journal, vol. 4, no. 4, p. 402-408, D0I:10.1016/j. spinee.2003.11.010. [4] Lien, S.B., Liou, N.H., Wu, S.S. (2007). Analysis of anatomic morphometry of the pedicles and the safe zone for through-pedicle procedures in the thoracic and lumbar spine. European Spine Journal, vol. 16, no. 8, p. 1215-1222, D0I:10.1007/s00586-006-0245-2. [5] Zdichavsky, M., Blauth, M., Knop, C., Graessner, M., Herrmann, H., Krettek, C., Bastian, L. (2004). Accuracy of pedicle screw placement in thoracic spine Fractures. Part I inter- and intra-observer reliability of the scoring system. European Journal of Trauma, vol. 30, no. 4, p. 234-240, D0I:10.1007/s00068-004-1422-9. [6] Mirza, S.K., Wiggins, G.C., York, J.E., Bellabarba, C., Knonodi, M.A., Chapman, J.R., Shaffrey, C.I. (2003). Accuracy of thoracic vertebral body screw placement using standard fluoroscopy, fluoroscopic image guidance, and computed tomographic image guidance: A cadaver study. Spine, vol. 28, no. 4, p. 402-413, D0I:10.1097/01.BRS.0000048461.51308.CD. [7] Polanecka, I., Korošec, M., Kopač, J. (2007). Drillingforce forecasting using neural networks. Strojniški vestnih - Journal of Mechanical Engineering, vol. 53, no. 11, p. 771-783. [8] Marinkovic, V. (2009). Application of artificial neural network for modelling the flash land dimensions in the forging dies. Strojniški vestnih - Journal of Mechanical Engineering, vol. 55, no. 1, p. 64-75. [9] Donizete, V., de Almeida, L.F., Mathias, M.H. (2010). Wear particle classifier system based on an artificial neural network. Strojniški vestnih - Journal of Mechanical Engineering, vol. 56, no. 4, p. 284-288. [10] Cheng, K.S., Lin, J.S., Mao, C.W. (1996). The application of competitive Hopfield neural network to medical image segmentation. IEEE Transactions on Medical Imaging, vol. 15, no. 4, p. 560-567, DOI:10.1109/42.511759. [11] Poli, R., Valli, G. (1997). Hopfield neural networks for the optimum segmentation of medical images. Handbook of Neural Computation, Oxford University Press, Oxford, ch. G5.5, p. 1-10. [12] Koss, J.E., Newman, F.D., Johnson, T.K., Kirch, D.L. (1999). Abdominal organ segmentation using texture transforms and a Hopfield neural network. IEEE Transactions on Medical Imaging, vol. 18, no. 7, p. 640-648, DOI:10.1109/42.790463. [13] Chang, C.Y. (2003). Contextual Hopfield neural networks for medical image edge detection. 16th IPPR Conference on Computer Vision, Graphics and Image Processing, p. 161-167. [14] Shi, Z., He, L. (2010). Application of neural networks in medical image processing. Proceedings of the 2nd International Symposium on Networking and Network Security, p. 23-26. [15] Scholl, I., Aach, T., Deserno, T.M., Kuhlne, T. (2011). Challenges of medical image processing. Computer Science - Research and Development, vol. 26, no. 1-2, p. 5-13. [16] Archip, N., Erard, P.J., Egmont-Pteresen, M., Haefliger, J.M., Germond, J.F. (2002). A knowledge-based approach to automatic detection of the spinal cord in CT images. IEEE Transactions on medical imaging, vol. 21, no. 12, p. 1504-1516, DOI:10.1109/ TMI.2002.806578. [17] Szilaghi, L., Szilaghi, S., Benyo, Z. (2007). Automated medical image processing methods for virtual endoscopy. World Congress on Medical Physics and Biomedical Engineering 2006. IFMBE Proceedings, vol. 14, part 15, p. 2383-2387. [18] Chaabani, A.C., Boujelben, A., Mahfoudhi, A., Abid, M. (2010). An automatic-pre-processing method for mammographic images. International Journal of Digital Content Technology and Its Applications, vol. 4, no. 3, p. 190-200. [19] Fang, J.J., Yang, C.Y., Lin, R.M. (2005). A computer-aided training system for pedicle screw implantation. International Congress Series. Computer Assisted Radiology and Surgery, vol. 1281, p. 661-666. [20] Morris, D. (2006). Haptics and physical simulation for virtual bone surgery. PhD thesis, University of Stanford, Stanford. [21] Kellerman, K., Salah, Z., Monch, Z. (2011). Improved spine surgery and intervention with virtual training and augmented reality. International Workshop on Digital Engineering, p. 8-15. [22] ImageJ - Image Processing and Analysis in Java from http://rsb.info.nih.gov/ij/, accessed on 2010-12-12. [23] Insight Segmentation and Registration Toolkit from http://www.itk.org/ITK, accessed on 2011-02-10. [24] Dietenbeck, T., Alessandrini, M., Friboulet, D., Bernard, O. (2010). CREASEG: A free software for the evaluation of image segmentation algorithms based on level-set. IEEE International Conference on Image Processing, p. 665-668, D0I:10.1109/ ICIP.2010.5652991. [25] Hopfield, J.J. (1984). Neurons with graded response have collective computational properties like those of two-state neurons. Biophysics, Proceedings of the National Academy of Sciences, vol. 81, p. 3088-3092, D0I:10.1073/pnas.81.10.3088. [26] Cheng, K.S., Lin, J.S., Mao, C.W. (1996). The application of competitive Hopfield neural network to medical image segmentation. IEEE Transactions on Medical Imaging, vol. 15, no. 4, p. 560-567, D0I:10.1109/42.511759.