Abstract
Gastric contractions are underpinned by an electrical event called slow wave activity. High-resolution electrical mapping has recently been adapted to study gastric slow waves at a high spatiotemporal detail. As more slow wave data becomes available, it is becoming evident that the spatial organization of slow wave plays a key role in the initiation and maintenance of gastric dsyrhythmias in major gastric motility disorders. All of the existing slow wave signal processing techniques deal with the identification and partitioning of recorded wave events, but not the analysis of the slow wave spatial organization, which is currently performed visually. This manual analysis is time consuming and is prone to observer bias and error. We present an automated approach to classify spatial slow wave propagation patterns via the use of Pearson cross correlations. Slow wave propagations were grouped into classes based on their similarity to each other. The method was applied to high-resolution gastric slow wave recordings from four pigs. There were significant changes in the velocity of the gastric slow wave wavefront and the amplitude of the slow wave event when there was a change in direction to the slow wave wavefront during dsyrhythmias, which could be detected with the automated approach.
I. Introduction
Contractions of the stomach serve to break down ingested food and mix the ingesta with gastric secretions. These contractions are governed by an underlying bio-electrical event know as slow waves, which are generated and propagated by a specialised network of cells known as the Interstitial Cells of Cajal (ICC) which are distributed throughout the stomach musculature [1]. Abnormalities in ICC and dysrhythmic slow wave activity have been associated with major gastric functional and motility disorders such as gastroparesis [2], and functional dyspepsia [3].
The conventional analysis of gastric slow wave activity has typically employed sparsely spaced electrodes, with the focus on frequency characteristics of the signal. For example, in the normal human stomach, gastric slow wave occur at a frequency of around 2-4 cycles-per-minute (cpm), and deviations outside this range have been classed as dysrhythmic slow wave activity; with less than 2 cpm defined as bradygastria, and more than 4 cpm as tachygastria [4]. However, the lack of spatial resolution due to the low density of sampling is a significant drawback of sparse electrode recordings.
The advent of high-resolution (HR) mapping of gastric slow waves have afforded a comprehensive spatiotemporal description of gastric dysrhythmias [5]. It has been shown that in addition to the frequency characteristics, the spatial organization of slow waves also exhibited significant deviations from the normal activity [6], [7], which may routinely occur even at normal frequencies [2]. To date, all HR mapping studies have employed manual classification and visual analyses of these spatial slow wave patterns, which presents the potential for missing certain critical features that are pertinent to gastric slow wave dysrhythmias due to observer error or bias.
In this study we introduce an automated method for classifying slow wave propagation based on spatiotemporal characteristics. The proposed method was developed with the intention of analyzing, defining, and summarizing pertinent distinguishing features of gastric slow wave recordings under normal and dysrhythmic conditions. This method was designed with features that make it suitable for both offline and online signal processing, frameworks of which have been previously described [8], [9], [10].
II. Methods
A. Recording method
Gastric slow waves were recorded from the stomachs of four pigs in-vivo. Animal ethics were granted by The University of Auckland Animal Ethics Committee. The International Guiding Principles for Biomedical Research Involving Animals and Human Beings were followed. Methods of surgery, anaesthesia, and physiological monitoring was performed as previously described [6]. A flexible printed-circuit-board (PCB) electrode array (256 electrodes; 4 mm) was positioned on the anterior porcine stomach [11]. A five minute period of stabilization was allowed prior to a 15 minute recording period.
All recordings were acquired using the ActiveTwo system (Biosemi, Amsterdam) at a sampling frequency of 512 Hz. The common mode sense (reference) electrode was placed on the body surface of the lower abdomen. The right-leg drive electrode (ground) was placed on the right hind leg. The acquisition box was connected to a Dell M1450 notebook computer via a fiber optic cable. The acquisition software was written in Labview 8.2 (National Instruments, Texas).
B. Signal Processing
The raw signals were first downsampled to 30 Hz, and the recorded slow wave events were identified using a validated automated variable threshold method (Fig. 1(a)) [12]. Next, based on the knowledge of the spatial locations of the electrode, slow wave events were clustered into their propagating wavefronts using a validated polynomial-based-surface estimate algorithm [13]. The clustered wavefront was visualised as an activation time (AT) map (Fig. 1(b)), which represented the spatiotemporal pattern of slow wave propagation as recorded on the surface of the stomach [11].
Fig. 1.

