Data Structures | Defines | Functions

src/eeg.h File Reference

STATUS: stable EEG struct handling functions More...

#include "definitions.h"
#include <string.h>
#include <stdlib.h>
#include "chaninfo.h"
#include "array.h"
#include "slist.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EEG
 a complete EEG-data set with meta-inforation. More...
struct  MarkerType
 describe a type of time-marker. More...

Defines

#define EEG_CLONE_ALL   0
 clone everything
#define EEG_CLONE_NOCHANINFO   2<<3
 clone everything except the eeg->chaninfo field
#define EEG_CLONE_NODATA   2<<1
 clone everything except the eeg->data field
#define EEG_CLONE_NOMARKERS   2<<2
 clone everything except the eeg->markers, eeg->nmarkers eeg->marker_labels fields

Functions

void eeg_append_comment (EEG *eeg, const char *comment)
 append text to the comment-field in the EEG-struct.
EEGeeg_clone (const EEG *eeg, int flags)
EEGeeg_extract_channels (EEG *eeg, const int *channels, int nchannels, bool alloc)
EEGeeg_extract_trials (EEG *eeg, const int *trials, int ntrials, bool alloc)
void eeg_free (EEG *eeg)
 free's all memory in EEG-struct. including the data
EEGeeg_init (int nbchan, int ntrials, int nsamples)
 create an empty EEG-data struct.
EEGeeg_init_markers (int nmarkers_per_trial, EEG *eeg)
void eeg_print (FILE *out, const EEG *eeg, int preview)
 Pretty-print an EEG - struct.
char * eeg_sprint (char *out, const EEG *eeg, int preview)
void print_channelinfo (FILE *out, const ChannelInfo *c)

Detailed Description

STATUS: stable EEG struct handling functions

Definition in file eeg.h.


Define Documentation

#define EEG_CLONE_ALL   0

clone everything

Definition at line 86 of file eeg.h.

#define EEG_CLONE_NOCHANINFO   2<<3

clone everything except the eeg->chaninfo field

Definition at line 92 of file eeg.h.

#define EEG_CLONE_NODATA   2<<1

clone everything except the eeg->data field

Definition at line 87 of file eeg.h.

#define EEG_CLONE_NOMARKERS   2<<2

clone everything except the eeg->markers, eeg->nmarkers eeg->marker_labels fields

Definition at line 89 of file eeg.h.


Function Documentation

void eeg_append_comment ( EEG eeg,
const char *  comment 
)

append text to the comment-field in the EEG-struct.

Parameters:
eeg the input struct
comment the text to append

Definition at line 62 of file eeg.c.

EEG* eeg_clone ( const EEG eeg,
int  flags 
)
EEG* eeg_extract_channels ( EEG eeg,
const int *  channels,
int  nchannels,
bool  alloc 
)
EEG* eeg_extract_trials ( EEG eeg,
const int *  trials,
int  ntrials,
bool  alloc 
)
void eeg_free ( EEG eeg  ) 

free's all memory in EEG-struct. including the data

Parameters:
eeg 

Definition at line 43 of file eeg.c.

EEG* eeg_init ( int  nbchan,
int  ntrials,
int  nsamples 
)

create an empty EEG-data struct.

Parameters:
nbchan number of channels
ntrials number of trials (1 for continuous data)
nsamples number of samples for each trial
Returns:
EEG

Definition at line 12 of file eeg.c.

EEG* eeg_init_markers ( int  nmarkers_per_trial,
EEG eeg 
)
void eeg_print ( FILE *  out,
const EEG eeg,
int  preview 
)

Pretty-print an EEG - struct.

Parameters:
out the output stream
eeg the struct
preview number of items to preview in data

Definition at line 77 of file eeg.c.

char* eeg_sprint ( char *  out,
const EEG eeg,
int  preview 
)
void print_channelinfo ( FILE *  out,
const ChannelInfo c 
)

Definition at line 524 of file eeg.c.