| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This program translates the `atr' annotations for the record named in its argument into an AHA-format annotation file with the annotator name `aha'.
1 #include <stdio.h>
2 #include <wfdb/wfdb.h>
3
4 main(argc, argv)
5 int argc;
6 char *argv[];
7 {
8 WFDB_Anninfo an[2];
9 WFDB_Annotation annot;
10
11 if (argc < 2) {
12 fprintf(stderr, "usage: %s record\n", argv[0]);
13 exit(1);
14 }
15 an[0].name = "atr"; an[0].stat = WFDB_READ;
16 an[1].name = "aha"; an[1].stat = WFDB_AHA_WRITE;
17 if (annopen(argv[1], an, 2) < 0) exit(2);
18 while (getann(0, &annot) == 0 && putann(0, &annot) == 0)
19 ;
20 wfdbquit();
21 exit(0);
22 }
|
(See http://www.physionet.org/physiotools/wfdb/examples/example2.c for a copy of this program.)
Notes:
argv[0] is the name by
which the program was invoked.
annopen.
getann and putann. The loop ends normally
when getann reaches the end of the input file, or prematurely if
there is a read or write error.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |