MNE-CPP  beta 1.0
mne_sourceestimate.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef MNESOURCEESTIMATE_H
37 #define MNESOURCEESTIMATE_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "mne_global.h"
45 
46 
47 //*************************************************************************************************************
48 //=============================================================================================================
49 // Eigen INCLUDES
50 //=============================================================================================================
51 
52 #include <Eigen/Core>
53 
54 
55 //*************************************************************************************************************
56 //=============================================================================================================
57 // Qt INCLUDES
58 //=============================================================================================================
59 
60 #include <QSharedPointer>
61 #include <QList>
62 #include <QIODevice>
63 
64 
65 //*************************************************************************************************************
66 //=============================================================================================================
67 // DEFINE NAMESPACE MNELIB
68 //=============================================================================================================
69 
70 namespace MNELIB
71 {
72 
73 
74 //*************************************************************************************************************
75 //=============================================================================================================
76 // USED NAMESPACES
77 //=============================================================================================================
78 
79 using namespace Eigen;
80 
81 
82 //*************************************************************************************************************
83 //=============================================================================================================
84 // FORWARD DECLARATIONS
85 //=============================================================================================================
86 
87 
88 
89 //=============================================================================================================
95 class MNESHARED_EXPORT MNESourceEstimate
96 {
97 public:
98  typedef QSharedPointer<MNESourceEstimate> SPtr;
99  typedef QSharedPointer<const MNESourceEstimate> ConstSPtr;
101  //=========================================================================================================
106 
107  //=========================================================================================================
116  MNESourceEstimate(const MatrixXd &p_sol, const VectorXi &p_vertices, float p_tmin, float p_tstep);
117 
118  //=========================================================================================================
124  MNESourceEstimate(const MNESourceEstimate& p_SourceEstimate);
125 
126  //=========================================================================================================
133  MNESourceEstimate(QIODevice &p_IODevice);
134 
135  //=========================================================================================================
139  void clear();
140 
141  //=========================================================================================================
148  MNESourceEstimate reduce(qint32 start, qint32 n);
149 
150  //=========================================================================================================
161  static bool read(QIODevice &p_IODevice, MNESourceEstimate& p_stc);
162 
163  //=========================================================================================================
171  bool write(QIODevice &p_IODevice);
172 
173  //=========================================================================================================
179  inline bool isEmpty() const;
180 
181  //=========================================================================================================
189  MNESourceEstimate& operator= (const MNESourceEstimate &rhs);
190 
191 public:
192  MatrixXd data;
193  VectorXi vertices; //ToDo define is_clustered_result; change vertno to ROI idcs
194  RowVectorXf times;
195  float tmin;
196  float tstep;
198 private:
199 
200  //=========================================================================================================
204  void update_times();
205 };
206 
207 
208 //*************************************************************************************************************
209 //=============================================================================================================
210 // INLINE DEFINITIONS
211 //=============================================================================================================
212 
213 inline bool MNESourceEstimate::isEmpty() const
214 {
215  return tstep == -1;
216 }
217 
218 } //NAMESPACE
219 
220 #endif // MNESOURCEESTIMATE_H
QSharedPointer< const MNESourceEstimate > ConstSPtr
QSharedPointer< MNESourceEstimate > SPtr