diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/app/rdsamp.c wfdb-10.5.4/app/rdsamp.c --- wfdb-10.5.3/app/rdsamp.c 2010-03-16 10:23:37.000000000 -0400 +++ wfdb-10.5.4/app/rdsamp.c 2010-07-02 00:39:48.000000000 -0400 @@ -410,7 +410,7 @@ for (i = 0; i < nsig; i++) { if (v[sig[i]] != WFDB_INVALID_SAMPLE) (void)printf(vfmt, - (double)(v[sig[i]] - si[sig[i]].baseline)/si[sig[i]].gain); + ((double)v[sig[i]] - si[sig[i]].baseline)/si[sig[i]].gain); else (void)printf(invalid); } diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/app/wrsamp.c wfdb-10.5.4/app/wrsamp.c --- wfdb-10.5.3/app/wrsamp.c 2010-03-12 12:18:48.000000000 -0500 +++ wfdb-10.5.4/app/wrsamp.c 2010-07-02 00:17:38.000000000 -0400 @@ -1,5 +1,5 @@ /* file: wrsamp.c G. Moody 10 August 1993 - Last revised: 1 March 2010 + Last revised: 1 July 2010 ------------------------------------------------------------------------------- wrsamp: Select fields or columns from a file and generate a WFDB record @@ -385,7 +385,7 @@ nf = ta->ntokens - zflag; SUALLOC(fv, nf, sizeof(int)); - for (i = 0, j = zflag; j <= nf; i++, j++) + for (i = 0, j = zflag; i < nf; i++, j++) fv[i] = j; } @@ -414,7 +414,7 @@ else { char tdesc[16]; - (void)sprintf(tdesc, "column %d", fv[i]); + (void)sprintf(tdesc, "olumn %d", fv[i]); SSTRCPY(si[i].desc, tdesc); } si[i].units = ""; diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/conf/version.def wfdb-10.5.4/conf/version.def --- wfdb-10.5.3/conf/version.def 2009-10-28 12:09:31.000000000 -0400 +++ wfdb-10.5.4/conf/version.def 2010-07-12 17:51:06.000000000 -0400 @@ -1,5 +1,5 @@ # file: version.def G. Moody 24 May 2000 -# Last revised: 28 October 2009 +# Last revised: 12 July 2010 # Each release of the WFDB Software Package is identified by a three-part # version number, defined below. Be sure to leave a single space before # and after the "=" in each of the next three lines! @@ -17,6 +17,6 @@ VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) # WAVEVERSION is the WAVE version number. -WAVEVERSION = 6.10 +WAVEVERSION = 6.11 # _____________________________________________________________________________ diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/doc/wag-src/header.5 wfdb-10.5.4/doc/wag-src/header.5 --- wfdb-10.5.3/doc/wag-src/header.5 2005-10-19 17:35:34.000000000 -0400 +++ wfdb-10.5.4/doc/wag-src/header.5 2010-06-29 10:33:47.000000000 -0400 @@ -277,6 +277,8 @@ fields is not considered to be part of the description, however. If the description is missing, the WFDB library functions that read header files supply a description of the +form 'record \fIrec\fP, signal \fIn\fP' (shortened to 'signal \fIn\fP' +by many WFDB applications). .SS "Info strings" .LP Comment lines that follow the last signal specification line diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/doc/wag-src/wfdb.3 wfdb-10.5.4/doc/wag-src/wfdb.3 --- wfdb-10.5.3/doc/wag-src/wfdb.3 2010-06-22 11:15:43.000000000 -0400 +++ wfdb-10.5.4/doc/wag-src/wfdb.3 2010-07-02 01:05:14.000000000 -0400 @@ -1,4 +1,4 @@ -.TH WFDB 3 "22 June 2010" "WFDB software 10.5.3" "WFDB Applications Guide" +.TH WFDB 3 "1 July 2010" "WFDB software 10.5.4" "WFDB Applications Guide" .SH NAME wfdb \- Waveform Database library .SH SYNOPSIS @@ -38,6 +38,8 @@ .br WFDB_Frequency getifreq(void) .br +int getseginfo(WFDB_Seginfo **segments) +.br char *getwfdb(void) .br int getframe(WFDB_Sample *\fIvector\fP) diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/doc/wpg-src/wpg0.tex wfdb-10.5.4/doc/wpg-src/wpg0.tex --- wfdb-10.5.3/doc/wpg-src/wpg0.tex 2010-06-22 11:22:38.000000000 -0400 +++ wfdb-10.5.4/doc/wpg-src/wpg0.tex 2010-07-14 01:10:47.000000000 -0400 @@ -3324,6 +3324,8 @@ * setheader:: Creating or changing a @file{hea} file. * setmsheader:: Creating a @file{hea} for a multi-segment record. +* getseginfo:: Get information about segments of a + multi-segment record. * wfdbquit:: Closing WFDB files. * iannclose and oannclose:: Closing annotation files. * wfdbquiet and wfdbverbose:: Suppressing error messages from the WFDB library. @@ -3463,7 +3465,7 @@ introduced in WFDB library version 5.0.) @c @group -@node setmsheader, wfdbquit, setheader, miscellaneous functions +@node setmsheader, getseginfo, setheader, miscellaneous functions @unnumberedsubsec setmsheader @findex setmsheader (9.1) @cindex header files (creating) @@ -3508,7 +3510,38 @@ first introduced in WFDB library version 9.1.) @c @group -@node wfdbquit, iannclose and oannclose, setmsheader, miscellaneous functions +@node getseginfo, wfdbquit, setmsheader, miscellaneous functions +@unnumberedsubsec getseginfo +@findex getseginfo (10.5.4) +@cindex multi-segment header (reading) +@cindex segments (in multi-segment records) + +@example +int getseginfo(WFDB_Segment **@var{psegarray}) +@end example +@noindent +@strong{Return:} +@table @asis +@item @t{(int)} +number of segments belonging to the current input record +@end table +@c @end group + +@noindent +Invoking @code{getseginfo(@var{psegarray})}, where @var{psegarray} is +declared to be of type @code{**WFDB_Seginfo}, sets @var{*psegarray} so +that it points to an array of @code{WFDB_Seginfo} structures that +describe the segments of the currently open (multi-segment) record. +The return value indicates the number of segments (i.e., the number +of valid @code{WFDB_Seginfo} structures in @var{*psegarray}. If +there is no current input record, or if the current input record is +not a multi-segment record, this function returns 0 and does not modify +@var{*psegarray}. + +contain the segments' names, lengths, and starting sample numbers. + +@c @group +@node wfdbquit, iannclose and oannclose, getseginfo, miscellaneous functions @unnumberedsubsec wfdbquit @findex wfdbquit @cindex closing WFDB files @@ -4693,6 +4726,7 @@ * WFDB_Calinfo structures:: Signal calibration specifications. * WFDB_Anninfo structures:: Annotator names and file types. * WFDB_Annotation structures:: Annotation contents. +* WFDB_Seginfo structures:: Segment information. @end menu @node WFDB_Siginfo structures, WFDB_Calinfo structures, Data Types, Data Types @@ -4994,7 +5028,7 @@ for an example of how to set the contents of an array of @code{WFDB_Anninfo} objects. -@node WFDB_Annotation structures, , WFDB_Anninfo structures, Data Types +@node WFDB_Annotation structures, WFDB_Seginfo structures, WFDB_Anninfo structures, Data Types @section Annotation Structures @cindex @code{WFDB_Annotation} structure (defined) @cindex annotation structure @@ -5077,6 +5111,39 @@ @xref{Example 3}, for a short program that examines the contents of a @code{WFDB_Annotation}. +@node WFDB_Seginfo structures, , WFDB_Annotation structures, Data Types +@section Segment Information Structures +@cindex @code{WFDB_Seginfo} structure (defined) +@cindex segment information structure +@cindex structure (segment) + +Objects of type @code{WFDB_Seginfo} contain these fields: + +@table @code +@item char recname[WFDB_MAXRNL+1] +@cindex segment name + +Segment name (the name of the simple record corresponding +to a segment of a multi-segment record), unless @code{recname} +has the special value '@code{~}'. In the latter case, the +segment is a gap (i.e., it corresponds to an interval during +which no signals are available). + +@item WFDB_Time nsamp +@cindex segment length + +Segment length in samples. + +@item WFDB_Time samp0 +@cindex segment start + +Number of samples that precede the segment in the multi-segment record +to which it belongs. If the segment is opened as an individual +record, its @code{n}th sample has sample number @code{n-1}, just as +for any record. If the record to which the segment belongs is opened, +the @code{n}th sample in the segment has sample number @code{n-1+samp0}. +@end table + @node Annotation Codes, Database Files, Data Types, Top @chapter Annotation Codes @@ -8915,10 +8982,24 @@ changes that may not be described here. @unnumberedsec WFDB 10.5 +@unnumberedsubsec Changes in version 10.5.4 (13 July 2010) + +Function @code{getseginfo()} has been introduced in WFDB library version +10.5.4, to allow applications to obtain information about the +segments belonging to the current (multi-segment) input record. + +In previous versions, integer arithmetic overflow was possible +when converting format 32 samples using @code{aduphys()}, if the difference +between the baseline value and the sample to be converted exceeded +the range of signed 32-bit integers. Although @code{rdsamp} does not +use @code{aduphys()} similar code in @code{rdsamp} also exhibited this problem, +which has now been corrected; thanks to Ikaro Silva for +reporting it and providing a test case. + @unnumberedsubsec Changes in version 10.5.3 (22 June 2010) -Function getgvmode() has been introduced in WFDB library version -10.5.3, to allow querying the current operating mode of getvec(). +Function @code{getgvmode()} has been introduced in WFDB library version +10.5.3, to allow querying the current operating mode of @code{getvec()}. @unnumberedsubsec Changes in version 10.5.2 (18 April 2010) diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/doc/wug-src/wug0.tex wfdb-10.5.4/doc/wug-src/wug0.tex --- wfdb-10.5.3/doc/wug-src/wug0.tex 2010-03-17 14:28:02.000000000 -0400 +++ wfdb-10.5.4/doc/wug-src/wug0.tex 2010-07-14 01:28:13.000000000 -0400 @@ -5683,6 +5683,24 @@ for details on diagnosing and correcting this problem. \end{itemize} +\subsection{How can I enlarge or reduce the size of individual signals?} + +\WAVE{} version 6.11 and later versions allow you to change the displayed +sizes of individual signals if you wish. If the {\sf Annotation Template} +is not open, open it by left-clicking anywhere in the signal window, then +left-click again in the signal window to return the focus there. + +Select the signal of interest by pressing \keycap{Shift} and clicking +with the left mouse button while the pointer is near the signal of +interest, which will be highlighted by \WAVE{} when you do so. Next, +press and hold \keycap{Control} and one of \keycap{+} (to enlarge the +signal), \keycap{-} (to reduce the size of the signal), or \keycap{=} +(to reset the size of the signal to the value selected in the +{\sf View} panel). + +You may repeat this operation with as many signals as desired. If you +have not selected any signal, all signals are resized by these commands. + \subsection{How can I change \WAVE{}'s default scales or display colors?} \index{scales} @@ -7097,6 +7115,45 @@ \end{description} + +Commands in the next group are used to change the display scales. If +a signal is selected, amplitude changes apply to the selected signal +{\em only}. If shown, the grid reflects the scale of signal 0 (the +top signal). + +\index{zoom} +\index{enlarging signals} +\index{signal!enlarging} +\index{reducing size of signals} +\index{changing scales} +\index{scales!changing} +\index{rescaling} +\index{time!compressing and expanding} + +\begin{description} + +\item[\keycap{Ctrl}+\keycap{(}] +zoom in (show more detail by expanding the time axis) + +\item[\keycap{Ctrl}+\keycap{)}] +zoom out (show more context by compressing the time axis) + +\item[\keycap{Ctrl}+\keycap{+}] +increase the amplitude of the signal(s) + +\item[\keycap{Ctrl}+\keycap{-}] +decrease the amplitude of the signal(s) + +\index{inverting signals}\index{signal!inverting} +\item[\keycap{Ctrl}+\keycap{*}] +invert the signal(s) + +\item[\keycap{Ctrl}+\keycap{=}] +restore the scales selected on the {\sf View} panel + +\end{description} + + Typing an annotation or marker mnemonic sets the {\sf Type} field of the {\sf Annotation Template} (even if the {\sf Annotation Template} is not visible, and even if editing is disabled). These mnemonics are diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/lib/signal.c wfdb-10.5.4/lib/signal.c --- wfdb-10.5.3/lib/signal.c 2010-06-22 12:04:26.000000000 -0400 +++ wfdb-10.5.4/lib/signal.c 2010-07-02 00:28:51.000000000 -0400 @@ -1,5 +1,5 @@ /* file: signal.c G. Moody 13 April 1989 - Last revised: 22 June 2010 wfdblib 10.5.3 + Last revised: 29 June 2010 wfdblib 10.5.4 WFDB library functions for signals _______________________________________________________________________________ @@ -244,11 +244,8 @@ static long msbtime; /* base time for multi-segment record */ static WFDB_Date msbdate; /* base date for multi-segment record */ static WFDB_Time msnsamples; /* duration of multi-segment record */ -static struct segrec { - char recname[WFDB_MAXRNL+1];/* segment name */ - WFDB_Time nsamp; /* number of samples in segment */ - WFDB_Time samp0; /* sample number of first sample in segment */ -} *segarray, *segp, *segend; /* beginning, current segment, end pointers */ +static WFDB_Seginfo *segarray, *segp, *segend; + /* beginning, current segment, end pointers */ /* These variables relate to open input signals. */ static unsigned maxisig; /* max number of input signals */ @@ -965,7 +962,7 @@ msbdate = bdate; msnsamples = nsamples; /* Read the names and lengths of the segment records. */ - SALLOC(segarray, segments, sizeof(struct segrec)); + SALLOC(segarray, segments, sizeof(WFDB_Seginfo)); segp = segarray; for (i = 0, ns = (WFDB_Time)0L; i < segments; i++, segp++) { /* Get next segment spec, skip empty lines and comments. */ @@ -1532,7 +1529,7 @@ /* If the current record contains multiple segments, locate the segment containing the desired sample. */ if (in_msrec) { - struct segrec *tseg = segp; + WFDB_Seginfo *tseg = segp; if (t >= msnsamples) { wfdb_error("isigsettime: improper seek on signal group %d\n", g); @@ -2799,6 +2796,12 @@ return (0); } +FINT getseginfo(WFDB_Seginfo **sarray) +{ + *sarray = segarray; + return (segments); +} + FINT setmsheader(char *record, char **segment_name, unsigned int nsegments) { WFDB_Frequency msfreq, mscfreq; @@ -3303,7 +3306,7 @@ FDOUBLE aduphys(WFDB_Signal s, WFDB_Sample a) { - int b; + double b; WFDB_Gain g; if (s < nvsig) { @@ -3435,7 +3438,7 @@ int i; SFREE(segarray); - segp = segend = (struct segrec *)NULL; + segp = segend = (WFDB_Seginfo *)NULL; for (i = 0; i < maxisig; i++) { SFREE(isd[i]->info.fname); /* missing before 10.4.6 */ SFREE(isd[i]->info.desc); diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/lib/wfdb.h wfdb-10.5.4/lib/wfdb.h --- wfdb-10.5.3/lib/wfdb.h 2010-06-22 22:26:09.000000000 -0400 +++ wfdb-10.5.4/lib/wfdb.h 2010-07-14 01:28:54.000000000 -0400 @@ -1,5 +1,5 @@ /* file: wfdb.h G. Moody 13 June 1983 - Last revised: 22 June 2010 wfdblib 10.5.3 + Last revised: 29 June 2010 wfdblib 10.5.4 WFDB library type, constant, structure, and function interface definitions _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) @@ -32,7 +32,7 @@ /* WFDB library version. */ #define WFDB_MAJOR 10 #define WFDB_MINOR 5 -#define WFDB_RELEASE 3 +#define WFDB_RELEASE 4 #define WFDB_NETFILES 1 /* if 1, library includes code for HTTP, FTP clients */ #define WFDB_NETFILES_LIBCURL 1 @@ -188,11 +188,18 @@ unsigned char *aux; /* pointer to auxiliary information */ }; +struct WFDB_seginfo { /* segment record structure */ + char recname[WFDB_MAXRNL+1]; /* segment name */ + WFDB_Time nsamp; /* number of samples in segment */ + WFDB_Time samp0; /* sample number of first sample */ +}; + /* Composite data types */ typedef struct WFDB_siginfo WFDB_Siginfo; typedef struct WFDB_calinfo WFDB_Calinfo; typedef struct WFDB_anninfo WFDB_Anninfo; typedef struct WFDB_ann WFDB_Annotation; +typedef struct WFDB_seginfo WFDB_Seginfo; /* Dynamic memory allocation macros. */ #define MEMERR(P, N, S) \ @@ -321,6 +328,7 @@ extern FINT newheader(char *record); extern FINT setheader(char *record, WFDB_Siginfo *siarray, unsigned int nsig); extern FINT setmsheader(char *record, char **segnames, unsigned int nsegments); +extern FINT getseginfo(WFDB_Seginfo **segments); extern FINT wfdbgetskew(WFDB_Signal s); extern FVOID wfdbsetiskew(WFDB_Signal s, int skew); extern FVOID wfdbsetskew(WFDB_Signal s, int skew); @@ -363,9 +371,10 @@ setecgstr(), strann(), setannstr(), setanndesc(), wfdb_isann(), wfdb_isqrs(), wfdb_setisqrs(), wfdb_map1(), wfdb_setmap1(), wfdb_map2(), wfdb_setmap2(), wfdb_ammap(), wfdb_mamap(), wfdb_annpos(), wfdb_setannpos(), - adumuv(), newheader(), setheader(), setmsheader(), wfdbputprolog(), - setsampfreq(), setbasetime(), putinfo(), setibsize(), setobsize(), - calopen(), getcal(), putcal(), newcal(), wfdbgetskew(), sample_valid(); + adumuv(), newheader(), setheader(), setmsheader(), getseginfo(), + wfdbputprolog(), setsampfreq(), setbasetime(), putinfo(), setibsize(), + setobsize(), calopen(), getcal(), putcal(), newcal(), wfdbgetskew(), + sample_valid(); extern FLONGINT wfdbgetstart(); extern FSAMPLE muvadu(), physadu(), sample(); extern FSTRING ecgstr(), annstr(), anndesc(), timstr(), mstimstr(), diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/lib/wfdb.h0 wfdb-10.5.4/lib/wfdb.h0 --- wfdb-10.5.3/lib/wfdb.h0 2010-06-22 11:24:08.000000000 -0400 +++ wfdb-10.5.4/lib/wfdb.h0 2010-07-01 17:12:58.000000000 -0400 @@ -1,5 +1,5 @@ /* file: wfdb.h G. Moody 13 June 1983 - Last revised: 22 June 2010 wfdblib 10.5.3 + Last revised: 29 June 2010 wfdblib 10.5.4 WFDB library type, constant, structure, and function interface definitions _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) @@ -188,11 +188,18 @@ unsigned char *aux; /* pointer to auxiliary information */ }; +struct WFDB_seginfo { /* segment record structure */ + char recname[WFDB_MAXRNL+1]; /* segment name */ + WFDB_Time nsamp; /* number of samples in segment */ + WFDB_Time samp0; /* sample number of first sample */ +}; + /* Composite data types */ typedef struct WFDB_siginfo WFDB_Siginfo; typedef struct WFDB_calinfo WFDB_Calinfo; typedef struct WFDB_anninfo WFDB_Anninfo; typedef struct WFDB_ann WFDB_Annotation; +typedef struct WFDB_seginfo WFDB_Seginfo; /* Dynamic memory allocation macros. */ #define MEMERR(P, N, S) \ @@ -321,6 +328,7 @@ extern FINT newheader(char *record); extern FINT setheader(char *record, WFDB_Siginfo *siarray, unsigned int nsig); extern FINT setmsheader(char *record, char **segnames, unsigned int nsegments); +extern FINT getseginfo(WFDB_Seginfo **segments); extern FINT wfdbgetskew(WFDB_Signal s); extern FVOID wfdbsetiskew(WFDB_Signal s, int skew); extern FVOID wfdbsetskew(WFDB_Signal s, int skew); @@ -363,9 +371,10 @@ setecgstr(), strann(), setannstr(), setanndesc(), wfdb_isann(), wfdb_isqrs(), wfdb_setisqrs(), wfdb_map1(), wfdb_setmap1(), wfdb_map2(), wfdb_setmap2(), wfdb_ammap(), wfdb_mamap(), wfdb_annpos(), wfdb_setannpos(), - adumuv(), newheader(), setheader(), setmsheader(), wfdbputprolog(), - setsampfreq(), setbasetime(), putinfo(), setibsize(), setobsize(), - calopen(), getcal(), putcal(), newcal(), wfdbgetskew(), sample_valid(); + adumuv(), newheader(), setheader(), setmsheader(), getseginfo(), + wfdbputprolog(), setsampfreq(), setbasetime(), putinfo(), setibsize(), + setobsize(), calopen(), getcal(), putcal(), newcal(), wfdbgetskew(), + sample_valid(); extern FLONGINT wfdbgetstart(); extern FSAMPLE muvadu(), physadu(), sample(); extern FSTRING ecgstr(), annstr(), anndesc(), timstr(), mstimstr(), diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/NEWS wfdb-10.5.4/NEWS --- wfdb-10.5.3/NEWS 2010-06-22 23:15:32.000000000 -0400 +++ wfdb-10.5.4/NEWS 2010-07-14 02:29:21.000000000 -0400 @@ -1,3 +1,28 @@ +10.5.4 (13 July 2010): + Function getseginfo() has been introduced in WFDB library version + 10.5.4, to allow applications to obtain information about the + segments belonging to the current (multi-segment) input record. + + In previous versions, integer arithmetic overflow was possible when + converting format 32 samples using aduphys(), if the difference between + the baseline value and the sample to be converted exceeded the range of + signed 32-bit integers. Although rdsamp does not use aduphys(), + similar code in rdsamp also exhibited this problem, which has now + been corrected; thanks to Ikaro Silva for reporting it and providing a + test case. + + A wrsamp bug introduced in version 10.4.25 caused it to fail in + some cases if no columns were specified. This has been corrected; + thanks to Tony Cacere for reporting this problem together with a + test case. + + WAVE version 6.11, included in this release of the WFDB software + package, allows the user to change display scales using keyboard + commands. This allows one to resize signals independently, a frequently + requested feature. For details, see "How can I enlarge or reduce the + size of individual signals?" in the WAVE FAQ (in WAVE, click on Help + and select "Frequently asked questions"). + 10.5.3 (22 June 2010): Function getgvmode() has been introduced in WFDB library version 10.5.3, to allow querying the current operating mode of getvec(). diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/edit.c wfdb-10.5.4/wave/edit.c --- wfdb-10.5.3/wave/edit.c 2009-05-12 12:19:00.000000000 -0400 +++ wfdb-10.5.4/wave/edit.c 2010-07-13 17:33:24.000000000 -0400 @@ -1,10 +1,10 @@ /* file: edit.c G. Moody 1 May 1990 - Last revised: 12 May 2009 + Last revised: 13 July 2010 Annotation-editing functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1990-2009 George B. Moody +Copyright (C) 1990-2010 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 @@ -40,6 +40,7 @@ static char level_time_string[36]; int bar_on, bar_x, bar_y; int level_mode, level_popup_active = -1; +int selected = -1; void reset_ref() { @@ -531,6 +532,83 @@ else if (e == ';') ann_template.anntyp = REF_MARK; else if (e == '\r' && attached && attached->this.anntyp == LINK) parse_and_open_url(attached->this.aux); + else if (e == '+' && event_ctrl_is_down(event)) { + /* Increase size of selected signal, if any */ + if (0 <= selected && selected < nsig) + vmag[selected] *= 1.1; + /* or of all signals, otherwise */ + else + for (i = 0; i < nsig; i++) + vmag[i] *= 1.1; + vscale[0] = 0.0; + calibrate(); + disp_proc(XV_NULL, (Event *) '.'); + } + else if (e == '-' && event_ctrl_is_down(event)) { + /* Decrease size of selected signal, if any */ + if (0 <= selected && selected < nsig) + vmag[selected] /= 1.1; + /* or of all signals, otherwise */ + else + for (i = 0; i < nsig; i++) + vmag[i] /= 1.1; + vscale[0] = 0.0; + calibrate(); + disp_proc(XV_NULL, (Event *) '.'); + } + else if (e == '*' && event_ctrl_is_down(event)) { + /* Invert selected signal, if any */ + if (0 <= selected && selected < nsig) + vmag[selected] *= -1.0; + /* or all signals, otherwise */ + else + for (i = 0; i < nsig; i++) + vmag[i] *= -1.0; + vscale[0] = 0.0; + calibrate(); + disp_proc(XV_NULL, (Event *) '.'); + } + else if (e == ')' && event_ctrl_is_down(event)) { + /* Show more context, less detail (zoom out) */ + tmag /= 1.01; + clear_cache(); + if (display_start_time < 0) + display_start_time = -display_start_time; + display_start_time -= (nsamp + 100)/200; + if (display_start_time < 0) display_start_time = 0; + calibrate(); + disp_proc(XV_NULL, (Event *) '^'); + } + else if (e == '(' && event_ctrl_is_down(event)) { + /* Show less context, more detail (zoom in) */ + tmag *= 1.01; + clear_cache(); + if (display_start_time < 0) + display_start_time = -display_start_time; + display_start_time += (nsamp + 99)/198; + calibrate(); + disp_proc(XV_NULL, (Event *) '^'); + } + else if (e == '=' && event_ctrl_is_down(event)) { + /* Reset size of selected signal, if any */ + if (0 <= selected && selected < nsig) + vmag[selected] = 1.0; + /* or of all signals, otherwise */ + else + for (i = 0; i < nsig; i++) + vmag[i] = 1.0; + /* Reset time scale */ + tmag = 1.0; + vscale[0] = 0.0; + if (display_start_time < 0) + display_start_time = -display_start_time; + display_start_time += nsamp/2; + calibrate(); + display_start_time -= nsamp/2; + if (display_start_time < 0) + display_start_time = 0; + disp_proc(XV_NULL, (Event *) '^'); + } else { static char es[2]; @@ -562,9 +640,9 @@ case KEY_TOP(9): /* : same as */ if (event_is_down(event)) { if (event_shift_is_down(event)) { - if (event_ctrl_is_down(event)) /* : end */ + if (event_ctrl_is_down(event)) /* : home */ disp_proc(XV_NULL, (Event *) 'h'); - else /* : home */ + else /* : end */ disp_proc(XV_NULL, (Event *) 'e'); } else if (event_ctrl_is_down(event)) /* +: backward */ @@ -572,6 +650,7 @@ else /* : forward */ disp_proc(XV_NULL, (Event *) ']'); } + selected = -1; break; /* = +half-screen = -half_screen @@ -595,6 +674,7 @@ } if (event_is_down(event)) { } + selected = -1; break; case KEY_RIGHT(7): /* home: Ignore key release events. @@ -603,6 +683,7 @@ the record. */ if (event_is_down(event)) disp_proc(XV_NULL, (Event *) 'h'); /* strange but correct! */ + selected = -1; break; case KEY_RIGHT(13): /* end: Ignore key release events. @@ -611,6 +692,7 @@ the record. */ if (event_is_down(event)) disp_proc(XV_NULL, (Event *) 'e'); + selected = -1; break; case KEY_RIGHT(9): /* page-up: Ignore key release events. @@ -623,6 +705,7 @@ else disp_proc(XV_NULL, (Event *) '('); } + selected = -1; break; case KEY_RIGHT(15): /* page-down: Ignore key release events. @@ -635,6 +718,7 @@ else disp_proc(XV_NULL, (Event *) ')'); } + selected = -1; break; case KEY_RIGHT(8): /* up-arrow: @@ -894,6 +978,8 @@ } if (imin >= 0) { set_signal_choice(imin); + if (selected == imin) selected = -1; + else selected = imin; if (event_ctrl_is_down(event)) add_signal_choice(); if (event_meta_is_down(event)) delete_signal_choice(); } diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/editing.hlp wfdb-10.5.4/wave/editing.hlp --- wfdb-10.5.3/wave/editing.hlp 1999-09-07 22:33:21.000000000 -0400 +++ wfdb-10.5.4/wave/editing.hlp 2010-07-13 19:24:37.000000000 -0400 @@ -163,3 +163,22 @@ it to the desired signal. Hold down the key during these operations to copy the annotation, rather than to move it (simultaneous annotations are permitted if their `chan' fields differ). + + +Changing the display scales ("zooming") +--------------------------------------- + +While editing, it may be helpful to change the time or amplitude scales. +You may do so either using the controls on the View panel, or by using +these keyboard commands while the focus is in the signal window: + + +<(> Zoom in (show more detail by expanding the time axis) + +<)> Zoom out (show more context by compressing the time axis) + +<+> Increase the amplitude of the signal(s) + +<-> Decrease the amplitude of the signal(s) + +<*> Invert the signal(s) + +<=> Restore the scales selected on the View panel + +If you have selected a signal (by + near the signal of +interest), amplitude changes will be applied to that signal only. Otherwise, +they will be applied to all signals. diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/grid.c wfdb-10.5.4/wave/grid.c --- wfdb-10.5.3/wave/grid.c 2005-06-10 10:32:53.000000000 -0400 +++ wfdb-10.5.4/wave/grid.c 2010-07-13 19:29:14.000000000 -0400 @@ -1,10 +1,10 @@ /* file: grid.c G. Moody 1 May 1990 - Last revised: 10 June 2005 + Last revised: 13 July 2010 Grid drawing functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1990-2005 George B. Moody +Copyright (C) 1990-2010 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 @@ -45,7 +45,7 @@ void show_grid() { int i, ii, x, xx, y, yy; - double dx, dxfine, dy, dyfine; + double dx, dxfine, dy, dyfine, vm; static int oghf, ogvf, grid_hidden; static double odx, ody; @@ -59,16 +59,20 @@ } /* Calculate the grid spacing in pixels */ + if (tmag <= 0.0) tmag = 1.0; switch (gvflag) { case 0: - case 1: dx = seconds(0.2); break; - case 2: dx = seconds(0.2); dxfine = seconds(0.04); break; - case 3: dx = seconds(300.0); dxfine = seconds(60.0); break; + case 1: dx = tmag * seconds(0.2); break; + case 2: dx = tmag * seconds(0.2); dxfine = tmag * seconds(0.04); break; + case 3: dx = tmag * seconds(300.0); dxfine = tmag * seconds(60.0); break; } + if (vmag == NULL || vmag[0] == 0.0) vm = 1.0; + else vm = vmag[0]; switch (ghflag) { case 0: - case 1: dy = millivolts(0.5); break; - case 2: dy = millivolts(0.5); dyfine = millivolts(0.1); break; + case 1: dy = vm * millivolts(0.5); break; + case 2: dy = vm * millivolts(0.5); + dyfine = vm * millivolts(0.1); break; } /* The grid must be drawn if it has not been plotted already, if the grid diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/helppan.c wfdb-10.5.4/wave/helppan.c --- wfdb-10.5.3/wave/helppan.c 2002-07-12 23:36:15.000000000 -0400 +++ wfdb-10.5.4/wave/helppan.c 2010-07-12 15:18:12.000000000 -0400 @@ -4,7 +4,7 @@ ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 2002 George B. Moody +Copyright (C) 1990-2010 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 @@ -239,7 +239,7 @@ 0); xv_create(help_panel, PANEL_MESSAGE, PANEL_LABEL_STRING, - "Copyright \251 1990-2001 George B. Moody.", + "Copyright \251 1990-2010 George B. Moody.", 0); xv_create(help_panel, PANEL_BUTTON, diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/init.c wfdb-10.5.4/wave/init.c --- wfdb-10.5.3/wave/init.c 2010-06-22 11:40:09.000000000 -0400 +++ wfdb-10.5.4/wave/init.c 2010-07-13 16:41:32.000000000 -0400 @@ -1,10 +1,10 @@ /* file: init.c G. Moody 1 May 1990 - Last revised: 14 March 2008 + Last revised: 13 July 2010 Initialization functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1990-2008 George B. Moody +Copyright (C) 1990-2010 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 @@ -74,6 +74,7 @@ (level_units_string = realloc(level_units_string, ns * sizeof(char **))) == NULL || (vscale = realloc(vscale, ns * sizeof(double))) == NULL || + (vmag = realloc(vmag, ns * sizeof(double))) == NULL || (dc_coupled = realloc(dc_coupled, ns * sizeof(int))) == NULL || (sigbase = realloc(sigbase, ns * sizeof(int))) == NULL || (blabel = realloc(blabel, ns * sizeof(char *))) == NULL || @@ -90,7 +91,7 @@ level_name[i] = level_value[i] = level_units[i] = (Panel_item)NULL; dc_coupled[i] = scope_v[i] = vref[i] = level_v[i] = v[i] = v0[i] = vmax[i] = vmin[i] = 0; - vscale[i] = 1.0; + vscale[i] = vmag[i] = 1.0; if ((level_name_string[i] = calloc(1, 12)) == NULL || (level_value_string[i] = calloc(1, 12)) == NULL || (level_units_string[i] = calloc(1, 12)) == NULL) { @@ -229,6 +230,7 @@ /* Calculate the base levels (in display units) for each signal, and for annotation display. */ set_baselines(); + tmag = 1.0; vscale[0] = 0.; /* force clear_cache() -- see calibrate() */ calibrate(); @@ -283,7 +285,7 @@ calopen(cfname); for (i = 0; i < nsig; i++) { - vscale[i] = - millivolts(1) / df[i].gain; + vscale[i] = - vmag[i] * millivolts(1) / df[i].gain; dc_coupled[i] = 0; if (getcal(df[i].desc, df[i].units, &ci) == 0 && ci.scale != 0.0) { vscale[i] /= ci.scale; @@ -310,6 +312,7 @@ /* tscale is a multiplicative scale factor that converts sample intervals to window abscissas. */ if (freq == 0.0) freq = WFDB_DEFFREQ; - nsamp = canvas_width_sec * freq; - tscale = seconds(1) / freq; + if (tmag <= 0.0) tmag = 1.0; + nsamp = canvas_width_sec * freq / tmag; + tscale = tmag * seconds(1) / freq; } diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/intro.hlp wfdb-10.5.4/wave/intro.hlp --- wfdb-10.5.3/wave/intro.hlp 2002-12-08 03:42:00.000000000 -0500 +++ wfdb-10.5.4/wave/intro.hlp 2010-07-12 17:21:50.000000000 -0400 @@ -1,15 +1,13 @@ WAVE: Waveform Analyzer, Viewer, and Editor -Copyright (C) 1990-2002 George B. Moody +Copyright (C) 1990-2010 George B. Moody WAVE is an extensible interactive graphical environment for manipulating sets of digitized signals with optional annotations. WAVE is built using the WFDB library developed for physiologic signal processing, so it can be applied to any of a wide variety of data formats supported by the WFDB library. WAVE can -run on Linux PCs, Sun workstations, and other systems that support the X -Window System and the free XView toolkit; in addition, it can be accessed -remotely using networked PCs, Macintoshes, or other systems for which X11 -servers are available. +run on FreeBSD, GNU/Linux, Mac OS X, MS-Windows with Cygwin, Solaris, and +other platforms that support the X Window System and the free XView toolkit. Among WAVE's capabilities are: - fast display of waveforms and annotations at various calibrated scales diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/mainpan.c wfdb-10.5.4/wave/mainpan.c --- wfdb-10.5.3/wave/mainpan.c 2010-02-12 17:38:53.000000000 -0500 +++ wfdb-10.5.4/wave/mainpan.c 2010-07-13 17:08:48.000000000 -0400 @@ -1,5 +1,5 @@ /* file: mainpan.c G. Moody 30 April 1990 - Last revised: 12 February 2010 + Last revised: 13 July 2010 Functions for the main control panel of WAVE ------------------------------------------------------------------------------- @@ -748,6 +748,9 @@ if (display_start_time < 0L) display_start_time = -display_start_time; cache_time = -1L; break; + case '^': /* Start at display_start_time. */ + cache_time = -1L; + break; case ':': /* End at time specified on panel. */ display_start_time = wstrtim((char *)xv_get(time2_item, PANEL_VALUE)); if (display_start_time < 0L) display_start_time = -display_start_time; diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/search.c wfdb-10.5.4/wave/search.c --- wfdb-10.5.3/wave/search.c 2000-01-30 04:13:21.000000000 -0500 +++ wfdb-10.5.4/wave/search.c 2010-07-13 13:54:18.000000000 -0400 @@ -1,10 +1,10 @@ /* file: search.c G. Moody 17 October 1996 - Last revised: 29 April 1999 + Last revised: 13 July 2010 Search template functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1999 George B. Moody +Copyright (C) 1996-2010 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 @@ -135,7 +135,7 @@ if (attached == NULL) return; xv_set(s_anntyp_item, PANEL_VALUE, attached->this.anntyp, NULL); xv_set(s_aux_item, PANEL_VALUE, - attached->this.aux ? attached->this.aux+1 : "", NULL); + attached->this.aux ? (char *)(attached->this.aux+1) : "", NULL); xv_set(s_subtyp_item, PANEL_VALUE, attached->this.subtyp, NULL); xv_set(s_chan_item, PANEL_VALUE, attached->this.chan, NULL); xv_set(s_num_item, PANEL_VALUE, attached->this.num, NULL); diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/wave.h wfdb-10.5.4/wave/wave.h --- wfdb-10.5.3/wave/wave.h 2005-08-05 12:01:52.000000000 -0400 +++ wfdb-10.5.4/wave/wave.h 2010-07-13 16:06:17.000000000 -0400 @@ -1,10 +1,10 @@ /* file: wave.h G. Moody 26 April 1990 - Last revised: 5 August 2005 + Last revised: 13 July 2010 Constants, macros, global variables, and function prototypes for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1990-2005 George B. Moody +Copyright (C) 1990-2010 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 @@ -139,6 +139,8 @@ COMMON WFDB_Sample *vmin; COMMON int *vvalid; +COMMON double *vmag; /* user-adjustable multiplier for + resizing signal scales */ COMMON double *vscale; /* amplitude scales for each signal (pixels/adu) */ COMMON double vscalea; /* amplitude scale for annotation num @@ -177,6 +179,8 @@ (or -1 if none) */ COMMON double freq; /* sampling frequency (Hz) */ COMMON int atimeres; /* annot time resolution in samples */ +COMMON double tmag; /* user-adjustable multiplier for + resizing time scale */ COMMON double tscale; /* time scale (pixels/samp interval) */ COMMON double mmpermv; /* amplitude scale for export */ COMMON double mmpersec; /* time scale for export */ diff -Naur --exclude Makefile --exclude info wfdb-10.5.3/wave/wave.prf wfdb-10.5.4/wave/wave.prf --- wfdb-10.5.3/wave/wave.prf 2003-02-12 16:30:20.000000000 -0500 +++ wfdb-10.5.4/wave/wave.prf 2010-07-13 17:53:00.000000000 -0400 @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 2002 George B. Moody +Copyright (C) 1990-2010 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 @@ -41,462 +41,15 @@ (or http://www.physionet.org/physiotools/wug/wug.htm), or print HELPDIR/html/wug/wug.ps on a PostScript printer. -Summary of changes from version 5.0 ------------------------------------ -- WAVE User's Guide in hypertext -- Coordination of multiple WAVE processes -- Remote control of and by Netscape -- `Level' window -- Signals may be rearranged in the signal window -- Fine and coarse grid options -- Automatic selection of time scale -- New controls in the `Analyze' window -- New WAVE menu features -- Enhanced log functions -- Enhanced scope functions -- New help topic: frequently asked questions -- New versions of WAVE for 386 Linux and Sparc Solaris 2.x are available -- New command-line options for specifying the first screen to view -- New X11 resources and command-line options for setting display preferences -- New controls in the `View' window (annotation, signal, time display options) -- Keypad annotation editing and display commands -- Multi-edit mode -- Signal selection using the mouse -- Fewer restrictions on WAVE menu files -- Timed autosave -- WFDB environment editing -- Support for remote file access via web (HTTP) and FTP servers -- WAVE sources now available freely under the GPL -- All previously reported bugs fixed - -New features ------------- -- If you have a web browser such as Netscape, you can read the WAVE User's - Guide on-line. WAVE's Help Topics window contains a `User's Guide' button - that opens the guide using Netscape or the browser of your choice. (If - you don't use Netscape, you will need to customize the `url_view' script - provided with the WAVE distribution.) Some topics in WAVE's spot help - have `More' buttons that link in this way to the User's Guide for an - in-depth discussion. - -- You may open two or more records at once if you start WAVE with a command - such as - wave -r 100+101+102 - (which opens records 100, 101, and 102 in separate main windows). Each - main window is a separate WAVE process, and may be controlled independently - of the others. The `master WAVE process', corresponding to the last named - record, has an extra button (labelled `Sync') in the control panel; clicking - on this button causes all of the other windows in the process group to become - synchronized with the master WAVE process. (This can also be done by - clicking on any point in the signal window of the master WAVE process, - using the middle mouse button while also pressing .) It is also - possible to open the same record in two or more windows, and to select - different displays for each one, by a command such as - wave -r 100+100 +0/-display +0/some.other.cpu:0 - (which opens record 100 in a window on `some.other.cpu', and also in a - master WAVE window on the local display; for this to be done successfully, - it is usually necessary to run `xhost' on the remote system to permit the - WAVE host to open a window on it). For further details on teleconferencing - via WAVE, and other applications of this feature, see the WAVE User's Guide. - -- A new LINK annotation type (mnemonic `@') has been added to the WFDB library. - The aux field of a LINK annotation contains a URL and an optional comment. - WAVE displays the comment, underlined and distinctively colored, in the - manner of a Web browser; if you select a LINK annotation, WAVE uses the - `url_view' script included in the WAVE distribution to cause your web browser - to open the specified URL. Going in the opposite direction, the `wavescript' - application included in the WAVE distribution can be used as a helper by - a web browser; `wavescript' starts WAVE if necessary and causes it to - display a segment of a record as specified by the file named on its command - line. It is therefore possible to use a browser such as Netscape to control - WAVE, and vice versa. For details, see `WAVE and the Web' in the WAVE User's - Guide. - -- If you have enabled `levels' in the `View' window, WAVE now opens a `Level' - window if you press a mouse button while the pointer is in the signal window. - The `Level' window shows the time and amplitudes of the samples at the - pointer location; this information is updated continuously whenever a mouse - button is depressed. Using the `Show' menu at the top of the `Level' window, - you may choose to view the time and amplitudes in physical units (seconds, - mV, etc.) or database units (sample intervals and analog-to-digital converter - units); you may also choose to view absolute time and levels, or time - interval and levels relative to a reference marker. The reference marker - (there may be at most one defined in any record) may be inserted, moved, or - deleted in the same way as any other marker; its mnemonic is `;'. - -- If you choose to draw `listed signals only' using the Draw menu in the `View' - window, signals shown in the signal window are now arranged as they appear in - the signal list. - -- A new fine grid option (0.04 s x 0.1 mV) has been added to the `Grid' menu - in the `View' window. If this option is selected, every fifth grid line is - emphasized. At standard display scales (25 mm/s, 10 mm/mV), this option - specifies a 1 mm grid. Two more new grid options are for use at condensed - time scales. These offer grid lines at 1 minute intervals, with every fifth - grid line emphasized; these may be used with 0.5 mV horizontal grid lines, - or without horizontal grid lines. - -- Records sampled at very low frequencies (10 Hz and under) are automatically - displayed at a condensed time scale, and with a coarse time grid. You may - choose any desired time scale and grid mode for such records if the default - is not satisfactory, and you may change the default by saving the desired - settings in the `View' window while a low-rate record is open. Doing so does - not affect the default time scale or grid mode for high-rate records. - -- In the `Analyze' window, the standard controls (i.e., those not defined in - the menu file) are now all at the top of the window (several appeared at the - bottom of the window in previous versions), and six new standard controls - (`<', `>', `From', `To', `Signal list' and `Reload') have been added. The - `<' and `>' buttons allow you to shift the analysis interval (the interval - between the `Start' and `End' markers) in either direction without changing - the length of the interval. The `From' and `To' controls show the date and - time of day corresponding to `Start' and `End', if the header file for the - record contains a start time and date. You can adjust the analysis interval - by changing either `Start' and `End' or `From' and `To', as you wish. - `Signal list' is a string, initially set to the list of available signal - numbers in the current record. The signal list may be edited directly, or - the current signal may be appended to or deleted from the signal list using - the mouse (point to the desired signal, press and hold down the - key, and click the left mouse button to add the signal to the signal list; - follow the same procedure using the key instead of the key - to delete the first occurrence of a specified signal from the signal list). - - If you click on `Reload', WAVE waits until any pending foreground commands - issued from the Analysis command window are complete, and then WAVE reloads - the current record. If a pending command is rewriting the annotations or - signals being viewed, using this button allows you to view the revised files - as soon as they are complete. You can also use this button to load - `snapshots' of files being written by commands running in the background, - but do not attempt to edit such `snapshots'. - -- Several additional variables can now be used within WAVE menu files to - control external programs. If the WAVE menu contains the string `$SIGNALS' - in a command, the signal list will be inserted at that position in the - command. (Note that the meaning of the current $SIGNAL variable is - unchanged.) The current display scales used by WAVE are available in the - WAVE menu as $VSCALE (the amplitude scale, in mm/mV) and $TSCALE (the time - scale, in mm/sec), and other WAVE display options are available in $DISPMODE. - See the default WAVE menu file for details on $DISPMODE and for examples of - all of these variables in use. - -- New controls have been added to the log window. The `Load' button forces - WAVE to load or reload the current log file; this feature is useful if - another process (such as a WAVE analysis menu button) has been used to - create or modify the current log file. The `Edit' button now allows you - to edit a log file using your favorite text editor (set the EDITOR - environment variable or the Wave.TextEditor resource; the default is - the standard Open Windows `textedit' utility). New buttons labelled `|<' - and `>|' allow you to jump directly to the first or last entry in the log. - Finally, the `Delay' slider allows you to change the update frequency - (from once per second up to once per ten seconds) while using review mode. - -- New mouse and keyboard controls have been implemented in the scope window. - Click left or right within the scope window to single-step the scope display - backward or forward respectively. Click the middle mouse button to pause - the continuous mode display and to recenter the main window on the current - waveform in the scope window. Press and hold down the key while - clicking left or right to resume the continuous mode display. Press - while clicking the middle button to adjust the delay time (the - interval from the left edge of the scope window to the trigger point). The - left, up, and right arrow keys emulate the mouse buttons within the scope - window (but you must click at least once using the mouse to move the keyboard - focus into the scope window before these keys work). - -- Frequently asked questions and answers have been gathered in a new help - topic. Select `Frequently asked questions' from the Help window to review - this topic. Please submit additional questions, answers, and suggestions - to the author at the address above. - -- At last, there is a version of WAVE that runs on a PC! WAVE has been ported - to Linux, a freely available UNIX clone for 386/486/Pentium PCs. See file - `LINUX', in the WAVE distribution, for further information. There is also a - version of WAVE that has been recompiled for Sparc Solaris 2.x. The standard - version for SunOS 4.x will also run in SunOS binary compatibility mode under - Solaris 2.3 and later versions, but the native version for Solaris is a - better (i.e., faster and more robust) choice for such environments. - -- You can now specify the starting time of the first screen shown by WAVE - using the `-f' command-line option. For example, - wave -r 100 -a atr -f 25:14 - opens record 100 at 25 minutes and 14 seconds from the beginning of the - record. You may also set the initial value of the signal list (see below) - using the `-s' option. For example, - wave -r slp60 -a ecg -s 0 2 3 -f 1:30 - opens record slp60 at 1 minute and 30 seconds from the beginning, and - initializes the signal list to contain signals 0, 2, and 3. If the option - `-VS 1' is also used (see next item), WAVE displays only the signals in the - signal list. - - Note that the meaning of `-s' has been changed from previous versions, to - conform with the convention used by many other WFDB applications for - specifying signal lists. To force WAVE to use a shared colormap, use the - new `-S' option. The new `-O' option forces WAVE to use overlays instead, - if the display supports them (this is the default behavior unless the - resource Wave.GraphicsMode has been set to a value other than 0 or 8). - -- WAVE now allows you to specify initial values for the settings controlled - from the `View' window using either X11 resources or command-line options. - In addition, you may save the current settings as defaults for the next time - you run WAVE. The following command-line options and X11 resources may be - used to initialize the `View' settings: - Option X11 resource - -Vs Wave.View.Subtype - -Vc Wave.View.Chan - -Vn Wave.View.Num - -Va Wave.View.Aux - -Vm Wave.View.Markers - -VN Wave.View.SignalNames - -Vb Wave.View.Baselines - -Vl Wave.View.Level - - -Vt CHOICE Wave.View.TimeScale - -Vv CHOICE Wave.View.AmplitudeScale - -VS CHOICE Wave.View.SignalMode - -VA CHOICE Wave.View.AnnotationMode - -VT CHOICE Wave.View.TimeMode - -VG CHOICE Wave.View.GridMode - - The options and resources in the first group correspond to the like-named - `Show:' options at the top of the `View' window. By default, all of these - options are off (false); set any of the X11 resources to `true' to enable - these options, or use the command-line options to do so. For example, to - enable initial display of markers, either use `-Vm' on the command line, or - `Wave.View.Markers:true' in the X11 resource database (for example, in your - `.Xdefaults' file). - - The options and resources in the second group correspond to the menu buttons - that appear in the remainder of the `View' window. The CHOICE argument, or - the value of the X11 resource, should match the position of the desired - menu choice in the corresponding `View' menu, where the top item on the menu - is in position 0, the one below it is in position 1, etc. For example, to - set the initial time scale to 50 mm/sec (the item at position 6 in the `Time - Scale' menu), add `-Vt 6' to the command line, or `Wave.View.TimeScale:6' to - the X11 resource database. - - Click left on `Save as new defaults' in the `View' window to retain WAVE's - current settings as defaults for future WAVE sessions. In addition to the - options on the `View' window, this action also records the screen resolution - (which you may specify on the command line using the `-dpi' option), the - signal window size (which you may change by dragging the resize handles on - the signal window), and the graphics mode (which you may specify on the - command line using the `-g', `-m', `-O', or `-S' options). Note that WAVE's - current settings, and those that are saved as defaults, are those reflected - in the signal window. If you have modified `View' window options since the - last time the signal window was redrawn, these modifications have not been - applied, and are not saved. - -- Three controls have been added to the `View' window. Using the `Draw:' menu - button, you may instruct WAVE to draw all available signals (the default) - or those in the signal list (see below) only. Using the `Show annotations:' - menu button, you may view annotations centered in the signal window (the - default), attached to the signal specified by the `chan' field of each - annotation, or as a signal. This last option replaces the standard - annotation display with a signal (drawn in the annotation color, in the - center of the signal window) derived from the `num' fields of any annotations - in the window. Turn off this selection to restore the normal display. - Finally, the `Time display:' menu button allows you to choose to display and - enter elapsed times (the default), absolute times (if the header - file for the record contains the absolute time of the beginning of the - record), or (elapsed) times in sample intervals. WAVE shows elapsed times - in the corners of the signal window in the signal color; absolute times are - drawn in the annotation color. - -- Whenever the pointer is in the signal window (as indicated by a crosshair - cursor replacing the normal arrow pointer), the numeric keypad and several of - the function keys may be used for many annotation editing and display - operations. `Num Lock' must be off if you wish to use the keypad for these - operations. The keypad commands are: - <1> (End): moves the display window to the end of the record - <2> (down-arrow): moves the selected annotation down one signal (see - next item) - <3> (PgDn): moves the display window back half a screenful (or - a full screenful if is depressed) - <4> (left-arrow): behaves like the left mouse button (*) - <5>: behaves like the middle mouse button (*) - <6> (right-arrow): behaves like the right mouse button (*) - <7> (Home): moves the display window to the beginning of the record - <8> (up-arrow): moves the selected annotation up one signal (see next - item) - <9> (PgUp): moves the display window forward half a screenful (or - a full screenful if is depressed) - <=>: moves the pointer left (with acceleration while the key - is held down) - <*>: moves the pointer right (with acceleration while the - key is held down) - Function key commands are: - (or F6): copies the selected annotation into the template - (or F9): simulates clicking on `Search >' in the main window; - if is depressed, simulates `< Search' - (*) Note that the and keys may be used in combination with - the numeric keypad keys <4>, <5>, and <6>, and that these combinations work - just as when using the mouse buttons. does not work with the numeric - keypad, however. See the section on PC keyboard equivalents (below) if you - are not using a Sun keyboard. - -- `Multi-edit mode' is enabled when you open a record with two or more signals, - enable annotation editing, and show annotations attached to signals (see the - previous item). In multi-edit mode, annotation editing operations are - slightly different from the usual ones. The most important difference is - that you must always point to the desired signal when inserting or moving - annotations. In this mode, the `chan' field in the Annotation Template - window does not determine the `chan' field of an inserted annotation; rather, - the signal to which you point determines the `chan' field, and the `chan' - field in the Annotation Template window is updated accordingly after each - insertion. To move an annotation to a different signal, simply select it - and drag the pointer to the desired time and signal. If you wish to change - the `chan' field of an annotation without changing its time, select the - annotation and use the up-arrow and down-arrow keys (keys <2> and <8> on the - numeric keypad; `Num Lock' must be off) to move it to the desired signal. - Hold down the key during these operations to copy the annotation, - rather than to move it (simultaneous annotations are permitted if their - `chan' fields differ). - -- Signals may be selected using the mouse. Point to the desired signal, press - and hold down the key, and click the left mouse button. The selected - signal remains highlighted until the signal window is redrawn. The value - in the `Signal' field of the `Analyze' window changes to match the selection. - -- Command strings in the WAVE menu can now be much longer (up to 1024 - characters each, including the button label). There is no longer any limit - (other than those imposed by the X server and by total available memory) on - the number of menu entries (buttons) in the `Analyze' window. If the - environment variable WAVEMENU is not set, but a file named `wavemenu' exists - in the current directory, WAVE uses that file as its menu file; otherwise, - WAVE uses the system default menu file. As always, WAVE offers to create - `wavemenu' if you attempt to edit the system default menu file. - -- WAVE now saves your edits at one-minute intervals. Note that this operation - is postponed until you perform an edit. - -- The `Load' window now allows you to change the WFDB environment (WFDB path - and WFDB calibration file) without exiting from WAVE as was necessary - previously. Note that any changes you make are local to the current WAVE - process, although you can export these values to processes running in the - Analyze window using the symbols $WFDB and $WFDBCAL in the WAVE menu file. - -- WAVE (and all other applications based on the WFDB library) can now read - input files from web sites and FTP servers, provided that the WFDB library - has been compiled together with libwww (see http://www.w3.org/Library/). To - do so, simply add the appropriate http:// or ftp:// base URL to the WFDB - path, and use WAVE in the usual way. - -- Sources for WAVE are now available on the web at http://www.physionet.org/. - WAVE has been released under the GNU Public License (GPL), which permits - it to be copied and redistributed without cost. - -Bug fixes ---------- - -- Several bugs that caused WAVE to crash or behave oddly when searching beyond - the end or before the beginning of an annotation file have been fixed. - -- WAVE now contains a work-around for an X server-related problem that - sometimes caused annotations to be moved inappropriately when clicking the - left or right mouse button rapidly. - -- In previous versions of WAVE, if the record name was changed while there are - unsaved edits, an inappropriate error message appeared (asserting that - write permission must be obtained in the current directory before continuing) - and it was then impossible to save the edits or to continue. (There may have - been other ways of triggering the same bug.) This bug has been fixed. - -- WAVE now contains a work-around for an XView library bug that occasionally - caused earlier versions to dump core after the WAVE menu file was reread. - This problem occurred if menu items were added more than once in a single - session; there may have been other ways of triggering the same bug. A side - effect of the work-around is that the `Analyze' window may reappear in a - different location after the menu file has been reread (this depends on - the window manager). There is no way to keep the window position fixed and - avoid crashes at the same time, short of fixing the bug in the XView library. - -- WAVE (and other WFDB applications) crashed in some cases after closing a - record and reopening it or another record; the cause of this problem was - a WFDB library bug, which was fixed in WFDB library version 9.7. - -- WAVE version 6.0 contained a bug that caused crashes when attempting to - change all annotations within a specified range; this has been fixed. - -PC keyboard equivalents for Sun function and numeric keypad keys ----------------------------------------------------------------- - -WAVE can be controlled using the mouse and the normal alphanumeric keys only, -but there are a few alternate controls that use function keys and the numeric -keypad. The on-line help for WAVE generally describes how to use these -functions on a Sun keyboard. On a PC keyboard, some substitutions must be -made: - - Action PC key Sun key - - Open spot help - Simulate middle mouse button click keypad <5> - Move editing cursor left keypad <=> - Move editing cursor right keypad <*> - Copy selected annotation to template - Search forward - Advance to the end of the record - Search backward - Move to the beginning of the record - Advance half a screen - Advance a full screen - Move back half a screen - Move back a full screen - -These PC equivalents are also usable on Sun keyboards. In addition, all of the -actions that can be performed using the Sun arrow keys can also be performed -using the PC arrow keys. - -Cautions --------- - -Whenever the annotator name appears within parentheses in WAVE's title bar, -there are unsaved edits. Unsaved edits may be saved by selecting `Save' from -WAVE's `File' menu, by changing to another record or existing annotation file, -or by exiting from WAVE via the `Quit' button (but not via `Quit' from the -system menu, see below). There are still three known ways to lose your edits -in WAVE: - -- If you are running WAVE in the foreground under SunOS, and you have opened - the `Analyze' window or have selected `Print' from the `File' menu, do not - attempt to suspend WAVE (for example, by typing control-Z in the terminal - window from which WAVE was started). Under these circumstances, WAVE may be - killed immediately (without quit confirmation) and any unsaved edits are - lost. To avoid this problem, always run WAVE in the background (use `&' at - the end of the WAVE command line). - - Note that it doesn't matter if the `Analysis commands' window is open, only - that it has been opened at some time in the current WAVE session. Using the - `Print' command invisibly opens the `Analysis commands' window, and thus has - the same effect. - - This problem is the result of a bug in the XView `termsw' package used - for the `Analysis commands' window. The Solaris 2.x and Linux versions of - the XView library do not have this bug, and this problem does not occur - except when running WAVE under SunOS 4.x. - -- If another process sends any of several termination signals to WAVE, WAVE - is killed immediately (without exit confirmation). This may be regarded - as a feature rather than as a bug. A system crash has the same effect. - -- If you select `Quit' from the system menu, WAVE pops up a quit confirmation - notice box; if you confirm that you wish to quit, WAVE quits immediately, - and any unsaved edits are lost. To avoid this, always use WAVE's `Quit' - button on the main control window; when you select it, WAVE pops up a - quit confirmation notice box, but saves edits first if you confirm that you - wish to quit. - -To limit the amount of damage resulting from loss of unsaved edits, WAVE -autosaves your edits frequently (at one-minute intervals, or after every 20 -edits). - -On some 24-bit displays, an X server bug causes WAVE to start with an empty -signal window. Using any of the navigation controls, or resizing the window, -should make the signals visible. On some of these displays, text in the -signal window may be invisible using overlay graphics mode; if this happens, -use the `-S' option. - -A bug in network file handling can sometimes interfere with correct display -of waveforms in the scope window when reading records via HTTP. For now, -the only workarounds are to restart WAVE, or to copy the record to local -disk files (this can be done easily using `xform', `snip', or a web browser). -Check http://www.physionet.org/ for updates to WAVE or to the WFDB library -that may correct this bug. +Summary of changes since version 6.0: + +- Resize signals by selecting them and using -<+> or -<-> +- Change time scale using -<(> and -<)> +- Search for the next valid sample of a specified signal +- XView full-screen pointer grab disabled for compatibility with recent X + servers +- View option to display valid signals only +- More reliable operation on X servers that don't implement backing store +- Updated hardware recommendations +- Ports to Mac OS X and MS-Windows with Cygwin +- Wider range of time scales