| 1 |
#ifndef _EEG_h_ |
| 2 |
#define _EEG_h_ |
| 3 |
/* EEG.h |
| 4 |
* |
| 5 |
* Copyright (C) 2011-2012,2014-2018 Paul Boersma |
| 6 |
* |
| 7 |
* This code is free software; you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published by |
| 9 |
* the Free Software Foundation; either version 2 of the License, or (at |
| 10 |
* your option) any later version. |
| 11 |
* |
| 12 |
* This code is distributed in the hope that it will be useful, but |
| 13 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 15 |
* See the GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
*/ |
| 20 |
|
| 21 |
#include "Sound.h" |
| 22 |
#include "TextGrid.h" |
| 23 |
#include "ICA.h" |
| 24 |
|
| 25 |
#include "EEG_def.h" |
| 26 |
|
| 27 |
autoEEG EEG_create (double tmin, double tmax); |
| 28 |
|
| 29 |
autoEEG EEG_readFromBdfFile (MelderFile file); |
| 30 |
|
| 31 |
autoEEG EEGs_concatenate (OrderedOf<structEEG>* me); |
| 32 |
|
| 33 |
void EEG_init (EEG me, double tmin, double tmax); |
| 34 |
integer EEG_getChannelNumber (EEG me, conststring32 channelName); |
| 35 |
void EEG_setChannelName (EEG me, integer channelNumber, conststring32 newName); |
| 36 |
static inline integer EEG_getNumberOfCapElectrodes (EEG me) { |
| 37 |
return (my numberOfChannels - 1) & ~ 15L; // BUG |
| 38 |
} |
| 39 |
static inline integer EEG_getNumberOfExtraSensors (EEG me) { |
| 40 |
return my numberOfChannels == 1 ? 0 : my numberOfChannels & 1 ? 1 : 8; // BUG |
| 41 |
} |
| 42 |
static inline integer EEG_getNumberOfExternalElectrodes (EEG me) { |
| 43 |
return my numberOfChannels - EEG_getNumberOfCapElectrodes (me) - EEG_getNumberOfExtraSensors (me); |
| 44 |
} |
| 45 |
void EEG_setExternalElectrodeNames (EEG me, conststring32 nameExg1, conststring32 nameExg2, conststring32 nameExg3, conststring32 nameExg4, |
| 46 |
conststring32 nameExg5, conststring32 nameExg6, conststring32 nameExg7, conststring32 nameExg8); |
| 47 |
void EEG_detrend (EEG me); |
| 48 |
void EEG_filter (EEG me, double lowFrequency, double lowWidth, double highFrequency, double highWidth, bool doNotch50Hz); |
| 49 |
void EEG_subtractReference (EEG me, conststring32 channelName1, conststring32 channelName2); |
| 50 |
void EEG_subtractMeanChannel (EEG me, integer fromChannel, integer toChannel); |
| 51 |
void EEG_setChannelToZero (EEG me, integer channelNumber); |
| 52 |
void EEG_setChannelToZero (EEG me, conststring32 channelName); |
| 53 |
void EEG_removeTriggers (EEG me, kMelder_string which, conststring32 criterion); |
| 54 |
autoEEG EEG_extractChannel (EEG me, integer channelNumber); |
| 55 |
autoEEG EEG_extractChannel (EEG me, conststring32 channelName); |
| 56 |
autoEEG EEG_extractChannels (EEG me, constINTVECVU const& channelNumbers); |
| 57 |
void EEG_removeChannel (EEG me, integer channelNumber); |
| 58 |
void EEG_removeChannel (EEG me, conststring32 channelName); |
| 59 |
static inline autoSound EEG_extractSound (EEG me) { return Data_copy (my sound.get()); } |
| 60 |
static inline autoTextGrid EEG_extractTextGrid (EEG me) { return Data_copy (my textgrid.get()); } |
| 61 |
autoEEG EEG_extractPart (EEG me, double tmin, double tmax, bool preserveTimes); |
| 62 |
void EEG_replaceTextGrid (EEG me, TextGrid textgrid); |
| 63 |
|
| 64 |
autoMixingMatrix EEG_to_MixingMatrix (EEG me, |
| 65 |
double startTime, double endTime, integer numberOfCrossCorrelations, double lagStep, |
| 66 |
integer maxNumberOfIterations, double tol, int method); |
| 67 |
|
| 68 |
autoEEG EEG_MixingMatrix_to_EEG_unmix (EEG me, MixingMatrix you); |
| 69 |
autoEEG EEG_MixingMatrix_to_EEG_mix (EEG me, MixingMatrix you); |
| 70 |
|
| 71 |
/* End of file EEG.h */ |
| 72 |
#endif |