In the previous chapter we were able to detect the QRS complexes of a recording created by a commercial equipment by using WFDB tools. Now we want to edit the result.
To do this, we need a viewer that allows deleting or adding QRS detections as well as reposition them if necessary. First of all, we are going to show the result, then we will explain the choices taken, as well as the process of installation. Once installed, the command is direct:
We indicate the record name (ecg) as well the annotation file qrs
and a nice window appears. The result (sligthly modified) can be seen in the
figure 3.1
The result of the analysis seems very good. Let me stress that the signal is
not good at all and that it was not even an WFDB signal in origin. Probably, no
editing is necessary. In any case, editing the annotations with wave is
a pleasure. Many subtle features are included (from defining your own set of
annotations to measuring signal amplitudes, from acting as an interface to
other programs to synchronizing several windows, from directly accessing
recordings on the PhysioNet web server to annotating a recording from
scratch). It is a wonderful program. You can follow an excellent tutorial at
PhysioNet
with the details. Wave is installed as a part of WFDB Software Package
in Linux systems.
At this point, given the importance of wave, I am going to dedicate some
time to installation topics. Firstly, I will emphasize the differences between
wave and gtkwave.
To develop a graphic program, you usually use a graphic library. A graphic
library is a set of graphic functions that do things such as creating a window,
drawing a line etc. Wave uses XView. Since it is not easy to use it in Windows,
there is an alternative. A similar program (Gtkwave) also developed by
the authors of WFDB uses Gtk. Since both programs are more or less similar, I
will stress the differences:
If you want to run WFDB in Windows, then you can download the
Self-extracting-installer. It
installs a set of WFDB tools as well as Gtkwave. The installation is very easy
and you can immediately use the program with the recording 100s that is
included in the package.
If you are using Linux, I strongly recommend the use of Wave (instead of
Gtkwave). Let me detail some reasons:
I would not like to be misunderstood. Gtkwave is an excellent program. Wave is
even better. If you are running Linux, I recommend that you make the aditional
effort of installing wave.
In any case, if you are running Windows and you feel frustrated by not being
able to use wave, turn a lemon into lemonade: install Linux.
Since the main inconvenience encountered with Wave is the difficulty in
the installation, and the details in PhysioNet are directed to Red Hat, I will
try to detail the procedure in Mandrake 9.0. Everything you need is included in
the distribution except:
And now the procedure:
XView uses an editor called textedit (included in xview-clients). It is
installed in /usr/openwin/bin/textedit. To call it from Wave, it
is necessary to define it as EDITOR
Some alternatives are to add /usr/openwin/bin to your PATH, or to copy textedit into a directory in your PATH, or to make a link from /usr/openwin/bin/textedit to a directory in your PATH; if you do any of these it will not be necessary to set EDITOR each time you plan to use 'textedit' within 'wave'.
Once made this arrangements, when you push the button Analyze and then Edit Menu you are asked
to copy wavemenu in your own directory. Once you click on copy
the menu (a very useful resource) appears edited with textedit. You can
define any other editor (not necessarily textedit) to edit the menu.
Finally, when you press F1 in wave, nothing happens. To get help when
you press F1, you can use the next command.
Now, when you press F1 a help window appears.
At this moment we have installed Wave. It is time to enjoy it. If you
are connected to the Internet and you type the command
then you have access to the record slp01a of the database slpdb
with the annotation st, as if it had been downloaded to your
computer. It is a sleep recording with a quantification of stages in epochs of
30 seconds. Believe or not, you can navigate through it from your own computer
without downloading the recording.
Let's do the same with our recording:
And we can begin to practice with our own data.
It has been a long and challenging session. At this moment we have installed
wave. We can follow the tutorial and edit our results. We can add or
eliminate annotations, we can change the type of annotation or assign them to
some specific signal. Once finished we will export the results to continue our
analysis.
In the next chapter we are going to use Scilab to analyze the data.
[j@localhost Code]$ wave -r ecg -a qrs
Differences between Gtkwave and Wave
Installation in Mandrake 9.0
[j@localhost Code]$ export EDITOR=/usr/openwin/bin/textedit
[j@localhost Code]$ wave -r ecg -a qrs
[j@localhost Code]$ xmodmap -e "keysym F1 = Help"
[j@localhost Code]$ wave -r ecg -a qrs
[j@localhost Code]$ wave -r slpdb/slp01a -a st
[j@localhost Code]$ wave -r ecg -a qrs
In summary
Next: Interacting with Scilab
Up: Applying PhysioNet tools to
Previous: Reading an ASCII file
Contents
j
2002-12-11