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

This item integrates GeometryInfo and Interpolation into Disp3D structure. More...

#include <sensordatatreeitem.h>

Public Types

typedef QSharedPointer< SensorDataTreeItemSPtr
 
typedef QSharedPointer< const SensorDataTreeItemConstSPtr
 

Public Member Functions

 SensorDataTreeItem (int iType=Data3DTreeModelItemTypes::SensorDataItem, const QString &text="Sensor Data", bool bUseGPU=false)
 
virtual ~SensorDataTreeItem ()
 
virtual void initData (const MNELIB::MNEBemSurface &tBemSurface, const FIFFLIB::FiffInfo &tFiffInfo, const QString &sSensorType, Qt3DCore::QEntity *p3DEntityParent)
 
virtual void addData (const Eigen::MatrixXd &tSensorData)
 
virtual bool isDataInit () const
 
virtual void setLoopState (bool bState)
 
virtual void setStreamingState (bool bState)
 
virtual void setTimeInterval (int iMSec)
 
virtual void setNumberAverages (int iNumberAverages)
 
virtual void setColormapType (const QString &sColormap)
 
virtual void setThresholds (const QVector3D &vecThresholds)
 
virtual void setCancelDistance (double dCancelDist)
 
virtual void setInterpolationFunction (const QString &sInterpolationFunction)
 
virtual void setSFreq (const double dSFreq)
 
virtual void setBadChannels (const FIFFLIB::FiffInfo &info)
 
virtual void setTransform (const Qt3DCore::QTransform &transform)
 
virtual void setTransform (const FIFFLIB::FiffCoordTrans &transform, bool bApplyInverse=false)
 
virtual void applyTransform (const Qt3DCore::QTransform &transform)
 
virtual void applyTransform (const FIFFLIB::FiffCoordTrans &transform, bool bApplyInverse=false)
 
- Public Member Functions inherited from DISP3DLIB::AbstractTreeItem
 AbstractTreeItem (int iType=Data3DTreeModelItemTypes::UnknownItem, const QString &text="")
 
void setData (const QVariant &value, int role=Qt::UserRole+1)
 
int type () const
 
QList< QStandardItem * > findChildren (int type)
 
QList< QStandardItem * > findChildren (const QString &text)
 
AbstractTreeItemoperator<< (AbstractTreeItem *newItem)
 
AbstractTreeItemoperator<< (AbstractTreeItem &newItem)
 

Protected Member Functions

virtual void initItem () override
 
virtual void onNewInterpolationMatrixAvailable (QSharedPointer< Eigen::SparseMatrix< float > > pMatInterpolationMatrixLeftHemi)
 
virtual void onNewRtRawDataAvailable (const Eigen::VectorXd &vecDataVector)
 
virtual void onNewRtSmoothedDataAvailable (const Eigen::MatrixX4f &matColorMatrix)
 
virtual void onStreamingStateChanged (const Qt::CheckState &checkState)
 
virtual void onColormapTypeChanged (const QVariant &sColormapType)
 
virtual void onTimeIntervalChanged (const QVariant &iMSec)
 
virtual void onDataThresholdChanged (const QVariant &vecThresholds)
 
virtual void onLoopStateChanged (const Qt::CheckState &checkState)
 
virtual void onNumberAveragesChanged (const QVariant &iNumAvr)
 
virtual void onCancelDistanceChanged (const QVariant &dCancelDist)
 
virtual void onInterpolationFunctionChanged (const QVariant &sInterpolationFunction)
 
- Protected Member Functions inherited from DISP3DLIB::AbstractTreeItem
virtual void onCheckStateChanged (const Qt::CheckState &checkState)
 

Protected Attributes

bool m_bIsDataInit
 
bool m_bUseGPU
 
QVector< int > m_iUsedSensors
 
QVector< int > m_iSensorsBad
 
QPointer< RtSensorDataControllerm_pSensorRtDataWorkController
 
QPointer< GpuInterpolationItemm_pInterpolationItemGPU
 
QPointer< AbstractMeshTreeItemm_pInterpolationItemCPU
 
- Protected Attributes inherited from DISP3DLIB::AbstractTreeItem
int m_iType
 
Qt::CheckState m_checkStateOld
 

Additional Inherited Members

- Signals inherited from DISP3DLIB::AbstractTreeItem
void checkStateChanged (const Qt::CheckState &checkState)
 
