• API Main Page
  • Documentation
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

src/eeg.h

Go to the documentation of this file.
00001 
00002 /* **************************************************************************
00003  *   Copyright (C) 2009 by Matthias Ihrke   *
00004  *   mihrke@uni-goettingen.de   *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  *   This program is distributed in the hope that it will be useful,       *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU General Public License for more details.                          *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this program; if not, write to the                         *
00018  *   Free Software Foundation, Inc.,                                       *
00019  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
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

Generated on Fri Jun 25 2010 14:10:17 for libeegtools by  doxygen 1.7.0