TUM-Logo

libRASCH

 

Home
 

General

About libRASCH/News
Design
Screen shots
Sample programs (with source code)
License
 

Download

libRASCH
Tools
 

Documentation

User
Developer
 

Resources

Mailing list
Supported Formats
Plugins
Status
Links
 
Contact
About this site
 
Last updated
Tue Mar 27 23:03:52 2007
libRASCH: ra_eval.h File Reference

ra_eval.h File Reference

Include dependency graph for ra_eval.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EVAL_MAX_TS   21
#define EVAL_MAX_USER   50
#define EVAL_MAX_HOST   50
#define EVAL_MAX_PRG   50
#define EVENT_MEM_ADD   0.1
#define MAX_ID_LEN   100
#define MAX_ATTRIB_LEN   100

Functions

eval_attributefind_attribute (struct eval_head *h, const char *id)
int delete_attributes (struct eval_head *h)
long get_event_idx (struct eval_class *c, long event_id)
int del_prop_values (struct eval_class *c, long idx)
int get_sum_data_idx (sum_handle sh, long channel, long dim)
int add_prop_mem (struct eval_class *c)
int alloc_prop_mem (struct eval_property *p)
int read_evaluation (meas_handle mh)
 get the original evaluation from a measurement
eval_handle add_eval_orig (meas_handle mh, struct plugin_struct *pl)
 create original evaluation in a measurement
int add_class_orig (meas_handle mh, eval_handle eh, struct plugin_struct *pl)
 add original event-classes
int add_events_orig (class_handle clh, struct plugin_struct *pl, long **ev_ids, long *num_ev)
 add original events
int add_prop_orig (class_handle clh, struct plugin_struct *pl, long *ev_ids, long num_ev)
 add original event properties
int add_values_orig (prop_handle ph, struct plugin_struct *pl, long *ev_ids, long num_ev)
 add original event values
int add_summaries_orig (class_handle clh, struct plugin_struct *pl)
 add event-summaries from a measurement
int add_sum_ch (class_handle clh, sum_handle sh, long sum_num, long num_ch, const long *ch, struct plugin_struct *pl)
int add_sum_part_orig (sum_handle sh, long n_ch, long n_dim, struct plugin_struct *pl)
int do_post_processing (meas_handle mh, eval_handle eh)
 process original evaluation after getting the data
void post_process_ecg (meas_handle mh, eval_handle eh, class_handle clh)
 post-process ecg data
int load_eval (meas_handle mh, const char *eval_file)
int get_eval_file (meas_handle mh, char *f)
 returns evaluation filename
int eval_get_info (any_handle h, int info_id, value_handle vh)
int free_eval_infos (struct eval_info *ei)


Detailed Description

The header file contains all definitions for an evaluation.

Author:
Raphael Schneider (rasch@med1.med.tum.de)

Definition in file ra_eval.h.


Define Documentation

#define EVAL_MAX_HOST   50
 

Definition at line 35 of file ra_eval.h.

Referenced by read_evals_xml().

#define EVAL_MAX_PRG   50
 

Definition at line 36 of file ra_eval.h.

Referenced by read_evals_xml().

#define EVAL_MAX_TS   21
 

Definition at line 33 of file ra_eval.h.

Referenced by read_evals_xml().

#define EVAL_MAX_USER   50
 

Definition at line 34 of file ra_eval.h.

Referenced by read_evals_xml().

#define EVENT_MEM_ADD   0.1
 

Definition at line 38 of file ra_eval.h.

Referenced by add_prop_mem().

#define MAX_ATTRIB_LEN   100
 

Definition at line 41 of file ra_eval.h.

Referenced by eval_get_info(), find_attribute(), ra_eval_attribute_list(), and ra_eval_attribute_set().

#define MAX_ID_LEN   100
 

Definition at line 40 of file ra_eval.h.

Referenced by ra_class_add(), ra_prop_add(), ra_sum_add(), and read_sets_xml().


Function Documentation

int add_class_orig meas_handle  mh,
eval_handle  eh,
struct plugin_struct pl
 

Parameters:
<mh> measurement handle
<pl> pointer to a plugin structure
The function adds all event-classes from a measurement to the original evaluation.

