[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

WFDB 10.5


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.23 (13 March 2014)

Changes in ‘configure’, ‘Makefile.tpl’, ‘conf/linux.def’, and ‘conf/linux-slib.def’ simplify installation of shared WFDB libraries and the applications that use them on Linux platforms.

(WFDB library version 10.5.22 was identical to version 10.5.21.)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.21 (18 November 2013)

In previous releases, WFDB library function strtim() did not always handle bracketed string inputs properly. Thanks to Benjamin Moody, who reported the problem and provided a patch to fix it.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.20 (2 September 2013)

Absolute pathnames are not tested in wfdb_open() unless the WFDB path contains an empty component.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.19 (21 July 2013)

This release includes fixes in lib/signal.c for several bugs that sometimes caused findsig(), getvec(), and sample() to return incorrect values when reading variable-layout multi-segment records with missing signals.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.18 (16 February 2013)

Function wfdb_addtopath now works properly if the path contained only one component on entry.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.17 (2 January 2013)

The WFDB library internal function wfdb_addtopath() (in ‘lib/wfdbio.c’) adds the path component of its string argument (i.e., everything except the file name itself) to the WFDB path, inserting it there if it is not already in the path. This function is called by another WFDB library internal function, wfdb_open(), which finds and opens files for all other WFDB library functions that open files; wfdb_open() passes the paths of files it successfully opens to wfdb_addtopath(), permitting other files in the same locations to be found. In previous releases, wfdb_addtopath() appended the new path component to the end of the WFDB path. As originally noted by David Brooks, this is suboptimal since the files comprising a given record are most often kept in the same directory. In this release, the new component is inserted at the head of the path, or as the second path component if "." (the current directory) is the first component, thus improving the likelihood that subsequent files to be opened will be found in the first or second location wfdb_open() checks.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.16 (27 September 2012)

A bug in WFDB library versions 10.5.11 through 10.5.15 resulted in an attempt to close an already-closed header file after invoking putinfo(). Thanks to Benjamin Moody for identifying the bug and contributing code to correct it (in ‘lib/signal.c’ and ‘lib/wfdbinit.c’).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.15 (25 September 2012)

Changes to the internal function readheader() in WFDB library version 10.5.14 made the library unable to open EDF files. This bug has been fixed.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.14 (13 August 2012)

WFDB applications can now read shared and private PhysioNetWorks projects securely, just as they have been able to read PhysioBank data since version 10.0.1 (November 1999). Low-level functions wfdb_open() (in ‘lib/wfdbio.c’) and readheader() (in ‘lib/signal.c’) incorporate changes to implement this new capability, as well as another new feature that allows record names to be specified using absolute pathnames or URLs. As always, a final ‘.hea’ is not considered to be part of a record name, but it may be included or omitted as desired.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.13 (13 May 2012)

Versions of the WFDB library up to 10.5.10 ignored embedded empty lines within the info sections of ‘.hea’ files, but versions 10.5.10 and 10.5.11 treat them as markers of the end of the info section. This version restores the previous treatment of embedded empty lines. Thanks to Justin Leo Cheang Loong for reporting this issue.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.12 (25 April 2012)

When called with a NULL argument, getinfo() sometimes behaves differently in WFDB library version 10.5.11 than it does in previous versions. This release restores the previous behavior. Thanks to Benjamin Moody for reporting this issue.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.11 (6 April 2012)

This release of the WFDB library introduces support for ‘.info’ files. These are files containing info strings in the same format as those that can be stored in ‘.hea’ files. The ‘.info’ file for a record named ‘record’ is named ‘record.info’, and it may be located anywhere in the WFDB path. Function getinfo(), as in previous releases, returns the first info string belonging to the record named as its argument, or the next info string belonging to the previously specified record if its argument is NULL. Beginning with this release, successive calls to getinfo() return the next info string contained in the record’s ‘.info’ file if it exists, and if there are no more in the record’s ‘.hea’ file. Function putinfo() writes an info string to the currently open output ‘.hea’ file, unless function setinfo() (new in this release) has been invoked, in which case the info string is appended to the record’s ‘.info’ file in the current directory. getinfo() reads all of the record’s info strings the first time it is invoked, returning them one at a time; wfdb_freeinfo() frees the memory allocated for getinfo()’s info strings and closes the ‘.info’ file opened by ‘putinfo()’, if any. After invoking wfdb_freeinfo(), a subsequent call to getinfo() reads the info strings again (or those of a different record, if a new record has been opened).

Virginia Faro-Maza identified and corrected a bug in WFDB library function iannsettime(), in file{lib/annot.c, that caused some annotations to be missed when two or more annotation files are open simultaneously.

WFDB library function isigopen(), in ‘lib/signal.c’, was reverted to that of version 10.5.9.

Benjamin Moody contributed patches for ‘app/snip.c’ to ensure that the output will be written using a format that can accommodate the sample range.

The signal calibration file, ‘data/wfdbcal’, has been updated with new definitions.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.10 (15 November 2011)

The WFDB library function isigopen(), in ‘lib/signal.c’, searches each component of the WFDB path for the signal file(s) named in the associated header file, until a match is found. Since signal files are usually located in the same directories as header files, they can be located most quickly by looking first in those directories. Thanks to David Brooks for suggesting this optimization and for a sample implementation.

Attempts to set the default size for HTTP range requests (using the environment variable WFDB_PAGESIZE) were ignored in previous versions of the WFDB library when compiled with libcurl. Thanks again to David for noting this limitation, which has been eliminated in this release by a change in www_init() (in ‘lib/wfdbio.c’).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.9 (10 September 2011)

When an application passes an array containing WFDB_INVALID_SAMPLE values to putvec(), the function translates these into the corresponding invalid-sample sentinel values used by the file format. (This is the inverse of the transformation done by getvec() and getframe(), so the effect is that at the application level, invalid samples are always represented by the value WFDB_INVALID_SAMPLE.)

Previous versions of the library did not perform this transformation correctly for formats 80 and 160 (they used a value of zero rather than -128 or -32768, respectively.) This bug was mainly an issue for programs such as ‘snip’ and ‘xform’ that read and modify existing data files.

Thanks to Benjamin Moody for identifying these problems and providing patches to remedy them.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.8 (12 March 2011)

Previous versions of the WFDB library did not behave properly if setbasetime() was invoked before setsampfreq(). Also, when dealing with time-of-day strings, previous versions of mstimstr() and strtim() round the base time to a number of samples since midnight, and do not work correctly if the number of samples per day is not an integer.

Benjamin Moody contributed patches to ‘lib/signal.c’ that remedy these deficiencies. The patches include three new internal functions (fstrtim(), ftimstr(), and fmstimstr()) which are equivalent to the WFDB library functions strtim(), timstr(), and mstimstr(), but take a second argument specifying the sampling frequency. These internal functions are used by setbasetime() and setheader() to record the base time with millisecond precision, independent of the actual sampling frequency, and independent of the effects of setifreq(), if any. Moreover, mstimstr() returns a string representation of the base time plus the given number of sampling intervals, mstimstr(0) returns the exact base time, and strtim() returns the sample number that is closest to the given time. In addition to being more precise, both functions now work correctly even if the number of samples per day is not an integer. Applications using this version of the WFDB library may call setbasetime() and setsampfreq() in either order.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.7 (16 December 2010)

When opening records with the same name in different directories successively within a single process, the persistence of WFDB path changes made by WFDB library function wfdb_addtopath() interfered with locating the correct files in the second and subsequent records. The solution included addition of a new WFDB library function, resetwfdb(), which restores the WFDB path to the value returned by the first invocation of getwfdb() in the current process (or NULL if getwfdb() has not been invoked); library function wfdbquit() now invokes resetwfdb(). In addition, the safe-string copy macro SSTRCPY (defined in wfdb.h) now properly handles the case of copying null pointers. Thanks to Benjamin Moody for identifying the problem, providing test inputs, and contributions to the solution.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.6 (29 November 2010)

WFDB records with names of the form ‘nnn/nnn’ can now be identified using the short form ‘nnn/’ in applications built using the WFDB library (e.g., rdsamp -r mimicdb/037/ and rdsamp -r mimicdb/037/037 are now equivalent).

In ‘<wfdb.h>’, the maximum lengths of record names, units strings, and signal description (‘.desc’) strings have been increased (to 50, 50, and 100 characters respectively). In ‘lib/wfdbio.c’, the maximum length of a WFDB file name (including path information) has been increased to 1024 characters.

(WFDB library version 10.5.5 was identical to version 10.5.4.)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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().


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.2 (18 April 2010)

When reading annotations of multifrequency records opened in high-resolution mode, a time shift was introduced by getann() in WFDB library versions 10.4.5 to 10.5.1. This problem has been corrected in 10.5.2.

Certain malformed segment .hea files were able to cause null pointer errors in isigopen(). This problem has been corrected. Thanks to Mauro Villarroel for reporting this problem together with a test case.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.1 (19 March 2010)

In version 10.5.0, signals in formats 80 and 160 with amplitudes of 0 were incorrectly treated as invalid by getframe() and getvec(). Thanks to Isaac Henry for reporting this problem, which has been corrected in ‘lib/signal.c’.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Changes in version 10.5.0 (16 March 2010)

The WFDB library now supports signals with 24 and 32 bits of precision, using new formats 24 and 32, as well as BDF and BDF+ files (24-bit EDF and EDF+ variants), so that WFDB applications can now read these formats. Note that these formats, unlike all previously defined formats, require more than 16 bits per sample value. If the WFDB software is compiled on a 16-bit platform (unusual except for embedded processors), the excess high bits of signals in these formats are not read on input, and they are replaced by zeroes on output, unless the WFDB_Sample data type has been redefined as long (in ‘wfdb.h’). This is not done by default since it would increase memory and computational requirements unnecessarily in embedded applications that do not require 24- or 32-bit precision.

Since support for extended precision samples cannot be introduced without this limitation in backward compatibility for 16-bit platforms, the minor version number of the library has been incremented to 5. Most users will not be affected by this change, however, apart from the new functionality it provides.

Memory allocation macros that have been defined previously in ‘wfdblib.h’ have been moved to ‘wfdb.h’ so they are accessible to WFDB applications, including user-written applications. For information about using these macros (MEMERR, SFREE, SUALLOC, SALLOC, SREALLOC, and SSTRCPY), see section memory allocation macros.

A buffer overflow in the WFDB library’s internal function edfparse() (in ‘signal.c’) has been corrected, thanks to a bug report and patch from Joonas Paalasmaa.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

George B. Moody (george@mit.edu)