MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
rtfiffrawview.h
Go to the documentation of this file.
1//=============================================================================================================
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
88class RtFiffRawViewModel;
89class RtFiffRawViewDelegate;
90
91//=============================================================================================================
98{
99 Q_OBJECT
100
101public:
102 typedef QSharedPointer<RtFiffRawView> SPtr;
103 typedef QSharedPointer<const RtFiffRawView> ConstSPtr;
105 //=========================================================================================================
111 RtFiffRawView(const QString& sSettingsPath = "",
112 QWidget* parent = 0,
113 Qt::WindowFlags f = Qt::Widget);
114
115 //=========================================================================================================
120
121 //=========================================================================================================
126 void updateOpenGLViewport();
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 //=========================================================================================================
233 bool getBadChannelHideStatus();
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 //=========================================================================================================
371 int getDistanceTimeSpacer();
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 //=========================================================================================================
418 void updateProcessingMode(ProcessingMode mode);
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;
470 QMap<qint32,float> m_qMapChScaling;
472 qint32 m_iT;
473 QSharedPointer<FIFFLIB::FiffInfo> m_pFiffInfo;
476 QList<qint32> m_qListBadChannels;
482 int m_iClickPosX;
483
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
#define DISPSHARED_EXPORT
Definition disp_global.h:55
FiffProj class declaration.
The AbstractView class provides the base calss for all Disp viewers.
The RtFiffRawView class provides a real-time channel view display.
QPointer< DISPLIB::RtFiffRawViewModel > m_pModel
QMap< qint32, float > m_qMapChScaling
QSharedPointer< const RtFiffRawView > ConstSPtr
void triggerDetected(int numberDetectedTriggers, const QMap< int, QList< QPair< int, double > > > &mapDetectedTriggers)
QList< qint32 > m_qListBadChannels
QStringList m_slSelectedChannels
QSharedPointer< RtFiffRawView > SPtr
QPointer< QTableView > m_pTableView
void markerMoved(QPoint position, int activeRow)
QSharedPointer< FIFFLIB::FiffInfo > m_pFiffInfo
QPointer< DISPLIB::RtFiffRawViewDelegate > m_pDelegate
QList< qint32 > m_qListCurrentSelection
The FilterKernel class provides methods to create/design a FIR filter kernel.
AbstractView class declaration.