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

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

#include <rtsourcedataworker.h>

Public Types

typedef QSharedPointer< RtSourceDataWorkerSPtr
 
typedef QSharedPointer< const RtSourceDataWorkerConstSPtr
 

Signals

void newRtRawData (const Eigen::VectorXd &vecDataVectorLeftHemi, const Eigen::VectorXd &vecDataVectorRightHemi)
 
void newRtSmoothedData (const Eigen::MatrixX4f &matColorMatrixLeftHemi, const Eigen::MatrixX4f &matColorMatrixRightHemi)
 

Public Member Functions

 RtSourceDataWorker ()
 
void addData (const Eigen::MatrixXd &data)
 
void clear ()
 
void setSurfaceColor (const Eigen::MatrixX4f &matColorLeft, const Eigen::MatrixX4f &matColorRight)
 
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 setInterpolationMatrixLeft (QSharedPointer< Eigen::SparseMatrix< float > > pMatInterpolationMatrixLeft)
 
void setInterpolationMatrixRight (QSharedPointer< Eigen::SparseMatrix< float > > pMatInterpolationMatrixRight)
 
void streamData ()
 

Static Protected Member Functions

static void normalizeAndTransformToColor (const Eigen::VectorXf &vecData, Eigen::MatrixX4f &matFinalVertColor, double dThresholdX, double dThresholdZ, 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...
 
static void generateColorsFromSensorValues (VisualizationInfo &visualizationInfoHemi)
 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
 
bool m_bIsLooping
 
bool m_bStreamSmoothedData
 
int m_iCurrentSample
 
int m_iAverageSamples
 
int m_iSampleCtr
 
double m_dSFreq
 
QList< VisualizationInfom_lHemiVisualizationInfo
 

Detailed Description

This worker streams either interpolated or raw data.

This worker streams either interpolated or raw data.

Definition at line 105 of file rtsourcedataworker.h.

Inheritance diagram for DISP3DLIB::RtSourceDataWorker:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for RtSourceDataWorker class.

Definition at line 111 of file rtsourcedataworker.h.

◆ SPtr

Shared pointer type for RtSourceDataWorker class.

Definition at line 110 of file rtsourcedataworker.h.

Constructor & Destructor Documentation

◆ RtSourceDataWorker()

RtSourceDataWorker::RtSourceDataWorker ( )
explicit

Default constructor.

Definition at line 73 of file rtsourcedataworker.cpp.

Member Function Documentation

◆ addData()

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

Add data which is to be streamed.

Parameters
[in]dataThe new data.

Definition at line 90 of file rtsourcedataworker.cpp.

◆ clear()

void DISP3DLIB::RtSourceDataWorker::clear ( )

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

◆ generateColorsFromSensorValues()

void RtSourceDataWorker::generateColorsFromSensorValues ( VisualizationInfo visualizationInfoHemi)
staticprotected

generateColorsFromSensorValues Produces the final color matrix that is to be emitted

Parameters

Definition at line 266 of file rtsourcedataworker.cpp.

◆ newRtRawData

void DISP3DLIB::RtSourceDataWorker::newRtRawData ( const Eigen::VectorXd &  vecDataVectorLeftHemi,
const Eigen::VectorXd &  vecDataVectorRightHemi 
)
signal

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

Parameters
[in]vecDataVectorLeftHemiThe new streamed raw data for the left hemispehre.
[in]vecDataVectorRightHemiThe new streamed raw data for the right hemispehre.

◆ newRtSmoothedData

void DISP3DLIB::RtSourceDataWorker::newRtSmoothedData ( const Eigen::MatrixX4f &  matColorMatrixLeftHemi,
const Eigen::MatrixX4f &  matColorMatrixRightHemi 
)
signal

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

Parameters
[in]matColorMatrixLeftHemiThe new streamed interpolated raw data in form of RGB colors per vertex for the left hemisphere.
[in]matColorMatrixRightHemiThe new streamed interpolated raw data in form of RGB colors per vertex for the right hemisphere.

◆ normalizeAndTransformToColor()

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

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]dThresholdZUpper threshold for normalizing.
[in]functionHandlerColorMapThe pointer to the function which converts scalar values to rgb.
[in]sColorMapThe color map to use.

Definition at line 290 of file rtsourcedataworker.cpp.

◆ setColormapType()

void RtSourceDataWorker::setColormapType ( const QString &  sColormapType)

Set the type of the colormap.

Parameters
[in]sColormapTypeThe new colormap type.

Definition at line 135 of file rtsourcedataworker.cpp.

◆ setInterpolationMatrixLeft()

