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

3.3 Annotator Information Structures

The aiarray argument for annopen and wfdbinit is a pointer to an array of objects of type WFDB_Anninfo. Each member of the array contains information provided to annopen and wfdbinit about an annotation file associated with the record:

char *name

the annotator name. The name ‘atr’ is reserved for a reference annotation file supplied by the creator of the database record to document its contents as accurately and thoroughly as possible. You may use other annotator names to identify annotation files that you create; unless there are compelling reasons not to do so, follow the convention that the annotator name is the name of the file’s creator (a program or a person). To avoid confusion, do not use ‘dat’, ‘datan’, ‘dn’, or ‘hea’ (all of which are commonly used as parts of WFDB file names) as annotator names. The special name ‘-’ refers to the standard input or output. Other annotator names may contain upper- or lower-case letters, digits, and underscores. Annotation files are normally created in the current directory and found in any of the directories in the database path (see section The Database Path and Other Environment Variables).

int stat

the file type/access code. Usually, stat is either WFDB_READ or WFDB_WRITE, to specify standard (“WFDB format”) annotation files to be read by getann or to be written by putann. Both MIT DB and AHA DB annotation files can be (and generally are) stored in WFDB format. The symbols WFDB_READ and WFDB_WRITE are defined in ‘<wfdb/wfdb.h>’. An AHA-format annotation file can be read by getann or written by putann if the stat field is set to WFDB_AHA_READ or WFDB_AHA_WRITE before calling annopen or wfdbinit (see section Example 2: An Annotation Translator). Other formats may be supported via a similar mechanism; consult ‘<wfdb/wfdb.h>’ for more information.

The number of WFDB_Anninfo objects in aiarray is given by the nann argument of annopen and wfdbinit. The annotation-reading function, getann, knows the annotators by number only; annopen and wfdbinit assign input annotator numbers beginning with 0 in the order in which they are given in the array of WFDB_Anninfo objects. Output annotator numbers used by putann also start at 0; note that input annotator 0 and output annotator 0 are distinct. Annotator numbers are supplied to getann and putann in their first arguments. See section annopen, for an example of how to set the contents of an array of WFDB_Anninfo objects.


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

PhysioNet (wfdb@physionet.org)