Processing of high-resolution gastric slow wave signals. (a) shows filtered signals with a red cross denoting the activation time of the slow wave event. Next based on the knowledge of the spatial location and timing of each event, they were clustered into their propagating wavefronts to generate an isochronal activation time map as shown in (b) (1 second intervals), with the vertical black arrow showing the direction of propagation. The dots represent electrode positions, with the red dots indicating interpolated data.
C. Automated classification method
The goal of the automated classification method is to efficiently quantify and classify heterogeneous slow wave propagation patterns. The classification step uses a similarity metric to group propagation patterns into similar classes.
The first AT map was chosen as a template, and each subsequent candidate AT map was compared to it. If a candidate AT map was considered to be similar to an existing template, then the template was updated by averaging the AT map at each electrode position (Fig. 2). If a candidate AT map was dis-similar to any existing templates, it synthesizes into a new AT template. The similarity metric was quantified using a Pearson-correlation-coefficient (PCC) and its expression is shown in (1). A PCC threshold of 0.9 was empirically chosen to group similar slow wave events.
Fig. 2.
Flowchart of the developed automated method to characterize gastric slow wave propagations.
| (1) |
In (1), X is the candidate AT map, Yi is the ith AT template map, μX and μYj are the associated means whereas σX and σYj are the associated standard deviations of X and Yi respectively.
After all the AT maps were assessed by the above classification algorithm, the total number of resultant templates represented the number of modes present in a particular recording. The amplitude and velocity of each wavefront were also calculated using methods previously described [8], [14].
If the recoded data had consistent stable propagation patterns then a single AT template would be calculated. On the other hand, if the recorded data had unstable propagation patterns, then a larger number of AT templates would be calculated.
III. Results
The automated classification method was applied on four pig experimental HR recording data sets, one of which only exhibited normal propagation, whereas the rest exhibited dysrhythmic slow wave propagation. A mode graph was produced to show the stability of the slow wave propagation (Fig. 3). The frequency of slow wave propagation can also be interpreted from the mode graph. Fig. 3 showed a recording with an abnormal slow wave propagation where the direction of propagation reversed from antegrade to retrograde. For this data set, the velocity and amplitude distribution of the antegrade and retrograde slow wave propagation is shown in Fig. 4. It can be seen that the retrograde propagation had higher velocities and slightly higher amplitudes compared to antegrade propagation.
Fig. 3.

Mode graph illustrating the two classes of propagation present in this case, i.e. antegrade and retrograde slow wave propagation. In (a) the mode graph provides information on the modes of slow wave propagation timing and frequency of the propagation. AT maps for four of the 21 waves from the example recording have demonstrated on the mode graph. (b) shows the final two templates generated by the automated classification scheme, with the arrows overlaid to demonstrate the dominant propagation directions.
Fig. 4.