- Static Public Member Functions inherited from DISP3DLIB::AbstractTreeItem
static void addItemWithDescription (QStandardItem *pItemParent, QStandardItem *pItemAdd)
 

Detailed Description

This item integrates GeometryInfo and Interpolation into Disp3D structure.

This item allows on-the-fly changes to parameters of visualization. It integrates the features provided in GeometryInfo and Interpolation.

Definition at line 92 of file sensordatatreeitem.h.

Inheritance diagram for DISP3DLIB::SensorDataTreeItem:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for sensordatatreeitem.

Definition at line 98 of file sensordatatreeitem.h.

◆ SPtr

Shared pointer type for sensordatatreeitem.

Definition at line 97 of file sensordatatreeitem.h.

Constructor & Destructor Documentation

◆ SensorDataTreeItem()

SensorDataTreeItem::SensorDataTreeItem ( int  iType = Data3DTreeModelItemTypes::SensorDataItem,
const QString &  text = "Sensor Data",
bool  bUseGPU = false 
)
explicit

Constructs a sensordatatreeitem object, calls initItem

Parameters
[in]iTypeThe type of the item. See types.h for declaration and definition.
[in]textThe text of this item. This is also by default the displayed name of the item in a view.
[in]bUseGPUWhether to use the GPU to visualize the data.

Definition at line 81 of file sensordatatreeitem.cpp.

◆ ~SensorDataTreeItem()

SensorDataTreeItem::~SensorDataTreeItem ( )
virtual

Destructor

Definition at line 94 of file sensordatatreeitem.cpp.

Member Function Documentation

◆ addData()

void SensorDataTreeItem::addData ( const Eigen::MatrixXd &  tSensorData)
virtual

Adds a block actual rt data which is streamed by this item's worker thread item. In order for this function to worker, you must call initData(...) beforehand.

Parameters
[in]tSensorDataThe matrix that holds rt measurement data.

Definition at line 210 of file sensordatatreeitem.cpp.

◆ applyTransform() [1/2]

void SensorDataTreeItem::applyTransform ( const FIFFLIB::FiffCoordTrans transform,
bool  bApplyInverse = false 
)
virtual

Applies a transformation o ntop of the present one.

Parameters
[in]transformThe new entity's transform.
[in]bApplyInverseWhether to apply the inverse. False by default.

Definition at line 457 of file sensordatatreeitem.cpp.

◆ applyTransform() [2/2]

void SensorDataTreeItem::applyTransform ( const Qt3DCore::QTransform &  transform)
virtual

Applies a transformation o ntop of the present one.

Parameters
[in]transformThe new entity's transform.

Definition at line 444 of file sensordatatreeitem.cpp.

◆ initData()

void SensorDataTreeItem::initData ( const MNELIB::MNEBemSurface tBemSurface,
const FIFFLIB::FiffInfo tFiffInfo,
const QString &  sSensorType,
Qt3DCore::QEntity *  p3DEntityParent 
)
virtual

Initializes the sensor data item with neccessary information for visualization computations. Constructs and initalizes the worker for this item.

Parameters
[in]tBemSurfaceMNEBemSurface that holds the mesh that should be visualized.
[in]tFiffInfoFiffInfo that holds the sensors information.
[in]sSensorTypeThe sensor type that is later used for live interpolation.
[in]p3DEntityParentThe Qt3D entity parent of the new item.

Definition at line 101 of file sensordatatreeitem.cpp.

◆ initItem()

void SensorDataTreeItem::initItem ( )
overrideprotectedvirtual

This adds all meta tree items and connects them fittingly Don't use this fucntion in the constructor of the abstract class.

Reimplemented from DISP3DLIB::AbstractTreeItem.

Definition at line 470 of file sensordatatreeitem.cpp.

◆ isDataInit()

bool DISP3DLIB::SensorDataTreeItem::isDataInit ( ) const
inlinevirtual

Returns true if this item is initialized.

Returns
Returns true if this item is initialized.

Definition at line 376 of file sensordatatreeitem.h.

◆ onCancelDistanceChanged()

void SensorDataTreeItem::onCancelDistanceChanged ( const QVariant &  dCancelDist)
protectedvirtual

This function gets called whenever the cancel distance of the interpolation changed.

Parameters
[in]dCancelDistThe new cancel distance.

Definition at line 679 of file sensordatatreeitem.cpp.

◆ onColormapTypeChanged()

