Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00025 #ifndef EEG_H
00026 # define EEG_H
00027
00028 #include "definitions.h"
00029 #include <string.h>
00030 #include <stdlib.h>
00031 #include "chaninfo.h"
00032 #include "array.h"
00033 #include "slist.h"
00034
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038
00041 typedef struct{
00042 uint class;
00043 char label[MAX_LABEL_LENGTH];
00044 } MarkerType;
00045
00048 typedef struct{
00049 char *filename;
00050 char *comment;
00051 uint nbchan;
00052 uint ntrials;
00053 uint n;
00054 double sampling_rate;
00056 Array *times;
00057 ChannelInfo *chaninfo;
00060 Array *data;
00062 Array *markers;
00066 Array *marker_type;
00072 SingleList *marker_types;
00075 void *additional;
00082 ulong nbytes_additional;
00083 } EEG;
00084
00085
00086 #define EEG_CLONE_ALL 0
00087 #define EEG_CLONE_NODATA 2<<1
00089 #define EEG_CLONE_NOMARKERS 2<<2
00092 #define EEG_CLONE_NOCHANINFO 2<<3
00096 EEG* eeg_init ( int nbchan, int ntrials, int nsamples );
00097 EEG* eeg_init_markers ( int nmarkers_per_trial, EEG *eeg );
00098 EEG* eeg_extract_channels( EEG* eeg, const int *channels, int nchannels, bool alloc );
00099 EEG* eeg_extract_trials ( EEG* eeg, const int *trials, int ntrials, bool alloc );
00100
00101 void eeg_append_comment( EEG *eeg, const char *comment );
00102 char* eeg_sprint( char *out, const EEG *eeg, int preview );
00103 void eeg_print( FILE *out, const EEG *eeg, int preview );
00104 EEG* eeg_clone( const EEG *eeg, int flags );
00105 void eeg_free ( EEG *eeg );
00106
00107 void print_channelinfo( FILE* out, const ChannelInfo *c );
00108
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112
00113 #endif