MNE-CPP  0.1.9
A Framework for Electrophysiology
Classes | Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DISP3DLIB::RtSensorDataWorker Class Reference

This worker streams either interpolated or raw data. More...

#include <rtsensordataworker.h>


struct  VisualizationInfo

Public Types

typedef QSharedPointer< RtSensorDataWorkerSPtr
typedef QSharedPointer< const RtSensorDataWorkerConstSPtr


void newRtRawData (Eigen::VectorXd vecDataVector)
void newRtSmoothedData (const Eigen::MatrixX4f &matColorMatrix)

Public Member Functions

 RtSensorDataWorker ()
void addData (const Eigen::MatrixXd &data)
void clear ()
void setNumberVertices (int iNumberVerts)
void setNumberAverages (int iNumAvr)
void setStreamSmoothedData (bool bStreamSmoothedData)
void setColormapType (const QString &sColormapType)
void setThresholds (const QVector3D &vecThresholds)
void setLoopState (bool bLoopState)
void setSFreq (const double dSFreq)
void setInterpolationMatrix (QSharedPointer< Eigen::SparseMatrix< float > > pMatInterpolationMatrix)
void streamData ()

Protected Member Functions

void normalizeAndTransformToColor (const Eigen::VectorXf &vecData, Eigen::MatrixX4f &matFinalVertColor, double dThresholdX, double dThreholdZ, QRgb(*functionHandlerColorMap)(double v, const QString &sColorMap), const QString &sColorMap)
 normalizeAndTransformToColor This method normalizes final values for all vertices of the mesh and converts them to rgb using the specified color converter More...
Eigen::MatrixX4f generateColorsFromSensorValues (const Eigen::VectorXd &vecSensorValues)
 generateColorsFromSensorValues Produces the final color matrix that is to be emitted More...

Protected Attributes

QList< Eigen::VectorXd > m_lDataQ
QList< Eigen::VectorXd > m_lDataLoopQ
Eigen::VectorXd m_vecAverage
QSharedPointer< Eigen::SparseMatrix< float > > m_pMatInterpolationMatrix
bool m_bIsLooping
bool m_bStreamSmoothedData
int m_iCurrentSample
int m_iAverageSamples
double m_dSFreq
struct DISP3DLIB::RtSensorDataWorker::VisualizationInfo m_lVisualizationInfo

Detailed Description

This worker streams either interpolated or raw data.

This worker streams either interpolated or raw data.

Definition at line 81 of file rtsensordataworker.h.

Inheritance diagram for DISP3DLIB::RtSensorDataWorker:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for RtSensorDataWorker class.

Definition at line 87 of file rtsensordataworker.h.

◆ SPtr

Shared pointer type for RtSensorDataWorker class.

Definition at line 86 of file rtsensordataworker.h.

Constructor & Destructor Documentation

◆ RtSensorDataWorker()

RtSensorDataWorker::RtSensorDataWorker ( )

Default constructor.

Definition at line 71 of file rtsensordataworker.cpp.

Member Function Documentation

◆ addData()

void RtSensorDataWorker::addData ( const Eigen::MatrixXd &  data)

Add data which is to be streamed.

[in]dataThe new data.

Definition at line 83 of file rtsensordataworker.cpp.

◆ clear()

void DISP3DLIB::RtSensorDataWorker::clear ( )

Clear this worker, empties the m_lData field that holds the current block of sensor activity

◆ generateColorsFromSensorValues()

MatrixX4f RtSensorDataWorker::generateColorsFromSensorValues ( const Eigen::VectorXd &  vecSensorValues)

generateColorsFromSensorValues Produces the final color matrix that is to be emitted

[in]vecSensorValuesA vector of sensor signals.
The final color values for the underlying mesh surface.

Definition at line 233 of file rtsensordataworker.cpp.

◆ newRtRawData

void DISP3DLIB::RtSensorDataWorker::newRtRawData ( Eigen::VectorXd  vecDataVector)

Emit this signal whenever this item should stream new raw data to its listeners.

[in]vecDataVectorThe raw data.

◆ newRtSmoothedData

void DISP3DLIB::RtSensorDataWorker::newRtSmoothedData ( const Eigen::MatrixX4f &  matColorMatrix)

Emit this signal whenever this item should stream interpolated raw data to its listeners.

[in]matColorMatrixThe interpolated raw data in form of rgb colors for each vertex.

◆ normalizeAndTransformToColor()

