Software Tool Development and Application Focusing in EDF Signal Readings and Polysomnography

The EDF+ (European Data Format Plus) is a flexible and open source data format created in order to store and exchange biomedical signals. It is known worldwide and used by a large variety of specialists in the area. EDF+ signals have been subjected to many researches of clinical interest amongst diagnosing and for treatment of diseases related to sleeping disorders. Nevertheless, more complete and user-friendly tools, which use these signals, are yet too few in the market. This paper presents a new tool developed in order to read and analyze EDF+ signals, focusing in the area of sleep disorders. It includes several features, such as organizing signal channels through previous montage customizations, sleep stage bars and graphics for analyzing the quality of sleep (hypnograms). It provides easiness in the whole process of interpretation and scoring of sleep events in polysomnography exams. The software development used the C++ language, due to its great versatility and efficiency, using Visual Studio Community 2013® as the Integrated Development Environment (IDE). Moreover, it implements many Digital Signal Processing (DSP) techniques, for instance, its own set of digital filters. This paper presents an application of Polysomnography analysis software and suggests a modification on the way to interpret the EDF+ standard and its usage.

variables. The exam is performed by using many techniques of biological signal study, such as EEG (electroencephalogram), EOG (electro-oculogram), EMG (electromyogram) and signals from other accessories, like the position sensor, snore sensor, flow sensor, respiratory straps, and oximeter, among others. Each one is used to acquire biological signals generated by electric potential differences in their respective regions of the human body [1]- [6].
Through polysomnography, diseases and disorders related to sleep can be properly diagnosed and treated. This exam is indicated for patients who suffer from symptoms such as insomnia, daytime sleepiness, and respiratory disorders (e.g.: snoring and apnea). From the electrical signals captured in the exam, a digital file is generated, by means of which certain software can provide physicians with biomedical signals analysis and information of physiological variables. This digitized exam file may have different types of formats and data structure, varying according to the organization. Figure 1 shows a representation of a patient being analyzed by a polysomnography session [1]- [6].
PSG importance is clear in the sense where computational and automated technology, constantly under improvements, have been positively implemented in the medicine and human sciences branches aid. The EDF+ format has facilitated the standardization of digital storage of biomedical signals. Therefore, in general, there are several softwares available for reading these signals, however there are few targeted exclusively for polysomnography. The purpose of this work is the development of a software for it, providing more clear, smooth and directed diagnosis in a more timely and efficient manner.

Methodology and Development
The main idea behind the developed study was to make the software capable of overloading the basic EDF+ Annotation standard with extra information that would provide easier detailing of the exams, rather than just showing a general signal to be interpreted. From a basic EDF+ Annotation, as shown in Figure 2(a), the overload would work saving the applied changes in the file, as shown by Figure 2(b). The modifications are the insertion of an annotation group, the channel where that event was scored and the kind of event scored. A "Sleep Event", as in Figure 2, is represented by the letter "s", followed by the channel number "10" and the kind of event "6" (which stands for "Leg Movement" in the software's current configuration). That keeps the original pattern from EDF+, where the "19" characters are recognized just as simple text characters. However once opened the file with isSleepWatcher these extra data before the sleep event name will be used for internal configurations.
That would give the software two different groups of processing capabilities: to open and process an exam never opened before in which the insertion of EDF+ Annotation configuration would be possible, or opening an exam already overloaded, so that some analyses and results would already be embedded in it.
This overloading can be configured into four different event groups: sleep stage, sleep event, observation and highlights. That way, the user interface gets more fluid and intuitive, allowing doctors and technicians to insert and interpret the many kinds of possible scorings in a PSG exam (e.g.: it is possible to score the sleep event just by dragging the mouse over the desired signal, instead of creating a new annotation in another channel made just for that purpose). Thus, giving more identity to it rather than just opening the exam's annotations as a generic signal, also evidenced by the Polyman ® software, developed by the EDF+ standard creator [6]. The proposed is-SleepWatcher methodology will, on top of a normal signal processing, display physiological information, being remarkable in the future as a next step for the EDF+ standard possible update and improvement.
The software archictecture is composed by 13 classes as presented by Figure 3, and for the system development, C++ programing language was used, supported by Unified Modeling Language (UML), which can be divided in three parts. The yellow block for reading EDF+ files. The orange one, for representig the PSG exam, ploting traces, signals analysis, and sleep tools. The red block for the mainframe interface and configuration. The last, grey one, are auxiliary classes.
The system flow-chart can be seen in the Figure 4 [6] [9] [10]. It is a simple representation of how the software works. Process as filter is included in the Perform Analysis and graphics ploting on Display Polysomnography signals.

Results and Discussion
As a first step in the proposal, Figure 5 shows the first view of the developed software isSleepWatcher. The    initial configurations are very wide so that a professional is the one responsible for choosing the appropriate options and customizations, which include signal amplitude, filtering options, graphic style and colors, EDF+ annotations etc. Figure 6(a) and Figure 6(b) show general view of specific configurations tab from the software in which the user is able to change graph and grids general option, and specify the EDF annotations convertion, respectively. Figure 7 details the options the users have after the signal is presented. Figure 8 shows a short comparison, and also, a validation comparison between the software developed in this work, isSleepWatcher, (Figure 8(a)) with the software provided by the creators of EDF + format, Polyman (Figure 8(b)). The layout shown refers to the same part of a demo exam. Figure 9 represents the processed signal by two different filtering configuration. Following, Figure 10 details the software application itself, presenting the full examinaton window with all the applied options and the Polysomnography processed signal.

Conclusions
Biomedical engineering and all of its ramifications is an area that has been continuously growing. This is the latest tendency in medicine, to focus more on prevention rather than treatment of diseases. Thus, the branch dedicated to examining gains more attention, giving reasons of proposing in development of automated processes and investment in higher performance and with better interface tools. The developed software presented as a very useful application through this paper meeting many of the needs of the area to which it applies. It was built with an intuitive and user-friendly interface, providing, in addition, options that were not addressed in similar software made for the same purpose, giving to the presented work its degree of innovation and novelty, in special with the approach to EDF+ Annotations configuration and processing.