v2.0.0
Loading...
Searching...
No Matches
rtfiffrawview.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef RTFIFFRAWVIEW_H
38#define RTFIFFRAWVIEW_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "../disp_global.h"
45#include "abstractview.h"
46
47#include <fiff/fiff_proj.h>
48
49//=============================================================================================================
50// QT INCLUDES
51//=============================================================================================================
52
53#include <QPointer>
54#include <QMap>
55
56//=============================================================================================================
57// EIGEN INCLUDES
58//=============================================================================================================
59
60#include <Eigen/Core>
61
62//=============================================================================================================
63// FORWARD DECLARATIONS
64//=============================================================================================================
65
66class QTableView;
67
68namespace FIFFLIB {
69 class FiffInfo;
70}
71
72namespace RTPROCESSINGLIB {
73 class FilterKernel;
74 class EventList;
75}
76
77//=============================================================================================================
78// DEFINE NAMESPACE DISPLIB
79//=============================================================================================================
80
81namespace DISPLIB
82{
83
84//=============================================================================================================
85// DISPLIB FORWARD DECLARATIONS
86//=============================================================================================================
87
90
91//=============================================================================================================
98{
99 Q_OBJECT
100
101public:
102 typedef QSharedPointer<RtFiffRawView> SPtr;
103 typedef QSharedPointer<const RtFiffRawView> ConstSPtr;
104
105 //=========================================================================================================
111 RtFiffRawView(const QString& sSettingsPath = "",
112 QWidget* parent = 0,
113 Qt::WindowFlags f = Qt::Widget);
114
115 //=========================================================================================================
120
121 //=========================================================================================================
127
128 //=========================================================================================================
135 void setSettingsPath(const QString& sSettingsPath);
136
137 //=========================================================================================================
143 void init(QSharedPointer<FIFFLIB::FiffInfo> &info);
144
145 //=========================================================================================================
151 void addData(const QList<Eigen::MatrixXd>& data);
152
153 //=========================================================================================================
159 Eigen::MatrixXd getLastBlock();
160
161 //=========================================================================================================
171 bool eventFilter(QObject *object, QEvent *event);
172
173 //=========================================================================================================
179 void setBackgroundColor(const QColor& backgroundColor);
180
181 //=========================================================================================================
187 QColor getBackgroundColor();
188
189 //=========================================================================================================
195 QMap<qint32, float> getScalingMap();
196
197 //=========================================================================================================
203 void setScalingMap(const QMap<qint32, float>& scaleMap);
204
205 //=========================================================================================================
211 void setSignalColor(const QColor& signalColor);
212
213 //=========================================================================================================
219 QColor getSignalColor();
220
221 //=========================================================================================================
225 void hideBadChannels();
226
227 //=========================================================================================================
234
235 //=========================================================================================================
241 void showSelectedChannelsOnly(const QStringList& selectedChannels);
242
243 //=========================================================================================================
249 void setZoom(double zoomFac);
250
251 //=========================================================================================================
257 double getZoom();
258
259 //=========================================================================================================
265 void setWindowSize(int T);
266
267 //=========================================================================================================
273 int getWindowSize();
274
275 //=========================================================================================================
281 void takeScreenshot(const QString& fileName);
282
283 //=========================================================================================================
289 void updateProjection(const QList<FIFFLIB::FiffProj>& projs);
290
291 //=========================================================================================================
297 void updateCompensator(int to);
298
299 //=========================================================================================================
305 void updateSpharaActivation(bool state);
306
307 //=========================================================================================================
315 void updateSpharaOptions(const QString& sSytemType,
316 int nBaseFctsFirst,
317 int nBaseFctsSecond);
318
319 //=========================================================================================================
325 void setFilter(const RTPROCESSINGLIB::FilterKernel &filterData);
326
327 //=========================================================================================================
333 void setFilterActive(bool state);
334
335 //=========================================================================================================
341 void setFilterChannelType(const QString& channelType);
342
343 //=========================================================================================================
352 void triggerInfoChanged(const QMap<double, QColor>& colorMap,
353 bool active,
354 const QString& triggerCh,
355 double threshold);
356
357 //=========================================================================================================
363 void setDistanceTimeSpacer(int value);
364
365 //=========================================================================================================
372
373 //=========================================================================================================
377 void resetTriggerCounter();
378
379 //=========================================================================================================
383 void saveSettings();
384
385 //=========================================================================================================
389 void loadSettings();
390
391 //=========================================================================================================
395 void clearView();
396
397 //=========================================================================================================
401 float getSamplingFreq() const;
402
403protected:
404 //=========================================================================================================
410 void updateGuiMode(GuiMode mode);
411
412 //=========================================================================================================
419
420 //=========================================================================================================
426 void channelContextMenu(QPoint pos);
427
428 //=========================================================================================================
432 void applySelection();
433
434 //=========================================================================================================
438 void hideSelection();
439
440 //=========================================================================================================
444 void resetSelection();
445
446 //=========================================================================================================
450 void visibleRowsChanged();
451
452 //=========================================================================================================
456 void markChBad();
457
458 //=========================================================================================================
464 void onAddEvent(bool bChecked);
465
466 QPointer<QTableView> m_pTableView;
467 QPointer<DISPLIB::RtFiffRawViewDelegate> m_pDelegate;
468 QPointer<DISPLIB::RtFiffRawViewModel> m_pModel;
469
470 QMap<qint32,float> m_qMapChScaling;
471
472 qint32 m_iT;
473 QSharedPointer<FIFFLIB::FiffInfo> m_pFiffInfo;
476 QList<qint32> m_qListBadChannels;
483
485
486signals:
487 //=========================================================================================================
494 void markerMoved(QPoint position,
495 int activeRow);
496
497 //=========================================================================================================
501 void triggerDetected(int numberDetectedTriggers,
502 const QMap<int,QList<QPair<int,double> > >& mapDetectedTriggers);
503
504 //=========================================================================================================
509
510 //=========================================================================================================
511 void addSampleAsEvent(int iSample);
512};
513} // NAMESPACE
514
515#endif // RTFIFFRAWVIEW_H
Declaration of the AbstractView Class.
disp library export/import macros.
#define DISPSHARED_EXPORT
Definition disp_global.h:51
FiffProj class declaration.
FIFF file I/O and data structures (raw, epochs, evoked, covariance, forward).
2-D display widgets and visualisation helpers (charts, topography, colour maps).
Real-time signal processing (filtering, averaging, HPI fitting, noise reduction).
AbstractView(QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
The RtFiffRawViewDelegate class represents a RTMSA delegate which creates the plot paths.
The RtFiffRawViewModel class implements the data access model for a real-time multi sample array data...
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)
QList< qint32 > m_qListCurrentSelection
void updateProjection(const QList< FIFFLIB::FiffProj > &projs)
void setZoom(double zoomFac)
void setFilter(const RTPROCESSINGLIB::FilterKernel &filterData)
void setScalingMap(const QMap< qint32, float > &scaleMap)
FIFF measurement file information.
Definition fiff_info.h:85
The FilterKernel class provides methods to create/design a FIR filter kernel.