Definition at line 117 of file read_evaluation.c.

References plugin_struct::access, add_events_orig(), add_prop_orig(), add_summaries_orig(), plugin_access_func::get_class_info, plugin_access_func::get_class_num, ra_class_add(), ra_value_free(), ra_value_get_string(), ra_value_is_ok(), and ra_value_malloc().

Referenced by read_evaluation().

eval_handle add_eval_orig meas_handle  mh,
struct plugin_struct pl
 

Parameters:
<mh> measurement handle
<pl> pointer to a plugin structure
The function creates in a measurement the original evaluation.

Definition at line 80 of file read_evaluation.c.

References plugin_struct::access, plugin_access_func::get_eval_info, ra_eval_add(), ra_value_free(), ra_value_get_string(), and ra_value_malloc().

Referenced by read_evaluation().

int add_events_orig class_handle  clh,
struct plugin_struct pl,
long **  ev_ids,
long *  num
 

Parameters:
<clh> event-class handle
<pl> pointer to a plugin structure
The function adds all events from a measurement to the original evaluation.

Definition at line 178 of file read_evaluation.c.

References plugin_struct::access, plugin_access_func::get_ev_info, ra_class_add_event(), ra_value_free(), ra_value_get_long_array(), ra_value_get_num_elem(), ra_value_is_ok(), and ra_value_malloc().

Referenced by add_class_orig().

int add_prop_mem struct eval_class c  ) 
 

Definition at line 911 of file eval.c.

References eval_property::allocated_events, eval_property::ch_map, EVENT_MEM_ADD, eval_property::next, eval_property::num_elements, eval_property::num_entries, eval_class::num_event, eval_class::prop, RA_VALUE_TYPE_CHAR, RA_VALUE_TYPE_CHAR_ARRAY, RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_DOUBLE_ARRAY, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_LONG_ARRAY, RA_VALUE_TYPE_SHORT, RA_VALUE_TYPE_SHORT_ARRAY, eval_property::value, and eval_property::value_type.

Referenced by ra_class_add_event().

int add_prop_orig class_handle  clh,
struct plugin_struct pl,
long *  ev_ids,
long  num_ev
 

Parameters:
<clh> event-class handle
<pl> pointer to a plugin structure
The function adds all event-properties from a measurement to the original evaluation.

Definition at line 240 of file read_evaluation.c.

References plugin_struct::access, add_values_orig(), plugin_access_func::get_prop_info, plugin_access_func::get_prop_num, ra_prop_add(), ra_value_free(), ra_value_get_double(), ra_value_get_long(), ra_value_get_string(), ra_value_is_ok(), and ra_value_malloc().

Referenced by add_class_orig().

int add_sum_ch class_handle  clh,
sum_handle  sh,
long  sum_num,
long  num_ch,
const long *  ch,
struct plugin_struct pl
 

Definition at line 414 of file read_evaluation.c.

References plugin_struct::access, add_sum_part_orig(), plugin_access_func::get_sum_ch_info, ra_sum_add_ch(), ra_value_free(), ra_value_get_long(), ra_value_get_num_elem(), ra_value_get_string_array(), and ra_value_malloc().

Referenced by add_summaries_orig().

int add_sum_part_orig sum_handle  sh,
long  n_ch,
long  n_dim,
struct plugin_struct pl
 

Definition at line 454 of file read_evaluation.c.

References plugin_struct::access, plugin_access_func::get_sum_events, plugin_access_func::get_sum_part_data, ra_sum_add_part(), ra_sum_set_part_data(), ra_value_free(), ra_value_get_long_array(), ra_value_get_num_elem(), and ra_value_malloc().

Referenced by add_sum_ch().

int add_summaries_orig class_handle  clh,
struct plugin_struct pl
 

Parameters:
<mh> measurement handle
<pl> pointer to a plugin structure
The function adds the original templates (stored in a measurement) in the evaluation 'e'.

Definition at line 362 of file read_evaluation.c.

References plugin_struct::access, add_sum_ch(), plugin_access_func::get_sum_ch_info, plugin_access_func::get_sum_info, plugin_access_func::get_sum_num, ra_sum_add(), ra_value_free(), ra_value_get_long_array(), ra_value_get_num_elem(), ra_value_get_string(), ra_value_is_ok(), and ra_value_malloc().

