Abstract
The use of precordial Doppler monitoring to prevent decompression sickness (DS) is well known by the scientific community as an important instrument for early diagnosis of DS. However, the timely and correct diagnosis of DS without assistance from diving medical specialists is unreliable. Thus, a common protocol for the manual annotation of echo Doppler signals and a tool for their automated recording and annotation are necessary. We have implemented original software for efficient bubble appearance annotation and proposed a unified annotation protocol. The tool auto-sets the response time of human “bubble examiners,” performs playback of the Doppler file by rendering it independent of the specific audio player, and enables the annotation of individual bubbles or multiple bubbles known as “showers.” The tool provides a report with an optimized data structure and estimates the embolic risk level according to the Extended Spencer Scale. The tool is built in accordance with ISO/IEC 9126 on software quality and has been projected and tested with assistance from the Divers Alert Network (DAN) Europe Foundation, which employs this tool for its diving data acquisition campaigns.
Keywords
Introduction
In recent years, the field of prevention has invested substantially in scientific research addressing the early detection of decompression illness (DI) and other diseases related to the practice of diving. Decompression illness is a term that is used to describe illness that results from a reduction in the surrounding ambient pressure relative to the body. 1 Decompression illness encompasses 2 diseases: decompression sickness (DS) and arterial gas embolism (AGE). Decompression illness is caused by inadequate decompression after exposure to increased pressure, during which bubbles grow in tissues and cause local damage. Arterial gas embolism is caused by bubbles that enter the lung circulation, travel through the arteries, and cause remote tissue damage by blocking blood flow at the small vessel level. An AGE is commonly referred to as an air embolism. Generally, an embolus is a foreign object that originates in a part of the body and starts to propagate into the bloodstream. An embolus can consist of gas bubbles or biological matter, such as blood clots, fat cells, tumor tissues, platelet aggregates, and fibrin clots. A study conducted by Bert in 1878 suggested that the rapid variation of external pressure is the most probable consequence of the formation of nitrogen bubbles in the blood and tissues. 2 The human body is typically able to manage the presence of nitrogen bubbles. However, DS is not caused by a single bubble but, in fact, by their massive presence, which is also referred to as saturation. In this case, the inflow velocity of bubbles into the blood exceeds their rate of dissolution in the saturation condition. Thus, bubbles may penetrate into the surrounding tissues or even obstruct the blood supply to cerebral organs, resulting in serious neurological complications. The consequences of an embolism are strongly related to the type of embolus (ie, its nature, number, and size) and the location of the embolism. Although the consequences of an embolism may vary, embolisms can cause temporary neurological deficits, heart attack, and stroke. Both gaseous and particle embolic events, such as cardiopulmonary bypass and carotid endarterectomy or cerebral angiographies and bone fractures, can be detected after cardiac surgery. The presence of venous gas bubbles is primarily found in diving, aviation, and space activities. In diving and hyperbaric medicine, the gas bubbles released into the tissue or the bloodstream during compression or decompression are considered precursors of DS. Because DS can damage nerves, arteries, veins, muscles, and bones, the consequences and preventions of this disease have been investigated for more than 100 years.
Echo Doppler techniques and monitoring areas
The basic idea underlying echo Doppler operation is the placement of a transducer or probe over the body of the subject to be examined. In the transducer, quartz crystals produce ultrasonic waves that propagate in the body tissues. The processing of the echo produced by each “obstacle” encountered enables the region of interest to be analyzed and a specific diagnosis for the observed area to be obtained. These detection instruments are particularly suitable for detecting circulating bubbles in the bloodstream because their echoes are easily discriminated from other reflected sounds. The Doppler techniques that can be adopted are “Continuous Doppler” and “Pulsed Doppler.” In Continuous Doppler, a transducer uses half of the quartz components to pulse ultrasounds and the other half to receive ultrasounds. The emissions are characterized by the continuous transmission of sound energy with high pulse frequency repetition. The reception is contemporary to the transmission because of the elements dedicated to the continuous listening of the reflected signals. In Pulsed Doppler, the transducer alternately uses all quartzes as transmitters and receivers. This technique sends a train of ultrasounds, waits for the reflected waves for a period that is proportional to the distance between the source and the area to explore, and then emits a new train of pulses. To detect embolic events using an ultrasound technique, a large blood vessel must be monitored. Suitable places in the human body are subclavian veins (arm/shoulder), femoral veins, middle cerebral (brain), and the precordial region (heart).
Doppler measurements in clinical and diving practice
Gas bubbles in the blood flow can derive from rapid reductions in body pressure with respect to the external environment during or after underwater activities. These bubbles can cause serious health problems, such as neurological symptoms, cardiac collapse, and even death, if not detected and treated in a timely manner. Different first aid treatments are recommended for different levels of the DI, which implies that a timely intervention by hyperbaric qualified personnel is required. In the 1970s, Dr Merrill Spencer showed that the absence of symptoms does not exclude the presence of bubbles; therefore, research investigating prompt techniques for detecting gas bubbles 3 and understanding how these bubbles are sometimes related to evident symptoms is needed. Evidence has shown that the circulating gas bubbles are the primary cause of DS, that bubbles can be present without DS, and that DS does not occur without detectable bubbles. 4 The appearance of bubbles in an audio echo Doppler file can be graded according to the Spencer Scale (SS) and its modified version, the Extended Spencer Scale (ESS). 5 Based on the number of detected bubbles in an audio analysis, the SS classifies an audio signal with occasional bubbles as Low Bubble Grade, an audio signal with continuous bubbles as High Bubble Grade (HBG), and an audio signal with a high amount of bubbles as HBG+ (Very HBG).6,7 The ESS uses a different graduation scale with steps of 0.5, which enables many decompression states to be defined. The determination of the ESS or SS grade indications is very important because it enables a medical team to identify the appropriate therapy for a diver. The prevention and early detection of DS require the availability of systems that can assess individual risk factors and total risk factors prior to the onset of symptoms. The results can be correlated with the pathological event to be prevented. The echo Doppler analysis of circulating bubbles satisfies these requirements.8–11 The detection of circulating gas bubbles in the bloodstream and their presence in body tissues enables the identification of the primary cause of DS at its onset and before it causes physical harm. The usefulness of Doppler monitoring in the prevention of DS is clear because a particular dive profile is substantially safer if implemented after instrumental analysis. Similarly, comparative studies on the production of circulating bubbles, related dive profiles, and symptomatology enable dive profiles that will produce fewer gas bubbles in the circulation to be identified and the maximum tolerable level of circulating bubbles that does not lead to the development of pathological reactions to be elucidated. Bubbles are gaseous elements that travel within the bloodstream, reflect ultrasound more intensely than surrounding red blood cells, and typically generate a characteristic sound. 12 One important phenomenon is the accompanying chirping or clicking sound that is characteristic of a traveling bubble as it passes through a Doppler sample volume; such bubbles generally appear as unidirectional signals within the blood flow spectrum. Doppler artifacts are typically bidirectional, high-intensity signals with maximum intensity near the zero line and varying duration. In addition, artifacts are not usually accompanied by the characteristic “chirping” or “clicking” sound. Emboli are defined as short, transient, high-intensity, unidirectional signals that travel through the sample volume, whereas artifacts are identified as unidirectional or bidirectional, transient, high-intensity signals of varying duration but without a velocity component within the sample volume. The clinical value of identifying emboli has been clearly established in various clinical publications; however, the actual process of detecting an embolic signal within the Doppler spectrum can be challenging. To assist a physician in identifying typical embolic signals, the availability of automatic instruments for detecting emboli in the bloodstream is extremely important, especially in the field of underwater prevention. The output of echo Doppler analysis consists of an audio file that can be analyzed by expert doctors estimating embolic risk. To design automated bubble-counting tools for echo Doppler signals, a set of test files for training and validation is needed. Typically, blind teams composed of hyperbaric doctors are used to independently produce annotations of echo Doppler acquisitions via handwritten notes while listening to echo Doppler files. However, each expert uses different text structures for bubble annotations, which may cause difficulty when they are interpreted by third parties. Furthermore, during aural examinations, different annotations for the same input file can arise from the use of different audio players. Each expert has a unique response time to external stimuli, which delays the correct instant of annotation of bubble occurrence. The speed with which an expert can respond to an external stimulus with a mechanical gesture is referred to as the “Rapidness Response Time.” An expert’s reports are subjective because they are based on a personal examiner’s evaluation; thus, they may be subject to errors of assessment. The use of nonunified protocols for the manual annotation of embolic events may produce errors in the interpretation of a handwritten report from an expert. Therefore, many techniques and algorithms have been investigated and implemented previously to automate this aural analysis. The automatic detection of embolic events in echo Doppler audio signals is based on the Fourier technique,13–15 Wavelet transform,16,17 and empirical mode decomposition,18–20 which provide the estimated embolic risk quantified by an appropriate grade scale as the output. Many automated bubble detection algorithms have been investigated and proposed in the literature, and each has been validated by an aural assessment performed offline by blind teams of experts to permit independent evaluations. To validate the efficiency of these techniques and algorithms, the outputs obtained from the blind teams must be compared, and only the outputs that agree with each other should be accepted. Therefore, the performance of an algorithm cannot be correctly validated and compared until an objective tool for bubble annotation, or at least a standardized textual annotation procedure, is universally adopted. In this study, we propose a new software tool for the efficient annotation of gas bubbles in echo Doppler audio signals. All existing tools can produce only an audio reproduction of an echo Doppler file. Our tool is the only one capable of jointly supporting simple audio playback with bubble detection, expert training, and expert-based calibration via the playing of preselected audio signals to evaluate the subjective “Rapidness Response Time.” This tool should overcome all previous problems caused by the unavailability of a unique and well-defined annotation procedure and also provide additional utilities. The proposed tool—Counter of Bubble Event (CoBE)—is being employed during master’s marine biology and diving lessons at the Polytechnic University of Marche (IT). These lessons are co-conducted by the polytechnic’s professors and Divers Alert Network (DAN) experts and will also be employed as a fundamental tool for the training of Doppler experts at the University of Malta.
Materials and Methods
The assignment of risk profiles for most divers depends on the availability of automated systems capable of accelerating and popularizing necessary profiling techniques. This need highlights the importance of automatic tools for the analysis of echo Doppler signals and a universally adopted annotation system capable of widespread and objective measures. As an alternative to nonunified protocols of manual annotation of embolic events, we proposed a tool that enables automatic reports of the occurrence of these events using a data structure with a well-defined syntax. This report structure allows simple comparisons of different bubble detection algorithms to evaluate their performance. Therefore, the proposed CoBE software is an essential tool for objective performance comparison of bubble detection algorithms because it provides a quantitative measure of the reliability of different systems.
Adopted protocol
To evaluate the performance of the proposed CoBE software, the developed tool was tested in an acquisition campaign of echo Doppler signals according to a protocol agreed on by DAN Europe. The choice of the echo Doppler signal acquisition site (precordial, subclavian, and transcranial) is part of the established acquisition protocol. The fundamental problem relating to the choice of the monitoring site is the filtering effect of the lung, which is particularly significant in the case of acquisitions in the subclavian area, femoral, and brain. Several studies have shown that the bubbles contained in the lungs after the passage of blood in the lungs become trapped there. 21
Therefore, an echo Doppler analysis performed downstream of the lungs will not reflect the total amount of bubbles. The only region in which the passage of all bubbles in the body occurs is the precordial area. This region behaves as a crossroads because all blood crosses the heart prior to entering the lungs. Among the venous sites, the precordial site offers the advantage of enabling monitoring all circulating bubbles, unlike acquisitions made in the subclavian, femoral, or transcranial areas. However, although acquisition in the precordial region reflects the production of bubbles throughout the body, the detection is rather poor due to heart noises (ie, noises generated from heart valves and walls) that can mask bubbles or produce misleading interpretations.20,22,23 In peripheral areas, such as the femoral and subclavian veins, smoother signals are obtained. The first feature, that is, the ability to monitor all bubbles, is more important than the second feature, that is, obtaining signals that less corrupted by noise. In the literature, a series of signal-processing algorithms capable of filtering unwanted signals from precordial echo Doppler files have been proposed and validated.20,24,25 Thus, the ultrasound analysis conducted in the precordial region is able to assess all bubbles in the human body and quantify a diver’s individual embolic risk. The individual risk is the set of subjective factors that increase the probability of the occurrence of DS, such as dehydration, dipping rate, nitrogen absorption rate, and general state of health. The environmental risk is the set of environment factors, such as immersion depth, speed of immersion, and emersion, that increase the bubble rate in divers. These risks, which are highly correlated, are used to outline a well-defined profile of immersion. A dive profile is a diagram that graphically illustrates a dive and is useful for deducing indications of a possible risk of DS and the oxygen toxicity level. The data used to obtain a dive profile include data related to the maximum attained depth, the real period of immersion (ie, the time actually spent underwater), and in the case of repetitive dives, the surface interval and amount of nitrogen remaining in the tissues. Therefore, to construct a dive profile, we need to know the total number of bubbles circulating in the vessels. To record all bubbles, a specific acquisition protocol must be established for recording all bubbles. The protocol that was jointly defined by us and DAN Europe is extensively applied in DAN Europe diving campaigns and has become a common standard for future analyses and studies. The precordial region was selected as the acquisition site using echo Doppler instrumentation and processing devices and the experimental acquisition procedure. All possible variables in DAN’s acquisition campaigns worldwide are established and unified, which may enable the comparison of collected data and their use to define, for example, a quantification of an individual diver’s risk level based on past and present dives and possible changes in decompression profiles. Therefore, echo Doppler signals are acquired by the Huntleigh FD1 Fetal Doppler with a 2-MHz probe (FD1; Huntleigh Ltd, Cardiff, UK), and uncompressed audio recordings are stored in linear pulse-code modulation format using a digital recorder (Tascam DP-004; TEAC America Inc., Montebello, CA, USA). The instrument’s technical specifications (sensitivity: 92 dB/mW and frequency response in the 10-22 000 Hz range) guarantee optimum performance for both musical instruments and audio playback. We selected these devices due to their excellent performance/cost ratio and certain premium features, such as small size, portability, and, in the case of the echo Doppler probe, waterproof design. These devices are well suited for the real-time monitoring of bubble events in harsh environments, such as on boats, because they have long battery lives (approximately 500 minutes for both the Huntleigh FD1 and Tascam DP-004), small sizes (140 mm × 70 mm × 27 mm for the Huntleigh FD1; 155 mm × 33.5 mm × 107 mm for the Tascam DP-004), and lightweights (295 g for the Huntleigh FD1; 360 g for the Tascam DP-004). The combined system (Huntleigh FD1 and Tascam DP-004) is easy to use and does not require any preliminary setup; however, particular attention must be paid to avoid saturation of the audio signals during their acquisition. The audio acquired by the Tascam DP-004 is real-time audio that is available via an external headset and simultaneously stored in the SD card embedded in the device. Currently, each audio file and information about each diver, such as their name, surname, age, date of acquisition, site of immersion, and other profile information, are stored in a remote database that is available to the scientific community. Personal data are not publicly accessible and are replaced by appropriate codes in observance of privacy laws. The acquisition protocol consists of 2 acquisition steps. The duration of each step is approximately 45 seconds, and the steps are separated by an interruption period of approximately 10 seconds during which the divers perform physical activities aimed at releasing the gas bubbles contained in their muscular tissues. The first acquisition step is performed approximately 35 minutes after diver emersion because the bubbles peak between 30 and 60 minutes after surfacing. 26
In addition to the bubbles circulating in the blood flow, other bubbles remain entrapped in the tissues and cannot be detected by the echo Doppler testing. For the DAN medical team to identify these bubbles, during the intermediate phase of physical exercise, a diver must simply perform a series of approximately 3 to 4 squats, repeating this exercise a few times. Although the exercise does not require excessive physical effort from the diver, it is sufficient to force the bubbles from the tissues and into the bloodstream. These exercises have been defined by DAN’s medical team. To ensure that the health of the divers is not endangered, the exercises are performed freely and slowly based on the capabilities and physical conditions of each diver. Therefore, a second phase of echo Doppler analysis is capable of detection. The DAN acquisition campaigns have enriched a database of approximately 3600 echo Doppler precordial files, and this database is constantly growing. Currently, this large amount of data constitutes the only free-access database provided by a nonprofit organization. It also contains hundreds of acquisitions in the precordial region conducted over the past 2 years with the approved protocol.
Acquisition campaign
Divers Alert Network Europe chose 3 members of its medical staff (2 men and 1 woman) grouped in 3 units, which are referred to as blind teams. Each member worked independent of the other 2 members without any communication. Examiners whose ages ranged between 45 and 65 years were selected to investigate the variability of reflections to external acoustic stimuli. Divers Alert Network chose only testers with a consolidated background; thus, all members have a degree in medicine and at least 10 years of experience in hyperbaric medicine. The experts originate from different countries (Belgium, Italy, and Malta). The test was conducted at the DAN head office in Malta. A soundproof room was dedicated to annotate audio files for all 8 months of acquisition. The room contained a computer equipped with all audio players, including QuickTime, Windows Media Player, Audacity, and CoBE. Each blind team concurrently listened to 20 files per day, twice a week, using individual headsets. Each file was played once per day with only 1 audio player. Seven days elapsed between 2 reproductions of the same file with different players. All tests involved playing audio files several times with different players. Initially, each team received a paper guide explaining how the software works. Subsequently, after the first annotation day, the guide was removed to evaluate the software’s ease of use and the user-friendliness of its interface. At the end of each session, each team compiled 15 standard questions about the usability of the test, as shown in Figure 8.
CoBE development
The CoBE tool was developed using Visual Basic 2010 Professional in the Visual Studio environment. The management of echo Doppler audio and the control of the input were made by employing DirectInput, DirectSound, and DirectX.AudioVideoPlayback classes, which belong to the DirectX family.27,28 Thus, the applications can communicate their characteristics to the kernel that configures the hardware. The “DirectX” class is used to avoid the situation in which the evaluation of the same echo Doppler audio provides different outputs if the same expert uses different players. For the assessment of the software quality, we employed the ISO/IEC 9126 standard as a reference. Therefore, our tool was realized in accordance with this normative.29,30
Detector training module
This section enables an examiner to determine their responsiveness to external acoustic stimuli by pressing a button. Random sounds, which are carefully chosen by the medical team and casually extracted from different acquisition campaigns, are reproduced with a variable delay from 0 to 5 seconds. Each sound, which includes some bubbles, has a duration between 2 and 6 seconds. Despite the large number of sounds, the memory needed for their storage is limited to less than 40 MB. The paths of these sound samples are stored in a vector whose size is equal to the number of files. In the training phase, the tool offers the examiner sequences of sounds that were randomly extracted between the stored sounds. Two random number sequences are generated: the first sequence contains a subset of 10 indexes belonging to the vector indexes of the sounds, whereas the second sequence contains 10 values of random backoff times, which must be applied to the playing of each file. At the beginning of the test, the sound reproduction uses the previous indexes to generate the sound sequence and casual delays. For the sound sequence reproductions, we employ an object of “Audio” type associated with the locations of the files to be played. Using a new object of “Device” type, we control the keyboard input. The initialization phase ends with the call of the “Acquire” method, which enables the program to check the input by reading this state in an appropriate buffer.
Audio module
Reproduction
This section ensures the reproduction of the echo Doppler sound due to a second object “Audio,” which is similar to the object described in the previous section. The 2 trackbars (for reproduction and volume control) are controlled using their property “Value” and the method “OnScroll” associated with them. To be constantly synchronized with the reproduced sound, the value of the trackbar is updated with the current position of the “Audio” object every 1 ms. Reciprocally, the event “OnScroll” updates the value of the player by moving the index of the trackbar. The trackbar value must be the total length of the file. The second control enables a user to decrease and increase the volume from minimum to maximum.
Visualization
As DirectX does not provide functions for displaying the waveform of an audio file, only the useful content for the 2-dimensional (2D) representation should be extracted from the data’s structure in Wave format (Waveform Audio File Format). Using the “ImageField” class to display the graphics of the audio file, we need timer controls to update the field every 10 ms to achieve a dynamic reproduction. Each audio file in Wave format is composed of 3 main blocks, which are referred to as “Chunks”: the “Riff Chunk” contains information about the audio coding format; the “Fmt Chunk” indicates several parameters, such as the sampling rate and the number of channels; and the “Data Chunk” provides useful information for our graphic display purposes. Each “Chunk” of an audio file is composed of different numbers of various fields for each type of chunk stored in 2 different notations: “Little Endian” and “Big Endian.” The 2 notations differ in their storage order of the least significant byte. To prevent loss of information, we converted the content of the various “Chunks” into a single “Big Endian” format via a custom class named “ExtractChunkFromWave.” Figure 1 shows the steps needed to extract useful data from an audio file. “WaveManager” is a class that was created for handling the data stream, and the object “Manager” is an instance of this class. This object needs the values contained in the field “ByteRate” and the data in the “Data Chunk.” The main methods defined in this class are “CompressMethod,” “NewMethod,” and “GetWaveMethod.”

