Study design and patient enrollment
After approval by the institutional ethics committee (approval number: S-611/2016), data collection of this prospective study was conducted from February 2, 2017 until June 6, 2017 in the Department of Anesthesiology of the Heidelberg University Hospital (Germany). The trial was registered at the German Clinical Trials Register (DRKS00011607).
Patients were included if they were at least 18 years old, underwent a neurosurgical procedure at the posterior cranial fossa, the cerebellopontine angle or the upper cervical spine and had no contraindications for TEE. All patients signed informed consent. A total of 39 patients were included in the study in order to record a sufficiently large dataset.
All patients underwent surgery in the semi-sitting position. The pre- and intraoperative anesthesia management was performed according to a standard protocol of the clinical department. After induction of general anesthesia with sufentanil, propofol, and rocuronium, anesthesia was maintained with continuous application of propofol, desflurane or sevoflurane. Two large bore peripheral venous catheters, an arterial catheter, a central venous line, and a Foley catheter were inserted. High quantities of crystalloid solutions were administered starting at the induction of anesthesia to reach a state of slight hypervolemia in each patient. Before placing the patient in the sitting position, a complete TEE-examination was performed to exclude persistent foramen ovale or other right-to-left shunts. During surgery, patients were continuously monitored for the occurrence of VAE with the mid-esophageal right-ventricular in- and outflow-tract view of the TEE.
The TEE examinations were performed with the approved CX50 ultrasound system and the 2D TEE-transducer × 7-2t (Philips, Hamburg, Germany).
Upon recognition of intraoperative VAE in the TEE by the study personnel, a bilateral compression of the jugular veins was applied and the neurosurgeons immediately coagulated and waxed the sites of air entry. If necessary, further measures were taken, including the anti-Trendelenburg movement of the operating table, the application of a crystalloid bolus and the increase of positive end-expiratory pressure (PEEP).
Data collection
For all included patients, age, gender, weight, height, ASA classification, indication for surgery, and surgery time was noted.
The loops of the intraoperative TEE monitoring were saved as video files to an external hard drive using an Epiphan DVI2USB 3.0™ frame grabber. The recorded TEE videos had a resolution of 628 × 458 pixels and were compressed with either Lagarith Lossless codec (5 patients) or the more efficient Motion JPEG Video codec (34 patients). In total, 155.14 h of TEE videos were recorded. The average frame rate was 38 frames per second.
If air bubbles where observable in TEE during surgery, the exact time of these periods was noted and the amount of visible air was qualitatively estimated and classified into three degrees of severity: grade 1 (minor amount of air), grade 2 (medium amount of air), and grade 3 (major amount of air). For air bubbles to be rated as embolic, a continuous flow of visible air was required, i.e. singular, isolated bubbles were not considered in our detection. In addition to the visual grading, clinical significance of all VAE events, which were detected during surgery, was classified according to the Tübingen VAE grading scale [8] (see Table 1).
Table 1 Tübingen scale of VAE detection [8] Periods affected by video superimpositions (e.g. due to an alarm message), repositioning of the TEE ultrasound probe, or intermittent freezing of the TEE video transfer were identified and excluded from further analysis.
Algorithm for the automated detection of VAE
The detection algorithm for VAE was implemented in Python v3.6 using OpenCV [9], NumPy [10] and SciPy [11].
Detection of the cardiac phase
Continuous calculation of the mean grayscale value within a rectangular region of 367 × 377 pixels in the TEE video provides a cyclic signal, which reflects cardiac periodicity. We filtered this signal using a high-pass Butterworth filter of second order at the critical frequency of 5 Hz resulting in a sequence \(\left\{{x}_{n}\right\}\) of smoothed average pixel intensities. For every timepoint n an embedded vector was formed from the sequence \(\left\{{x}_{n}\right\}\) as follows, based on the theorem of Takens [12]:
$${\overrightarrow{x}}_{n}\text{ } = \text{ }\left(\begin{array}{ccccc}{x}_{n-12}& {x}_{n-9}& {x}_{n-6}& {x}_{n-3}& {x}_{n}\end{array}\right)$$
In an initialization step, a reference cycle \(\left\{{\overrightarrow{x}}_{n}\right\}\) of the embedding vector trajectory covering one cardiac period was extracted and subdivided into 15 cardiac phase segments. During subsequent analysis, an instantaneous cardiac phase value was assigned to each frame. It was defined as the phase segment number associated with the corresponding reference cycle embedding vector. The latter was identified as the reference vector with minimum Euclidean distance to the current embedding vector.
Detection of statistical outliers
In analogy to [13], the images of each cardiac phase were modeled with a gaussian model, which is defined by the mean and the standard deviation of the grayscale value for every pixel. Therefore, for every pixel position and separately for every phase, a rolling mean µ and standard deviation σ of the last 30 images of the corresponding cardiac phase were calculated. In order to suppress detections in dark areas of the image with very low variation, the minimum value for the standard deviation was set to the 65% quantile of all values for σ in the TEE image.
A pixel was classified as being part of an air embolus if its grayscale value I exceeded the mean by at least k standard deviations:
The optimal free parameter k was estimated in a preliminary experiment. For every frame in the TEE videos the total number of pixels classified as air embolus was recorded.
Statistics
The TEE videos were analyzed according to 2.3 and the number of pixels classified as air by the algorithm was recorded for every frame defining a time series. At times with a repositioning of the TEE ultrasound probe or after freezing of the TEE video transfer, a reinitialization of the detection algorithm (i.e. reference cycle and pixel statistics) was triggered.
The recorded time series of number of detected air pixels was filtered using a rolling median with a window size of 140 frames in order to be robust against short outliers. In order to model the background noise floor, the 15% quantile of the number of detected air pixels for the first 140 frames after every reinitialization of the detection algorithm was calculated and subtracted from the rolling median. The resulting time-series was compared to the time-matched sequence of the visual VAE grading reference by means of receiver operating characteristic (ROC) curves. Periods with a disturbance in the TEE video or a repositioning of the TEE ultrasound probe were excluded from this analysis. Likewise, consecutive images, with normalized cross correlation of 0.999 or higher (indicating temporal freezing in the video transfer) were not considered.