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

WFDB 10.6


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

Changes in version 10.6.2 (8 March 2019)

Changes to the internal functions get_ann_table() and put_ann_table() ensure sensible and consistent behavior if a custom annotation type is defined (using setannstr()) but no description is provided (using setanndesc()). Prior to version 10.6.0, the library would typically set the description to "(null)" in this case, but this was not guaranteed. In version 10.6.0, this behavior was changed in an attempt to fix the undefined behavior, but the result was an annotation file that could not be read correctly. Version 10.6.2 fixes both of these problems; annotation files written by any older version can be read by version 10.6.2, and annotation files written by version 10.6.2 can be read by any older version.

Changes in isgsettime() and isgsetframe() avoid incorrect behavior if the specified time value is large enough to cause integer overflow.


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

Changes in version 10.6.1 (28 November 2018)

The internal function edfparse() will correctly calculate the ADC resolution of EDF signals, and will correctly interpret a negative “number of data records” (meaning that the length of the record was unknown at the time the header was written.)

sample() now returns WFDB_INVALID_SAMPLE if the requested sample is not in the buffer and cannot be read (i.e., isigsettime() fails.) sample_valid() returns 0 in this case. In previous versions of the library, sample() would call exit() in this situation, forcing the program to exit immediately.

In some circumstances, isigopen() will now return -3; unlike a return value of -1 or -2, this indicates that no new signals have been opened and all previously-opened signals have been closed.

The implementation of NETFILES has been optimized in several ways, to avoid making unnecessary HTTP requests, and to avoid unnecessarily disconnecting from and reconnecting to a remote server, especially when opening a remote file for the first time.

The library will now honor HTTP redirections. (Previously, the libwww-based implementation would follow redirections properly, but the libcurl-based implementation would not.) Up to five redirections will be followed for a particular file, and (if range requests are used) the new URL will be cached for up to five minutes.

The internal function readheader() will correctly parse “minimum version” requirements (denoted by #wfdb at the start of a header file.)

The library will cope better with records that are incorrectly formatted or partially unreadable: getskewedframe() will avoid crashing if a signal file ends unexpectedly in a multi-segment record; readheader() will reject segment names beginning with ‘+’; isigopen() will reject records or segments where the total number of samples per frame, or the maximum signal skew, is too large; isgsetframe() and getskewedframe() will treat an unreadable segment as an error.

Several bugs have been fixed in isigopen(). It will now correctly handle the sitation where nsig is zero or negative, the record has multiple segments, and the first segment header cannot be read or contains no signals. It will correctly handle some situations where a record contains three or more signal groups, and not all signals can be opened (for example, when the first signal file contains more than nsig signals, but the second and third signal files together contain nsig or fewer signals.) When multiple records are opened at once (“+ mode”), it will correctly honor the limit provided by the caller, and will not open more than nsig new signals.

The internal function wfdb_fopen() will treat any path containing :// as a possible URL, and will correctly handle non-URL paths that end with : or :/.


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

Changes in version 10.6.0 (26 January 2018)

The new functions getiafreq() and setiafreq() allow the application to change the time scale for input annotations, as setifreq() does for input signals. The new function getiaorigfreq() returns the “native” time resolution of the input file.

New macros, defined in ‘wfdb.h’, can be used to determine the limits of the numeric types used by the WFDB library. For example, WFDB_SAMPLE_MAX is the maximum value of a WFDB_Sample variable.

wfdb.h’ now includes prototypes for the internal functions wfdb_me_fatal() and wfdb_error(), which are used by the MEMERR macro.

Support for using libwww to read remote files has been removed. libwww support was introduced with version 10.0.1 in 2000, and was still supported as an alternative after libcurl support was added in version 10.3.16. However, libwww has not been actively developed for many years; we don’t recommend its use anymore, and removing support is necessary in order to simplify and add new features to WFDB in the future.

The WFDB library now supports reading variable-layout, multi-frequency records, provided that each signal’s sampling frequency is constant across the entire record. Although previous versions of the library were able to read such records in some cases, the behavior of getvec() and isigsettime() was buggy and inconsistent.

When reading a variable-layout multi-segment record, values returned by getvec(), getframe(), or sample() are rounded to the nearest integer. If that value is outside the range of a WFDB_Sample variable, the value WFDB_SAMPLE_MIN or WFDB_SAMPLE_MAX is returned.

When reading a signal from an EDF file in which the minimum representable value is greater than zero (corresponding to a negative baseline), the baseline returned by isigopen() is correctly rounded to the nearest integer. In previous versions, the baseline was off by 1, causing applications to calculate an incorrect physical value.

When reading a signal file in format 311, the file may end with two samples encoded as three bytes (so the total number of samples is 3n+2, and the total number of bytes is 4n+3.) Files created by the WFDB library itself do not use this format (an extra zero sample will be added in this case, for backwards compatibility), but such files may be created by other applications.

isigsettime() works correctly when reading a multi-segment record with multiple signal files per segment.

setifreq() works correctly if there are no input signals open.

tnextvec() returns -1 if it reaches the end of the record without finding a valid sample. Previously, in the case of a fixed-layout record, it would return zero in this case.

getann() correctly handles annotation files with huge time values (where the unscaled value exceeds the range of a WFDB_Time variable.) If the scaled value exceeds that range, it is replaced with WFDB_TIME_MIN or WFDB_TIME_MAX. getann() will also correctly round the time value if it is negative, and will correctly handle non-NOTE annotations at time zero.

If an input annotation file has no explicit time resolution, but the application calls setifreq() before annopen(), the input annotations will be rescaled accordingly. (In previous versions of the library, this would only work for annotation files with an explicit time resolution.)

When writing signals in format 212, 310, or 311, if the total number of samples is not a multiple of 2 or 3, wfdbquit() will correctly write out the remaining samples, adding padding if necessary. wfdbflush() will do likewise, provided that the output is a regular file and there is no mandatory block size.

When writing an annotation file, the time resolution and annotation type definitions will not be written until the first time putann() is called for that annotator. As a result, it is possible to call setafreq(), setannstr(), or setanndesc(), after calling annopen() and before the first putann().

putann() correctly handles consecutive annotations that are more than 2,147,483,647 samples apart.

The Fortran wrapper functions have been updated for compatibility with modern Fortran compilers on 64-bit systems.

Password-protected remote files can now be accessed when WFDB_PAGESIZE is set to zero.


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

PhysioNet (wfdb@physionet.org)