Data extraction procedure from a Wave file.
“NewMethod” is invoked at object creation and receives the “ByteRate” and data for calculating samples, whose maximum and minimum amplitudes are adjusted to the graphic format. This method performs other operations, such as background color setting and waveform plotting. The method “GetWaveMethod” creates a bitmap image and provides it to the “ImageField” in the Audio module. We represent the bitmap as a series of X-Y points in a 2D reference system. A “Pen” graphical object draws the points and connects them with a solid line through an interpolation operation. The previous steps are shown in Figure 2. To capture the input keyboard, the DirectInput class repeatedly hears the keyboard buffer to obtain every pressure on the chosen button. When the button (on the screen or keyboard) is pressed, the tool stores the instant of bubble appearance in seconds and tenths of seconds. The detected bubbles are displayed on the screen as rectangular blue bars under the reproduction trackbar.

Bitmap generation for the 2-dimensional representation of an audio file.
Saving
The data obtained during the annotation phase are stored in a text file. One of the most important problems that can occur in this phase is multiple bubble detection. The tool reveals every keyboard input by reading an apposite buffer. If the keyboard buffer is read with very high frequency, such as 1 KHz, and the user exerts prolonged pressure on the key, a single bubble can be annotated as multiple bubbles. To avoid the erroneous annotation of multiple bubbles, a preliminary phase of “bundling bubbles” is implemented before the storage phase. If 2 adjacent bubbles are separated by temporal distances of less than 0.05 seconds, they will be considered as a single bubble and then merged. In the bundling phase, each bubble is compared with the next bubble. The shower case can be recognized by this procedure because the total duration of this event is typically significantly longer than 0.05 seconds.
Report module
File management is performed by importing the classes for text files’ treatment as binary data streams. The report files can be changed by reopening them in write mode; all data contained in the appropriate text area will be stored in overwrite mode.
CoBe Functionalities and Graphical User Interface
The proposed CoBE tool stems from the need to provide medical experts with a universal and efficient instrument for listening to and annotating echo Doppler files. It resembles a common audio player with reduced functionalities of reproduction and encoding of an audio file but with advanced annotation plug-ins that are not available in commercial tools. The system includes a calibration step to gauge the tool on the specific user who is making the annotations as objective as possible. The GUI (graphical user interface) of the CoBE tool is composed of 3 parts: “Detector Training” (Figure 3), “Audio” (Figure 4), and “Show Txt” (Figure 5).

