MNE-CPP  beta 1.0
inverseview.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef INVERSEVIEW_H
37 #define INVERSEVIEW_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "disp3D_global.h"
45 
46 #include "inverseviewproducer.h"
47 
48 #include <mne/mne_sourcespace.h>
49 #include <fs/surfaceset.h>
50 #include <mne/mne_sourceestimate.h>
51 
52 
53 //*************************************************************************************************************
54 //=============================================================================================================
55 // Qt INCLUDES
56 //=============================================================================================================
57 
58 #include "qglview.h"
59 #include <QGeometryData>
60 #include <QGLColorMaterial>
61 #include <QSharedPointer>
62 #include <QList>
63 #include <QMap>
64 
65 
66 //*************************************************************************************************************
67 //=============================================================================================================
68 // Eigen INCLUDES
69 //=============================================================================================================
70 
71 #include <Eigen/Core>
72 
73 
74 //*************************************************************************************************************
75 //=============================================================================================================
76 // FORWARD DECLARATIONS
77 //=============================================================================================================
78 
79 class QTimer;
80 
81 namespace FSLIB
82 {
83 class Label;
84 }
85 
86 
87 //*************************************************************************************************************
88 //=============================================================================================================
89 // DEFINE NAMESPACE DISP3DLIB
90 //=============================================================================================================
91 
92 namespace DISP3DLIB
93 {
94 
95 //*************************************************************************************************************
96 //=============================================================================================================
97 // USED NAMESPACES
98 //=============================================================================================================
99 
100 using namespace MNELIB;
101 using namespace FSLIB;
102 using namespace Eigen;
103 
104 
105 //*************************************************************************************************************
106 //=============================================================================================================
107 // FORWARD DECLARATIONS
108 //=============================================================================================================
109 
110 
111 //=============================================================================================================
118 class DISP3DSHARED_EXPORT InverseView : public QGLView
119 {
120  Q_OBJECT
121 public:
122  typedef QSharedPointer<InverseView> SPtr;
123  typedef QSharedPointer<const InverseView> ConstSPtr;
125  //=========================================================================================================
138  InverseView(const MNESourceSpace &p_sourceSpace, QList<Label> &p_qListLabels, QList<RowVector4i> &p_qListRGBAs, qint32 p_iFps = 24, bool p_bLoop = true, bool p_bStereo = false, bool p_bSlowMotion = false, QWindow *parent = 0);
139 
140  //=========================================================================================================
144  ~InverseView();
145 
146  //=========================================================================================================
152  void pushSourceEstimate(MNESourceEstimate &p_sourceEstimate);
153 
154 protected:
155  //=========================================================================================================
161  void initializeGL(QGLPainter *painter);
162 
163  //=========================================================================================================
169  void paintGL(QGLPainter *painter);
170 
171  //=========================================================================================================
177  void keyPressEvent(QKeyEvent *e);
178 
179  //=========================================================================================================
185  void mouseMoveEvent(QMouseEvent *e);
186 
187  //=========================================================================================================
193  void mousePressEvent(QMouseEvent *e);
194 
195 private:
196 
197  InverseViewProducer::SPtr m_pInverseViewProducer;
199  //Data Stuff
200  MNESourceSpace m_sourceSpace;
201  QList<Label> m_qListLabels;
202  QList<RowVector4i> m_qListRGBAs;
204  qint32 m_iColorMode;
206  //GL Stuff
207  bool m_bStereo;
208 
209  float m_fOffsetZ;
210  float m_fOffsetZEye;
211  QGLSceneNode *m_pSceneNodeBrain;
212  QGLSceneNode *m_pSceneNode;
214  QGLLightModel *m_pLightModel;
215  QGLLightParameters *m_pLightParametersScene;
217  QGLColorMaterial material;
218 
219 
220  QVector3D m_vecBoundingBoxMin;
221  QVector3D m_vecBoundingBoxMax;
222  QVector3D m_vecBoundingBoxCenter;
224  // QGLCamera *m_pCameraFrontal; /**< frontal camera. */
225 
226  QList< QMap<qint32, qint32> > m_qListMapLabelIdIndex;
227 
228  //=========================================================================================================
234  void updateActivation(QSharedPointer<Eigen::VectorXd> p_pVecActivation);
235 
236  //=========================================================================================================
242 // QGLSceneNode *createScene();
243 
244 };
245 
246 //*************************************************************************************************************
247 //=============================================================================================================
248 // INLINE DEFINITIONS
249 //=============================================================================================================
250 
251 
252 } // NAMESPACE
253 
254 #endif // INVERSEVIEW_H
255 
Source Space descritpion.
InverseViewProducer class declaration.
SurfaceSet class declaration.
disp3D library export/import macros.
3D stereoscopic labels
Definition: inverseview.h:118
QSharedPointer< InverseView > SPtr
Definition: inverseview.h:122
QSharedPointer< InverseViewProducer > SPtr
QSharedPointer< const InverseView > ConstSPtr
Definition: inverseview.h:123
MNESourceEstimate class declaration.
MNESourceSpace class declaration.
#define DISP3DSHARED_EXPORT
Definition: disp3D_global.h:57