[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section contains a brief summary of changes to the WFDB library and to this guide since the first printing of the tenth edition of this guide in June, 1999. See ‘NEWS’, in the top-level directory of the WFDB Software Package distribution, for information on any more recent changes that may not be described here.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The WFDB library no longer reports spurious checksum errors when reading EDF files, which don't have checksums.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Internal WFDB library function wfdb_checkname
now allows hyphens
(-
) within record and annotator names.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
WFDB library function strtim
now rounds rather than truncating when
the sampling frequency is not an integer.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
WFDB library function mstimstr
now outputs time to the nearest
millisecond, rather than truncating its calculation to the next lowest number
of milliseconds.
A new WFDB library function, wfdbputprolog
, can write a prolog at the
beginning of a signal file. WFDB applications ignore embedded prologs.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
WFDB library function setwfdb()
now exports the WFDB library
environment variables (WFDB
, WFDBCAL
,
WFDBANNSORT,
and WFDBGVMODE
) on all modern platforms, so
that a process started by a WFDB application inherits the WFDB
environment of its parent. (This is not possible on platforms that do
not provide a working putenv()
function, such as MacOS 9 and
earlier, and 16-bit versions of MS-Windows.) Some previous versions
also included this capability, but the older implementation caused a
memory leak, and it was disabled in version 10.4.6. Thanks to Omar
Abdala and Dan Scott for reporting the problem and help in identifying
its cause.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A new WFDB library function, tnextvec()
, finds the next valid sample
from a chosen signal, occurring at or after a specified time. This
function is particularly useful when reading variable-layout
multi-segment records that may have lengthy gaps in signals of interest.
For portability, the WFDB library has always stored parameters such as
sampling frequency and gain as strings rather than as floating-point
numbers. Although the resultant loss of precision has been almost
always negligible, it has been observable in the specific case of
converting very large time intervals from sample intervals to seconds,
when the sampling frequency in Hz cannot be represented exactly in
binary (e.g., if the sampling frequency is once per minute, or 1/60
Hz). This situation cannot be wholly avoided, but it can be
minimized. Changes in this release, in setheader()
and in functions
that record time units in annotation files, increase the precision
with which non-integer parameters are recorded, so that loss of
precision as a result of converting them to and from strings should
almost never be observable.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The rule for sorting annotations within a file has been changed to allow a much
larger number of simultaneous annotations (i.e., annotations in a given
annotation file with identical time
fields) than was previously
possible. Since version 6.1, the WFDB library sorts simultaneous annotations
according to the value of their chan
fields, allowing for 256
simultaneous annotations at any given time. Beginning in version 10.4.12, the
library sorts simultaneous annotations according to their num
fields,
then sorts those with identical num
fields according to their
chan
fields, allowing up to 65,536 simultaneous annotations at any given
time.
A new WFDB library function, findsig
, returns the signal number of the
input signal matching its string argument, or -1 if no such input signal
exists. If the string argument could be interpreted as an input signal number,
it is taken as such; otherwise, the string argument must be an exact match to a
signal name (desc
field in the siginfo
structure).
Previous versions of WFDB library function setifreq
entered an infinite
loop if invoked (contrary to specifications) before opening an input record.
setifreq
now detects the error, emits an appropriate warning, and
returns.
If a WFDB application that uses WFDB library version 10.4.5 through 10.4.11
attempted to read an annotation file before reading the sampling frequency of
the associated record (for example, by invoking isigopen
or
sampfreq
), the annotation times might all appear to be zero. This may
occur when reading annotations created using WFDB 10.4.5 or later. The times
supplied when creating the file are correctly written but may be incorrectly
read in these cases. This problem was corrected in this release; thanks to
Thomas Heldt for reporting it and providing a reproducible example of it.
(WFDB library version 10.4.11 was identical to version 10.4.10.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
EDF digital maximum and minimum values are now read properly in 64-bit
builds; previous versions had a bug in edfparse
(an internal WFDB
library function defined in ‘lib/signal.c’) that did not appear in
32-bit builds. Thanks to Joe Mietus for reporting the problem.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The WFDB library once again correctly interprets a hyphen (-
)
(used in place of a record name, annotator name, signal file name,
or calibration file name) as a reference to the standard input or
output, for platforms that support POSIX standard I/O (see section Using Standard I/O for Database Files).
This feature was broken in 10.4.5 as a side effect of changes
in wfdb_open
(an internal WFDB library function defined in
‘lib/wfdbio.c’).
(WFDB library version 10.4.8 was identical to version 10.4.7.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Yinqi Zhang reported and contributed a fix for a memory leak in
make_vsd()
(an internal WFDB library function defined in
‘signal.c’).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The WFDB functions setafreq()
and getafreq()
(for
setting and getting the time resolution of newly-created output
annotation files in ticks per second) were new in version 10.4.5, but
were undocumented. They are now described in this Guide, and wrappers
for these functions are now included in ‘fortran/wfdbf.c’.
An important change in the WFDB library: memory allocation errors are
now treated as fatal by default (in previous versions, the functions
that encountered them returned error values that permitted the
application to handle them). These errors occur when there is
insufficient memory available to the WFDB library. To obtain the old
behavior, in which the calling function will continue execution if
possible after a memory allocation error, invoke wfdbmemerr(0)
.
By default, however, such an error will cause the process to
terminate. In either case, the WFDB library emits an appropriate
error message to aid in troubleshooting.
New macros for handling dynamically allocated memory are defined in
‘lib/wfdblib.h’ and used throughout the WFDB library, eliminating most
known memory leaks. Three known leaks remain (in setecgstr()
,
setannstr()
, and setanndesc()
); these are documented and
harmless in current applications. Thanks to Yinqi Zhang for reporting a leak
in copysi()
(an internal WFDB library function defined in
‘signal.c’), which prompted the cleanup.
WFDB functions strecg()
, setecgstr()
, strann()
,
setannstr()
, and setanndesc()
now handle NULL string inputs
properly. (Previous versions passed NULL strings to strcmp()
, with
undesirable results.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Bob Farrell and Tony Ricke chased down and provided fixes for memory leaks in several WFDB library functions, and also provided revisions to permit additional type checking and to avoid type mismatch warnings.
Changes in the build system make it easier to build WFDB using Cygwin gcc (with or without the Cygwin POSIX library).
When creating annotation files, if the input sampling frequency differs
from the frame rate of the input record (either because of using
WFDB_HIGHRES
mode while reading a multifrequency record, or because
of having used setifreq()
to modify the sampling frequency), a comment
is written to the beginning of the annotation file indicating the
resolution of the annotation times in ticks per second (thus allowing
the application to store its annotations with whatever time resolution
is desired). When reading an annotation file, if such a resolution
comment is found, getann adjusts the times of annotations to match the
currently defined sampling frequency. The resolutions are kept
independently for each annotation file, so (for example) bxb
can
compare two annotation files written with different resolutions.
The ability to set the time resolution of annotation files has required
a minor change in the semantics of setifreq()
. It is now necessary
to invoke setifreq()
before creating an annotation file that will
have a resolution matching the (modified) input sampling frequency.
Since setifreq()
must be invoked after opening the input signals,
this implies that wfdbinit()
cannot be used to open both input signals
and output annotation files if setifreq()
is to be used; rather, the
sequence should be isigopen()
, setifreq()
, and finally
annopen()
.
If a string that includes a ‘.’ is supplied to a WFDB library function where a record name is expected, the WFDB library assumes that it is the name of a file located in the WFDB path. If the name ends in ‘.hea’, the file is assumed to be a WFDB-format header file, and its record name is assumed to be the first part of the string, exclusive of the ‘.hea'’.
This version also includes support for reading EDF files natively. If a string supplied as a record name contains a ‘.’ but does not end in ‘.hea’, it is assumed to be the record name of an EDF file of the same name.
(WFDB library versions 10.4.3 and 10.4.4 were identical to version 10.4.2.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Mathias Gruber reported a line in wfdbio.c that used void pointer arithmetic (permitted as an extension by gcc but not allowed by ANSI/ISO C or most other C compilers). This operation has been replaced by ANSI/ISO C-conformant code.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A bug caused incorrect output from WFDB library function strtim() when called with the argument "i", following use of setifreq() to change the effective sampling frequency, resulting in incorrect output from example 10 in the WFDB Programmer's Guide. This has now been corrected.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Version 10.4.0 and later versions of the WFDB library are intended to be compiled using ANSI/ISO C (and C++) compilers only; previous versions also supported the use of traditional (K&R) C compilers. The most obvious change resulting from this decision is in the use of prototypes in function declarations, an innovation of ANSI C that permits better error-checking by compilers. The ANSI/ISO C standard is now more than 15 years old, and it has been over 10 years since a C compiler that does not support function prototypes was used for development of the WFDB library. Code in ‘wfdbio.c’ that provides limited support for compilers that do not provide an ANSI/ISO C library has been retained for now, and ‘wfdb.h’ still includes a set of K&R C function declarations; both of these features are deprecated, however, and may be removed in future versions of the WFDB library. Users who still need to use a K&R C compiler to compile the library itself may find 'unprotoize' (included in the GNU gcc distribution) to be helpful.
The mapping of lowest expressible sample values to WFDB_INVALID_SAMPLE
performed by getframe()
(in ‘lib/signal.c’) did not work properly
for signal formats 80 and 160 (in which samples are recorded as unsigned
integers); this has now been corrected.
The symbol WFDB_GVPAD
is newly defined in ‘<wfdb/wfdb.h>’.
It may be added to WFDB_HIGHRES
or WFDB_LOWRES
and given
as input to setgvmode()
.
The effect of doing so is that missing samples, and samples recognized
as invalid, are replaced by getframe()
, getvec()
, and
sample()
with the most recently read valid values rather than by
the special value WFDB_INVALID_SAMPLE
.
This behavior allows applications such as digital filters to remain
ignorant of missing data without significant performance penalties.
sample()
now checks that its signal number input
is valid, and returns WFDB_INVALID_SAMPLE
if not. In previous
versions, sample
returned a sample from signal 0 if the requested
signal was unavailable.
sample_valid()
now returns -1 in the case of a signal that becomes
unavailable before the end of the record (previous versions returned 1 in this case).
The FIR filter example (see section Example 7: A General-Purpose FIR Filter) now works properly. The previous version always began processing the input at sample 0, regardless of start time specified in its argument list.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This version is the first to support reading variable-layout records (multi-segment records in which the number, arrangement, gains, and baselines of the signals may vary from one segment to the next; see section Multi-Segment Records).
Rounding errors in the WFDB library's mstimstr
function have been
reduced. Previous versions did not always round appropriately when the
sampling frequency was much less than 1 Hz.
The maximum length for a record name (WFDB_MAXRNL
, defined in
‘wfdb.h’) has been increased from 11 to 20.
A new constant, WFDB_INVALID_SAMPLE
, is now defined in ‘wfdb.h’.
It is used to identify padding inserted to fill in for missing data. When
writing in any format that uses fewer than 16 bits per sample, putvec
maps WFDB_INVALID_SAMPLE
to the lowest (most negative) value expressible
in that format; when reading a signal file in such a format, getframe
performs the inverse mapping, so that missing data can be identified regardless
of the data format.
A side effect of this change is that (for example) any samples that had the most negative value (for example, -2048 in a format 212 signal file) are now flagged as invalid. To treat such samples as invalid is reasonable, however, since these occur only when the input level falls below the working range of the analog-to-digital converter.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Benjamin Moody has added an interface between the WFDB library and
libcurl
as an alternative to the existing libwww
interface, and
has updated ‘configure’ and ‘conf/*.def’ to search for and use
libcurl
if it is available. The primary advantages of libcurl
over libwww
are that libcurl
is smaller and faster, it supports
access to password-protected files, and it is actively maintained. Both
libraries are freely available on all popular platforms.
Isaac Henry has updated configure
to support building a native
MS-Windows version of the WFDB library using either Cygwin gcc or MinGW
gcc.
A number of minor changes, mostly involving conditional use of ‘malloc.h’, ‘stdlib.h’, and ‘string.h’, were made to eliminate warnings from gcc 4.x.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Rules for generating the binary tarball for MS-Windows have been fixed so that the Cygwin DLLs are now included with correct permissions.
Installation of shared libraries under GNU/Linux requires an extra step if SELinux is enabled (as under Fedora Core 2 and later); this has been incorporated into ‘conf/linux-slib.def’.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Guido Muesch reported that getspf()
did not always
return correct results if the frame frequency does not have an exact
representation as a double precision floating point number. This problem has
now been corrected.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Using an indirect WFDB path (i.e., setting the WFDB environment variable to a value such as ‘@FILE’, where ‘FILE’ contains the desired path) was broken in WFDB library versions 10.3.9 through 10.3.12; it now works again, thanks to a patch contributed by Fred Geheb.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Okko Willeboordse pointed out an incompatibility between the native
MS-Windows API and the ANSI/ISO C library function mkdir
, which is
used by the WFDB library. This does not present a problem when
compiling the WFDB library using the supported Cygwin/gcc compiler
under MS-Windows, nor does any related problem occur on any other
platform. It should now be a little easier to compile the WFDB library
using unsupported compilers, thanks to a new MKDIR
macro that hides
the incompatibility (see ‘lib/wfdblib.h0’).
Piotr Wlodarek initiated a discussion about memory leaks in the WFDB
library, citing as an example the 'trivial example program in C' from
this Guide, which does not free memory it allocates in isigopen()
when reading the signal specifications. This problem can be avoided by
invoking wfdbquit()
in the example program, just before exiting.
Further discussion of this point has been added to this Guide following
the presentation of the 'trivial example', and in the description of
wfdbquit
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In ‘signal.c’, several bugs have been identified and fixed. Thanks
to Piotr Wlodarek, who found a buffer overrun in isigopen
. Also,
isgsettime
sometimes performed incorrect seeks on multifrequency
records that had been opened in high-resolution mode; this has been
fixed, together with a related bug that caused the value returned by
strtim("e")
to be calculated incorrectly in some such cases.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In version 10.3.9, the functions setannstr
, setanndesc
,
and setecgstr
did not contain necessary checks to avoid invoking
strcmp
with a NULL
argument. These checks have been added in
version 10.3.10. Thanks to Thomas Heldt for reporting this problem.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The WFDB library functions setwfdb
, setannstr
,
setanndesc
, and setecgstr
now copy their input string
arguments, so that it is no longer necessary for WFDB applications to
keep these strings valid. If you have created applications that rely on
being able to modify these strings, it will be necessary to invoke the
corresponding functions again before such changes will take effect
within the WFDB library.
Previous versions of the WFDB library function putinfo
did not
flush their output until either a new header file was created (via
setheader
or newheader
) or the process exited. This has
now been corrected, and putinfo output is now flushed before
putinfo
returns. Thanks to Jonas Carlson for reporting this
problem.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The WFDB library function setbasetime()
now properly
accepts arguments specifying midnight (e.g., ‘0:0:0’), which previous
versions rejected, and the function setheader()
records such times correctly in the ‘.hea’ files it creates.
(WFDB library version 10.3.7 was identical to 10.3.6.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The fix applied in isigclose()
in 10.3.5 was incomplete but is now
(really!) fixed. Applications that use sample()
should call
wfdbquit()
to be certain that sample
's buffer is freed before
exiting.
Some long-standing problems in the code (in ‘lib/wfdbio.c’) that handles http range requests for NETFILES-enabled versions of the library have been partially addressed. The underlying issue is that http servers do not always return the range of bytes requested; when this happens, it is not difficult to determine that there is a problem, but it is tricky to figure out what to do about it. Based on experiments with several different http servers, the strategy for handling such problems within the WFDB NETFILES code has been improved substantially, but there may be further room for improvement.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Fixed a bug in WFDB library function isigclose()
(in
‘lib/signal.c’) that had caused sample()
's buffer to be freed
inappropriately when switching segments in a multi-segment record.
Thanks to Dave Schaffer for the bug report and for a test case that
illustrated the bug.
(WFDB library versions 10.3.3 and 10.3.4 were identical to 10.3.2.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Fixed a WFDB library bug that caused annotation sorting to fail if a new header file had been written. Thanks to Winton Baker for reporting this problem and for providing an example that illustrated the bug.
(WFDB library version 10.3.1 was identical to 10.3.0.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Fixed bugs in ‘lib/signal.c’ that caused improper accounting of signal
group numbers when reading from two or more records at the same time (as in
‘nst’), a bug that caused a segfault in ‘nst’, and a bug that
referenced uninitialized memory in newheader
if nsig
= 0.
The WFDB Software Package has been ported to Mac OS X (Darwin), version 10.2 (the port should also work under 10.1 but this has not been tested and will not be supported).
It is now possible to generate a shared WFDB library (DLL) under MS-Windows using Cygwin/gcc.
Added functions sample
and sample_valid
to the WFDB library
(in ‘lib/signal.c’). sample(s, t)
returns the sample at
time (sample number) t
from signal s
, handling all
necessary buffering internally and allowing the caller to treat the
signal file as a virtual array of randomly accessible samples.
sample_valid
can be invoked to check if the most recent value
returned by sample
was valid (e.g., to see if the end of the
input was reached). For an example of the use of these functions, see
‘app/wqrs.c’.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Fixed a bug in example 9 in this guide (introduced in version 10.2.0).
Updated ‘lib/wfdbdll.def’ and the ‘Makefile.dos’ files in several directories. These have not been tested in recent years and may need further revisions; feedback is welcome.
Corrected persistent problems with generating PDF versions of the manuals for the desired page size, and added hyperlinks to the PDF version of this guide.
(WFDB library version 10.2.8 was identical to 10.2.7.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Added a workaround to wfdb_fclose
(in ‘lib/wfdbio.c’) so that
closing stdin
after using freopen
doesn't trigger a core dump.
If out-of-order annotations were written and automatic annotation sorting was
suppressed, the warning produced by oannclose
(in ‘lib/annot.c’)
once again includes the correct sortann
command needed to put the
annotations into order. (This feature was broken by a previous revision.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The new functions setifreq
and getifreq
allow an
application to choose any convenient sampling frequency for reading
input signals. Samples read from signal files using getvec
are
buffered, resampled, and delivered to the calling application as if the
original signals had been sampled at the desired frequency. Times
expressed in sample intervals passed to or from other WFDB library
functions (getann
, putann
, mstimstr
, timstr
,
and strtim
) are rescaled as needed to match intervals
corresponding to the chosen frequency. Thanks to Pat Hamilton for the
inspiration!
The WFDB library now records the base time with millisecond precision
(previous versions did so with one-second precision), and ‘xform’
provides starting times to the library function setbasetime
with
millisecond precision. Thanks to Allavatam Venugopal for providing
examples that illustrated the need for these features.
Fixed deskewing buffer initialization in getframe
, broken by the
10.2.0 update, which introduced an infinite loop when reading a record
that requires skew correction starting at sample 0. Thanks to Andrew
Walsh for finding an example that triggered this bug.
Fixed rounding errors in adumuv
, muvadu
, and physadu
.
Previous versions rounded negative values toward zero; to obtain consistent
conversions, however, it is necessary to round all values down (e.g., from
-1.5 to -2 rather than up to -1).
Fixed a memory leak in wfdb_fclose
(in ‘lib/wfdbio.h’). Thanks to
Ion Gaztañaga.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Additions and fixes in ‘wfdbf.c’ (the Fortran wrappers for the WFDB library).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Code in ‘wfdbio.c’ that required the use of the string
header
to identify a header file has been revised so that the
standard hea
is now usable for this purpose in all cases.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Portability fixes in ‘wfdblib.h’. (WFDB library version 10.2.2 was identical to 10.2.1.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Most users will no longer need to set the WFDB path explicitly, as a result of several minor changes in the default path and in the installer for the WFDB Software Package.
The environment variable WFDBNOSORT
was replaced by WFDBANNSORT
,
and the environment variable WFDBGVMODE
was introduced
(see section Annotation Order, and see section Multi-Frequency Records, for details).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are no longer any fixed limits on the numbers of signals or annotation
files that can be opened simultaneously, or on the number of samples per signal
per frame. In previous versions of the WFDB library, the symbols
WFDB_MAXSIG
, WFDB_MAXANN
, and WFDB_MAXSPF
(all defined in
‘<wfdb/wfdb.h>’) specified limits on these parameters that could be
modified only by recompiling the WFDB library. These symbols are still defined
for compatibility with older applications that use them (typically to determine
the size of static arrays).
Since version 10.1.1, record names may include path information (see the notes for version 10.1.1 below), but if such names are used to generate names of WFDB output files, the user has been required to ensure that the target directory exists. This requirement is eliminated in version 10.2.0. If an output file is specified to be located in a non-existent directory, the WFDB library will attempt to create the directory (including, if necessary, any non-existent parent directories). This feature simplifies the use of record names that include directory information, as is common when reading data from a CDROM or a web server such as PhysioNet. For example, using the WFDB path (‘. http://www.physionet.org/physiobank/database’), if the current directory, ‘.’, does not contain a subdirectory named ‘mitdb’, the command:
sqrs -r mitdb/100 |
will read its input from http://www.physionet.org/physiobank/database/mitdb/, will create a directory named ‘mitdb’ within the current directory, and will write its output annotation file (‘100.qrs’) into this newly-created directory. If we then use the command:
rdann -r mitdb/100 -a qrs |
the header file is still read from the remote directory, but the annotation file is read from ‘./mitdb’. (The programs ‘sqrs’ and ‘rdann’ are standard applications that use the WFDB library; see the WFDB Applications Guide for details.)
Also new is the WFDB test suite (located in the ‘checkpkg’ directory of the WFDB source tree, at the same level as the ‘lib’ directory containing the WFDB library sources). This set of programs can be used to help verify that a newly-installed version of the WFDB library behaves properly.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The WFDB library requires that the record name specified in the first line of a header file must match the name of the record with which the header file is associated (this is done in order to detect corrupted or erroneously renamed header files). Version 10.1.6 requires that only the final portion of the record name (stripped of any path information) must match.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
More changes in the ‘make’ description files, for Cygwin compatibility.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The symbol WFDB_NETFILES
replaces the old NETFILES
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
More changes in the ‘make’ description files, to support a configuration script.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Changes in the ‘make’ description files.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Record names may contain (absolute or relative) path information as a prefix,
and if (as a result) an input file is found in a location that does not appear
explicitly in the WFDB path, that location is appended to the end of the WFDB
path. For example, if the WFDB path is
‘. http://www.physionet.org/physiobank/database’, and the
record name ‘mitdb/100’ is supplied to wfdbinit
, the WFDB library
will find the header file at
http://www.physionet.org/physiobank/database/mitdb/100.hea,
and will then add http://www.physionet.org/physiobank/database/mitdb/ to
the end of the WFDB path so that the signal file (specified as ‘100.dat’
in the header file) can be found.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Version 10.1.0 supports a new signal file format (311), and contains numerous minor changes in the NETFILES support code introduced in 10.0.1.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Beginning with version 10.0.1, the WFDB library supports reading not only local
files, but also remote files made available by web (HTTP) or FTP servers. To
make use of this feature, link your application with both the WFDB library and
the libwww
library (freely available for all versions of Unix, and for
most recent versions of MS Windows, from http://www.w3.org/Library, or
from http://www.physionet.org/physiotools/libwww/). (In some
cases, notably under GNU/Linux, libwww
is linked together with the
dynamically-loaded version of the WFDB library, so that you do not need to link
libwww
explicitly.) All access to remote files is read-only. If you do
not wish to allow access to remote files, or if libwww
is not available
for your OS, simply do not define the symbol NETFILES when compiling the WFDB
library. For further details, see ‘wfdbio.c’ in the WFDB library sources.
The WFDB environment variable may now contain whitespace (space, tab, or newline characters) as path component separators under any OS. Multiple consecutive whitespace characters are treated as a single path component separator. Use a ‘.’ to specify the current directory as a path component when using whitespace as a path component separator. A semicolon (‘;’) is also acceptable as a path component separator under any OS. A colon (‘:’) is still acceptable as a path component separator under Unix (Linux, etc.), provided only that the colon is not immediately followed by ‘//’.
If the WFDB path includes components of the forms ‘http://somewhere.net/mydata’ or ‘ftp://somewhere.else/yourdata’, the sequence ‘://’ is explicitly recognized as part of a URL prefix (under any OS), and the ‘:’ and ‘/’ characters within the ‘://’ are not interpreted further. Note that the MS-DOS ‘\’ is not acceptable as an alternative to ‘/’ in a URL prefix. To make WFDB paths containing URL prefixes more easily (human) readable, use whitespace for path component separators.
Previous versions of the WFDB library that were compiled for environments other than MS-DOS used file names in the format type.record. This file name format is no longer supported.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Beginning with version 10.0.0, the name of the library is WFDB. All
earlier versions were named DB. All library symbols have been similarly
renamed, with WFDB
and wfdb
replacing DB
and db
everywhere, in names of library functions, constants, type and structure
definitions, library source file names, and names of environment variables
(e.g., the DB environment variable is now the WFDB environment variable).
Version 10.0.0 of the WFDB library is functionally identical with the
final release (version 9.7.4) of the DB library, except for the name
changes. It should be possible to recompile existing applications
written for DB library version 9.x without modification, and to link
them with WFDB library version 10.0.0. This is possible because two
sets of #include
files are provided with the WFDB library. The
first set, accessible via #include <wfdb/...>
, works with
applications written as described in this guide. The alternate set,
accessible via #include <ecg/...>
, is compatible with DB 9.x
applications as described in previous editions of this guide.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
George B. Moody (george@mit.edu)