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 class FiffInfo;
56}
57
58namespace UTILSLIB {
59 class FilterKernel;
60}
61
62namespace RTPROCESSINGLIB {
63 class EventList;
64}
65
66//=============================================================================================================
67// DEFINE NAMESPACE DISPLIB
68//=============================================================================================================
69
70namespace DISPLIB
71{
72
73//=============================================================================================================
74// DISPLIB FORWARD DECLARATIONS
75//=============================================================================================================
76
79
80//=============================================================================================================
90{
91 Q_OBJECT
92
93public:
94 typedef QSharedPointer<RtFiffRawView> SPtr;
95 typedef QSharedPointer<const RtFiffRawView> ConstSPtr;
96
97 //=========================================================================================================
103 RtFiffRawView(const QString& sSettingsPath = "",
104 QWidget* parent = 0,
105 Qt::WindowFlags f = Qt::Widget);
106
107 //=========================================================================================================
112
113 //=========================================================================================================
118 void updateViewport();
119
120 //=========================================================================================================
127 void setSettingsPath(const QString& sSettingsPath);
128
129 //=========================================================================================================
135 void init(QSharedPointer<FIFFLIB::FiffInfo> &info);
136
137 //=========================================================================================================
143 void addData(const QList<Eigen::MatrixXd>& data);
144
145 //=========================================================================================================
151 Eigen::MatrixXd getLastBlock();
152
153 //=========================================================================================================
163 bool eventFilter(QObject *object, QEvent *event);
164
165 //=========================================================================================================
171 void setBackgroundColor(const QColor& backgroundColor);
172
173 //=========================================================================================================
179 QColor getBackgroundColor();
180
181 //=========================================================================================================
187 QMap<qint32, float> getScalingMap();
188
189 //=========================================================================================================
195 void setScalingMap(const QMap<qint32, float>& scaleMap);
196
197 //=========================================================================================================
203 void setSignalColor(const QColor& signalColor);
204
205 //=========================================================================================================
211 QColor getSignalColor();
212
213 //=========================================================================================================
217 void hideBadChannels();
218
219 //=========================================================================================================
226
227 //=========================================================================================================
233 void showSelectedChannelsOnly(const QStringList& selectedChannels);
234
235 //=========================================================================================================
241 void setZoom(double zoomFac);
242
243 //=========================================================================================================
249 double getZoom();
250
251 //=========================================================================================================
257 void setWindowSize(int T);
258
259 //=========================================================================================================
265 int getWindowSize();
266
267 //=========================================================================================================
273 void takeScreenshot(const QString& fileName);
274
275 //=========================================================================================================
281 void updateProjection(const QList<FIFFLIB::FiffProj>& projs);
282
283 //=========================================================================================================
289 void updateCompensator(int to);
290
291 //=========================================================================================================
297 void updateSpharaActivation(bool state);
298
299 //=========================================================================================================
307 void updateSpharaOptions(const QString& sSytemType,
308 int nBaseFctsFirst,
309 int nBaseFctsSecond);
310
311 //=========================================================================================================
317 void setFilter(const UTILSLIB::FilterKernel &filterData);
318
319 //=========================================================================================================
325 void setFilterActive(bool state);
326
327 //=========================================================================================================
333 void setFilterChannelType(const QString& channelType);
334
335 //=========================================================================================================
344 void triggerInfoChanged(const QMap<double, QColor>& colorMap,
345 bool active,
346 const QString& triggerCh,
347 double threshold);
348
349 //=========================================================================================================
355 void setDistanceTimeSpacer(int value);
356
357 //=========================================================================================================
364
365 //=========================================================================================================
369 void resetTriggerCounter();
370
371 //=========================================================================================================
375 void saveSettings();
376
377 //=========================================================================================================
381 void loadSettings();
382
383 //=========================================================================================================
387 void clearView();
388
389 //=========================================================================================================
393 float getSamplingFreq() const;
394
395protected:
396 //=========================================================================================================
402 void updateGuiMode(GuiMode mode);
403
404 //=========================================================================================================
411
412 //=========================================================================================================
418 void channelContextMenu(QPoint pos);
419
420 //=========================================================================================================
424 void applySelection();
425
426 //=========================================================================================================
430 void hideSelection();
431
432 //=========================================================================================================
436 void resetSelection();
437
438 //=========================================================================================================
442 void visibleRowsChanged();
443
444 //=========================================================================================================
448 void markChBad();
449
450 //=========================================================================================================
456 void onAddEvent(bool bChecked);
457
458 QPointer<QTableView> m_pTableView;
459 QPointer<DISPLIB::RtFiffRawViewDelegate> m_pDelegate;
460 QPointer<DISPLIB::RtFiffRawViewModel> m_pModel;
461
462 QMap<qint32,float> m_qMapChScaling;
463
464 qint32 m_iT;
465 QSharedPointer<FIFFLIB::FiffInfo> m_pFiffInfo;
468 QList<qint32> m_qListBadChannels;
475
477
478signals:
479 //=========================================================================================================
486 void markerMoved(QPoint position,
487 int activeRow);
488
489 //=========================================================================================================
493 void triggerDetected(int numberDetectedTriggers,
494 const QMap<int,QList<QPair<int,double> > >& mapDetectedTriggers);
495
496 //=========================================================================================================
501
502 //=========================================================================================================
503 void addSampleAsEvent(int iSample);
504};
505} // NAMESPACE
506
507#endif // RTFIFFRAWVIEW_H
Common base widget for every dockable Quick-Control settings panel in DISPLIB.
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
SSP projection item: a named projection vector set with active/desired flags, parsed from FIFFB_PROJ_...
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)
QPointer< DISPLIB::RtFiffRawViewModel > m_pModel
QMap< qint32, float > m_qMapChScaling
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 triggerDetected(int numberDetectedTriggers, const QMap< int, QList< QPair< int, double > > > &mapDetectedTriggers)
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
void markerMoved(QPoint position, int activeRow)
void addData(const QList< Eigen::MatrixXd > &data)
void updateProcessingMode(ProcessingMode mode)
void showSelectedChannelsOnly(const QStringList &selectedChannels)
void updateSpharaActivation(bool state)
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 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:88