int getann(DB_Annotator an, DB_Annotation *annot)
Return:
This function reads the next annotation from the input annotator
specified by an into the annotation structure
(see section Annotation Structures)
pointed to by annot. The caller must allocate storage for the
annotation structure. Input annotators are numbered 0, 1, 2, etc. This
short program uses getann
to read the contents of the reference
(`atruth') annotation file for record `100s':
#include <ecg/db.h> main() { DB_Anninfo a; DB_Annotation annot; a.name = "atruth"; a.stat = READ; if (annopen("100s", &a, 1) < 0) exit(1); while (getann(0, &annot) == 0) printf("%s %s\n", mstimstr(annot.time), annstr(annot.anntyp); exit(0); }
See section Annotator Information Structures,
for information on the contents of the DB_Anninfo
structure,
and
see section [ms]timstr, and
see section annstr, anndesc, and ecgstr,
for details of the functions used to print portions of the annotations
read by getann
in this example.
Go to the first, previous, next, last section, table of contents.