MNE-CPP  beta 1.0
realtimesourceestimate.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef REALTIMESOURCEESTIMATE_H
37 #define REALTIMESOURCEESTIMATE_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "xmeas_global.h"
46 #include "newmeasurement.h"
47 
48 #include <fs/label.h>
49 #include <fs/surfaceset.h>
50 #include <fs/annotationset.h>
51 #include <fiff/fiff_info.h>
52 #include <mne/mne_sourcespace.h>
53 #include <mne/mne_sourceestimate.h>
54 
55 
56 //*************************************************************************************************************
57 //=============================================================================================================
58 // Qt INCLUDES
59 //=============================================================================================================
60 
61 #include <QSharedPointer>
62 #include <QVector>
63 #include <QList>
64 #include <QMutex>
65 #include <QMutexLocker>
66 
67 
68 //*************************************************************************************************************
69 //=============================================================================================================
70 // DEFINE NAMESPACE XMEASLIB
71 //=============================================================================================================
72 
73 namespace XMEASLIB
74 {
75 
76 
77 //*************************************************************************************************************
78 //=============================================================================================================
79 // USED NAMESPACES
80 //=============================================================================================================
81 
82 using namespace FIFFLIB;
83 using namespace MNELIB;
84 using namespace FSLIB;
85 
86 
87 //=========================================================================================================
94 {
95 public:
96  typedef QSharedPointer<RealTimeSourceEstimate> SPtr;
97  typedef QSharedPointer<const RealTimeSourceEstimate> ConstSPtr;
99  //=========================================================================================================
105  RealTimeSourceEstimate(QObject *parent = 0);
106 
107  //=========================================================================================================
111  virtual ~RealTimeSourceEstimate();
112 
113  //=========================================================================================================
119  inline void setAnnotSet(AnnotationSet::SPtr& annotSet);
120 
121  //=========================================================================================================
127  inline AnnotationSet::SPtr& getAnnotSet();
128 
129  //=========================================================================================================
135  inline void setSurfSet(SurfaceSet::SPtr& surfSet);
136 
137  //=========================================================================================================
143  inline SurfaceSet::SPtr& getSurfSet();
144 
145  //=========================================================================================================
152  virtual void setValue(MNESourceEstimate &v);
153 
154  //=========================================================================================================
161  virtual MNESourceEstimate::SPtr& getValue();
162 
163  //=========================================================================================================
169  inline MNESourceEstimate& getStc();
170 
171  //=========================================================================================================
177  inline bool isInitialized() const;
178 
179  bool m_bStcSend;
181 private:
182  mutable QMutex m_qMutex;
184  AnnotationSet::SPtr m_pAnnotSet;
185  SurfaceSet::SPtr m_pSurfSet;
187  MNESourceEstimate::SPtr m_pMNEStc;
188  bool m_bInitialized;
189 };
190 
191 
192 //*************************************************************************************************************
193 //=============================================================================================================
194 // INLINE DEFINITIONS
195 //=============================================================================================================
196 
198 {
199  QMutexLocker locker(&m_qMutex);
200  m_pAnnotSet = annotSet;
201 }
202 
203 
204 //*************************************************************************************************************
205 
207 {
208  QMutexLocker locker(&m_qMutex);
209  return m_pAnnotSet;
210 }
211 
212 
213 //*************************************************************************************************************
214 
216 {
217  QMutexLocker locker(&m_qMutex);
218  m_pSurfSet = surfSet;
219 }
220 
221 
222 //*************************************************************************************************************
223 
225 {
226  QMutexLocker locker(&m_qMutex);
227  return m_pSurfSet;
228 }
229 
230 
231 //*************************************************************************************************************
232 
234 {
235  QMutexLocker locker(&m_qMutex);
236  return m_bInitialized;
237 }
238 
239 } // NAMESPACE
240 
241 Q_DECLARE_METATYPE(XMEASLIB::RealTimeSourceEstimate::SPtr)
242 
243 #endif // REALTIMESOURCEESTIMATE_H
void setAnnotSet(AnnotationSet::SPtr &annotSet)
Contains the declaration of the NewMeasurement class.
#define XMEASSHARED_EXPORT
Definition: xmeas_global.h:54
SurfaceSet class declaration.
QSharedPointer< MNESourceEstimate > SPtr
void setSurfSet(SurfaceSet::SPtr &surfSet)
FiffInfo class declaration.
QSharedPointer< SurfaceSet > SPtr
Definition: surfaceset.h:86
QSharedPointer< RealTimeSourceEstimate > SPtr
Definition: fiff.h:98
Real-time source estimate measurement.
QSharedPointer< AnnotationSet > SPtr
Definition: annotationset.h:99
MNESourceEstimate class declaration.
MNESourceSpace class declaration.
AnnotationSet class declaration.
Label class declaration.
QSharedPointer< const RealTimeSourceEstimate > ConstSPtr
Contains the xMeas library export/import macros.