Comparison of velocities and amplitudes of gastric slow wave propagation in a data set (Fig. 3) which exhibited two different types of propagation (1) antegrade (in blue crossed) and (2) retrograde (in red dots). This histogram of the amplitudes and velocities of the two different classes are shown around corresponding axis. The antegrade propagation has a lower velocity profile and slightly lower amplitude distribution compared to retrograde propagation.
An ANOVA was performed on velocity and amplitude calculations between different propagation pattern classes for each of the experimental data sets (Table I). The results showed there were significant variations in amplitudes and velocities of slow wave propagations across different propagation pattern classes. The computational time to process the recorded data in an offline setting was also recorded in Table I.
Table I.
ANOVA analysis of amplitude and velocity calculations between different propagation pattern classes in four data sets. When there were two or more classes, velocities and amplitude vary across classes. Computational time is also recorded.
| Experiment Number | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| Number of Waves | 45 | 52 | 21 | 27 |
| Number of Classes | 1 | 5 | 2 | 6 |
| Amplitude | - | p<0.05 | p<0.05 | p<0.05 |
| Velocity | - | p<0.05 | p<0.05 | p<0.05 |
| Computational time (ms) | 21 | 72 | 12 | 28 |
IV. Discussions & Conclusions
In this paper we have introduced a method to automatically identify and classify spatiotemporal patterns of gastric slow wave propagation. It was applied to four porcine experimental HR recordings and provided useful information about the nature of varying slow wave propagation patterns. Using this method variations in slow wave propagation occurring in any given experiment could be automatically summarized in a mode graph, to readily and objectively visualize changes in pattern. In cardiac HR electrical mapping, techniques exist to analyse dysrhythmic activity [15], but those methods cannot be used directly used in gastric HR mapping due to differences in the temporal course and spatiotemporal patterns of slow wave activity compared to cardiac activity. Some of the potential applications of this method along with its advantages are described.
From human gastric HR mapping studies, it has been revealed that during circumferential propagation in dysrhythmias such as gastroparesis, slow wave velocity and amplitude increases by more than two fold due to the inherent anisotropy in the stomach [2]. The increase in amplitude is due to the proportionality between velocity and transmembrane current entering the extracellular space [16]. In Fig. 3, with retrograde propagation there is an element of circumferential propagation and a higher velocity due to the longer spacing of isochrones in comparison to antegrade propagation. The corresponding higher velocities correlate with higher amplitudes, as seen in Fig. 4. The ability to detect variation in slow wave patterns, developed here, can therefore be applied as a clinical tool to detect and investigate gastric dysrhythmias. By creating templates of slow wave activity, a library of templates could be constructed to automatically discern similarities or differences between gastric dysrhythmias and gastric disorders. Another application of this method is that it can test the efficacy of drugs and novel therapies such as surgery or electrical stimulation on gastric slow wave propagation during the experiment.
The main advantage of the automated method is that it eliminates the need for visual classification of slow wave propagation patterns and presents the data in an intuitive manner. As the described methods are not a large scale pattern recognition system, it can be over-sensitive if the AT maps have not been clustered correctly. If the AT maps are not consistently formed well, a large of classes will end up, resulting in an incorrect inference. The methods are computationally efficient. In an offline setting, this automated method took on average around 30 ms to classify 12 minutes of recordings. This method is particularly advantageous in an online setting where the computational overhead is a significant factor for implementation and visualization [9]. Here we have applied this method to gastric HR slow wave recordings, but it can be used for HR mapping of other gastrointestinal organs exhibiting slow wave activity such as the intestine. This automated method is therefore anticipated to provide valuable insights into slow wave propagation in the gastrointestinal tract during experimental recordings.
Acknowledgments
This project and/or authors are supported by funding through the Health Research Council (New Zealand) and National Institute of Health (USA) [No. R01 DK64775]. J. Gao is supported by a University of Auckland Heath Research Doctoral Scholarship, a Freemasons Postgraduate Scholarship, and a R. H. T. Bates Postgraduate Scholarship. P. Du is supported by a Rutherford Foundation New Zealand Postdoctoral Fellowship and a Marsden Fast-Start Grant.
Contributor Information
Niranchan Paskaranandavadivel, Email: npas004@aucklanduni.ac.nz, Auckland Bioengineering Institute, The University of Auckland, New Zealand.
Jerry Gao, Auckland Bioengineering Institute, The University of Auckland, New Zealand.
Peng Du, Auckland Bioengineering Institute, The University of Auckland, New Zealand.
Gregory O'Grady, Department of Surgery & Auckland Bioengineering Institute, The University of Auckland, New Zealand.
Leo K. Cheng, Auckland Bioengineering Institute, The University of Auckland; Department of Surgery, Vanderbilt University, Nashville, TN, USA
References
- 1.Cheng LK, O'Grady G, Du P, Egbuji JU, Windsor JA, Pullan AJ. Gastrointestinal system. Wiley Interdiscip Rev Syst Biol Med. 2010;2(no. 1):65–79. doi: 10.1002/wsbm.19. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.O'Grady G, Angeli T, Du P, Lahr C, Lammers W, Windsor J, Abell T, Farrugia G, Pullan A, Cheng L. Abnormal initiation and conduction of slow-wave activity in gastroparesis, defined by high-resolution electrical mapping. Gastroenterology. 2012;143:589–598. doi: 10.1053/j.gastro.2012.05.036. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Lin Z, Eaker E, Sarosiek I, McCallum R. Gastric myoelectrical activity and gastric emptying in patients with functional dyspepsia. Am J Gastroenterol. 1999;94(no. 9):2384–2389. doi: 10.1111/j.1572-0241.1999.01362.x. [DOI] [PubMed] [Google Scholar]
- 4.Coleski R, Hasler WL. Directed endoscopic mucosal mapping of normal and dysrhythmic gastric slow waves in healthy humans. Neurogastroenterol Motil. 2004 Oct;16(5):557–65. doi: 10.1111/j.1365-2982.2004.00542.x. [DOI] [PubMed] [Google Scholar]
- 5.O'Grady G, Angeli TR, Du P, Lahr C, Lammers WJ, Windsor JA, Abell TL, Farrugia G, Pullan AJ, Cheng LK. Abnormal initiation and conduction of slow-wave activity in gastroparesis, defined by high-resolution electrical mapping. Gastroenterology. 2012 Sep;143(3):589–98.e1-3. doi: 10.1053/j.gastro.2012.05.036. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.O'Grady G, Egbuji JU, Du P, Lammers WJ, Cheng LK, Windsor JA, Pullan AJ. High-resolution spatial analysis of slow wave initiation and conduction in porcine gastric dysrhythmia. Neurogastroenterol Motil. 2011 Sep;23(9):e345–55. doi: 10.1111/j.1365-2982.2011.01739.x. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Lammers W, Ver Donck L, Stephen B, Smets D, Schuurkes J. Focal activities and re-entrant propagations as mechanisms of gastric tachyarrhythmias. Gastroenterology. 2008;135(no. 5):1601–1611. doi: 10.1053/j.gastro.2008.07.020. [DOI] [PubMed] [Google Scholar]
- 8.Paskaranandavadivel N, Cheng LK, Du P, O'Grady G, Pullan AJ. Improved signal processing techniques for the analysis of high resolution serosal slow wave activity in the stomach. Conf Proc IEEE Eng Med Biol Soc. 2011;2011:1737–40. doi: 10.1109/IEMBS.2011.6090497. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Bull SH, O'Grady G, Cheng LK, Pullan AJ. A framework for the online analysis of multi-electrode gastric slow wave recordings. Conf Proc IEEE Eng Med Biol Soc. 2011;2011:1741–4. doi: 10.1109/IEMBS.2011.6090498. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Yassi R, O'Grady G, Paskaranandavadivel N, Du P, Angeli TR, Pullan AJ, Cheng LK, Erickson JC. The gastrointestinal electrical mapping suite (GEMS): software for analyzing and visualizing high-resolution (multi-electrode) recordings in spatiotemporal detail. BMC Gastroenterol. 2012 Jun 6;12:60. doi: 10.1186/1471-230X-12-60. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Du P, O'Grady G, Egbuji JU, Lammers WJEP, Budgett D, Nielsen P, Windsor JA, Pullan AJ, Cheng LK. High-resolution mapping of in vivo gastrointestinal slow wave activity using flexible printed circuit board electrodes: methodology and validation. Ann Biomed Eng. 2009;37(no. 4):839–846. doi: 10.1007/s10439-009-9654-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Erickson JC, O'Grady G, Du P, Obioha C, Qiao W, Richards WO, Bradshaw LA, Pullan AJ, Cheng LK. Falling-Edge, Variable Threshold (FEVT) Method for the Automated Detection of Gastric Slow Wave Events in High-Resolution Serosal Electrode Recordings. Ann Biomed Eng. 2010;38(no. 4):1511–1529. doi: 10.1007/s10439-009-9870-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Erickson JC, O'Grady G, Du P, Egbuji JU, Pullan AJ, Cheng LK. Automated gastric slow wave cycle partitioning and visualization for high-resolution activation time maps. Ann Biomed Eng. 2011 Jan;39(1):469–83. doi: 10.1007/s10439-010-0170-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Paskaranandavadivel N, O'Grady G, Du P, Pullan AJ, Cheng LK. An improved method for the estimation and visualization of velocity fields from gastric high-resolution electrical mapping. IEEE Trans Biomed Eng. 2012 Mar;59(3):882–9. doi: 10.1109/TBME.2011.2181845. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Rogers J, Usui M, KenKnight B, Ideker R, Smith W. Recurrent wavefront morphologies: a method for quantifying the complexity of epicardial activation patterns. Ann Biomed Eng. 1997;25(no. 5):761–768. doi: 10.1007/BF02684160. [DOI] [PubMed] [Google Scholar]
- 16.O'Grady G, Du P, Paskaranandavadivel N, Angeli TR, Lammers WJ, Asirvatham SJ, Windsor JA, Farrugia G, Pullan AJ, Cheng LK. Rapid high-amplitude circumferential slow wave propagation during normal gastric pacemaking and dysrhythmias. Neurogastroenterol Motil. 2012 Jul;24(7):e299–e312. doi: 10.1111/j.1365-2982.2012.01932.x. [DOI] [PMC free article] [PubMed] [Google Scholar]

