MNE-CPP  beta 1.0
main.cpp
1 //=============================================================================================================
36 //*************************************************************************************************************
37 //=============================================================================================================
38 // INCLUDES
39 //=============================================================================================================
40 
41 #include <disp3D/geometryview.h>
42 
44 
45 
46 //*************************************************************************************************************
47 //=============================================================================================================
48 // QT INCLUDES
49 //=============================================================================================================
50 
51 #include <QGuiApplication>
52 
53 
54 //*************************************************************************************************************
55 //=============================================================================================================
56 // USED NAMESPACES
57 //=============================================================================================================
58 
59 using namespace DISP3DLIB;
60 
61 
62 //*************************************************************************************************************
63 //=============================================================================================================
64 // MAIN
65 //=============================================================================================================
66 
67 //=============================================================================================================
76 int main(int argc, char *argv[])
77 {
78  QGuiApplication app(argc, argv);
79 
80  QFile t_File("./MNE-sample-data/MEG/sample/sample_audvis-meg-eeg-oct-6-fwd.fif");
81  MNEForwardSolution t_forwardSolution(t_File);
82 
83  GeometryView view(t_forwardSolution.src);
84 
85  if (view.stereoType() != QGLView::RedCyanAnaglyph)
86  view.camera()->setEyeSeparation(0.3f);
87  QStringList args = QCoreApplication::arguments();
88  int w_pos = args.indexOf("-width");
89  int h_pos = args.indexOf("-height");
90  if (w_pos >= 0 && h_pos >= 0)
91  {
92  bool ok = true;
93  int w = args.at(w_pos + 1).toInt(&ok);
94  if (!ok)
95  {
96  qWarning() << "Could not parse width argument:" << args;
97  return 1;
98  }
99  int h = args.at(h_pos + 1).toInt(&ok);
100  if (!ok)
101  {
102  qWarning() << "Could not parse height argument:" << args;
103  return 1;
104  }
105  view.resize(w, h);
106  }
107  else
108  {
109  view.resize(800, 600);
110  }
111  view.show();
112 
113  return app.exec();
114 }
MNEForwardSolution class declaration, which provides the forward solution including the source space ...
Geometry View.
Definition: geometryview.h:93
Declaration of the GeometryView Class.