RtFiffRawViewModel
Namespace: DISPLIB · Library: Display Library
#include <disp/rtfiffrawviewmodel.h>
class DISPLIB::RtFiffRawViewModel
Circular-buffer QAbstractTableModel feeding the real-time FIFF raw browser.
Keeps the last few seconds of streaming FIFF data in a per-channel ring buffer and forwards bad-channel flips, trigger detections and annotation edits back to the underlying FiffInfo / event list.
Inheritance
Public Methods
RtFiffRawViewModel(parent)
Constructs an real-time multi sample array table model for the given parent.
Parameters:
- parent : *QObject ** parent of the table model.
~RtFiffRawViewModel()
Destructs RtFiffRawViewModel and stops the use of Shared Memory within the Event Manager.
rowCount(parent)
Returns the number of rows under the given parent.
When the parent is valid it means that rowCount is returning the number of children of parent.
Parameters:
- parent : const QModelIndex & not used.
Returns:
- int — number of rows.
columnCount(parent)
Returns the number of columns for the children of the given parent.
Parameters:
- parent : const QModelIndex & not used.
Returns:
- int — number of columns.
data(index, role)
Returns the data stored under the given role for the item referred to by the index.
Parameters:
-
index : const QModelIndex & determines item location.
-
role : int role to return.
Returns:
- QVariant — accessed data.
headerData(section, orientation, role)
Returns the data for the given role and section in the header with the specified orientation.
Parameters:
-
section : int For horizontal headers, the section number corresponds to the column number. Similarly, for vertical headers, the section number corresponds to the row number.
-
orientation : Qt::Orientation Qt::Horizontal or Qt::Vertical.
-
role : int role to show.
Returns:
- QVariant — accessed eader data.
setFiffInfo(p_pFiffInfo)
Sets corresponding fiff information.
Parameters:
- p_pFiffInfo : QSharedPointer<FiffInfo> & The corresponding fiff information.
setSamplingInfo(sps, T, bSetZero)
Sets the sampling information and calculates the resulting downsampling factor between actual sps and desired sps.
Parameters:
-
sps : float Samples per second of incomming data.
-
T : int Time window length to display.
-
bSetZero : bool If data should be set to zero. Default is false.
getLastBlock()
Returns the last received data block.
Returns:
- Eigen::MatrixXd — the last data block.
addData(data)
Adds multiple time points (QVector) for a channel set (VectorXd).
Parameters:
- data : const QList< Eigen::MatrixXd > & data to add (Time points of channel samples).
getKind(row)
Returns the kind of a given channel number.
Parameters:
- row : qint32 row number which correspodns to a given channel.
Returns:
- FIFFLIB::fiff_int_t — kind of given channel number.
getUnit(row)
Returns the unit of a given channel number.
Parameters:
- row : qint32 row number which correspodns to a given channel.
Returns:
- FIFFLIB::fiff_int_t — unit of given channel number.
getCoil(row)
Returns the coil type of a given channel number.
Parameters:
- row : qint32 row number which correspodns to a given channel.
Returns:
- FIFFLIB::fiff_int_t — coil type of given channel number.
getMaxSamples()
Returns the maximal number of samples of the downsampled data to display.
Returns:
- qint32 — the maximal number of samples.