MNE-CPP  beta 1.0
labelview.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef LABELVIEW_H
37 #define LABELVIEW_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "disp3D_global.h"
45 
46 #include <mne/mne.h>
47 #include <fs/surfaceset.h>
48 #include <mne/mne_sourceestimate.h>
49 
50 
51 //*************************************************************************************************************
52 //=============================================================================================================
53 // QT INCLUDES
54 //=============================================================================================================
55 
56 #include "qglview.h"
57 #include <QGeometryData>
58 #include <QGLColorMaterial>
59 #include <QSharedPointer>
60 #include <QList>
61 
62 
63 //*************************************************************************************************************
64 //=============================================================================================================
65 // FORWARD DECLARATIONS
66 //=============================================================================================================
67 
68 class QTimer;
69 
70 namespace FSLIB
71 {
72 class Label;
73 }
74 
75 
76 //*************************************************************************************************************
77 //=============================================================================================================
78 // DEFINE NAMESPACE FSLIB
79 //=============================================================================================================
80 
81 namespace DISP3DLIB
82 {
83 
84 //*************************************************************************************************************
85 //=============================================================================================================
86 // USED NAMESPACES
87 //=============================================================================================================
88 
89 using namespace MNELIB;
90 using namespace FSLIB;
91 
92 
93 //*************************************************************************************************************
94 //=============================================================================================================
95 // FORWARD DECLARATIONS
96 //=============================================================================================================
97 
98 
99 //=============================================================================================================
105 class DISP3DSHARED_EXPORT LabelView : public QGLView
106 {
107  Q_OBJECT
108 public:
109  typedef QSharedPointer<LabelView> SPtr;
110  typedef QSharedPointer<const LabelView> ConstSPtr;
112  //=========================================================================================================
118  LabelView(SurfaceSet &p_surfSet, QList<Label> &p_qListLabels, QList<RowVector4i> &p_qListRGBAs, QWindow *parent = 0);
119 
120  //=========================================================================================================
124  ~LabelView();
125 
126 
127  void pushSourceEstimate(MNESourceEstimate &p_sourceEstimate);
128 
129 
130 protected:
131  //=========================================================================================================
137  void initializeGL(QGLPainter *painter);
138 
139  //=========================================================================================================
145  void paintGL(QGLPainter *painter);
146 
147 private:
148 
149  //Data Stuff
150  SurfaceSet m_surfSet;
151  QList<Label> m_qListLabels;
152  QList<RowVector4i> m_qListRGBAs;
154  //GL Stuff
155  bool m_bStereo;
156 
157  QGLLightModel *m_pLightModel;
158  QGLLightParameters *m_pLightParametersScene;
160  QGLColorMaterial material;
161 
162  QGLSceneNode *m_pSceneNodeBrain;
163  QGLSceneNode *m_pSceneNode;
165  QGLCamera *m_pCameraFrontal;
170  MNESourceEstimate m_curSourceEstimate;
171  RowVectorXd m_vecFirstLabelSourceEstimate;
172  double m_dMaxSourceEstimate;
173 
174  qint32 simCount;
175  qint32 m_nTSteps;
176  QTimer *m_timer;
177  void updateData();
178 
179 
180 
181 
182 
183  //=========================================================================================================
189 // QGLSceneNode *createScene();
190 
191 };
192 
193 //*************************************************************************************************************
194 //=============================================================================================================
195 // INLINE DEFINITIONS
196 //=============================================================================================================
197 
198 
199 } // NAMESPACE
200 
201 #endif // LABELVIEW_H
202 
3D stereoscopic labels
Definition: labelview.h:105
SurfaceSet class declaration.
disp3D library export/import macros.
QSharedPointer< LabelView > SPtr
Definition: labelview.h:109
MNESourceEstimate class declaration.
QSharedPointer< const LabelView > ConstSPtr
Definition: labelview.h:110
#define DISP3DSHARED_EXPORT
Definition: disp3D_global.h:57
A hemisphere set of surfaces.
Definition: surfaceset.h:83