MNE-CPP  beta 0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stcmodel.h
1 #ifndef STCMODEL_H
2 #define STCMODEL_H
3 
4 //*************************************************************************************************************
5 //=============================================================================================================
6 // INCLUDES
7 //=============================================================================================================
8 
9 #include "../disp3D_global.h"
10 
11 #include "stcworker.h"
12 
13 
14 //*************************************************************************************************************
15 //=============================================================================================================
16 // Qt INCLUDES
17 //=============================================================================================================
18 
19 #include <QAbstractTableModel>
20 #include <QThread>
21 
22 
23 //*************************************************************************************************************
24 //=============================================================================================================
25 // Eigen INCLUDES
26 //=============================================================================================================
27 
28 #include <Eigen/Core>
29 
30 
31 //*************************************************************************************************************
32 //=============================================================================================================
33 // FORWARD DECLARATIONS
34 //=============================================================================================================
35 
36 namespace MNELIB
37 {
38  class MNESourceEstimate;
39 }
40 
41 
42 //*************************************************************************************************************
43 //=============================================================================================================
44 // USED NAMESPACES
45 //=============================================================================================================
46 
47 using namespace Eigen;
48 using namespace MNELIB;
49 
50 
51 class DISP3DSHARED_EXPORT StcModel : public QAbstractTableModel
52 {
53  Q_OBJECT
54 public:
55  StcModel(QObject *parent = 0);
56 
57  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const ;
58  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
59  virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
60  virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
61 
62  void addData(const MNESourceEstimate &stc);
63 
64  void setVertices(const VectorXi &vertnos);
65 
66 signals:
67 
68 
69 
70 private:
71  QSharedPointer<QThread> m_pThread;
72  StcWorker::SPtr m_pWorker;
73 
74 
75  bool m_bRTMode;
76 
77 
78  QVector<VectorXd> m_data;
80  VectorXi m_vertices;
81 
82  qint32 m_iDownsampling;
83  qint32 m_iCurrentSample;
85 };
86 
87 Q_DECLARE_METATYPE(Eigen::MatrixXd);
88 
89 #endif // STCMODEL_H
QSharedPointer< StcWorker > SPtr
Definition: stcworker.h:40
Q_DECLARE_METATYPE(Eigen::MatrixXf)
#define DISP3DSHARED_EXPORT
Definition: disp3D_global.h:55