void RtSourceDataWorker::setInterpolationMatrixLeft ( QSharedPointer< Eigen::SparseMatrix< float > >  pMatInterpolationMatrixLeft)

Set the interpolation matrix for the left hemisphere.

Parameters
[in]pMatInterpolationMatrixLeftThe new interpolation matrix.

Definition at line 168 of file rtsourcedataworker.cpp.

◆ setInterpolationMatrixRight()

void RtSourceDataWorker::setInterpolationMatrixRight ( QSharedPointer< Eigen::SparseMatrix< float > >  pMatInterpolationMatrixRight)

Set the interpolation matrix for the right hemisphere.

Parameters
[in]pMatInterpolationMatrixRightThe new interpolation matrix.

Definition at line 175 of file rtsourcedataworker.cpp.

◆ setLoopState()

void RtSourceDataWorker::setLoopState ( bool  bLoopState)

Set the loop functionality on or off.

Parameters
[in]bLoopStateThe new looping state.

Definition at line 154 of file rtsourcedataworker.cpp.

◆ setNumberAverages()

void RtSourceDataWorker::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 121 of file rtsourcedataworker.cpp.

◆ setSFreq()

void RtSourceDataWorker::setSFreq ( const double  dSFreq)

Set the sampling frequency.

Parameters
[in]dSFreqThe new sampling frequency.

Definition at line 161 of file rtsourcedataworker.cpp.

◆ setStreamSmoothedData()

void RtSourceDataWorker::setStreamSmoothedData ( bool  bStreamSmoothedData)

Sets the state whether to stream smoothed or raw data

Parameters
[in]bStreamSmoothedDataThe new state.

Definition at line 128 of file rtsourcedataworker.cpp.

◆ setSurfaceColor()

void RtSourceDataWorker::setSurfaceColor ( const Eigen::MatrixX4f &  matColorLeft,
const Eigen::MatrixX4f &  matColorRight 
)

Set the color of the vertices for the left and right hemisphere.

Parameters
[in]matColorLeftThe color of the vertices for the left hemisphere.
[in]matColorRightThe color of the vertices for the right hemisphere.

Definition at line 112 of file rtsourcedataworker.cpp.

◆ setThresholds()

void RtSourceDataWorker::setThresholds ( const QVector3D &  vecThresholds)

Set the normalization value.

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

Definition at line 144 of file rtsourcedataworker.cpp.

◆ streamData()

void RtSourceDataWorker::streamData ( )

Streams the data.

Definition at line 182 of file rtsourcedataworker.cpp.

Member Data Documentation

◆ m_bIsLooping

bool DISP3DLIB::RtSourceDataWorker::m_bIsLooping
protected

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

Definition at line 244 of file rtsourcedataworker.h.

◆ m_bStreamSmoothedData

bool DISP3DLIB::RtSourceDataWorker::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 245 of file rtsourcedataworker.h.

◆ m_dSFreq

double DISP3DLIB::RtSourceDataWorker::m_dSFreq
protected

The current sampling frequency.

Definition at line 251 of file rtsourcedataworker.h.

◆ m_iAverageSamples

int DISP3DLIB::RtSourceDataWorker::m_iAverageSamples
protected

Number of average to compute.

Definition at line 248 of file rtsourcedataworker.h.

◆ m_iCurrentSample

int DISP3DLIB::RtSourceDataWorker::m_iCurrentSample
protected

Iterator to current sample which is/was streamed.

Definition at line 247 of file rtsourcedataworker.h.

◆ m_iSampleCtr

int DISP3DLIB::RtSourceDataWorker::m_iSampleCtr
protected

The sample counter.

Definition at line 249 of file rtsourcedataworker.h.

◆ m_lDataLoopQ

QList<Eigen::VectorXd> DISP3DLIB::RtSourceDataWorker::m_lDataLoopQ
protected

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

Definition at line 241 of file rtsourcedataworker.h.

◆ m_lDataQ

QList<Eigen::VectorXd> DISP3DLIB::RtSourceDataWorker::m_lDataQ
protected

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

Definition at line 240 of file rtsourcedataworker.h.

◆ m_lHemiVisualizationInfo

QList<VisualizationInfo> DISP3DLIB::RtSourceDataWorker::m_lHemiVisualizationInfo
protected

The visualization info for each hemisphere.

Definition at line 253 of file rtsourcedataworker.h.

◆ m_vecAverage

Eigen::VectorXd DISP3DLIB::RtSourceDataWorker::m_vecAverage
protected

The averaged data to be streamed.

Definition at line 242 of file rtsourcedataworker.h.


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