Referenced by add_class_orig().

int add_values_orig prop_handle  ph,
struct plugin_struct pl,
long *  ev_ids,
long  num_ev
 

Parameters:
<ph> event-property handle
<pl> pointer to a plugin structure
The function sets the original event values (stored in a measurement) in the evaluation 'e' for the given event properties 'proph'.

Definition at line 311 of file read_evaluation.c.

References plugin_struct::access, plugin_access_func::get_ev_value, ra_prop_set_value(), ra_value_free(), ra_value_get_long_array(), ra_value_get_num_elem(), ra_value_get_single_elem(), and ra_value_malloc().

Referenced by add_prop_orig().

int alloc_prop_mem struct eval_property p  ) 
 

Definition at line 1452 of file eval.c.

References eval_property::allocated_events, eval_property::ch_map, eval_property::evclass, eval_property::num_elements, eval_property::num_entries, eval_class::num_event, RA_VALUE_TYPE_CHAR, RA_VALUE_TYPE_CHAR_ARRAY, RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_DOUBLE_ARRAY, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_LONG_ARRAY, RA_VALUE_TYPE_SHORT, RA_VALUE_TYPE_SHORT_ARRAY, eval_property::value, and eval_property::value_type.

Referenced by ra_prop_add().

int del_prop_values struct eval_class c,
long  idx
 

Definition at line 1058 of file eval.c.

References eval_property::ch_map, eval_property::next, eval_property::num_elements, eval_property::num_entries, RA_VALUE_TYPE_CHAR, RA_VALUE_TYPE_CHAR_ARRAY, RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_DOUBLE_ARRAY, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_LONG_ARRAY, RA_VALUE_TYPE_SHORT, RA_VALUE_TYPE_SHORT_ARRAY, eval_property::value, and eval_property::value_type.

Referenced by ra_class_del_event().

int delete_attributes struct eval_head h  ) 
 

Definition at line 211 of file eval.c.

References eval_attribute::next, ra_list_del(), ra_value_free(), eval_attribute::src_handle, and eval_attribute::value.

Referenced by ra_class_delete(), ra_eval_delete(), and ra_prop_delete().

int do_post_processing meas_handle  mh,
eval_handle  eh
 

Parameters:
<mh> measurement handle
<e> pointer to an evaluation structure
The function performs a post-processing on the original evaluation after the values are got from the measurement. TODO: Think about how all this post-processing stuff can be implemented in a more general way.

Definition at line 511 of file read_evaluation.c.

References post_process_ecg(), ra_class_get(), ra_prop_get(), ra_value_free(), ra_value_get_num_elem(), ra_value_get_voidp_array(), and ra_value_malloc().

Referenced by read_evaluation().

int eval_get_info any_handle  h,
int  info_id,
value_handle  vh
 

Definition at line 78 of file eval_internal.c.

References _ra_set_error, eval_summary::ascii_id, eval_property::ascii_id, eval_class::ascii_id, eval_sum_ch_desc::ch, eval_summary::ch_desc, eval::def, eval_sum_ch_desc::fiducial_offset, MAX_ATTRIB_LEN, eval_sum_ch_desc::name, eval_summary::num_ch, eval_sum_ch_desc::num_dim, eval_class::num_event, eval::original, RA_ERR_UNKNOWN_INFO, ra_eval_attribute_get(), RA_INFO_CLASS_ASCII_ID_C, RA_INFO_CLASS_DESC_C, RA_INFO_CLASS_EV_NUM_L, RA_INFO_CLASS_NAME_C, RA_INFO_EVAL_ADD_TS_C, RA_INFO_EVAL_DEFAULT_L, RA_INFO_EVAL_DESC_C, RA_INFO_EVAL_HOST_C, RA_INFO_EVAL_MODIFY_TS_C, RA_INFO_EVAL_NAME_C, RA_INFO_EVAL_ORIGINAL_L, RA_INFO_EVAL_PROG_C, RA_INFO_EVAL_USER_C, RA_INFO_PROP_ASCII_ID_C, RA_INFO_PROP_DESC_C, RA_INFO_PROP_HAS_MINMAX_L, RA_INFO_PROP_MAX_D, RA_INFO_PROP_MIN_D, RA_INFO_PROP_NAME_C, RA_INFO_PROP_UNIT_C, RA_INFO_PROP_VALTYPE_L, RA_INFO_SUM_ASCII_ID_C, RA_INFO_SUM_CH_DIM_NAME_CA, RA_INFO_SUM_CH_DIM_UNIT_CA, RA_INFO_SUM_CH_FIDUCIAL_L, RA_INFO_SUM_CH_NUM_DIM_L, RA_INFO_SUM_CH_NUM_L, RA_INFO_SUM_DESC_C, RA_INFO_SUM_NAME_C, RA_INFO_SUM_NUM_CH_L, ra_value_get_number(), ra_value_set_long(), ra_value_set_string(), ra_value_set_string_array(), eval_sum_ch_desc::unit, and eval_property::value_type.

