23#ifndef CHANNELDATAMODEL_H
24#define CHANNELDATAMODEL_H
40#include <QReadWriteLock>
41#include <QSharedPointer>
102 typedef QSharedPointer<ChannelDataModel>
SPtr;
103 typedef QSharedPointer<const ChannelDataModel>
ConstSPtr;
113 void init(QSharedPointer<FIFFLIB::FiffInfo> pFiffInfo);
149 void setScaleMap(
const QMap<qint32, float> &scaleMap);
203 int channelCount()
const;
204 int firstSample()
const;
205 int totalSamples()
const;
228 float channelRms(
int channelIdx,
int firstSample,
int lastSample)
const;
247 QVector<float> decimatedVertices(
int channelIdx,
251 int &vboFirstSample)
const;
262 float sampleValueAt(
int channelIdx,
int sample)
const;
278 void rebuildDisplayInfo();
279 float amplitudeMaxForChannel(
int ch)
const;
280 QColor colorForChannel(
int ch)
const;
281 QString typeLabelForChannel(
int ch)
const;
283 mutable QReadWriteLock m_lock;
285 QSharedPointer<FIFFLIB::FiffInfo> m_pFiffInfo;
286 QVector<QVector<float>> m_channelData;
287 int m_firstSample = 0;
288 int m_maxStoredSamples = 0;
290 QMap<qint32, float> m_scaleMap;
291 QColor m_signalColor { Qt::darkGreen };
293 QVector<ChannelDisplayInfo> m_virtualDisplayInfo;
294 QVector<ChannelDisplayInfo> m_displayInfo;
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
FIFF file I/O, in-memory data structures and high-level readers/writers.
2-D display widgets and visualisation helpers (charts, topography, colour maps).
DetrendMode
Channel display metadata (read-only from the renderer's perspective).
Channel display metadata (read-only from the renderer's perspective).
void appendData(const Eigen::MatrixXd &data)
DetrendMode detrendMode() const
void setScaleMap(const QMap< qint32, float > &scaleMap)
void setScaleMapFromStrings(const QMap< QString, double > &scaleMap)
void setVirtualChannels(const QVector< ChannelDisplayInfo > &virtualChannels)
void setChannelBad(int channelIdx, bool bad)
void setRemoveDC(bool remove)
void init(QSharedPointer< FIFFLIB::FiffInfo > pFiffInfo)
void setSignalColor(const QColor &color)
void setData(const Eigen::MatrixXd &data, int firstSample=0)
void setMaxStoredSamples(int n)
ChannelDataModel(QObject *parent=nullptr)
QSharedPointer< ChannelDataModel > SPtr
QSharedPointer< const ChannelDataModel > ConstSPtr
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...