MNE-CPP
0.1.9
A Framework for Electrophysiology
|
The RtFiffRawViewModel class implements the data access model for a real-time multi sample array data stream. More...
#include <rtfiffrawviewmodel.h>
Public Types | |
typedef QSharedPointer< RtFiffRawViewModel > | SPtr |
typedef QSharedPointer< const RtFiffRawViewModel > | ConstSPtr |
Signals | |
void | newSelection (const QList< qint32 > &selection) |
void | windowSizeChanged (int windowSize) |
void | triggerDetected (int numberDetectedTriggers, const QMap< int, QList< QPair< int, double > > > &mapDetectedTriggers) |
Public Member Functions | |
RtFiffRawViewModel (QObject *parent=0) | |
~RtFiffRawViewModel () | |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
void | setFiffInfo (QSharedPointer< FIFFLIB::FiffInfo > &p_pFiffInfo) |
void | setSamplingInfo (float sps, int T, bool bSetZero=false) |
Eigen::MatrixXd | getLastBlock () |
void | addData (const QList< Eigen::MatrixXd > &data) |
FIFFLIB::fiff_int_t | getKind (qint32 row) const |
FIFFLIB::fiff_int_t | getUnit (qint32 row) const |
FIFFLIB::fiff_int_t | getCoil (qint32 row) const |
qint32 | getMaxSamples () const |
qint32 | getCurrentSampleIndex () const |
double | getLastBlockFirstValue (int row) const |
const QMap< qint32, qint32 > & | getIdxSelMap () const |
void | selectRows (const QList< qint32 > &selection) |
void | hideRows (const QList< qint32 > &selection) |
void | resetSelection () |
void | toggleFreeze (const QModelIndex &index) |
void | setScaling (const QMap< qint32, float > &p_qMapChScaling) |
void | updateProjection (const QList< FIFFLIB::FiffProj > &projs) |
void | updateCompensator (int to) |
void | updateSpharaActivation (bool state) |
void | updateSpharaOptions (const QString &sSytemType, int nBaseFctsFirst, int nBaseFctsSecond) |
void | setFilter (QList< RTPROCESSINGLIB::FilterKernel > filterData) |
void | setFilterActive (bool state) |
void | setBackgroundColor (const QColor &color) |
void | setFilterChannelType (const QString &channelType) |
void | createFilterChannelList (QStringList channelNames) |
void | markChBad (QModelIndex ch, bool status) |
void | markChBad (QModelIndexList chlist, bool status) |
void | triggerInfoChanged (const QMap< double, QColor > &colorMap, bool active, QString triggerCh, double threshold) |
void | distanceTimeSpacerChanged (int value) |
void | resetTriggerCounter () |
qint32 | numVLines () const |
bool | isFreezed () const |
const QMap< qint32, float > & | getScaling () const |
QList< QPair< int, double > > | getDetectedTriggers () const |
QList< QPair< int, double > > | getDetectedTriggersOld () const |
QMap< double, QColor > | getTriggerColor () const |
int | getNumberOfTimeSpacers () const |
double | getTriggerThreshold () const |
QString | getTriggerName () const |
int | getCurrentTriggerIndex () const |
bool | triggerDetectionActive () const |
int | getCurrentOverlapAddDelay () const |
int | getFirstSampleOffset () const |
double | getMaxValueFromRawViewModel (int row) const |
void | addEvent (int iSample) |
std::unique_ptr< std::vector< EVENTSLIB::Event > > | getEventsToDisplay (int iBegin, int iEnd) const |
The RtFiffRawViewModel class implements the data access model for a real-time multi sample array data stream.
DECLARE CLASS RtFiffRawViewModel
Definition at line 101 of file rtfiffrawviewmodel.h.
typedef QSharedPointer<const RtFiffRawViewModel> DISPLIB::RtFiffRawViewModel::ConstSPtr |
Const shared pointer type for RtFiffRawViewModel.
Definition at line 107 of file rtfiffrawviewmodel.h.
typedef QSharedPointer<RtFiffRawViewModel> DISPLIB::RtFiffRawViewModel::SPtr |
Shared pointer type for RtFiffRawViewModel.
Definition at line 106 of file rtfiffrawviewmodel.h.
RtFiffRawViewModel::RtFiffRawViewModel | ( | QObject * | parent = 0 | ) |
Constructs an real-time multi sample array table model for the given parent.
[in] | parent | parent of the table model. |
Definition at line 83 of file rtfiffrawviewmodel.cpp.
RtFiffRawViewModel::~RtFiffRawViewModel | ( | ) |
Destructs RtFiffRawViewModel and stops the use of Shared Memory within the Event Manager.
Definition at line 115 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::addData | ( | const QList< Eigen::MatrixXd > & | data | ) |
Adds multiple time points (QVector) for a channel set (VectorXd)
[in] | data | data to add (Time points of channel samples). |
Definition at line 417 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::addEvent | ( | int | iSample | ) |
Adds event based on input parameters
[in] |
Definition at line 1384 of file rtfiffrawviewmodel.cpp.
|
virtual |
Returns the number of columns for the children of the given parent.
[in] | parent | not used. |
Definition at line 133 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::createFilterChannelList | ( | QStringList | channelNames | ) |
Create list of channels which are to be filtered based on channel names
[in] | channelNames | the channel names which are to be filtered. |
Definition at line 970 of file rtfiffrawviewmodel.cpp.
|
virtual |
Returns the data stored under the given role for the item referred to by the index.
[in] | index | determines item location. |
[in] | role | role to return. |
Definition at line 140 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::distanceTimeSpacerChanged | ( | int | value | ) |
distanceTimeSpacerChanged changes the distance of the time spacers
[in] | value | the new distance for the time spacers. |
Definition at line 1065 of file rtfiffrawviewmodel.cpp.
fiff_int_t RtFiffRawViewModel::getCoil | ( | qint32 | row | ) | const |
Returns the coil type of a given channel number
[in] | row | row number which correspodns to a given channel. |
Definition at line 598 of file rtfiffrawviewmodel.cpp.
|
inline |
Returns the current overlap add delay
Definition at line 826 of file rtfiffrawviewmodel.h.
|
inline |
Returns the current sample index which represents the index which the next incoming data will be stored at in the data
Definition at line 690 of file rtfiffrawviewmodel.h.
|
inline |
Returns the current trigger channel index
Definition at line 812 of file rtfiffrawviewmodel.h.
|
inline |
Returns current detected trigger flanks
Definition at line 758 of file rtfiffrawviewmodel.h.
|
inline |
Returns old detected trigger flanks
Definition at line 774 of file rtfiffrawviewmodel.h.
std::unique_ptr< std::vector< EVENTSLIB::Event > > RtFiffRawViewModel::getEventsToDisplay | ( | int | iBegin, |
int | iEnd | ||
) | const |
Returns events between two samples
[in] | iBegin | Lower bound for sample (inclusive). |
[in] | iEnd | Upper bound for sample (exclusive). |
Definition at line 1391 of file rtfiffrawviewmodel.cpp.
|
inline |
Get offset of first drawn sample in the window
Definition at line 836 of file rtfiffrawviewmodel.h.
|
inline |
Returns a map which conatins the channel idx and its corresponding selection status
Definition at line 718 of file rtfiffrawviewmodel.h.
fiff_int_t RtFiffRawViewModel::getKind | ( | qint32 | row | ) | const |
Returns the kind of a given channel number
[in] | row | row number which correspodns to a given channel. |
Definition at line 574 of file rtfiffrawviewmodel.cpp.
MatrixXd RtFiffRawViewModel::getLastBlock | ( | ) |
Returns the last received data block.
Definition at line 406 of file rtfiffrawviewmodel.cpp.
|
inline |
Returns the first value of the last complete data display block
[in] | row | row for which the first value is to be returned. |
Definition at line 705 of file rtfiffrawviewmodel.h.
|
inline |
Returns the maximal number of samples of the downsampled data to display
Definition at line 683 of file rtfiffrawviewmodel.h.
double RtFiffRawViewModel::getMaxValueFromRawViewModel | ( | int | row | ) | const |
Get maximum range of respective channel type. range value in FiffChInfo does not seem to contain a reasonable value
[in] | Row | of the model |
Definition at line 1321 of file rtfiffrawviewmodel.cpp.
|
inline |
Returns the current number for the time spacers
Definition at line 790 of file rtfiffrawviewmodel.h.
|
inline |
Returns current scaling
Definition at line 739 of file rtfiffrawviewmodel.h.
|
inline |
Returns current trigger color
Definition at line 746 of file rtfiffrawviewmodel.h.
|
inline |
Returns the current trigger name
Definition at line 805 of file rtfiffrawviewmodel.h.
|
inline |
Returns the current trigger threshold
Definition at line 798 of file rtfiffrawviewmodel.h.
fiff_int_t RtFiffRawViewModel::getUnit | ( | qint32 | row | ) | const |
Returns the unit of a given channel number
[in] | row | row number which correspodns to a given channel. |
Definition at line 586 of file rtfiffrawviewmodel.cpp.
|
virtual |
Returns the data for the given role and section in the header with the specified orientation.
[in] | section | For horizontal headers, the section number corresponds to the column number. Similarly, for vertical headers, the section number corresponds to the row number. |
[in] | orientation | Qt::Horizontal or Qt::Vertical. |
[in] | role | role to show. |
Definition at line 206 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::hideRows | ( | const QList< qint32 > & | selection | ) |
Hides the given list of channel
[in] | selection | channel index list to select. |
Definition at line 631 of file rtfiffrawviewmodel.cpp.
|
inline |
Returns current freezing status
Definition at line 732 of file rtfiffrawviewmodel.h.
void RtFiffRawViewModel::markChBad | ( | QModelIndex | ch, |
bool | status | ||
) |
markChBad marks the selected channels as bad/good in m_chInfolist
[in] | chlist | index that is selected for marking. |
[in] | status,status=1 | -> mark as bad, status=0 -> mark as good. |
Definition at line 1011 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::markChBad | ( | QModelIndexList | chlist, |
bool | status | ||
) |
markChBad marks the selected channels as bad/good in m_chInfolist
[in] | chlist | is the list of indices that are selected for marking. |
[in] | status,status=1 | -> mark as bad, status=0 -> mark as good. |
Definition at line 1083 of file rtfiffrawviewmodel.cpp.
|
signal |
Emmited when new selcetion was made
[in] | selection | list of all selected channels. |
|
inline |
Returns the number of vertical lines (one per second)
Definition at line 725 of file rtfiffrawviewmodel.h.
void RtFiffRawViewModel::resetSelection | ( | ) |
Resets the current selection (selects all channels)
Definition at line 648 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::resetTriggerCounter | ( | ) |
resetTriggerCounter resets the trigger counter
Definition at line 1076 of file rtfiffrawviewmodel.cpp.
|
virtual |
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.
[in] | parent | not used. |
Definition at line 122 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::selectRows | ( | const QList< qint32 > & | selection | ) |
Selects the given list of channel indeces and unselect all other channels
[in] | selection | channel index list to select. |
Definition at line 610 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::setBackgroundColor | ( | const QColor & | color | ) |
Set the background color
[in] | color | The background color. |
Definition at line 924 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::setFiffInfo | ( | QSharedPointer< FIFFLIB::FiffInfo > & | p_pFiffInfo | ) |
Sets corresponding fiff information
[in] | p_pFiffInfo | The corresponding fiff information. |
Definition at line 298 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::setFilter | ( | QList< RTPROCESSINGLIB::FilterKernel > | filterData | ) |
Set new filter parameters
[in] | filterData | list of the new filter. |
Definition at line 895 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::setFilterActive | ( | bool | state | ) |
Set filter activation
[in] | state | filter on/off flag. |
Definition at line 917 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::setFilterChannelType | ( | const QString & | channelType | ) |
Sets the type of channel which are to be filtered
[in] | channelType | the channel type which is to be filtered (EEG, MEG, All). |
Definition at line 931 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::setSamplingInfo | ( | float | sps, |
int | T, | ||
bool | bSetZero = false |
||
) |
Sets the sampling information and calculates the resulting downsampling factor between actual sps and desired sps
[in] | sps | Samples per second of incomming data. |
[in] | T | Time window length to display. |
[in] | bSetZero | If data should be set to zero. Default is false. |
Definition at line 375 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::setScaling | ( | const QMap< qint32, float > & | p_qMapChScaling | ) |
Set scaling channel scaling
[in] | p_qMapChScaling | Map of scaling factors. |
Definition at line 686 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::toggleFreeze | ( | const QModelIndex & | index | ) |
Toggle freeze for all channels when a channel is double clicked
[in] | index | of the channel which has been double clicked. |
Definition at line 663 of file rtfiffrawviewmodel.cpp.
|
signal |
Emmited when trigger detection was performed
|
inline |
Returns whether trigger detection is active or not
Definition at line 819 of file rtfiffrawviewmodel.h.
void RtFiffRawViewModel::triggerInfoChanged | ( | const QMap< double, QColor > & | colorMap, |
bool | active, | ||
QString | triggerCh, | ||
double | threshold | ||
) |
markChBad marks the selected channels as bad/good in m_chInfolist
[in] | colorMap | color for each trigger channel. |
[in] | activ | real time trigger detection active. |
[in] | triggerCh | current trigger channel to scan. |
[in] | threshold | threshold for the detection process. |
Definition at line 1038 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::updateCompensator | ( | int | to | ) |
Update the compensator
[in] | to | Compensator to use in fiff constant format FiffCtfComp.kind (NOT FiffCtfComp.ctfkind). |
Definition at line 755 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::updateProjection | ( | const QList< FIFFLIB::FiffProj > & | projs | ) |
Update the SSP projection
[in] | projs | The new projectors. |
Definition at line 695 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::updateSpharaActivation | ( | bool | state | ) |
Update the SPHARA operator
[in] | state | The current state of teh SPHARA tool. |
Definition at line 809 of file rtfiffrawviewmodel.cpp.
void RtFiffRawViewModel::updateSpharaOptions | ( | const QString & | sSytemType, |
int | nBaseFctsFirst, | ||
int | nBaseFctsSecond | ||
) |
Update the SPHARA operator
[in] | sSystemType | The current acquisition system type (VectorView, BabyMEG, EEG). |
[in] | nBaseFctsFirst | The new number of basis function to use for the first SPHARA operator. |
[in] | nBaseFctsSecond | The new number of basis function to use for the second SPHARA operator. |
Definition at line 816 of file rtfiffrawviewmodel.cpp.
|
signal |
Emmited when the window size/max number of samples changed
[in] | windowSize | number of samples in the window. |