v2.0.0
Loading...
Searching...
No Matches
rtfiffrawview.h
Go to the documentation of this file.
1//=============================================================================================================
22
23#ifndef RTFIFFRAWVIEW_H
24#define RTFIFFRAWVIEW_H
25
26//=============================================================================================================
27// INCLUDES
28//=============================================================================================================
29
30#include "../disp_global.h"
31#include "abstractview.h"
32
33#include <fiff/fiff_proj.h>
34
35//=============================================================================================================
36// QT INCLUDES
37//=============================================================================================================
38
39#include <QPointer>
40#include <QMap>
41
42//=============================================================================================================
43// EIGEN INCLUDES
44//=============================================================================================================
45
46#include <Eigen/Core>
47
48//=============================================================================================================
49// FORWARD DECLARATIONS
50//=============================================================================================================
51
52class QTableView;
53
54namespace FIFFLIB
55{
56class FiffInfo;
57}
58
59namespace UTILSLIB
60{
61class FilterKernel;
62}
63
64namespace RTPROCESSINGLIB
65{
66class EventList;
67}
68
69//=============================================================================================================
70// DEFINE NAMESPACE DISPLIB
71//=============================================================================================================
72
73namespace DISPLIB
74{
75
76//=============================================================================================================
77// DISPLIB FORWARD DECLARATIONS
78//=============================================================================================================
79
82
83//=============================================================================================================
93{
94 Q_OBJECT
95
96public:
97 typedef QSharedPointer<RtFiffRawView> SPtr;
98 typedef QSharedPointer<const RtFiffRawView> ConstSPtr;
99
100 //=========================================================================================================
108 RtFiffRawView(const QString& sSettingsPath = "",
109 QWidget* parent = 0,
110 Qt::WindowFlags f = Qt::Widget);
111
112 //=========================================================================================================
117
118 //=========================================================================================================
123 void updateViewport();
124
125 //=========================================================================================================
132 void setSettingsPath(const QString& sSettingsPath);
133
134 //=========================================================================================================
140 void init(QSharedPointer<FIFFLIB::FiffInfo>& info);
141
142 //=========================================================================================================
148 void addData(const QList<Eigen::MatrixXd>& lMatData);
149
150 //=========================================================================================================
156 Eigen::MatrixXd getLastBlock();
157
158 //=========================================================================================================
168 bool eventFilter(QObject* object, QEvent* event);
169
170 //=========================================================================================================
176 void setBackgroundColor(const QColor& backgroundColor);
177
178 //=========================================================================================================
184 QColor getBackgroundColor();
185
186 //=========================================================================================================
192 QMap<qint32, float> getScalingMap();
193
194 //=========================================================================================================
200 void setScalingMap(const QMap<qint32, float>& scaleMap);
201
202 //=========================================================================================================
208 void setSignalColor(const QColor& signalColor);
209
210 //=========================================================================================================
216 QColor getSignalColor();
217
218 //=========================================================================================================
222 void hideBadChannels();
223
224 //=========================================================================================================
231
232 //=========================================================================================================
238 void showSelectedChannelsOnly(const QStringList& selectedChannels);
239
240 //=========================================================================================================
246 void setZoom(double zoomFac);
247
248 //=========================================================================================================
254 double getZoom();
255
256 //=========================================================================================================
262 void setWindowSize(int T);
263
264 //=========================================================================================================
270 int getWindowSize();
271
272 //=========================================================================================================
278 void takeScreenshot(const QString& fileName);
279
280 //=========================================================================================================
286 void updateProjection(const QList<FIFFLIB::FiffProj>& projs);
287
288 //=========================================================================================================
294 void updateCompensator(int to);
295
296 //=========================================================================================================
302 void updateSpharaActivation(bool state);
303
304 //=========================================================================================================
312 void updateSpharaOptions(const QString& sSytemType,
313 int nBaseFctsFirst,
314 int nBaseFctsSecond);
315
316 //=========================================================================================================
322 void setFilter(const UTILSLIB::FilterKernel& filterData);
323
324 //=========================================================================================================
330 void setFilterActive(bool state);
331
332 //=========================================================================================================
338 void setFilterChannelType(const QString& channelType);
339
340 //=========================================================================================================
349 void triggerInfoChanged(const QMap<double, QColor>& colorMap,
350 bool active,
351 const QString& triggerCh,
352 double threshold);
353
354 //=========================================================================================================
360 void setDistanceTimeSpacer(int value);
361
362 //=========================================================================================================
369
370 //=========================================================================================================
374 void resetTriggerCounter();
375
376 //=========================================================================================================
380 void saveSettings();
381
382 //=========================================================================================================
386 void loadSettings();
387
388 //=========================================================================================================
392 void clearView();
393
394 //=========================================================================================================
400 float getSamplingFreq() const;
401
402 //=========================================================================================================
409 void setCrosshairEnabled(bool enabled);
410
411 //=========================================================================================================
415 bool crosshairEnabled() const;
416
417protected:
418 //=========================================================================================================
424 void updateGuiMode(GuiMode mode);
425
426 //=========================================================================================================
433
434 //=========================================================================================================
440 void channelContextMenu(QPoint pos);
441
442 //=========================================================================================================
446 void applySelection();
447
448 //=========================================================================================================
452 void hideSelection();
453
454 //=========================================================================================================
458 void resetSelection();
459
460 //=========================================================================================================
464 void visibleRowsChanged();
465
466 //=========================================================================================================
473 void updateRowHeight();
474
475 //=========================================================================================================
479 void markChBad();
480
481 //=========================================================================================================
487 void onAddEvent(bool bChecked);
488
489 //=========================================================================================================
497 int columnAt(int iX) const;
498
499 //=========================================================================================================
505 void updateCrosshair(const QPoint& position);
506
507 QPointer<QTableView> m_pTableView;
508 QPointer<DISPLIB::RtFiffRawViewDelegate> m_pDelegate;
509 QPointer<DISPLIB::RtFiffRawViewModel> m_pModel;
510
511 QMap<qint32, float> m_qMapChScaling;
512
513 qint32 m_iT;
514 QSharedPointer<FIFFLIB::FiffInfo> m_pFiffInfo;
517 QList<qint32> m_qListBadChannels;
525
527
528signals:
529 //=========================================================================================================
536 void markerMoved(QPoint position,
537 int activeRow);
538
539 //=========================================================================================================
543 void triggerDetected(int numberDetectedTriggers,
544 const QMap<int, QList<QPair<int, double>>>& mapDetectedTriggers);
545
546 //=========================================================================================================
551
552 //=========================================================================================================
553 void addSampleAsEvent(int iSample);
554
555 //=========================================================================================================
565 void cursorDataChanged(float timeSec, float amplitude,
566 const QString& channelName, const QString& unitLabel);
567};
568} // NAMESPACE
569
570#endif // RTFIFFRAWVIEW_H
SSP projection item: a named projection vector set with active/desired flags, parsed from FIFFB_PROJ_...
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
Common base widget for every dockable Quick-Control settings panel in DISPLIB.
FIFF file I/O, in-memory data structures and high-level readers/writers.
2-D display widgets and visualisation helpers (charts, topography, colour maps).
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
AbstractView(QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
QAbstractItemDelegate painting one FIFF channel's signal trace inside RtFiffRawView.
Circular-buffer QAbstractTableModel feeding the real-time FIFF raw browser.
void setFilterChannelType(const QString &channelType)
void cursorDataChanged(float timeSec, float amplitude, const QString &channelName, const QString &unitLabel)
QPointer< DISPLIB::RtFiffRawViewModel > m_pModel
void init(QSharedPointer< FIFFLIB::FiffInfo > &info)
QMap< qint32, float > getScalingMap()
QSharedPointer< const RtFiffRawView > ConstSPtr
RtFiffRawView(const QString &sSettingsPath="", QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
void takeScreenshot(const QString &fileName)
void updateGuiMode(GuiMode mode)
bool eventFilter(QObject *object, QEvent *event)
void addData(const QList< Eigen::MatrixXd > &lMatData)
void triggerDetected(int numberDetectedTriggers, const QMap< int, QList< QPair< int, double > > > &mapDetectedTriggers)
QMap< qint32, float > m_qMapChScaling
void setBackgroundColor(const QColor &backgroundColor)
void addSampleAsEvent(int iSample)
void updateSpharaOptions(const QString &sSytemType, int nBaseFctsFirst, int nBaseFctsSecond)
void setDistanceTimeSpacer(int value)
QList< qint32 > m_qListBadChannels
float getSamplingFreq() const
QStringList m_slSelectedChannels
void channelContextMenu(QPoint pos)
QSharedPointer< RtFiffRawView > SPtr
Eigen::MatrixXd getLastBlock()
QPointer< QTableView > m_pTableView
int columnAt(int iX) const
void markerMoved(QPoint position, int activeRow)
void updateProcessingMode(ProcessingMode mode)
void showSelectedChannelsOnly(const QStringList &selectedChannels)
void updateSpharaActivation(bool state)
void setCrosshairEnabled(bool enabled)
QSharedPointer< FIFFLIB::FiffInfo > m_pFiffInfo
void triggerInfoChanged(const QMap< double, QColor > &colorMap, bool active, const QString &triggerCh, double threshold)
void setSignalColor(const QColor &signalColor)
void setSettingsPath(const QString &sSettingsPath)
QPointer< DISPLIB::RtFiffRawViewDelegate > m_pDelegate
void updateCrosshair(const QPoint &position)
void onAddEvent(bool bChecked)
void setFilterActive(bool state)
void setFilter(const UTILSLIB::FilterKernel &filterData)
QList< qint32 > m_qListCurrentSelection
void updateProjection(const QList< FIFFLIB::FiffProj > &projs)
void setZoom(double zoomFac)
void setScalingMap(const QMap< qint32, float > &scaleMap)
The FilterKernel class provides methods to create/design a FIR filter kernel.
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Definition fiff_info.h:90