diff -Naur --exclude Makefile --exclude info wfdb-10.4.20/install-wave32 wfdb-10.4.21/install-wave32 --- wfdb-10.4.20/install-wave32 2009-01-13 14:25:28.000000000 -0500 +++ wfdb-10.4.21/install-wave32 2009-05-12 12:23:30.000000000 -0400 @@ -27,10 +27,15 @@ # names in other Linux distributions, and "yum" itself may not be available # as a package manager in some distributions. These commands are safe to # run even if any or all of these packages are already installed. -yum -y update libgcc.i386 glibc-devel.i386 libX11-devel.i386 \ - libXpm-devel.i386 libcurl-devel.i386 xorg-x11-fonts-misc -yum -y install libgcc.i386 glibc-devel.i386 libX11-devel.i386 \ - libXpm-devel.i386 libcurl-devel.i386 xorg-x11-fonts-misc + +if [ "x$1" != "x-q" ] +then + yum -y update libgcc.i386 glibc-devel.i386 libX11-devel.i386 \ + libXpm-devel.i386 libcurl-devel.i386 xorg-x11-fonts-misc + yum -y install libgcc.i386 glibc-devel.i386 libX11-devel.i386 \ + libXpm-devel.i386 libcurl-devel.i386 xorg-x11-fonts-misc +fi + # On Debian-based distributions, such as Ubuntu, it's awkward to force apt-get # to install 32-bit packages, especially if like-named 64-bit packages have # been installed already. Google on "getlibs" for an alternative. @@ -41,9 +46,14 @@ # easiest way to install them on Fedora is using the RPM command below. # Again, this command is safe even if any or all of these are already # installed. -rpm -ivh http://physionet.org/physiotools/xview/i386-Fedora/xview-3.2p1.4-21.1.fc8.i386.rpm \ - http://physionet.org/physiotools/xview/i386-Fedora/xview-clients-3.2p1.4-21.1.fc8.i386.rpm \ - http://physionet.org/physiotools/xview/i386-Fedora/xview-devel-3.2p1.4-21.1.fc8.i386.rpm + +if [ "x$1" != "x-q" ] +then + rpm -ivh http://physionet.org/physiotools/xview/i386-Fedora/xview-3.2p1.4-21.1.fc8.i386.rpm \ + http://physionet.org/physiotools/xview/i386-Fedora/xview-clients-3.2p1.4-21.1.fc8.i386.rpm \ + http://physionet.org/physiotools/xview/i386-Fedora/xview-devel-3.2p1.4-21.1.fc8.i386.rpm +fi + # # On Debian or Ubuntu, simply run # apt-get install xviewg-dev diff -Naur --exclude Makefile --exclude info wfdb-10.4.20/lib/Makefile.tpl wfdb-10.4.21/lib/Makefile.tpl --- wfdb-10.4.20/lib/Makefile.tpl 2009-05-03 15:22:24.000000000 -0400 +++ wfdb-10.4.21/lib/Makefile.tpl 2009-05-14 10:42:24.000000000 -0400 @@ -1,5 +1,5 @@ # file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 3 May 2009 +# Last revised: 14 May 2009 # This section of the Makefile should not need to be changed. INCLUDES = $(INCDIR)/wfdb/wfdb.h $(INCDIR)/wfdb/wfdblib.h \ @@ -70,3 +70,5 @@ signal.o: wfdb.h wfdblib.h signal.c calib.o: wfdb.h wfdblib.h calib.c wfdbio.o: wfdb.h wfdblib.h wfdbio.c + $(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' -DCFLAGS='"-I$(INCDIR)"' \ + -DLDFLAGS='"-lwfdb"' -c wfdbio.c \ No newline at end of file diff -Naur --exclude Makefile --exclude info wfdb-10.4.20/lib/wfdb.h wfdb-10.4.21/lib/wfdb.h --- wfdb-10.4.20/lib/wfdb.h 2009-05-04 01:01:16.000000000 -0400 +++ wfdb-10.4.21/lib/wfdb.h 2009-05-14 11:06:33.000000000 -0400 @@ -33,7 +33,7 @@ /* WFDB library version. */ #define WFDB_MAJOR 10 #define WFDB_MINOR 4 -#define WFDB_RELEASE 20 +#define WFDB_RELEASE 21 #define WFDB_NETFILES 1 /* if 1, library includes code for HTTP, FTP clients */ #define WFDB_NETFILES_LIBCURL 1 diff -Naur --exclude Makefile --exclude info wfdb-10.4.20/NEWS wfdb-10.4.21/NEWS --- wfdb-10.4.20/NEWS 2009-05-04 01:23:53.000000000 -0400 +++ wfdb-10.4.21/NEWS 2009-05-14 11:34:46.000000000 -0400 @@ -1,3 +1,13 @@ +10.4.21: + Changes in lib/Makefile.tpl were needed in order to pass configuration + constants to the functions added to wfdbio.c in 10.4.20, but were + omitted from that release; they have been included in this version. + + Several changes in WAVE, including an option (accessible from the View + panel) to display valid signals only, have been designed to provide + more convenient access to variable-layout records such as those in the + MIMIC II Waveform Database. + 10.4.20: WFDB application 'snip' can now create excerpts of multi-segment records that preserve the segmentation of the original records. diff -Naur --exclude Makefile --exclude info wfdb-10.4.20/wave/edit.c wfdb-10.4.21/wave/edit.c --- wfdb-10.4.20/wave/edit.c 2005-06-10 10:34:01.000000000 -0400 +++ wfdb-10.4.21/wave/edit.c 2009-05-12 12:19:00.000000000 -0400 @@ -1,10 +1,10 @@ /* file: edit.c G. Moody 1 May 1990 - Last revised: 10 June 2005 + Last revised: 12 May 2009 Annotation-editing functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1990-2005 George B. Moody +Copyright (C) 1990-2009 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -96,8 +96,8 @@ } invalid_data = (isigsettime(level_time) < 0 || getvec(level_v) < 0); for (i = 0; i < nsig; i++) { - sprintf(level_name_string[i], "%8s: ", signame[i]); - if (invalid_data) { + sprintf(level_name_string[i], "%s: ", signame[i]); + if (invalid_data || level_v[i] == WFDB_INVALID_SAMPLE) { sprintf(level_value_string[i], " "); sprintf(level_units_string[i], " "); } diff -Naur --exclude Makefile --exclude info wfdb-10.4.20/wave/modepan.c wfdb-10.4.21/wave/modepan.c --- wfdb-10.4.20/wave/modepan.c 2003-07-12 02:09:37.000000000 -0400 +++ wfdb-10.4.21/wave/modepan.c 2009-05-12 12:53:32.000000000 -0400 @@ -1,10 +1,10 @@ /* file: modepan.c G. Moody 30 April 1990 - Last revised: 12 July 2003 + Last revised: 12 May 2009 Mode panel functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 2003 George B. Moody +Copyright (C) 1990-2009 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -122,7 +122,7 @@ XV_HELP_DATA, "wave:view.draw", PANEL_LABEL_STRING, "Draw: ", PANEL_CHOICE_STRINGS, - "all signals", "listed signals only", NULL, + "all signals", "listed signals only", "valid signals only", NULL, PANEL_VALUE, 0, PANEL_DEFAULT_VALUE, 0, 0); @@ -228,7 +228,7 @@ /* Check the signal display options next. */ i = sig_mode; sig_mode = (int)xv_get(sig_item, PANEL_VALUE); - if (i != sig_mode) + if (i != sig_mode || sig_mode == 2) set_baselines(); /* Check the annotation display mode next. */ diff -Naur --exclude Makefile --exclude info wfdb-10.4.20/wave/sig.c wfdb-10.4.21/wave/sig.c --- wfdb-10.4.20/wave/sig.c 2006-02-06 07:29:55.000000000 -0500 +++ wfdb-10.4.21/wave/sig.c 2009-05-13 13:21:45.000000000 -0400 @@ -1,10 +1,10 @@ /* file: sig.c G. Moody 27 April 1990 - Last revised: 6 February 2006 + Last revised: 13 May 2009 Signal display functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1990-2006 George B. Moody +Copyright (C) 1990-2009 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -54,6 +54,7 @@ int j, xn, xp; XPoint *p, *q; + if (ybase == -9999) return; for (j = 0, p = q = b; j <= n; j++) { if (j == n || q->y == WFDB_INVALID_SAMPLE) { if (p < q) { @@ -90,11 +91,24 @@ if (lp->vlist[i]) drawtrace(lp->vlist[i], lp->ndpts, base[i], draw_sig, 0); } - else + else if (sig_mode == 1) for (i = 0; i < siglistlen; i++) { if (0 <= siglist[i] && siglist[i] < nsig && lp->vlist[siglist[i]]) drawtrace(lp->vlist[siglist[i]], lp->ndpts,base[i],draw_sig,0); } + else { /* sig_mode == 2 (show valid signals only) */ + int j, nvsig; + for (i = nvsig = 0; i < nsig; i++) + if (lp->vlist[i] && vvalid[i]) nvsig++; + for (i = j = 0; i < nsig; i++) { + if (lp->vlist[i] && vvalid[i]) { + base[i] = canvas_height*(2*(j++)+1.)/(2.*nvsig); + drawtrace(lp->vlist[i], lp->ndpts, base[i], draw_sig, 0); + } + else + base[i] = -9999; + } + } highlighted = -1; } @@ -105,7 +119,7 @@ if (!lp_current) return; if (0 <= highlighted && highlighted < lp_current->nsig) { - if (sig_mode == 0) { + if (sig_mode != 1) { drawtrace(lp_current->vlist[highlighted], lp_current->ndpts, base[highlighted], unhighlight_sig, 1); drawtrace(lp_current->vlist[highlighted], lp_current->ndpts, @@ -125,7 +139,7 @@ } highlighted = i; if (0 <= highlighted && highlighted < lp_current->nsig) { - if (sig_mode == 0) { + if (sig_mode != 1) { drawtrace(lp_current->vlist[highlighted], lp_current->ndpts, base[highlighted], clear_sig, 1); drawtrace(lp_current->vlist[highlighted], lp_current->ndpts, @@ -181,13 +195,13 @@ /* Show the annotations, if available. */ show_annotations(display_start_time, nsamp); - /* If requested, show the signal names. */ - if (show_signame) show_signal_names(); - /* Get a display list for the requested screen, and show it. */ lp = find_display_list(display_start_time); show_display_list(lp); + /* If requested, show the signal names. */ + if (show_signame) show_signal_names(); + /* If requested, show the signal baselines. */ if (show_baseline) show_signal_baselines(lp); @@ -350,7 +364,7 @@ } else lp->vlist[c][x0].y = WFDB_INVALID_SAMPLE; - vvalid[c] = 0; + // vvalid[c] = 0; } } } @@ -465,11 +479,24 @@ for (i = 0; i < nsig; i++) XDrawString(display, osb, draw_sig, xoff, base[i] - yoff, signame[i], strlen(signame[i])); - else + else if (sig_mode == 1) { for (i = 0; i < siglistlen; i++) if (0 <= siglist[i] && siglist[i] < nsig) XDrawString(display, osb, draw_sig, xoff, base[i] - yoff, signame[siglist[i]], strlen(signame[siglist[i]])); + } + else { /* sig_mode == 2 (show valid signals only) */ + int j, nvsig; + for (i = nvsig = 0; i < nsig; i++) + if (vvalid[i]) nvsig++; + for (i = j = 0; i < nsig; i++) { + if (vvalid[i]) { + base[i] = canvas_height*(2*(j++)+1.)/(2.*nvsig); + XDrawString(display, osb, draw_sig, xoff, base[i] - yoff, + signame[i], strlen(signame[i])); + } + } + } } static void show_signal_baselines(lp) @@ -479,6 +506,7 @@ yoff = mmy(2); for (i = 0; i < nsig; i++) { + if (base[i] == -9999) continue; if (dc_coupled[i] && 0 <= lp->sb[i] && lp->sb[i] < canvas_height) { XDrawLine(display, osb, draw_ann, 0, lp->sb[i]+base[i], canvas_width, lp->sb[i]+base[i]); @@ -499,7 +527,7 @@ { int ix, j = -1, xx, yy; - if (sig_mode == 0) j = i; + if (sig_mode != 1) j = i; else if (0 <= i && i < siglistlen) j = siglist[i]; if (j < 0 || j >= nsig || lp_current->vlist[j] == NULL) return (-1); if (nsamp > canvas_width) ix = x;