void SensorDataTreeItem::onColormapTypeChanged ( const QVariant &  sColormapType)
protectedvirtual

This function gets called whenever the used colormap type changed.

Parameters
[in]sColormapTypeThe name of the new colormap type.

Definition at line 610 of file sensordatatreeitem.cpp.

◆ onDataThresholdChanged()

void SensorDataTreeItem::onDataThresholdChanged ( const QVariant &  vecThresholds)
protectedvirtual

This function gets called whenever the normaization value changed. The normalization value is used to normalize the estimated source activation.

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

Definition at line 638 of file sensordatatreeitem.cpp.

◆ onInterpolationFunctionChanged()

void SensorDataTreeItem::onInterpolationFunctionChanged ( const QVariant &  sInterpolationFunction)
protectedvirtual

This function gets called whenever the function of the interpolation changed.

Parameters
[in]sInterpolationFunctionThe new function name.

Definition at line 691 of file sensordatatreeitem.cpp.

◆ onLoopStateChanged()

void SensorDataTreeItem::onLoopStateChanged ( const Qt::CheckState &  checkState)
protectedvirtual

This function gets called whenever the check/activation state of the looped streaming state changed.

Parameters
[in]checkStateThe check state of the looped streaming state.

Definition at line 655 of file sensordatatreeitem.cpp.

◆ onNewInterpolationMatrixAvailable()

void SensorDataTreeItem::onNewInterpolationMatrixAvailable ( QSharedPointer< Eigen::SparseMatrix< float > >  pMatInterpolationMatrixLeftHemi)
protectedvirtual

Set the new interpolation matrix.

Parameters
[in]pMatInterpolationMatrixLeftHemiThe new interpolation matrix.

Definition at line 567 of file sensordatatreeitem.cpp.

◆ onNewRtRawDataAvailable()

void SensorDataTreeItem::onNewRtRawDataAvailable ( const Eigen::VectorXd &  vecDataVector)
protectedvirtual

This function gets called whenever this item receives sensor values for each estimated source.

Parameters
[in]vecDataVectorThe streamed raw data.

Definition at line 577 of file sensordatatreeitem.cpp.

◆ onNewRtSmoothedDataAvailable()

void SensorDataTreeItem::onNewRtSmoothedDataAvailable ( const Eigen::MatrixX4f &  matColorMatrix)
protectedvirtual

This function gets called whenever this item receives new color values for each estimated source.

Parameters
[in]sourceColorSamplesThe color values for the streamed data.

Definition at line 587 of file sensordatatreeitem.cpp.

◆ onNumberAveragesChanged()

void SensorDataTreeItem::onNumberAveragesChanged ( const QVariant &  iNumAvr)
protectedvirtual

This function gets called whenever the number of averages of the streamed samples changed.

Parameters
[in]iNumAvrThe new number of averages.

Definition at line 668 of file sensordatatreeitem.cpp.

◆ onStreamingStateChanged()

void SensorDataTreeItem::onStreamingStateChanged ( const Qt::CheckState &  checkState)
protectedvirtual

This function gets called whenever the check/activation state of the rt data worker changed.

Parameters
[in]checkStateThe check state of the worker.

Definition at line 597 of file sensordatatreeitem.cpp.

◆ onTimeIntervalChanged()

void SensorDataTreeItem::onTimeIntervalChanged ( const QVariant &  iMSec)
protectedvirtual

This function gets called whenever the time interval in between the streamed samples changed.

Parameters
[in]iMSecThe new time in milliseconds waited in between each streamed sample.

Definition at line 627 of file sensordatatreeitem.cpp.

◆ setBadChannels()

void SensorDataTreeItem::setBadChannels ( const FIFFLIB::FiffInfo info)
virtual

Update bad channels and recalculate interpolation matrix.

Parameters
[in]infoThe fiff info including the new bad channels.

Definition at line 402 of file sensordatatreeitem.cpp.

◆ setCancelDistance()

void SensorDataTreeItem::setCancelDistance ( double  dCancelDist)
virtual

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.

Parameters
[in]dCancelDistThe new cancel distance value in meters.

Definition at line 361 of file sensordatatreeitem.cpp.

◆ setColormapType()

void SensorDataTreeItem::setColormapType ( const QString &  sColormap)
virtual

This function sets the colormap type.

Parameters
[in]sColortableThe new colormap ("Hot Negative 1" etc.).

