![]() |
libRASCH |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
3.5. Access EvaluationsThe example will show how to get the evaluation belonging to a measurement and to get some information about it. We will perform the following steps:
libRASCH supports different "types" of evaluations, these are 'original evaluation', 'default evaluation' and '"old" evaluations. The 'original evaluation' is the evaluation performed with the recording system (e.g. commercial Holter systems). In a measurement there can be only one 'original evaluation', but there can be none. The 'default evaluation' is the evaluation which should be used as default. If a measurement has only a 'original evaluation', than this will also be the 'default evaluation'. Old evaluations are like a history of evaluations. When a new evaluation is added to a measurement, than this will be the new 'default evaluation' and the previous 'default evaluation' will become a 'old evaluation'. This enables the user to go back to a previous evaluation, if the current evalution went wrong. //
#include <stdio.h>
#include <ra.h>
int main(int argc, char *argv[])
{
ra_handle ra;
value_handle vh;
meas_handle meas;
eval_handle eval;
long l, num;
/* initialize libRASCH */
ra = ra_lib_init();
if (ra == NULL)
{
printf("error initializing libRASCH\n");
return -1;
}
/* open measurement */
meas = ra_meas_open(ra, argv[1], 0);
if (meas == NULL)
{
printf("can't open measurement %s\n", argv[1]);
return -1;
}
/* get default evaluation */
eval = ra_eval_get_def(meas); The output of the above example for ECG '100s' is shown here: evaluation original was added at 27.05.2005 09:28:53 using the program handle_eval event-property qrs-pos (qrs-pos) belongs to event-set heartbeat and contains 74 events event-property qrs-class (qrs-class) belongs to event-set heartbeat and contains 74 events event-property qrs-temporal (qrs-temporal) belongs to event-set heartbeat and contains 74 events event-property rri (rri) belongs to event-set heartbeat and contains 74 events event-property rri-class (rri-class) belongs to event-set heartbeat and contains 74 events event-property rri-refvalue (rri-refvalue) belongs to event-set heartbeat and contains 74 events event-property rri-num-refvalue (rri-num-refvalue) belongs to event-set heartbeat and contains 74 events |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||