Module used to train the experts and obtain correct detection times.

Module used to review audio, detect bubbles, and save the results in a text file.

Module used to view the stored results of previous annotations.
“Detector Training” is designed to train experts and calculate their response times. The “Audio” allows a user to reproduce different echo Doppler files with a unique player and detect bubbles by pressing an appropriate button. The last “Show Txt” part can visualize and edit bubbles that were recorded in a previous audio test. To ensure the optimal use of the tool, the flowchart in Figure 6 illustrates the correct running sequence of these parts.

Examiner’s steps for analyzing echo Doppler audio with CoBE.
Detector training module
The first step is the execution of the module “Detector Training” (Figure 3) to characterize the examiner. This module enables the examiner to determine their responsiveness to external acoustic stimuli by pressing a button. The responsiveness, which is expressed in milliseconds, indicates the exact instant of appearance of bubbles, which eliminates any subjective influence from different examiners. This module plays a random sound with a variable delay between 0 and 5 seconds. The sounds can contain bubbles of variable size and number to achieve the widest characterization of users. The human auditory system may have different sensitivity levels; thus, some persons are able to hear small bubbles better than large bubbles and vice versa. Pressure on the start button enables random playback of the first sample, and, simultaneously, a timer starts a clock with millisecond accuracy. The clock stops at the press of a preset button that can be optionally selected from a list of enabled keys. This operation is repeated 10 times for 10 successively presented sounds. At the end of the test, the average response time of the examiner is calculated and displayed in a specific field. If the procedure is correctly performed, and the user is satisfied with its response time, the test does not need to be repeated, and the average response time is passed to the Audio module, which overwrites the default value. The human response time to external acoustic stimuli varies from person to person; thus, we decided to set the default value to 40 ms according to tests reported in the literature.31–33
The GUI has 2 blue text fields: the first field contains the delay times related to each sound, whereas the second field contains an identification number for each sound. These fields appear at the end of the procedure when the average response time is returned. Above these fields are 2 scrolling lists: the first list is the key selection box to be pressed when the bubble is heard and the second list contains the default average response time of 40 ms, which can be changed by the user.
Audio module
Reproduction
The audio module (Figure 4) was developed to enable the reproduction and display of echo Doppler audio files, annotation of embolic events, and data storage as text files. The first step is the loading of an echo Doppler file selected by scrolling through a directory and a subdirectory of a terminal. When the audio is loaded, the current path is updated in a text field, and the management “Play,” “Pause,” and “Stop” buttons is enabled. To facilitate reproduction, 2 auxiliary trackbars are employed: the first trackbar is used for reproduction control and the second trackbar is used for volume control. The user can change the instant of sound reproduction by moving the first trackbar cursor forward or backward. The functionality of the other control is distinct; after each modification, the audio is played back with the new settings.
Visualization
The screen portion devoted to the graphic display of audio files is an image field. Two orthogonal axes are drawn in red, and the origin of the reference system corresponds to the current audio signal play time. The “Switch Amplitude” module is a particular component used for graphic display that enables the choice of the time interval for audio playback, which must be displayed on the screen. This range may vary from 1 to 10 seconds with a minimum step of 10 ms. By default, it is set to 10 seconds. This control is situated at the top right of the window. Each audio contains a large number of samples; thus, it is processed with downsampling techniques to ensure a smoother display of the associated waveform. The basic idea of this technique is to reproduce only one sample every k samples. Considering a ByteRate equal to half of the original and a window of 10 ms, the number of samples k is calculated by formula (1):
Sometimes, the waveform of a signal analyzed with CoBE can differ slightly from those displayed by other commercial players. However, the audio reproduction and visualization are duplicated in 2 different data fluxes, and the previous compression technique affects only the graphic data without influencing the audio quality. The compression can be set by the control box to achieve appropriate signal visualization. This control box is situated on the bottom right of the window. The preview of compressed or uncompressed audio appears only after uploading the file when the playback has not yet started.
Annotation
During reproduction, if the examiner detects a bubble, the event can be signaled by pressing a button on the screen or a preselected key on the keyboard. This last mode is faster than the first mode because the user does not have to keep the mouse over the “Bubble” button on the screen and can instead concentrate on listening and press the button when appropriate.
Saving
After test completion, all detected bubbles can be saved in a text file with a defined structure. Prior to saving, CoBE asks the user to make a subjective assessment of the presence or absence of showers. This information is stored in a text file using an appropriate string and can serve as an additional aid to evaluate the effectiveness of automated methods for detecting bubbles. The users can choose their file name and the storage directory of the result file during saving. The tool also provides the ability to specify filters by indicating the file extensions for storage. In our case, only the “.txt” extension is allowed. The value returned by the dialog box is a combination of 2 strings: the first string contains the file path and the file name and the second string contains the playback date and time. This strategy guarantees unambiguous analysis and avoids overwriting records. When the save is completed, a warning message appears on the screen. After closing the message, the examiner can test another audio file and repeat the entire procedure.
Report module
The module “Show txt” enables a user to view and modify the bubbles saved in a text file from a previous audio analysis. The components in this form are the “Search” button for loading a file, the text area used to display the content of the file, the option check that enables modifying a file, and the “Save” button used to save the comments as a text file. When the file is uploaded, a specific text field stores the path of the file, and the text area in the center of the form visualizes the content of the file. Changes may be approved after putting a check in the appropriate control box, and subsequently, the user can insert comments or other text at will. Prior to closing the software or viewing module, the current changes in the text field must be saved. By pressing the “Save” button, the entire content of the current file is overridden with the content of the text area. The saved bubbles are tabulated in a certain order using a certain criterion. The first lines of the file contain information about the creation date and the number of detected bubbles. The following text contains all bubbles grouped per second. For each bubble, the program stores the instant of detection with a maximum accuracy of tenths of a second. During the save, all instants of bubble detection are rounded to the nearest integer, and all bubbles with equal integers are grouped. The pair (second; counter) refers to the groupings in the data file. The second is the instant of detection converted to a whole, and the counter is an integer that is equal to one in the case of the detection of a single bubble and greater than one in the case of multibubble detection in the second considered (eg, Single Detection 7; 1—Multi-Detection 6; 2).
All bubbles in each group can be displayed with the decimal part. The number 7 is the second rounded to the nearest integer when one or more bubbles are detected. The number 4 is the number of bubbles detected. The subsequent numbers, which correspond to the number of bubbles, are the detection instants of bubbles with a precision of one-tenth of a second, such as 6.91-7.11-7.3-7.47. The file can be modified to add comments or text that may help the user in subsequent audio analysis.
Results
CoBE performance test
To obtain an objective quantification of the usefulness of CoBe and a set of correctly annotated files to compare the capabilities of different bubble detection algorithms, 3 blind teams were chosen to analyze 240 echo Doppler audio files with the CoBE tool. These 240 echo Doppler files originated from 2 different DANs diving campaigns: Maldives 2016 (137 files) and Elba Island 2016 (103 files). These files are products of acquisitions performed according to the previously described protocol. No anomalies, such as saturation signals or low signal levels due to operator errors in signal acquisition, were observed. The 3 selected blind teams consisted of hyperbaric doctors who belonged to the DAN organization. They annotated the 240 echo Doppler files with 3 different players, including the CoBE tool.
This tool responds to a significant problem, that is, the univocal reproduction of a sound, such as an echo Doppler file, independent of the player employed. To verify this main feature, each of the 3 blind teams listened to the same file 4 times according to a well-defined procedure. Each file among the 240 total usable echo Doppler files was randomly extracted and annotated by the same examiner using a different audio player each time. The interval between subsequent plays of the same file was set to at least 7 days to prevent a user from remembering the specific file. During each subsequent listening, a different audio player among the 4 selected audio players (Audacity, Windows Media Player, QuickTime, and CoBE) was employed, and the player’s order of use was random. The main outcome of this listening protocol was that each audio player introduces additional variability in the correct bubble recognition. Matches (including true positives, false positives, and false negatives) among the 3 blind team annotations for the same file increase when the same player is employed. Establishing a hierarchy of performance among different players is beyond the scope of this study; however, we want to emphasize that using a specific player must be included in the specifications of a unified protocol used to obtain, by direct listening or automatic algorithms, a diver’s embolic risk grade. Although CoBE is not better or worse than the commonly used audio players, it adds standardized audio file annotation features and calibration based on a listener’s response time. The 4 annotations of each file produced by each blind team during this examination differ in terms of the number of bubbles and showers detected and their instants of appearance. In comparison, the records of each of the 3 blind teams for the same file heard using the same player are relatively convergent. Tables 1 to 3 correspond to the 3 different blind teams. In these tables, the rows indicate a specific audio file, whereas the first 4 columns contain the number of bubbles detected using each of the 4 different audio players. The last 3 columns list the statistical parameters of mean, standard deviation, and median. These tables refer to only 10 casual files among the 240 audio files included in the entire evaluation protocol. With reference to the total annotation results for the 240 files, CoBE enabled the blind teams to obtain comparable reports for every annotated audio file. About 62% of the 240 annotated files exhibit absolute convergence in terms of the numbers of detected bubbles. The remaining 38% of the reports can be divided into 2 groups: the first 35% differ in the number of detected bubbles by less than 1% among the blind teams, whereas the remaining 3% differ in the number of detected bubbles by 1% to 1.7%. Regarding shower detection, CoBE achieved 100% convergence among the 3 blind teams’ results. Counter of Bubble Event provides a higher number of correctly annotated files with respect to conventional manual annotation due to its well-defined standard annotation structure. These properly annotated files can be effectively employed for validating automatic bubble detection algorithms. The annotation structure of CoBE and depicted in Figure 7 can clearly display the detected bubbles and thereby facilitate additional studies or signal processes performed using these audio files. One of the main advantages of CoBE is its ability to report the exact moment of bubble appearance. This advantage is attributed to the Detector Training Module, which removes the dependence on particular examiners. This tool is the only tool that uses a noninvasive embedded technique to calculate the user response time to an acoustic stimuli and self-trains experts for efficient bubble recognition. Counter of Bubble Event can be used as medical training tool for hyperbaric doctors and cardiologists to instruct them in listening to and recognizing bubbles. Properly recorded and annotated audio files can be randomly presented to the auditor and used to train the ear. At the end of each analysis, a physician can compare the bubbles he or she identified with those in the file to verify his or her ability to correctly detect bubbles. Currently, CoBE is extensively employed with the DAN standard annotation tool. The feedback that we received from DAN operators after they applied CoBE to a large number of annotation campaigns related to its ease of use, the immediacy of relationship interpretation, and the extreme precision of the times of embolic event occurrence. In addition, CoBE enables us to easily and automatically combine different audio tests conducted on the same audio file by different blind teams (or manually by making a different choice in the CoBE menu). Counter of Bubble Event has proven to be a very effective system for annotating bubbles in Doppler echo sound signals and enlightening the scientific community. Counter of Bubble Event software is licensed under GNU/GPL v3 and will be available for download on the DAN site by November (www.diversafetyguardian.org).
Player comparison of blind team 1.
Abbreviations: CoBE, Counter of Bubble Event; QT, QuickTime; WMP, Windows Media Player.
Player comparison of blind team 2.
Abbreviations: CoBE, Counter of Bubble Event; QT, QuickTime; WMP, Windows Media Player.
Player comparison of blind team 3.
Abbreviations: CoBE, Counter of Bubble Event; QT, QuickTime; WMP, Windows Media Player.

