[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
int setheader(char *record, WFDB_Siginfo *siarray, unsigned int nsig) |
This function creates or recreates a header file (in the current
directory) for the specified record, based on the contents of the
first nsig members of siarray. The preferred way to create
a header file for a new record is using newheader
, which records
signal checksum and length variables maintained by putvec
. The
intended use of setheader
is for editing header files,
e.g., to change recorded signal gains from a calibration program, or to add
signal descriptions or "info" strings. In the following code fragment, the
header file for record `old' is used to create a header file for
record `new':
... int nsig, status; WFDB_Siginfo *s; nsig = isigopen("old", NULL, 0); s = (WFDB_Siginfo *)malloc(nsig * sizeof(WFDB_Siginfo)); nsig = isigopen("old", s, -nsig); if (nsig > 0) { s[0].gain = 100.0; status = setheader("new", s, (unsigned int)nsig); } ... |
The header file for record `new' will contain the same signal
information as that for record `old', except that the gain
for signal 0 will have been changed as shown. Any "info" strings in
the `hea' file for record `old' must be copied explicitly;
see section getinfo, and see section putinfo.
(This function was first
introduced in WFDB library version 5.0.)