MNE-CPP  beta 1.0
main.cpp
1 //=============================================================================================================
38 //*************************************************************************************************************
39 //=============================================================================================================
40 // INCLUDES
41 //=============================================================================================================
42 
43 #include <iostream>
44 #include <vector>
45 #include <math.h>
46 
47 
48 #include <fiff/fiff.h>
49 #include <mne/mne.h>
50 
51 
52 //*************************************************************************************************************
53 //=============================================================================================================
54 // QT INCLUDES
55 //=============================================================================================================
56 
57 #include <QtCore/QCoreApplication>
58 
59 
60 //*************************************************************************************************************
61 //=============================================================================================================
62 // USED NAMESPACES
63 //=============================================================================================================
64 
65 using namespace FIFFLIB;
66 using namespace MNELIB;
67 
68 
69 //*************************************************************************************************************
70 //=============================================================================================================
71 // MAIN
72 //=============================================================================================================
73 
74 //=============================================================================================================
83 int main(int argc, char *argv[])
84 {
85  QCoreApplication a(argc, argv);
86 
87  //generate FiffEvokedSet
88  QFile t_sampleFile("./MNE-sample-data/MEG/sample/sample_audvis-ave.fif");
89  FiffEvokedSet p_FiffEvokedSet(t_sampleFile);
90 
91  //cancelNoise example
92  qint32 comp_now = p_FiffEvokedSet.info.get_current_comp();
93  qint32 dest_comp = 2;
94 
95  if(comp_now != dest_comp)
96  p_FiffEvokedSet.compensate_to(p_FiffEvokedSet,dest_comp);
97 
98  //example for compensator generation
99  FiffCtfComp comp;
100  if(dest_comp > 0 )
101  {
102  qDebug() << "This part needs to be debugged";
103  p_FiffEvokedSet.info.make_compensator(comp_now,dest_comp,comp); //ToDo: make_compensator needs to be debugged
104  printf("Appropriate forward operator compensator created.\n");
105  }
106  else
107  printf("No forward operator compensator needed.\n");
108 
109  //Do the projection
110  //this was already performed with the FiffEvoked instantiation
111 
112  return a.exec();
113 }
114 
115 //*************************************************************************************************************
116 //=============================================================================================================
117 // STATIC DEFINITIONS
118 //=============================================================================================================
Definition: fiff.h:98
CTF software compensation data.
Definition: fiff_ctf_comp.h:87
evoked data set
FIFF class declaration, which provides static wrapper functions to stay consistent with mne matlab to...