void RtSensorDataWorker::normalizeAndTransformToColor ( const Eigen::VectorXf &  vecData,
Eigen::MatrixX4f &  matFinalVertColor,
double  dThresholdX,
double  dThreholdZ,
QRgb(*)(double v, const QString &sColorMap)  functionHandlerColorMap,
const QString &  sColorMap 

normalizeAndTransformToColor This method normalizes final values for all vertices of the mesh and converts them to rgb using the specified color converter

[in]vecDataThe final values for each vertex of the surface.
[in,out]matFinalVertColorThe color matrix which the results are to be written to.
[in]dThresholdXLower threshold for normalizing.
[in]dThreholdZUpper threshold for normalizing.
[in]functionHandlerColorMapThe pointer to the function which converts scalar values to rgb.
[in]sColorMapThe color map to us.

Definition at line 260 of file rtsensordataworker.cpp.

◆ setColormapType()

void RtSensorDataWorker::setColormapType ( const QString &  sColormapType)

Set the type of the colormap.

[in]sColormapTypeThe new colormap type.

Definition at line 128 of file rtsensordataworker.cpp.

◆ setInterpolationMatrix()

void RtSensorDataWorker::setInterpolationMatrix ( QSharedPointer< Eigen::SparseMatrix< float > >  pMatInterpolationMatrix)

Set the interpolation matrix.

[in]pMatInterpolationMatrixThe new interpolation matrix.

Definition at line 158 of file rtsensordataworker.cpp.

◆ setLoopState()

void RtSensorDataWorker::setLoopState ( bool  bLoopState)

Set the loop functionality on or off.

[in]bLoopStateThe new looping state.

Definition at line 144 of file rtsensordataworker.cpp.

◆ setNumberAverages()

void RtSensorDataWorker::setNumberAverages ( int  iNumAvr)

Set the number of average to take after emitting the data to the listening threads.

[in]iNumAvrThe new number of averages.

Definition at line 114 of file rtsensordataworker.cpp.

◆ setNumberVertices()

void RtSensorDataWorker::setNumberVertices ( int  iNumberVerts)

Set number of vertices.

[in]iNumberVertsThe number of vertices.

Definition at line 105 of file rtsensordataworker.cpp.

◆ setSFreq()

void RtSensorDataWorker::setSFreq ( const double  dSFreq)

Set the sampling frequency.

[in]dSFreqThe new sampling frequency.

Definition at line 151 of file rtsensordataworker.cpp.

◆ setStreamSmoothedData()

void RtSensorDataWorker::setStreamSmoothedData ( bool  bStreamSmoothedData)

Sets the state whether to stream smoothed or raw data

[in]bStreamSmoothedDataThe new state.

Definition at line 121 of file rtsensordataworker.cpp.

◆ setThresholds()

void RtSensorDataWorker::setThresholds ( const QVector3D &  vecThresholds)

Set the normalization value.

[in]vecThresholdsThe new threshold values used for normalizing the data.

Definition at line 136 of file rtsensordataworker.cpp.

◆ streamData()

void RtSensorDataWorker::streamData ( )

Streams the data.

Definition at line 164 of file rtsensordataworker.cpp.

Member Data Documentation

◆ m_bIsLooping

bool DISP3DLIB::RtSensorDataWorker::m_bIsLooping

Flag if this thread should repeat sending the same data over and over again.

Definition at line 215 of file rtsensordataworker.h.

◆ m_bStreamSmoothedData

bool DISP3DLIB::RtSensorDataWorker::m_bStreamSmoothedData

Flag if this thread's streams the raw or already smoothed data. Latter are produced by multiplying the smoothing operator here in this thread.

Definition at line 216 of file rtsensordataworker.h.

◆ m_dSFreq

double DISP3DLIB::RtSensorDataWorker::m_dSFreq

The current sampling frequency.

Definition at line 221 of file rtsensordataworker.h.

◆ m_iAverageSamples

int DISP3DLIB::RtSensorDataWorker::m_iAverageSamples

Number of average to compute.

Definition at line 219 of file rtsensordataworker.h.

◆ m_iCurrentSample

int DISP3DLIB::RtSensorDataWorker::m_iCurrentSample

Iterator to current sample which is/was streamed.

Definition at line 218 of file rtsensordataworker.h.

◆ m_lDataLoopQ

QList<Eigen::VectorXd> DISP3DLIB::RtSensorDataWorker::m_lDataLoopQ

List that holds the matrix data <n_channels x n_samples> for looping.

Definition at line 210 of file rtsensordataworker.h.

◆ m_lDataQ

QList<Eigen::VectorXd> DISP3DLIB::RtSensorDataWorker::m_lDataQ

List that holds the fiff matrix data <n_channels x n_samples>.

Definition at line 209 of file rtsensordataworker.h.

◆ m_lVisualizationInfo

struct DISP3DLIB::RtSensorDataWorker::VisualizationInfo DISP3DLIB::RtSensorDataWorker::m_lVisualizationInfo

Container for the visualization info.

◆ m_pMatInterpolationMatrix

QSharedPointer<Eigen::SparseMatrix<float> > DISP3DLIB::RtSensorDataWorker::m_pMatInterpolationMatrix

The interpolation matrix.

Definition at line 213 of file rtsensordataworker.h.

◆ m_vecAverage

Eigen::VectorXd DISP3DLIB::RtSensorDataWorker::m_vecAverage

The averaged data to be streamed.

Definition at line 212 of file rtsensordataworker.h.

The documentation for this class was generated from the following files: