WFDB_annopen
Keywords: wfdb_tools

Next: WFDB_isigopen Up: Selecting Database Records Previous: Selecting Database Records Contents

##
WFDB_annopen

Usage: | `WFDB_annopen(RECORD, ANNINFO)` |
Input: | `RECORD`: (string) record name |
| `ANNINFO`: annotator information structure(s) |

This function opens input and output annotation files for a selected record. If RECORD begins with `+', previously opened annotation files are left open, and the record name is taken to be the remainder of RECORD after discarding the `+'. Otherwise, WFDB_annopen closes any previously opened annotation files, and takes all of RECORD as the record name. ANNINFO is a structure array created by WFDB_Anninfo (see section 3.8), with one array element for each annotator to be opened. The caller must fill in the WFDB_Anninfo structure array to specify the names of the annotators, and to indicate which annotators are to be read, and which are to be written. Input and output annotators may be listed in any order in ANNINFO. Annotator numbers (for both input and output annotators) are assigned in the order in which the annotators appear in ANNINFO (the first annotator is number 0). For example, these instructions

        >> a = WFDB_Anninfo(3);
        >> a(1).name = 'a'; a(1).stat = 'WFDB_READ';
        >> a(2).name = 'b'; a(2).stat = 'WFDB_WRITE';
        >> a(3).name = 'c'; a(3).stat = 'WFDB_READ';
        >> WFDB_annopen('100s', a)

attempt to open three annotation files for record `100s'. Annotator `a' becomes input annotator 0, `b' becomes output annotator 0, and `c' becomes input annotator 1. Thus WFDB_getann(1) (see section 3.3) will read all annotations from annotator `c', and WFDB_putann(0, ANN) (see section 3.3) will write an annotation for annotator `b'. Input annotation files will be found if they are located in any of the directories in the WFDB path (see section 3.7). Output annotators are created in the current directory (but note that, under Unix at least, it is possible to specify annotator names such as `/here' or `zzz/there' or even `../somewhere/else')

See also: WFDB_Anninfo (3.8), WFDB_getann (3.3), WFDB_putann (3.3)

Next: WFDB_isigopen Up: Selecting Database Records Previous: Selecting Database Records Contents