Referenced by ra_info_get().

struct eval_attribute* find_attribute struct eval_head h,
const char *  id
 

Definition at line 193 of file eval.c.

References eval_info::attribute, ra_meas::eval, MAX_ATTRIB_LEN, eval_head::meas, eval_attribute::name, eval_attribute::next, and eval_attribute::src_handle.

Referenced by ra_eval_attribute_get(), ra_eval_attribute_set(), and ra_eval_attribute_unset().

int free_eval_infos struct eval_info ei  ) 
 

Definition at line 204 of file eval_internal.c.

References eval_info::attribute, eval_info::evaluations, ra_eval_delete(), ra_list_del(), ra_value_free(), and eval_attribute::value.

Referenced by ra_meas_close().

int get_eval_file meas_handle  mh,
char *  f
 

Parameters:
<mh> measurement handle
<f> will receive the filename of the evaluation
If no evaluation file was given, this function returns the default filename used for evaluations (based on the measurement name).

Definition at line 45 of file eval_internal.c.

References ra_info_get(), RA_INFO_REC_GEN_DIR_L, RA_INFO_REC_GEN_PATH_C, ra_rec_get_first(), ra_value_free(), ra_value_get_long(), ra_value_get_string(), and ra_value_malloc().

long get_event_idx struct eval_class c,
long  event_id
 

Definition at line 1039 of file eval.c.

References eval_class::ev, and eval_event::id.

Referenced by ra_class_del_event(), ra_class_get_event_pos(), ra_class_set_event_pos(), ra_prop_get_ch(), ra_prop_get_value(), and ra_prop_set_value().

int get_sum_data_idx sum_handle  sh,
long  channel,
long  dim
 

Definition at line 2447 of file eval.c.

References eval_sum_ch_desc::ch, eval_summary::ch_desc, eval_sum_ch_desc::data_idx, eval_summary::num_ch, and eval_sum_ch_desc::num_dim.

Referenced by ra_sum_get_part_data(), and ra_sum_set_part_data().

int load_eval meas_handle  mh,
const char *  eval_file
 

Definition at line 30 of file eval_internal.c.

Referenced by ra_meas_open().

void post_process_ecg meas_handle  mh,
eval_handle  eh,
class_handle  clh
 

Parameters:
<mh> measurement handle
<e> pointer to an evaluation structure
The function performs a post-processing for ecg values.

Definition at line 564 of file read_evaluation.c.

References plugin_struct::ra, ra_lib_handle_from_any_handle(), ra_lib_set_option(), ra_plugin_get_by_name(), ra_proc_do(), ra_proc_free(), ra_proc_get(), ra_value_free(), ra_value_malloc(), and ra_value_set_voidp().

Referenced by do_post_processing().

int read_evaluation meas_handle  mh  ) 
 

Parameters:
<mh> measurement handle
The function gets the original evaluation from a measurement.

Definition at line 34 of file read_evaluation.c.

References _ra_set_error, add_class_orig(), add_eval_orig(), do_post_processing(), ra_meas::p, RA_ERR_READ_EVAL, ra_eval_edit_cancel(), ra_eval_edit_complete(), ra_eval_edit_start(), and ra_eval_get_original().

Referenced by ra_meas_open().


Generated on Fri May 27 11:33:26 2005 for libRASCH by  doxygen 1.4.2