[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If the symbol WFDB_NETFILES
is defined at the time the WFDB library is
compiled, then input files located on remote web (HTTP) and FTP servers can be
read directly. This capability is implemented using the World Wide Web
Consortium's libwww
library (which is available on many of the platforms
supported by the WFDB library). NETFILES support, if available, is transparent
to WFDB applications. To make use of this feature, simply link to the
NETFILES-enabled WFDB library (the necessary libwww
functions will be
loaded automatically), and incorporate one or more URL prefixes in the WFDB
path.
In current versions of the WFDB library, the default WFDB path (defined in the
WFDB library source file wfdblib.h
, and used as the WFDB path if the
WFDB environment variable is undefined) is `. /usr/database
http://www.physionet.org/physiobank/database'. (The second component,
after the `.' that specifies the current directory, may vary, depending on
your platform and the choices made during installation.) The third component
is a URL prefix pointing to PhysioBank, an on-line archive for a wide variety
of standard databases of physiologic signals.
For example, the MIT-BIH Polysomnographic Database is kept in
http://www.physionet.org/physiobank/database/slpdb, so it is
possible to read record slp37
of that database directly from PhysioBank
by passing slpdb/slp37
as the record argument to wfdbinit
(or isigopen
, annopen
, etc.).
Current implementations of libwww
permit input from http:// URLs
in much the same way that local files are read, provided that the remote web
server supports HTTP 1.1 range requests (most, including PhysioNet's, do).
This means that it is not necessary to download an entire file in order to
examine part of it, and you may notice little or no speed difference between
local file and network file input for many applications. If the remote server
does not support range requests, however, or if input is from an ftp://
URL, the current implementation downloads the entire file to memory, so you may
notice a significant startup delay if the file is long and your network
connection is slow, or if the file does not fit into physical memory.
Currently, NETFILES support is limited to input files; as always, any output files created by the WFDB library are written into the current directory, unless the record name contains local path information.
NETFILES support was introduced in WFDB library version 10.0.1.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |