MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
rtsourcedatacontroller.h
Go to the documentation of this file.
1//=============================================================================================================
35#ifndef DISP3DLIB_RTSOURCEDATACONTROLLER_H
36#define DISP3DLIB_RTSOURCEDATACONTROLLER_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
42#include "../../../../disp3D_global.h"
43#include <fs/label.h>
44
45//=============================================================================================================
46// QT INCLUDES
47//=============================================================================================================
48
49#include <QTimer>
50#include <QPointer>
51#include <QThread>
52
53//=============================================================================================================
54// EIGEN INCLUDES
55//=============================================================================================================
56
57#include <Eigen/SparseCore>
58
59//=============================================================================================================
60// FORWARD DECLARATIONS
61//=============================================================================================================
62
63//=============================================================================================================
64// DEFINE NAMESPACE DISP3DLIB
65//=============================================================================================================
66
67namespace DISP3DLIB
68{
69
70//=============================================================================================================
71// DISP3DLIB FORWARD DECLARATIONS
72//=============================================================================================================
73
74class RtSourceDataWorker;
75class RtSourceInterpolationMatWorker;
76
77//=============================================================================================================
84{
85 Q_OBJECT
86
87public:
88 typedef QSharedPointer<RtSourceDataController> SPtr;
89 typedef QSharedPointer<const RtSourceDataController> ConstSPtr;
91 //=========================================================================================================
96
97 //=========================================================================================================
102
103 //=========================================================================================================
109 void setStreamingState(bool bStreamingState);
110
111 //=========================================================================================================
118 void setInterpolationFunction(const QString &sInterpolationFunction);
119
120 //=========================================================================================================
126 void setLoopState(bool bLoopState);
127
128 //=========================================================================================================
136 void setCancelDistance(double dCancelDist);
137
138 //=========================================================================================================
144 void setTimeInterval(int iMSec);
145
146 //=========================================================================================================
158 void setInterpolationInfo(const Eigen::MatrixX3f &matVerticesLeft,
159 const Eigen::MatrixX3f &matVerticesRight,
160 const QVector<QVector<int> > &vecNeighborVerticesLeft,
161 const QVector<QVector<int> > &vecNeighborVerticesRight,
162 const Eigen::VectorXi& vecVertNoLeftHemi,
163 const Eigen::VectorXi& vecVertNoRightHemi);
164
165 //=========================================================================================================
172 void setSurfaceColor(const Eigen::MatrixX4f &matColorLeft,
173 const Eigen::MatrixX4f &matColorRight);
174
175 //=========================================================================================================
186 void setAnnotationInfo(const Eigen::VectorXi &vecLabelIdsLeftHemi,
187 const Eigen::VectorXi &vecLabelIdsRightHemi,
188 const QList<FSLIB::Label> &lLabelsLeftHemi,
189 const QList<FSLIB::Label> &lLabelsRightHemi,
190 const Eigen::VectorXi &vecVertNoLeft,
191 const Eigen::VectorXi &vecVertNoRight);
192
193 //=========================================================================================================
199 void setThresholds(const QVector3D &vecThresholds);
200
201 //=========================================================================================================
207 void setVisualizationType(int iVisType);
208
209 //=========================================================================================================
215 void setColormapType(const QString &sColormapType);
216
217 //=========================================================================================================
223 void setNumberAverages(int iNumAvr);
224
225 //=========================================================================================================
231 void setSFreq(double dSFreq);
232
233 //=========================================================================================================
239 void setStreamSmoothedData(bool bStreamSmoothedData);
240
241 //=========================================================================================================
247 void addData(const Eigen::MatrixXd& data);
248
249protected:
250 //=========================================================================================================
258 void onNewRtRawData(const Eigen::VectorXd &vecDataVectorLeftHemi,
259 const Eigen::VectorXd &vecDataVectorRightHemi);
260
261 //=========================================================================================================
268 void onNewSmoothedRtRawData(const Eigen::MatrixX4f &matColorMatrixLeftHemi,
269 const Eigen::MatrixX4f &matColorMatrixRightHemi);
270
271 //=========================================================================================================
277 void onNewInterpolationMatrixLeftCalculated(QSharedPointer<Eigen::SparseMatrix<float> > pMatInterpolationMatrixLeftHemi);
278
279 //=========================================================================================================
285 void onNewInterpolationMatrixRightCalculated(QSharedPointer<Eigen::SparseMatrix<float> > pMatInterpolationMatrixRightHemi);
286
287 QTimer m_timer;
293 QPointer<RtSourceDataWorker> m_pRtSourceDataWorker;
294 QPointer<RtSourceInterpolationMatWorker> m_pRtInterpolationLeftWorker;
295 QPointer<RtSourceInterpolationMatWorker> m_pRtInterpolationRightWorker;
299signals:
300 //=========================================================================================================
308 void interpolationInfoLeftChanged(const Eigen::MatrixX3f &matVerticesLeft,
309 const QVector<QVector<int> > &vecNeighborVerticesLeft,
310 const QVector<int> &vecMappedSubsetLeft);
311
312 //=========================================================================================================
320 void interpolationInfoRightChanged(const Eigen::MatrixX3f &matVerticesRight,
321 const QVector<QVector<int> > &vecNeighborVerticesRight,
322 const QVector<int> &vecMappedSubsetRight);
323
324 //=========================================================================================================
332 void annotationInfoLeftChanged(const Eigen::VectorXi &vecLabelIdsLeftHemi,
333 const QList<FSLIB::Label> &lLabels,
334 const Eigen::VectorXi &vecVertNoLeft);
335
336 //=========================================================================================================
344 void annotationInfoRightChanged(const Eigen::VectorXi &vecLabelIdsRightHemi,
345 const QList<FSLIB::Label> &lLabels,
346 const Eigen::VectorXi &vecVertNoRight);
347
348 //=========================================================================================================
355 void surfaceColorChanged(const Eigen::MatrixX4f &matColorLeft,
356 const Eigen::MatrixX4f &matColorRight);
357
358 //=========================================================================================================
364 void streamSmoothedDataChanged(bool bStreamSmoothedData);
365
366 //=========================================================================================================
372 void interpolationFunctionChanged(const QString &sInterpolationFunction);
373
374 //=========================================================================================================
380 void cancelDistanceChanged(double dCancelDist);
381
382 //=========================================================================================================
388 void thresholdsChanged(const QVector3D &vecThresholds);
389
390 //=========================================================================================================
396 void visualizationTypeChanged(int iVisType);
397
398 //=========================================================================================================
404 void sFreqChanged(double dSFreq);
405
406 //=========================================================================================================
412 void numberAveragesChanged(int iNumAvr);
413
414 //=========================================================================================================
420 void loopStateChanged(bool bLoopState);
421
422 //=========================================================================================================
428 void colormapTypeChanged(const QString &sColormapType);
429
430 //=========================================================================================================
436 void rawDataChanged(const Eigen::MatrixXd& data);
437
438 //=========================================================================================================
444 void newInterpolationMatrixLeftAvailable(QSharedPointer<Eigen::SparseMatrix<float> > pMatInterpolationMatrixLeftHemi);
445
446 //=========================================================================================================
452 void newInterpolationMatrixRightAvailable(QSharedPointer<Eigen::SparseMatrix<float> > pMatInterpolationMatrixRightHemi);
453
454 //=========================================================================================================
462 void newRtRawDataAvailable(const Eigen::VectorXd &vecDataVectorLeftHemi,
463 const Eigen::VectorXd &vecDataVectorRightHemi);
464
465 //=========================================================================================================
472 void newRtSmoothedDataAvailable(const Eigen::MatrixX4f &matColorMatrixLeftHemi,
473 const Eigen::MatrixX4f &matColorMatrixRightHemi);
474};
475} // NAMESPACE
476
477#endif //DISP3DLIB_RTSOURCEDATACONTROLLER_H
Label class declaration.
#define DISP3DSHARED_EXPORT
This controller organizes data streaming and interpolation matrix calculations. It only uses Queued s...
QPointer< RtSourceInterpolationMatWorker > m_pRtInterpolationRightWorker
QSharedPointer< const RtSourceDataController > ConstSPtr
void numberAveragesChanged(int iNumAvr)
QPointer< RtSourceDataWorker > m_pRtSourceDataWorker
void annotationInfoRightChanged(const Eigen::VectorXi &vecLabelIdsRightHemi, const QList< FSLIB::Label > &lLabels, const Eigen::VectorXi &vecVertNoRight)
void rawDataChanged(const Eigen::MatrixXd &data)
void surfaceColorChanged(const Eigen::MatrixX4f &matColorLeft, const Eigen::MatrixX4f &matColorRight)
void newRtSmoothedDataAvailable(const Eigen::MatrixX4f &matColorMatrixLeftHemi, const Eigen::MatrixX4f &matColorMatrixRightHemi)
void colormapTypeChanged(const QString &sColormapType)
QPointer< RtSourceInterpolationMatWorker > m_pRtInterpolationLeftWorker
void sFreqChanged(double dSFreq)
void newInterpolationMatrixRightAvailable(QSharedPointer< Eigen::SparseMatrix< float > > pMatInterpolationMatrixRightHemi)
void newInterpolationMatrixLeftAvailable(QSharedPointer< Eigen::SparseMatrix< float > > pMatInterpolationMatrixLeftHemi)
void loopStateChanged(bool bLoopState)
void interpolationFunctionChanged(const QString &sInterpolationFunction)
void thresholdsChanged(const QVector3D &vecThresholds)
QSharedPointer< RtSourceDataController > SPtr
void interpolationInfoRightChanged(const Eigen::MatrixX3f &matVerticesRight, const QVector< QVector< int > > &vecNeighborVerticesRight, const QVector< int > &vecMappedSubsetRight)
void newRtRawDataAvailable(const Eigen::VectorXd &vecDataVectorLeftHemi, const Eigen::VectorXd &vecDataVectorRightHemi)
void annotationInfoLeftChanged(const Eigen::VectorXi &vecLabelIdsLeftHemi, const QList< FSLIB::Label > &lLabels, const Eigen::VectorXi &vecVertNoLeft)
void cancelDistanceChanged(double dCancelDist)
void visualizationTypeChanged(int iVisType)
void interpolationInfoLeftChanged(const Eigen::MatrixX3f &matVerticesLeft, const QVector< QVector< int > > &vecNeighborVerticesLeft, const QVector< int > &vecMappedSubsetLeft)
void streamSmoothedDataChanged(bool bStreamSmoothedData)