Visualization of stored results with a commercial editor, such as Notepad.
CoBE usability test
To conduct a usability test of the product, numerous tasks were performed by a series of users. Therefore, each user performed the proposed tasks in an autonomous manner without any external aid. Each user answered a series of 15 questions on the most critical issues encountered during the assigned duties. These questions primarily relate to the user-friendliness of the interface and the effectiveness of the tool in performing the planned activities. The answers, which were provided in closed form, range from 1 (very poor) to 5 (excellent); the usability test is presented in Figure 8. More than 96% of the surveyed users gave a total score between 4 and 5 points. The average ratings are grouped into 2 categories: the “GUI and User Friendly Interface” achieved a score of 98% and the “Completion tasks” achieved a score of 94%. The “GUI and User Friendly Interface” category had a mean score of 4.3, a median of 4, an SD of 0.64, and a sample size of 30. The “Completion tasks” category had mean score of 4.2, a median of 4, an SD of 0.75, and a sample size of 15.

Questions submitted to the examiners of audio echo Doppler les involved in Counter of Bubble Event.
Conclusions
Counter of Bubble Event is proved to be a useful tool for both bubble annotation in echo Doppler audio signals and the creation of a unified annotation structure that can be used as an instrument for the validation and comparison of automatic detection algorithms. Therefore, CoBE is an essential tool for the objective evaluation of the effectiveness of bubble detection algorithms and also provides a quantitative reliability index of their performance. Currently, the literature proposes a variety of automated algorithms, each of which produces different reports from the same analyzed echo Doppler signal. Consequently, achieving a unique and univocal conclusion may not be feasible. This situation is particularly inadequate in the health care sector in terms of preventing decompression pathology because choosing a specific therapy for a subject under examination relies on precise bubble detection. The principal characteristic of CoBE is that it allows bubble annotation without the influence of different audio players, which enables clear audio analysis by the final examiners. Furthermore, to eliminate the dependence of bubble detection on an examiner’s reflexes, the tool provides a preliminary “calibration phase” in which the examiner’s reaction time to sampled sounds is measured. The tool provides a module to calculate the response times, which may have additional uses. As mentioned previously, in this phase, CoBE measures a user’s response time to an external stimulus. This information is then used to calibrate the tool for the subsequent phase of bubble detection and to accurately note the occurrence of each event. Counter of Bubble Event is also a useful training tool that can be used to test the ability of the ear to correctly recognize a single bubble and showers. The tool will be made available for further testing by nonexpert subjects who will try to identify bubbles. Currently, this tool can be used in an extensive range of sectors, from the sport and wellness area to medical specialist environments. In terms of human physiology, emboli are particulate or gaseous elements that travel within the bloodstream, reflect ultrasound more intensely than the surrounding red blood cells, and typically generate a characteristic sound. Emboli are potentially harmful and may cause ischemic stroke. Therefore, physicians can use the occurrence and proliferation of emboli as indicators of stroke risk from cardiac and vascular diseases. The early detection of emboli is relevant for a variety of clinical applications, such as identifying patients at high risk of stroke due to the presence of emboli and those with arterial or cardiac sources of embolism, monitoring patients during invasive surgical procedures and assessing the effects of antithrombotic agents. The clinical value of identifying emboli has been clearly established in the clinical literature; however, the actual process of detecting an embolic signal within the Doppler spectrum can be challenging. To assist a physician in identifying typical embolic signals, the availability of automatic instruments for detecting emboli in the bloodstream is extremely important, particularly in the field of underwater prevention and for medical scopes. Certainly, CoBe is a tool that can be used to examine and annotate any echo Doppler file, including playback in offline mode and automatic annotation generation in a standard format. However, it may also be useful for medical staff training if used as a standard player for echo Doppler analysis and comparison with previously annotated files. Our next step will involve porting the implemented algorithms on an embedded device to provide a complete system for bubble diagnosis in harsh environments, such as deep diving, and patient monitoring in hospitals or homes. Cloud integration can achieve a direct dialog between patients and medical teams.
Footnotes
Funding:
The author(s) received no financial support for the research, authorship, and/or publication of this article.
Declaration Of Conflicting Interests:
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Author Contributions
PP, LM, and LP conceived and designed the experiments and jointly developed the structure and arguments for the paper. AM analyzed the data. LM and LP wrote the first draft of the manuscript. AB and SV contributed to the writing of the manuscript. AM and PP agree with manuscript results and conclusions. PP made critical revisions and approved the final version. All authors reviewed and approved the final manuscript.
Disclosures and Ethics
As a requirement of publication, the authors have provided to the publisher a signed confirmation of compliance with legal and ethical obligations, including but not limited to the following: authorship and contributorship, conflicts of interest, privacy and confidentiality, and (where applicable) protection of human and animal research subjects. The authors have read and confirmed their agreement with the ICMJE authorship and conflict of interest criteria. The authors have also confirmed that this article is unique and not under consideration or published in any other publication and that they have permission from rights holders to reproduce any copyrighted material. Any disclosures are made in this section. The external blind peer reviewers report no conflicts of interest.