Definition at line 326 of file sensordatatreeitem.cpp.

◆ setInterpolationFunction()

void SensorDataTreeItem::setInterpolationFunction ( const QString &  sInterpolationFunction)
virtual

This function sets the function that is used in the interpolation process.

Parameters
[in]sInterpolationFunctionFunction that computes interpolation coefficients using the distance values.

Definition at line 377 of file sensordatatreeitem.cpp.

◆ setLoopState()

void SensorDataTreeItem::setLoopState ( bool  bState)
virtual

This function sets the loop flag.

Parameters
[in]bStateWhether to loop the data or not.

Definition at line 262 of file sensordatatreeitem.cpp.

◆ setNumberAverages()

void SensorDataTreeItem::setNumberAverages ( int  iNumberAverages)
virtual

This function sets the number of averages.

Parameters
[in]iNumberAveragesThe new number of averages.

Definition at line 310 of file sensordatatreeitem.cpp.

◆ setSFreq()

void SensorDataTreeItem::setSFreq ( const double  dSFreq)
virtual

Set the sampling frequency.

Parameters
[in]dSFreqThe new sampling frequency.

Definition at line 393 of file sensordatatreeitem.cpp.

◆ setStreamingState()

void SensorDataTreeItem::setStreamingState ( bool  bState)
virtual

This function sets the data streaming.

Parameters
[in]bStateWhether to stream the data to the display or not.

Definition at line 278 of file sensordatatreeitem.cpp.

◆ setThresholds()

void SensorDataTreeItem::setThresholds ( const QVector3D &  vecThresholds)
virtual

This function set the threshold values.

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

Definition at line 342 of file sensordatatreeitem.cpp.

◆ setTimeInterval()

void SensorDataTreeItem::setTimeInterval ( int  iMSec)
virtual

This function sets the time interval for streaming.

Parameters
[in]iMSecThe waiting time inbetween samples.

Definition at line 294 of file sensordatatreeitem.cpp.

◆ setTransform() [1/2]

void SensorDataTreeItem::setTransform ( const FIFFLIB::FiffCoordTrans transform,
bool  bApplyInverse = false 
)
virtual

Sets the entity's transformation. This will clear the old transformation.

Parameters
[in]transformThe new entity's transform.
[in]bApplyInverseWhether to apply the inverse. False by default.

Definition at line 431 of file sensordatatreeitem.cpp.

◆ setTransform() [2/2]

void SensorDataTreeItem::setTransform ( const Qt3DCore::QTransform &  transform)
virtual

Sets the entity's transformation. This will clear the old transformation.

Parameters
[in]transformThe new entity's transform.

Definition at line 418 of file sensordatatreeitem.cpp.

Member Data Documentation

◆ m_bIsDataInit

bool DISP3DLIB::SensorDataTreeItem::m_bIsDataInit
protected

The init flag.

Definition at line 361 of file sensordatatreeitem.h.

◆ m_bUseGPU

bool DISP3DLIB::SensorDataTreeItem::m_bUseGPU
protected

The use GPU flag.

Definition at line 362 of file sensordatatreeitem.h.

◆ m_iSensorsBad

QVector<int> DISP3DLIB::SensorDataTreeItem::m_iSensorsBad
protected

Store bad channel indexes.

Definition at line 365 of file sensordatatreeitem.h.

◆ m_iUsedSensors

QVector<int> DISP3DLIB::SensorDataTreeItem::m_iUsedSensors
protected

Stores the indices of channels inside the passed fiff evoked that are used for interpolation.

Definition at line 364 of file sensordatatreeitem.h.

◆ m_pInterpolationItemCPU

QPointer<AbstractMeshTreeItem> DISP3DLIB::SensorDataTreeItem::m_pInterpolationItemCPU
protected

This item manages all 3d rendering and calculations.

Definition at line 369 of file sensordatatreeitem.h.

◆ m_pInterpolationItemGPU

QPointer<GpuInterpolationItem> DISP3DLIB::SensorDataTreeItem::m_pInterpolationItemGPU
protected

This item manages all 3d rendering and calculations.

Definition at line 368 of file sensordatatreeitem.h.

◆ m_pSensorRtDataWorkController

QPointer<RtSensorDataController> DISP3DLIB::SensorDataTreeItem::m_pSensorRtDataWorkController
protected

The source data worker. This worker streams the rt data to this item.

Definition at line 367 of file sensordatatreeitem.h.


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