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

4.1 Macros for Mapping Annotation Codes

Application programs that use the macros described in this section should include the line

 
#include <wfdb/ecgmap.h>

which will make their definitions, and those in ‘<wfdb/ecgcodes.h>’, available.

isann(c)

true (1) if c is a legal annotation code, false (0) otherwise

isqrs(c)

true (1) if c denotes a QRS complex, false (0) otherwise

map1(c)

maps c into one of the set {NOTQRS, NORMAL, PVC, FUSION, LEARN}

map2(c)

maps c into one of the set {NOTQRS, NORMAL, SVPB, PVC, FUSION, LEARN}

annpos(c)

maps c into one of the set {APUNDEF, APSTD, APHIGH, APLOW, APATT, APAHIGH, APALOW} (see ‘<wfdb/ecgmap.h>’ for definitions of these symbols; this macro was first introduced in WFDB library version 6.0)

If you define your own annotation codes, you may wish to modify the tables used by the macros above. The file ‘<wfdb/ecgmap.h>’ also defines setisqrs(c, x), setmap1(c, x), setmap2(c, x), and setannpos(c, x) for this purpose. In each case, x is the value to be returned when the corresponding mapping macro is invoked with an argument of c. (These macros were first introduced in WFDB library version 6.0.)

The macros below convert between AHA and MIT annotation codes; they are also defined in ‘<wfdb/ecgmap.h>’.

ammap(a)

maps a (an AHA annotation code) into an MIT annotation code (one of the set {NORMAL, PVC, FUSION, RONT, VESC, PACE, UNKNOWN, VFON, VFOFF, NOISE, NOTE}), or NOTQRS

mamap(c, s)

maps c (an MIT annotation code) into an AHA annotation code (one of the set {‘N’, ‘V’, ‘F’, ‘R’, ‘E’, ‘P’, ‘Q’, ‘[’, ‘]’, ‘U’, ‘O’}); s is the MIT annotation subtyp (significant only if c is NOISE)


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

PhysioNet (wfdb@physionet.org)