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>

Classes

struct  VisualizationInfo
 

Public Types

typedef QSharedPointer< RtSensorDataWorkerSPtr
 
typedef QSharedPointer< const RtSensorDataWorkerConstSPtr
 

Signals

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 ( )
explicit

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.

Parameters
[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)
protected

generateColorsFromSensorValues Produces the final color matrix that is to be emitted

Parameters
[in]vecSensorValuesA vector of sensor signals.
Returns
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)
signal

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

Parameters
[in]vecDataVectorThe raw data.

◆ newRtSmoothedData

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

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

Parameters
[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 
)
protected

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

Parameters
[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.

Parameters
[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.

Parameters
[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.

Parameters
[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.

Parameters
[in]iNumAvrThe new number of averages.

Definition at line 114 of file rtsensordataworker.cpp.

◆ setNumberVertices()

void RtSensorDataWorker::setNumberVertices ( int  iNumberVerts)

Set number of vertices.

Parameters
[in]iNumberVertsThe number of vertices.

Definition at line 105 of file rtsensordataworker.cpp.

◆ setSFreq()

void RtSensorDataWorker::setSFreq ( const double  dSFreq)

Set the sampling frequency.

Parameters
[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

Parameters
[in]bStreamSmoothedDataThe new state.

Definition at line 121 of file rtsensordataworker.cpp.

◆ setThresholds()

void RtSensorDataWorker::setThresholds ( const QVector3D &  vecThresholds)

Set the normalization value.

Parameters
[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
protected

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
protected

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
protected

The current sampling frequency.

Definition at line 221 of file rtsensordataworker.h.

◆ m_iAverageSamples

int DISP3DLIB::RtSensorDataWorker::m_iAverageSamples
protected

Number of average to compute.

Definition at line 219 of file rtsensordataworker.h.

◆ m_iCurrentSample

int DISP3DLIB::RtSensorDataWorker::m_iCurrentSample
protected

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
protected

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
protected

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
protected

Container for the visualization info.

◆ m_pMatInterpolationMatrix

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

The interpolation matrix.

Definition at line 213 of file rtsensordataworker.h.

◆ m_vecAverage

Eigen::VectorXd DISP3DLIB::RtSensorDataWorker::m_vecAverage
protected

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: