MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
rtsensordataworker.h
Go to the documentation of this file.
1//=============================================================================================================
36#ifndef DISP3DLIB_RTSENSORDATAWORKER_H
37#define DISP3DLIB_RTSENSORDATAWORKER_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
43#include "../../../../disp3D_global.h"
44
46
47//=============================================================================================================
48// QT INCLUDES
49//=============================================================================================================
50
51#include <QRgb>
52#include <QSharedPointer>
53#include <QObject>
54
55//=============================================================================================================
56// EIGEN INCLUDES
57//=============================================================================================================
58
59#include <Eigen/SparseCore>
60
61//=============================================================================================================
62// FORWARD DECLARATIONS
63//=============================================================================================================
64
65//=============================================================================================================
66// DEFINE NAMESPACE DISP3DLIB
67//=============================================================================================================
68
69namespace DISP3DLIB
70{
71
72//=============================================================================================================
73// DISP3DLIB FORWARD DECLARATIONS
74//=============================================================================================================
75
76//=============================================================================================================
83{
84 Q_OBJECT
85
86public:
87 typedef QSharedPointer<RtSensorDataWorker> SPtr;
88 typedef QSharedPointer<const RtSensorDataWorker> ConstSPtr;
90 //=========================================================================================================
94 explicit RtSensorDataWorker();
95
96 //=========================================================================================================
102 void addData(const Eigen::MatrixXd& data);
103
104 //=========================================================================================================
108 void clear();
109
110 //=========================================================================================================
116 void setNumberVertices(int iNumberVerts);
117
118 //=========================================================================================================
124 void setNumberAverages(int iNumAvr);
125
126 //=========================================================================================================
132 void setStreamSmoothedData(bool bStreamSmoothedData);
133
134 //=========================================================================================================
140 void setColormapType(const QString& sColormapType);
141
142 //=========================================================================================================
148 void setThresholds(const QVector3D &vecThresholds);
149
150 //=========================================================================================================
156 void setLoopState(bool bLoopState);
157
158 //=========================================================================================================
164 void setSFreq(const double dSFreq);
165
166 //=========================================================================================================
172 void setInterpolationMatrix(QSharedPointer<Eigen::SparseMatrix<float> > pMatInterpolationMatrix);
173
174 //=========================================================================================================
178 void streamData();
179
180protected:
181 //=========================================================================================================
193 void normalizeAndTransformToColor(const Eigen::VectorXf& vecData,
194 Eigen::MatrixX4f &matFinalVertColor,
195 double dThresholdX,
196 double dThreholdZ,
197 QRgb (*functionHandlerColorMap)(double v, const QString& sColorMap),
198 const QString& sColorMap);
199
200 //=========================================================================================================
208 Eigen::MatrixX4f generateColorsFromSensorValues(const Eigen::VectorXd& vecSensorValues);
209
210 QList<Eigen::VectorXd> m_lDataQ;
211 QList<Eigen::VectorXd> m_lDataLoopQ;
213 Eigen::VectorXd m_vecAverage;
214 QSharedPointer<Eigen::SparseMatrix<float> > m_pMatInterpolationMatrix;
222 double m_dSFreq;
224 //=========================================================================================================
229 double dThresholdX;
230 double dThresholdZ;
231
232 Eigen::MatrixX4f matOriginalVertColor;
233 Eigen::MatrixX4f matFinalVertColor;
234
235 QString sColormapType;
236 QRgb (*functionHandlerColorMap)(double v, const QString& sColorMap) = DISPLIB::ColorMap::valueToColor;
237 } m_lVisualizationInfo;
239signals:
240 //=========================================================================================================
246 void newRtRawData(Eigen::VectorXd vecDataVector);
247
248 //=========================================================================================================
254 void newRtSmoothedData(const Eigen::MatrixX4f &matColorMatrix);
255};
256} // NAMESPACE
257
258#endif //DISP3DLIB_RTSENSORDATAWORKER_H
ColorMap class declaration.
#define DISP3DSHARED_EXPORT
static QRgb valueToColor(double v, const QString &sMap)
Definition colormap.h:688
This worker streams either interpolated or raw data.
QList< Eigen::VectorXd > m_lDataLoopQ
QList< Eigen::VectorXd > m_lDataQ
void newRtSmoothedData(const Eigen::MatrixX4f &matColorMatrix)
QSharedPointer< const RtSensorDataWorker > ConstSPtr
QSharedPointer< RtSensorDataWorker > SPtr
void newRtRawData(Eigen::VectorXd vecDataVector)
QSharedPointer< Eigen::SparseMatrix< float > > m_pMatInterpolationMatrix