This controller organizes data streaming and interpolation matrix calculations. It only uses Queued signals in order to be thread safe with the underlying workers.
More...
#include <rtsensordatacontroller.h>
This controller organizes data streaming and interpolation matrix calculations. It only uses Queued signals in order to be thread safe with the underlying workers.
This controller organizes data streaming and interpolation matrix calculations. It only uses Queued signals in order to be thread safe with the underlying workers.
Definition at line 86 of file rtsensordatacontroller.h.
◆ ConstSPtr
◆ SPtr
◆ RtSensorDataController()
RtSensorDataController::RtSensorDataController |
( |
| ) |
|
◆ ~RtSensorDataController()
RtSensorDataController::~RtSensorDataController |
( |
| ) |
|
◆ addData()
void RtSensorDataController::addData |
( |
const Eigen::MatrixXd & |
data | ) |
|
◆ badChannelsChanged
void DISP3DLIB::RtSensorDataController::badChannelsChanged |
( |
const FIFFLIB::FiffInfo & |
info | ) |
|
|
signal |
Emit this signal whenever the bad channels changed.
- Parameters
-
[in] | info | The fiff info including the new bad channels. |
◆ cancelDistanceChanged
void DISP3DLIB::RtSensorDataController::cancelDistanceChanged |
( |
double |
dCancelDist | ) |
|
|
signal |
Emit this signal whenever the cancel distance changed.
- Parameters
-
[in] | dCancelDist | The new cancel distance value in meters. |
◆ colormapTypeChanged
void DISP3DLIB::RtSensorDataController::colormapTypeChanged |
( |
const QString & |
sColormapType | ) |
|
|
signal |
Emit this signal whenever the colormap changed.
- Parameters
-
[in] | sColormapType | The new colormap type. |
◆ interpolationFunctionChanged
void DISP3DLIB::RtSensorDataController::interpolationFunctionChanged |
( |
const QString & |
sInterpolationFunction | ) |
|
|
signal |
Emit this signal whenever the interpolation function changed.
- Parameters
-
[in] | sInterpolationFunction | Function that computes interpolation coefficients using the distance values. |
◆ interpolationInfoChanged
void DISP3DLIB::RtSensorDataController::interpolationInfoChanged |
( |
const Eigen::MatrixX3f & |
matVertices, |
|
|
const QVector< QVector< int > > & |
vecNeighborVertices, |
|
|
const QVector< Eigen::Vector3f > & |
vecSensorPos, |
|
|
const FIFFLIB::FiffInfo & |
fiffInfo, |
|
|
int |
iSensorType |
|
) |
| |
|
signal |
Emit this signal whenever the interpolation info changed.
- Parameters
-
[in] | matVertices | The vertex information. |
[in] | vecNeighborVertices | The neighbor vertex information. |
[in] | vecSensorPos | The QVector that holds the sensor positons in x, y and z coordinates. |
[in] | fiffEvoked | Holds all information about the sensors. |
[in] | iSensorType | Type of the sensor: FIFFV_EEG_CH or FIFFV_MEG_CH. |
◆ loopStateChanged
void DISP3DLIB::RtSensorDataController::loopStateChanged |
( |
bool |
bLoopState | ) |
|
|
signal |
Emit this signal whenever the loop state changed.
- Parameters
-
[in] | bLoopState | The new looping state. |
◆ newInterpolationMatrixAvailable
void DISP3DLIB::RtSensorDataController::newInterpolationMatrixAvailable |
( |
QSharedPointer< Eigen::SparseMatrix< float > > |
pMatInterpolationMatrix | ) |
|
|
signal |
Emit this signal whenever a new interpolation matrix is available.
- Parameters
-
[in] | pMatInterpolationMatrix | The new interpolation matrix. |
◆ newRtRawDataAvailable
void DISP3DLIB::RtSensorDataController::newRtRawDataAvailable |
( |
const Eigen::VectorXd & |
vecDataVector | ) |
|
|
signal |
Emit this signal whenever a new raw data is streamed.
- Parameters
-
[in] | vecDataVector | The new streamed raw data. |
◆ newRtSmoothedDataAvailable
void DISP3DLIB::RtSensorDataController::newRtSmoothedDataAvailable |
( |
const Eigen::MatrixX4f & |
matColorMatrix | ) |
|
|
signal |
Emit this signal whenever a new interpolated raw data is streamed.
- Parameters
-
[in] | matColorMatrix | The new streamed interpolated raw data in form of RGB colors per vertex. |
◆ numberAveragesChanged
void DISP3DLIB::RtSensorDataController::numberAveragesChanged |
( |
int |
iNumAvr | ) |
|
|
signal |
Emit this signal whenever the number of averages changed.
- Parameters
-
[in] | iNumAvr | The new number of averages. |
◆ numberVerticesChanged
void DISP3DLIB::RtSensorDataController::numberVerticesChanged |
( |
int |
iNumberVerts | ) |
|
|
signal |
Emit this signal whenever the number of vertices changed.
- Parameters
-
[in] | iNumberVerts | The new number of vertices. |
◆ onNewInterpolationMatrixCalculated()
void RtSensorDataController::onNewInterpolationMatrixCalculated |
( |
QSharedPointer< Eigen::SparseMatrix< float > > |
pMatInterpolationMatrix | ) |
|
|
protected |
Call this function whenever a new interpolation matrix is available to be dispatched.
- Parameters
-
[in] | pMatInterpolationMatrix | The new interpolation matrix data. |
Definition at line 275 of file rtsensordatacontroller.cpp.
◆ onNewRtRawData()
void RtSensorDataController::onNewRtRawData |
( |
const Eigen::VectorXd & |
vecDataVector | ) |
|
|
protected |
Call this function whenever new raw data is available to be dispatched.
- Parameters
-
[in] | vecDataVector | The new raw data. |
Definition at line 261 of file rtsensordatacontroller.cpp.
◆ onNewSmoothedRtRawData()
void RtSensorDataController::onNewSmoothedRtRawData |
( |
const Eigen::MatrixX4f & |
matColorMatrix | ) |
|
|
protected |
Call this function whenever new interpolated raw data is available to be dispatched.
- Parameters
-
[in] | matColorMatrix | The new interpolated data as RGB colors per vertex. |
Definition at line 268 of file rtsensordatacontroller.cpp.
◆ rawDataChanged
void DISP3DLIB::RtSensorDataController::rawDataChanged |
( |
const Eigen::MatrixXd & |
data | ) |
|
|
signal |
Emit this signal whenever new data to be streamed was added.
- Parameters
-
◆ setBadChannels()
Sets bad channels and recalculate interpolation matrix.
- Parameters
-
[in] | info | The fiff info including the new bad channels. |
Definition at line 240 of file rtsensordatacontroller.cpp.
◆ setCancelDistance()
void RtSensorDataController::setCancelDistance |
( |
double |
dCancelDist | ) |
|
This function sets the cancel distance used in distance calculations for the interpolation. Distances higher than this are ignored, i.e. the respective coefficients are set to zero. Warning: Using this function can take some seconds because recalculation are required.
- Parameters
-
[in] | dCancelDist | The new cancel distance value in meters. |
Definition at line 175 of file rtsensordatacontroller.cpp.
◆ setColormapType()
void RtSensorDataController::setColormapType |
( |
const QString & |
sColormapType | ) |
|
◆ setInterpolationFunction()
void RtSensorDataController::setInterpolationFunction |
( |
const QString & |
sInterpolationFunction | ) |
|
This function sets the function that is used in the interpolation process. Warning: Using this function can take some seconds because recalculation are required.
- Parameters
-
[in] | sInterpolationFunction | Function that computes interpolation coefficients using the distance values. |
Definition at line 161 of file rtsensordatacontroller.cpp.
◆ setInterpolationInfo()
void RtSensorDataController::setInterpolationInfo |
( |
const Eigen::MatrixX3f & |
matVertices, |
|
|
const QVector< QVector< int > > & |
vecNeighborVertices, |
|
|
const QVector< Eigen::Vector3f > & |
vecSensorPos, |
|
|
const FIFFLIB::FiffInfo & |
fiffInfo, |
|
|
int |
iSensorType |
|
) |
| |
Sets the members InterpolationData.bemSurface, InterpolationData.vecSensorPos and m_numSensors. Warning: Using this function can take some seconds because recalculation are required.
- Parameters
-
[in] | matVertices | The vertex information. |
[in] | vecNeighborVertices | The neighbor vertex information. |
[in] | vecSensorPos | The QVector that holds the sensor positons in x, y and z coordinates. |
[in] | fiffEvoked | Holds all information about the sensors. |
[in] | iSensorType | Type of the sensor: FIFFV_EEG_CH or FIFFV_MEG_CH. |
- Returns
- Returns the created interpolation matrix.
Definition at line 195 of file rtsensordatacontroller.cpp.
◆ setLoopState()
void RtSensorDataController::setLoopState |
( |
bool |
bLoopState | ) |
|
◆ setNumberAverages()
void RtSensorDataController::setNumberAverages |
( |
int |
iNumAvr | ) |
|
◆ setSFreq()
void RtSensorDataController::setSFreq |
( |
double |
dSFreq | ) |
|
◆ setStreamingState()
void RtSensorDataController::setStreamingState |
( |
bool |
bStreamingState | ) |
|
Set the streaming state (start/stop streaming).
- Parameters
-
[in] | bStreamingState | The new straming state. |
Definition at line 150 of file rtsensordatacontroller.cpp.
◆ setStreamSmoothedData()
void RtSensorDataController::setStreamSmoothedData |
( |
bool |
bStreamSmoothedData | ) |
|
Sets the state whether to stream smoothed or raw data
- Parameters
-
[in] | bStreamSmoothedData | The new state. |
Definition at line 247 of file rtsensordatacontroller.cpp.
◆ setThresholds()
void RtSensorDataController::setThresholds |
( |
const QVector3D & |
vecThresholds | ) |
|
Set the normalization value.
- Parameters
-
[in] | vecThresholds | The new threshold values used for normalizing the data. |
Definition at line 212 of file rtsensordatacontroller.cpp.
◆ setTimeInterval()
void RtSensorDataController::setTimeInterval |
( |
int |
iMSec | ) |
|
Set the time in MSec to wait inbetween data samples.
- Parameters
-
[in] | iMSec | The new length in milli Seconds to wait inbetween data samples. |
Definition at line 182 of file rtsensordatacontroller.cpp.
◆ sFreqChanged
void DISP3DLIB::RtSensorDataController::sFreqChanged |
( |
double |
dSFreq | ) |
|
|
signal |
Emit this signal whenever the sampling frequency changed.
- Parameters
-
[in] | dSFreq | The new sampling frequency. |
◆ streamSmoothedDataChanged
void DISP3DLIB::RtSensorDataController::streamSmoothedDataChanged |
( |
bool |
bStreamSmoothedData | ) |
|
|
signal |
Emit this signal whenever the state to whether stream smoothed/interpolated or raw data changed.
- Parameters
-
[in] | info | The fiff info including the new bad channels. |
◆ surfaceColorChanged
void DISP3DLIB::RtSensorDataController::surfaceColorChanged |
( |
const Eigen::MatrixX3f & |
matSurfaceVertColor | ) |
|
|
signal |
Emit this signal whenever the surface color changed.
- Parameters
-
[in] | matSurfaceVertColor | The vertex colors on which the streamed data should be plotted. |
◆ thresholdsChanged
void DISP3DLIB::RtSensorDataController::thresholdsChanged |
( |
const QVector3D & |
vecThresholds | ) |
|
|
signal |
Emit this signal whenever the thresholds changed.
- Parameters
-
[in] | vecThresholds | The new threshold values used for normalizing the data. |
◆ m_iMSecInterval
int DISP3DLIB::RtSensorDataController::m_iMSecInterval |
|
protected |
◆ m_pRtInterpolationWorker
◆ m_pRtSensorDataWorker
◆ m_rtInterpolationWorkerThread
QThread DISP3DLIB::RtSensorDataController::m_rtInterpolationWorkerThread |
|
protected |
◆ m_rtSensorDataWorkerThread
QThread DISP3DLIB::RtSensorDataController::m_rtSensorDataWorkerThread |
|
protected |
◆ m_timer
QTimer DISP3DLIB::RtSensorDataController::m_timer |
|
protected |
The documentation for this class was generated from the following files: