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

Provides a generic brain tree item to hold real time data. More...

#include <mnedatatreeitem.h>

Public Types

typedef QSharedPointer< MneDataTreeItemSPtr
 
typedef QSharedPointer< const MneDataTreeItemConstSPtr
 

Public Member Functions

 MneDataTreeItem (int iType=Data3DTreeModelItemTypes::MNEDataItem, const QString &text="MNE", bool bUseGPU=false)
 
 ~MneDataTreeItem ()
 
void initData (const MNELIB::MNEForwardSolution &tForwardSolution, const FSLIB::SurfaceSet &tSurfSet, const FSLIB::AnnotationSet &tAnnotSet, Qt3DCore::QEntity *p3DEntityParent)
 
void addData (const MNELIB::MNESourceEstimate &tSourceEstimate)
 
bool isDataInit () const
 
void setLoopState (bool state)
 
void setStreamingState (bool state)
 
void setTimeInterval (int iMSec)
 
void setNumberAverages (int iNumberAverages)
 
void setColormapType (const QString &sColormap)
 
void setVisualizationType (const QString &sVisualizationType)
 
void setThresholds (const QVector3D &vecThresholds)
 
virtual void setInterpolationFunction (const QString &sInterpolationFunction)
 
void setSFreq (const double dSFreq)
 
void setAlpha (float fAlpha)
 
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

void initItem ()
 
void onCheckStateWorkerChanged (const Qt::CheckState &checkState)
 
virtual void onNewInterpolationMatrixLeftAvailable (QSharedPointer< Eigen::SparseMatrix< float > > pMatInterpolationMatrixLeftHemi)
 
virtual void onNewInterpolationMatrixRightAvailable (QSharedPointer< Eigen::SparseMatrix< float > > pMatInterpolationMatrixRightHemi)
 
virtual void onNewRtRawData (const Eigen::VectorXd &vecDataVectorLeftHemi, const Eigen::VectorXd &vecDataVectorRightHemi)
 
void onNewRtSmoothedDataAvailable (const Eigen::MatrixX4f &matColorMatrixLeftHemi, const Eigen::MatrixX4f &matColorMatrixRightHemi)
 
void onColormapTypeChanged (const QVariant &sColormapType)
 
void onTimeIntervalChanged (const QVariant &iMSec)
 
void onDataThresholdChanged (const QVariant &vecThresholds)
 
void onVisualizationTypeChanged (const QVariant &sVisType)
 
void onCheckStateLoopedStateChanged (const Qt::CheckState &checkState)
 
void onNumberAveragesChanged (const QVariant &iNumAvr)
 
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
 
QPointer< RtSourceDataControllerm_pRtSourceDataController
 
QPointer< AbstractMeshTreeItemm_pInterpolationItemLeftCPU
 
QPointer< GpuInterpolationItemm_pInterpolationItemLeftGPU
 
QPointer< AbstractMeshTreeItemm_pInterpolationItemRightCPU
 
QPointer< GpuInterpolationItemm_pInterpolationItemRightGPU
 
- 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

Provides a generic brain tree item to hold real time data.

MneDataTreeItem provides a generic item to hold information about real time source localization data to plot onto the brain surface.

Definition at line 99 of file mnedatatreeitem.h.

Inheritance diagram for DISP3DLIB::MneDataTreeItem:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for MneDataTreeItem class.

Definition at line 105 of file mnedatatreeitem.h.

◆ SPtr

Shared pointer type for MneDataTreeItem class.

Definition at line 104 of file mnedatatreeitem.h.

Constructor & Destructor Documentation

◆ MneDataTreeItem()

MneDataTreeItem::MneDataTreeItem ( int  iType = Data3DTreeModelItemTypes::MNEDataItem,
const QString &  text = "MNE",
bool  bUseGPU = false 
)
explicit

Default constructor.

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 mnedatatreeitem.cpp.

◆ ~MneDataTreeItem()

MneDataTreeItem::~MneDataTreeItem ( )

Default destructor

Definition at line 93 of file mnedatatreeitem.cpp.

Member Function Documentation

◆ addData()

void MneDataTreeItem::addData ( const MNELIB::MNESourceEstimate tSourceEstimate)

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

Parameters
[in]tSourceEstimateThe MNESourceEstimate data.

Definition at line 411 of file mnedatatreeitem.cpp.

◆ applyTransform() [1/2]

void MneDataTreeItem::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 647 of file mnedatatreeitem.cpp.

◆ applyTransform() [2/2]

void MneDataTreeItem::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 668 of file mnedatatreeitem.cpp.

◆ initData()

void MneDataTreeItem::initData ( const MNELIB::MNEForwardSolution tForwardSolution,
const FSLIB::SurfaceSet tSurfSet,
const FSLIB::AnnotationSet tAnnotSet,
Qt3DCore::QEntity *  p3DEntityParent 
)

Initializes the rt data item with neccessary information for visualization computations.

Parameters
[in]tForwardSolutionThe MNEForwardSolution.
[in]tSurfSetThe surface set holding the left and right hemisphere surfaces.
[in]tAnnotSetThe annotation set holding the left and right hemisphere annotations.
[in]p3DEntityParentPointer to the QEntity parent.

Definition at line 207 of file mnedatatreeitem.cpp.

◆ initItem()

void MneDataTreeItem::initItem ( )
protectedvirtual

AbstractTreeItem functions

Reimplemented from DISP3DLIB::AbstractTreeItem.

Definition at line 100 of file mnedatatreeitem.cpp.

◆ isDataInit()

bool DISP3DLIB::MneDataTreeItem::isDataInit ( ) const
inline

Updates the rt data which is streamed by this item's worker thread item.

Returns
Returns true if this item is initialized.

Definition at line 410 of file mnedatatreeitem.h.

◆ onCheckStateLoopedStateChanged()

void MneDataTreeItem::onCheckStateLoopedStateChanged ( const Qt::CheckState &  checkState)
protected

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

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

Definition at line 820 of file mnedatatreeitem.cpp.

◆ onCheckStateWorkerChanged()

void MneDataTreeItem::onCheckStateWorkerChanged ( const Qt::CheckState &  checkState)
protected

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

Parameters
[in]checkStateThe check state of the worker.

Definition at line 689 of file mnedatatreeitem.cpp.

◆ onColormapTypeChanged()

void MneDataTreeItem::onColormapTypeChanged ( const QVariant &  sColormapType)
protected

This function gets called whenever the used colormap type changed.

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

Definition at line 750 of file mnedatatreeitem.cpp.

◆ onDataThresholdChanged()

void MneDataTreeItem::onDataThresholdChanged ( const QVariant &  vecThresholds)
protected

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 782 of file mnedatatreeitem.cpp.

◆ onInterpolationFunctionChanged()

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

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

Parameters
[in]dCancelDistThe new cancel distance. This function gets called whenever the function of the interpolation changed.
[in]sInterpolationFunctionThe new function name.

Definition at line 856 of file mnedatatreeitem.cpp.

◆ onNewInterpolationMatrixLeftAvailable()

void MneDataTreeItem::onNewInterpolationMatrixLeftAvailable ( QSharedPointer< Eigen::SparseMatrix< float > >  pMatInterpolationMatrixLeftHemi)
protectedvirtual

Set the new interpolation matrix.

Parameters
[in]pMatInterpolationMatrixLeftHemiThe new interpolation matrix for the left hemisphere.

Definition at line 716 of file mnedatatreeitem.cpp.

◆ onNewInterpolationMatrixRightAvailable()

void MneDataTreeItem::onNewInterpolationMatrixRightAvailable ( QSharedPointer< Eigen::SparseMatrix< float > >  pMatInterpolationMatrixRightHemi)
protectedvirtual

Set the new interpolation matrix.

Parameters
[in]pMatInterpolationMatrixRightHemiThe new interpolation matrix for the right hemisphere.

Definition at line 726 of file mnedatatreeitem.cpp.

◆ onNewRtRawData()

void MneDataTreeItem::onNewRtRawData ( const Eigen::VectorXd &  vecDataVectorLeftHemi,
const Eigen::VectorXd &  vecDataVectorRightHemi 
)
protectedvirtual

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

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

Definition at line 736 of file mnedatatreeitem.cpp.

◆ onNewRtSmoothedDataAvailable()

void MneDataTreeItem::onNewRtSmoothedDataAvailable ( const Eigen::MatrixX4f &  matColorMatrixLeftHemi,
const Eigen::MatrixX4f &  matColorMatrixRightHemi 
)
protected

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

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.

Definition at line 702 of file mnedatatreeitem.cpp.

◆ onNumberAveragesChanged()

void MneDataTreeItem::onNumberAveragesChanged ( const QVariant &  iNumAvr)
protected

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

Parameters
[in]iNumAvrThe new number of averages.

Definition at line 833 of file mnedatatreeitem.cpp.

◆ onTimeIntervalChanged()

void MneDataTreeItem::onTimeIntervalChanged ( const QVariant &  iMSec)
protected

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 771 of file mnedatatreeitem.cpp.

◆ onVisualizationTypeChanged()

void MneDataTreeItem::onVisualizationTypeChanged ( const QVariant &  sVisType)
protected

This function gets called whenever the preferred visualization type changes (single vertex, smoothing, annotation based). This functions translates from QString to m_iVisualizationType.

Parameters
[in]sVisTypeThe new visualization type.

Definition at line 803 of file mnedatatreeitem.cpp.

◆ setAlpha()

void MneDataTreeItem::setAlpha ( float  fAlpha)

Set the alpha value.

Parameters
[in]fAlphaThe new alpha value.

Definition at line 587 of file mnedatatreeitem.cpp.

◆ setColormapType()

void MneDataTreeItem::setColormapType ( const QString &  sColormap)

This function sets the color map type.

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

Definition at line 495 of file mnedatatreeitem.cpp.

◆ setInterpolationFunction()

void MneDataTreeItem::setInterpolationFunction ( const QString &  sInterpolationFunction)
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. This function sets the function that is used in the interpolation process.
[in]sInterpolationFunctionFunction that computes interpolation coefficients using the distance values.

Definition at line 562 of file mnedatatreeitem.cpp.

◆ setLoopState()

void MneDataTreeItem::setLoopState ( bool  state)

This function sets the loop flag.

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

Definition at line 431 of file mnedatatreeitem.cpp.

◆ setNumberAverages()

void MneDataTreeItem::setNumberAverages ( int  iNumberAverages)

This function sets the number of averages.

Parameters
[in]iNumberAveragesThe new number of averages.

Definition at line 479 of file mnedatatreeitem.cpp.

◆ setSFreq()

void MneDataTreeItem::setSFreq ( const double  dSFreq)

Set the sampling frequency.

Parameters
[in]dSFreqThe new sampling frequency.

Definition at line 578 of file mnedatatreeitem.cpp.

◆ setStreamingState()

void MneDataTreeItem::setStreamingState ( bool  state)

This function sets the data streaming.

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

Definition at line 447 of file mnedatatreeitem.cpp.

◆ setThresholds()

void MneDataTreeItem::setThresholds ( const QVector3D &  vecThresholds)

This function set the threshold values.

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

Definition at line 527 of file mnedatatreeitem.cpp.

◆ setTimeInterval()

void MneDataTreeItem::setTimeInterval ( int  iMSec)

This function sets the time interval for streaming.

Parameters
[in]iMSecThe waiting time inbetween samples.

Definition at line 463 of file mnedatatreeitem.cpp.

◆ setTransform() [1/2]

void MneDataTreeItem::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 605 of file mnedatatreeitem.cpp.

◆ setTransform() [2/2]

void MneDataTreeItem::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 626 of file mnedatatreeitem.cpp.

◆ setVisualizationType()

void MneDataTreeItem::setVisualizationType ( const QString &  sVisualizationType)

This function sets the visualization type.

Parameters
[in]sVisualizationTypeThe new visualization type ("Annotation based" etc.).

Definition at line 511 of file mnedatatreeitem.cpp.

Member Data Documentation

◆ m_bIsDataInit

bool DISP3DLIB::MneDataTreeItem::m_bIsDataInit
protected

The init flag.

Definition at line 393 of file mnedatatreeitem.h.

◆ m_bUseGPU

bool DISP3DLIB::MneDataTreeItem::m_bUseGPU
protected

The use GPU flag.

Definition at line 394 of file mnedatatreeitem.h.

◆ m_pInterpolationItemLeftCPU

QPointer<AbstractMeshTreeItem> DISP3DLIB::MneDataTreeItem::m_pInterpolationItemLeftCPU
protected

This item manages all 3d rendering and calculations for the left hemisphere.

Definition at line 398 of file mnedatatreeitem.h.

◆ m_pInterpolationItemLeftGPU

QPointer<GpuInterpolationItem> DISP3DLIB::MneDataTreeItem::m_pInterpolationItemLeftGPU
protected

This item manages all 3d rendering and calculations for the left hemisphere.

Definition at line 399 of file mnedatatreeitem.h.

◆ m_pInterpolationItemRightCPU

QPointer<AbstractMeshTreeItem> DISP3DLIB::MneDataTreeItem::m_pInterpolationItemRightCPU
protected

This item manages all 3d rendering and calculations for the right hemisphere.

Definition at line 400 of file mnedatatreeitem.h.

◆ m_pInterpolationItemRightGPU

QPointer<GpuInterpolationItem> DISP3DLIB::MneDataTreeItem::m_pInterpolationItemRightGPU
protected

This item manages all 3d rendering and calculations for the right hemisphere.

Definition at line 401 of file mnedatatreeitem.h.

◆ m_pRtSourceDataController

QPointer<RtSourceDataController> DISP3DLIB::MneDataTreeItem::m_pRtSourceDataController
protected

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

Definition at line 396 of file mnedatatreeitem.h.


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