v2.0.0
Loading...
Searching...
No Matches
evokedsetmodel.cpp
Go to the documentation of this file.
1//=============================================================================================================
14
15//=============================================================================================================
16// INCLUDES
17//=============================================================================================================
18
19#include "evokedsetmodel.h"
20
21#include <fiff/fiff_info.h>
23
24//=============================================================================================================
25// QT INCLUDES
26//=============================================================================================================
27
28#include <QtConcurrent>
29#include <QFuture>
30#include <QPair>
31#include <QColor>
32
33//=============================================================================================================
34// EIGEN INCLUDES
35//=============================================================================================================
36
37//=============================================================================================================
38// STL INCLUDES
39//=============================================================================================================
40
41#include <iostream>
42
43//=============================================================================================================
44// USED NAMESPACES
45//=============================================================================================================
46
47using namespace DISPLIB;
48using namespace FIFFLIB;
49using namespace Eigen;
50
51//=============================================================================================================
52// DEFINE MEMBER METHODS
53//=============================================================================================================
54
56: QAbstractTableModel(parent)
57, m_qMapAverageColor(QSharedPointer<QMap<QString, QColor>>::create())
58, m_qMapAverageActivation(QSharedPointer<QMap<QString, bool>>::create())
59, m_qMapAverageColorOld(QSharedPointer<QMap<QString, QColor>>::create())
60, m_qMapAverageActivationOld(QSharedPointer<QMap<QString, bool>>::create())
61, m_bIsInit(false)
62, m_bIsFreezed(false)
63, m_bProjActivated(false)
64, m_bCompActivated(false)
65, m_fSps(1024.0f)
66{
67}
68
69//=============================================================================================================
70
74
75//=============================================================================================================
76//virtual functions
77int EvokedSetModel::rowCount(const QModelIndex& /*parent*/) const
78{
79 if (m_pEvokedSet) {
80 return m_pEvokedSet->info.nchan;
81 }
82
83 return 0;
84}
85
86//=============================================================================================================
87
88int EvokedSetModel::columnCount(const QModelIndex& /*parent*/) const
89{
90 return 3;
91}
92
93//=============================================================================================================
94
95QVariant EvokedSetModel::data(const QModelIndex& index, int role) const
96{
97 if (role != Qt::DisplayRole && role != Qt::BackgroundRole && role != EvokedSetModelRoles::GetAverageData) {
98 return QVariant();
99 }
100
101 if (index.isValid()) {
102 qint32 row = m_qMapIdxRowSelection[index.row()];
103
104 //******** first column (chname) ********
105 if (index.column() == 0 && role == Qt::DisplayRole) {
106 return QVariant(m_pEvokedSet->info.ch_names);
107 }
108
109 //******** second column (butterfly data plot) ********
110 //TODO: Bring this into a better structure see colum three
111 if (index.column() == 1) {
112 QVariant v;
113
114 QList<DISPLIB::AvrTypeRowVector> lRowDataPerTrigType;
116
117 switch (role) {
118 case Qt::DisplayRole: {
119 //pack all adjacent (after reload) RowVectorPairs into a QList
120
121 if (m_bIsFreezed) {
122 // data freeze
123 for (int i = 0; i < m_matDataFreeze.size(); ++i) {
124 pairItem.first = m_lAvrTypesFreeze.at(i);
125 pairItem.second = m_matDataFreeze.at(i).row(row);
126 lRowDataPerTrigType.append(pairItem);
127 }
128 } else {
129 // data stream
130 for (int i = 0; i < m_matData.size(); ++i) {
131 pairItem.first = m_lAvrTypes.at(i);
132 pairItem.second = m_matData.at(i).row(row);
133 lRowDataPerTrigType.append(pairItem);
134 }
135 }
136
137 v.setValue(lRowDataPerTrigType);
138
139 return v;
140 }
141 case Qt::BackgroundRole: {
142 // if(m_fiffInfo.bads.contains(m_chInfolist[row].ch_name)) {
143 // QBrush brush;
144 // brush.setStyle(Qt::SolidPattern);
145 // // qDebug() << m_chInfolist[row].ch_name << "is marked as bad, index:" << row;
146 // brush.setColor(Qt::red);
147 // return QVariant(brush);
148 // }
149 // else
150 return QVariant();
151 }
152 } // end role switch
153 } // end column check
154
155 //******** third column (2D layout data plot, this third column is needed because the te data needs to be in another structure for the 2D layout to work) ********
156 if (index.column() == 2) {
157 QVariant v;
158 QList<DISPLIB::AvrTypeRowVectorPair> lRowDataPerTrigType;
160
161 switch (role) {
163 if (m_bIsFreezed) {
164 // data freeze
165 for (int i = 0; i < m_matDataFreeze.size(); ++i) {
166 averagedData.first = m_lAvrTypesFreeze.at(i);
167 averagedData.second.first = m_matDataFreeze.at(i).data();
168 averagedData.second.second = m_matDataFreeze.at(i).cols();
169
170 lRowDataPerTrigType.append(averagedData);
171 }
172 } else {
173 for (int i = 0; i < m_matData.size(); ++i) {
174 averagedData.first = m_lAvrTypes.at(i);
175 averagedData.second.first = m_matData.at(i).data();
176 averagedData.second.second = m_matData.at(i).cols();
177
178 lRowDataPerTrigType.append(averagedData);
179 }
180 }
181
182 v.setValue(lRowDataPerTrigType);
183 }
184 }
185
186 return v;
187 } //end column check
188
189 } // end index.valid() check
190
191 return QVariant();
192}
193
194//=============================================================================================================
195
196QVariant EvokedSetModel::headerData(int section, Qt::Orientation orientation, int role) const
197{
198 if (role != Qt::DisplayRole && role != Qt::TextAlignmentRole) {
199 return QVariant();
200 }
201
202 if (orientation == Qt::Horizontal) {
203 switch (section) {
204 case 0: //chname column
205 return QVariant();
206 case 1: //data plot column
207 switch (role) {
208 case Qt::DisplayRole:
209 return QVariant("data plot");
210 case Qt::TextAlignmentRole:
211 return QVariant(Qt::AlignLeft);
212 }
213 return QVariant("data plot");
214 }
215 } else if (orientation == Qt::Vertical) {
216 QModelIndex chname = createIndex(section, 0);
217 switch (role) {
218 case Qt::DisplayRole:
219 return QVariant(data(chname).toString());
220 }
221 }
222
223 return QVariant();
224}
225
226//=============================================================================================================
227
228void EvokedSetModel::setEvokedSet(QSharedPointer<FiffEvokedSet> pEvokedSet)
229{
230 m_pEvokedSet = pEvokedSet;
231
232 if (!m_bIsInit) {
233 init();
234 }
235
236 updateData();
237}
238
239//=============================================================================================================
240
242{
243 if (!m_pEvokedSet) {
244 return;
245 }
246
247 beginResetModel();
248
249 //Generate bad channel index list
250 RowVectorXi sel; // = RowVectorXi(0,0);
251 QStringList emptyExclude;
252
253 if (m_pEvokedSet->info.bads.size() > 0) {
254 sel = FiffInfoBase::pick_channels(m_pEvokedSet->info.ch_names, m_pEvokedSet->info.bads, emptyExclude);
255 }
256
257 m_vecBadIdcs = sel;
258
259 m_fSps = m_pEvokedSet->info.sfreq;
260
261 m_matSparseProjMult = SparseMatrix<double>(m_pEvokedSet->info.chs.size(), m_pEvokedSet->info.chs.size());
262 m_matSparseCompMult = SparseMatrix<double>(m_pEvokedSet->info.chs.size(), m_pEvokedSet->info.chs.size());
263 m_matSparseProjCompMult = SparseMatrix<double>(m_pEvokedSet->info.chs.size(), m_pEvokedSet->info.chs.size());
264
265 m_matSparseProjMult.setIdentity();
266 m_matSparseCompMult.setIdentity();
267 m_matSparseProjCompMult.setIdentity();
268
269 m_qMapAverageActivation->clear();
270 m_qMapAverageColor->clear();
271 m_qMapAverageActivationOld->clear();
272 m_qMapAverageColorOld->clear();
273
274 //Create the initial SSP projector
275 updateProjection(m_pEvokedSet->info.projs);
276
277 //Create the initial Compensator projector
279
280 endResetModel();
281
283
284 m_bIsInit = true;
285}
286
287//=============================================================================================================
288
290{
291 if (!m_pEvokedSet) {
292 return;
293 }
294
295 m_matData.clear();
296 m_lAvrTypes.clear();
297
298 for (int i = 0; i < m_pEvokedSet->evoked.size(); ++i) {
299 bool doProj = m_bProjActivated && m_pEvokedSet->evoked.at(i).data.cols() > 0 && m_pEvokedSet->evoked.at(i).data.rows() == m_matProj.cols() ? true : false;
300
301 bool doComp = m_bCompActivated && m_pEvokedSet->evoked.at(i).data.cols() > 0 && m_pEvokedSet->evoked.at(i).data.rows() == m_matComp.cols() ? true : false;
302
303 if (doComp) {
304 if (doProj) {
305 //Comp + Proj
306 m_matData.append(m_matSparseProjCompMult * m_pEvokedSet->evoked.at(i).data);
307 } else {
308 //Comp
309 m_matData.append(m_matSparseCompMult * m_pEvokedSet->evoked.at(i).data);
310 }
311 } else {
312 if (doProj) {
313 //Proj
314 m_matData.append(m_matSparseProjMult * m_pEvokedSet->evoked.at(i).data);
315 } else {
316 //None - Raw
317 m_matData.append(m_pEvokedSet->evoked.at(i).data);
318 }
319 }
320
321 m_pairBaseline = m_pEvokedSet->evoked.at(i).baseline;
322
323 m_lAvrTypes.append(m_pEvokedSet->evoked.at(i).comment);
324 }
325
326 // Update average selection information map. Use old colors if existing.
327 QStringList slCurrentAvrComments;
328 int iSizeAvrActivation = m_qMapAverageActivation->size();
329 int iSizeAvrColor = m_qMapAverageColor->size();
330
331 for (int i = 0; i < m_pEvokedSet->evoked.size(); ++i) {
332 slCurrentAvrComments << m_pEvokedSet->evoked.at(i).comment;
333
334 if (!m_qMapAverageActivation->contains(m_pEvokedSet->evoked.at(i).comment)) {
335 if (m_qMapAverageActivationOld->contains(m_pEvokedSet->evoked.at(i).comment)) {
336 m_qMapAverageActivation->insert(m_pEvokedSet->evoked.at(i).comment, m_qMapAverageActivationOld->value(m_pEvokedSet->evoked.at(i).comment));
337 } else {
338 m_qMapAverageActivation->insert(m_pEvokedSet->evoked.at(i).comment, true);
339 }
340 }
341
342 if (!m_qMapAverageColor->contains(m_pEvokedSet->evoked.at(i).comment)) {
343 if (m_qMapAverageColorOld->contains(m_pEvokedSet->evoked.at(i).comment)) {
344 m_qMapAverageColor->insert(m_pEvokedSet->evoked.at(i).comment, m_qMapAverageColorOld->value(m_pEvokedSet->evoked.at(i).comment));
345 } else {
346 m_qMapAverageColor->insert(m_pEvokedSet->evoked.at(i).comment, Qt::yellow);
347 }
348 }
349 }
350
351 // Delete average color and activation if they are no longer present in the evoked set
352 QMutableMapIterator<QString, bool> itrActivation(*m_qMapAverageActivation);
353 while (itrActivation.hasNext()) {
354 itrActivation.next();
355 if (!slCurrentAvrComments.contains(itrActivation.key())) {
356 m_qMapAverageActivationOld->insert(itrActivation.key(), itrActivation.value());
357 itrActivation.remove();
358 }
359 }
360
361 QMutableMapIterator<QString, QColor> itrColor(*m_qMapAverageColor);
362 while (itrColor.hasNext()) {
363 itrColor.next();
364 if (!slCurrentAvrComments.contains(itrColor.key())) {
365 m_qMapAverageColorOld->insert(itrColor.key(), itrColor.value());
366 itrColor.remove();
367 }
368 }
369
370 // Only emit new colors and activations if evoked types were added or deleted
371 if (iSizeAvrColor != m_qMapAverageColor->size()) {
372 emit newAverageColorMap(m_qMapAverageColor);
373 }
374
375 if (iSizeAvrActivation != m_qMapAverageActivation->size()) {
376 emit newAverageActivationMap(m_qMapAverageActivation);
377 }
378
379 //Update data content
380 QModelIndex topLeft = this->index(0, 1);
381 QModelIndex bottomRight = this->index(m_pEvokedSet->info.nchan - 1, 1);
382 QVector<int> roles;
383 roles << Qt::DisplayRole;
384
385 emit dataChanged(topLeft, bottomRight, roles);
386}
387
388//=============================================================================================================
389
390QSharedPointer<QMap<QString, QColor>> EvokedSetModel::getAverageColor() const
391{
392 return m_qMapAverageColor;
393}
394
395//=============================================================================================================
396
397QSharedPointer<QMap<QString, bool>> EvokedSetModel::getAverageActivation() const
398{
399 return m_qMapAverageActivation;
400}
401
402//=============================================================================================================
403
404void EvokedSetModel::setAverageColor(const QSharedPointer<QMap<QString, QColor>> qMapAverageColor)
405{
406 m_qMapAverageColor = qMapAverageColor;
407}
408
409//=============================================================================================================
410
411void EvokedSetModel::setAverageActivation(const QSharedPointer<QMap<QString, bool>> qMapAverageActivation)
412{
413 m_qMapAverageActivation = qMapAverageActivation;
414}
415
416//=============================================================================================================
417
419{
420 if (row < m_qMapIdxRowSelection.size()) {
421 qint32 chRow = m_qMapIdxRowSelection[row];
422 return m_pEvokedSet->info.chs[chRow].kind;
423 }
424
425 return 0;
426}
427
428//=============================================================================================================
429
431{
432 bool bIsBad = false;
433
434 if (row < m_qMapIdxRowSelection.size()) {
435 qint32 chRow = m_qMapIdxRowSelection[row];
436 bIsBad = m_pEvokedSet->info.bads.contains(m_pEvokedSet->info.chs[chRow].ch_name);
437 }
438
439 return bIsBad;
440}
441
442//=============================================================================================================
443
445{
446 if (row < m_qMapIdxRowSelection.size()) {
447 qint32 chRow = m_qMapIdxRowSelection[row];
448 return m_pEvokedSet->info.chs[chRow].unit;
449 }
450
451 return FIFF_UNIT_NONE;
452}
453
454//=============================================================================================================
455
457{
458 if (row < m_qMapIdxRowSelection.size()) {
459 qint32 chRow = m_qMapIdxRowSelection[row];
460 return m_pEvokedSet->info.chs[chRow].chpos.coil_type;
461 }
462
463 return FIFFV_COIL_NONE;
464}
465
466//=============================================================================================================
467
469{
470 return m_bIsInit;
471}
472
473//=============================================================================================================
474
476{
477 qint32 iNumSamples = 0;
478
479 if (!m_matData.isEmpty()) {
480 iNumSamples = m_matData.first().cols();
481 }
482
483 return m_bIsInit ? iNumSamples : 0;
484}
485
486//=============================================================================================================
487
488QVariant EvokedSetModel::data(int row, int column, int role) const
489{
490 return data(index(row, column), role);
491}
492
493//=============================================================================================================
494
495const QMap<qint32, qint32>& EvokedSetModel::getIdxSelMap() const
496{
497 return m_qMapIdxRowSelection;
498}
499
500//=============================================================================================================
501
503{
504 qint32 iNumSamples = 0;
505
506 if (!m_matData.isEmpty()) {
507 iNumSamples = m_matData.first().cols();
508 }
509
510 return (qint32)(iNumSamples / m_fSps) - 1;
511}
512
513//=============================================================================================================
514
516{
517 int iPreSamples = 0;
518
519 if (!m_pEvokedSet) {
520 return iPreSamples;
521 }
522
523 if (!m_pEvokedSet->evoked.isEmpty()) {
524 RowVectorXf times = m_pEvokedSet->evoked.first().times;
525
526 // Search for stim onset via times
527 for (int i = 0; i < times.cols(); i++) {
528 if (times(i) == 0.0f) {
529 break;
530 }
531
532 iPreSamples++;
533 }
534 }
535
536 return iPreSamples;
537}
538
539//=============================================================================================================
540
542{
543 return m_fSps;
544}
545
546//=============================================================================================================
547
549{
550 return m_bIsFreezed;
551}
552
553//=============================================================================================================
554
556{
557 //std::cout<<floor((m_matData.cols()/m_fSps)*10)<<std::endl;
558 qint32 iNumSamples = 0;
559
560 if (!m_matData.isEmpty()) {
561 iNumSamples = m_matData.first().cols();
562 }
563
564 return floor((iNumSamples / m_fSps) * 10);
565}
566
567//=============================================================================================================
568
569QPair<QVariant, QVariant> EvokedSetModel::getBaselineInfo() const
570{
571 //qDebug()<<floor((m_matData.cols()/m_fSps)*10);
572 return m_pairBaseline;
573}
574
575//=============================================================================================================
576
578{
579 return m_matData.size();
580}
581
582//=============================================================================================================
583
584void EvokedSetModel::selectRows(const QList<qint32>& selection)
585{
586 if (!m_pEvokedSet) {
587 return;
588 }
589
590 beginResetModel();
591
592 m_qMapIdxRowSelection.clear();
593
594 qint32 count = 0;
595 for (qint32 i = 0; i < selection.size(); ++i) {
596 if (selection[i] < m_pEvokedSet->info.nchan) {
597 m_qMapIdxRowSelection.insert(count, selection[i]);
598 ++count;
599 }
600 }
601
602 emit newSelection(selection);
603
604 endResetModel();
605}
606
607//=============================================================================================================
608
610{
611 if (!m_pEvokedSet) {
612 return;
613 }
614
615 beginResetModel();
616
617 m_qMapIdxRowSelection.clear();
618
619 for (qint32 i = 0; i < m_pEvokedSet->info.nchan; ++i) {
620 m_qMapIdxRowSelection.insert(i, i);
621 }
622
623 endResetModel();
624}
625
626//=============================================================================================================
627
628void EvokedSetModel::updateProjection(const QList<FiffProj>& projs)
629{
630 if (!m_pEvokedSet) {
631 return;
632 }
633
634 // Update the SSP projector
635 if (m_pEvokedSet->info.chs.size() > 0) {
636 m_pEvokedSet->info.projs = projs;
637 m_bProjActivated = false;
638 for (qint32 i = 0; i < projs.size(); ++i) {
639 if (m_pEvokedSet->info.projs[i].active) {
640 m_bProjActivated = true;
641 }
642 }
643
644 m_pEvokedSet->info.make_projector(m_matProj);
645 //qDebug() << "EvokedSetModel::updateProjection - New projection calculated. m_bProjActivated is "<<m_bProjActivated;
646
647 //set columns of matrix to zero depending on bad channels indexes
648 RowVectorXi sel; // = RowVectorXi(0,0);
649 QStringList emptyExclude;
650
651 if (m_pEvokedSet->info.bads.size() > 0) {
652 sel = FiffInfoBase::pick_channels(m_pEvokedSet->info.ch_names, m_pEvokedSet->info.bads, emptyExclude);
653 }
654
655 m_vecBadIdcs = sel;
656
657 for (qint32 j = 0; j < m_vecBadIdcs.cols(); ++j) {
658 m_matProj.col(m_vecBadIdcs[j]).setZero();
659 }
660
661 // qDebug() << "Bads\n" << m_vecBadIdcs;
662 // qDebug() << "Proj\n";
663 // qDebug() << m_matProj.block(0,0,10,10);
664
665 qint32 nchan = m_pEvokedSet->info.nchan;
666 qint32 i, k;
667
668 typedef Eigen::Triplet<double> T;
669 std::vector<T> tripletList;
670 tripletList.reserve(nchan);
671
672 //
673 // Make proj sparse
674 //
675 tripletList.clear();
676 tripletList.reserve(m_matProj.rows() * m_matProj.cols());
677 for (i = 0; i < m_matProj.rows(); ++i) {
678 for (k = 0; k < m_matProj.cols(); ++k) {
679 if (m_matProj(i, k) != 0) {
680 tripletList.push_back(T(i, k, m_matProj(i, k)));
681 }
682 }
683 }
684
685 m_matSparseProjMult = SparseMatrix<double>(m_matProj.rows(), m_matProj.cols());
686 if (tripletList.size() > 0) {
687 m_matSparseProjMult.setFromTriplets(tripletList.begin(), tripletList.end());
688 }
689
690 //Create full multiplication matrix
691 m_matSparseProjCompMult = m_matSparseProjMult * m_matSparseCompMult;
692 }
693}
694
695//=============================================================================================================
696
698{
699 if (!m_pEvokedSet) {
700 return;
701 }
702
703 // Update the compensator
704 if (m_pEvokedSet->info.chs.size() > 0) {
705 if (to == 0) {
706 m_bCompActivated = false;
707 } else {
708 m_bCompActivated = true;
709 }
710
711 // qDebug()<<"to"<<to;
712 // qDebug()<<"from"<<from;
713 // qDebug()<<"m_bCompActivated"<<m_bCompActivated;
714
715 FiffCtfComp newComp;
716 m_pEvokedSet->info.make_compensator(0, to, newComp); //Do this always from 0 since we always read new raw data, we never actually perform a multiplication on already existing data
717
718 //We do not need to call this->m_pFiffInfo->set_current_comp(to);
719 //Because we will set the compensators to the coil in the same FiffInfo which is already used to write to file.
720 //Note that the data is written in raw form not in compensated form.
721 m_matComp = newComp.data->data;
722
723 //
724 // Make proj sparse
725 //
726 qint32 nchan = m_pEvokedSet->info.nchan;
727 qint32 i, k;
728
729 typedef Eigen::Triplet<double> T;
730 std::vector<T> tripletList;
731 tripletList.reserve(nchan);
732
733 tripletList.clear();
734 tripletList.reserve(m_matComp.rows() * m_matComp.cols());
735 for (i = 0; i < m_matComp.rows(); ++i) {
736 for (k = 0; k < m_matComp.cols(); ++k) {
737 if (m_matComp(i, k) != 0) {
738 tripletList.push_back(T(i, k, m_matComp(i, k)));
739 }
740 }
741 }
742
743 m_matSparseCompMult = SparseMatrix<double>(m_matComp.rows(), m_matComp.cols());
744 if (tripletList.size() > 0) {
745 m_matSparseCompMult.setFromTriplets(tripletList.begin(), tripletList.end());
746 }
747
748 //Create full multiplication matrix
749 m_matSparseProjCompMult = m_matSparseProjMult * m_matSparseCompMult;
750 }
751}
752
753//=============================================================================================================
754
756{
757 m_bIsFreezed = !m_bIsFreezed;
758
759 if (m_bIsFreezed) {
760 m_matDataFreeze = m_matData;
761 m_lAvrTypesFreeze = m_lAvrTypes;
762 }
763
764 //Update data content
765 QModelIndex topLeft = this->index(0, 1);
766 QModelIndex bottomRight = this->index(this->rowCount(), 1);
767 QVector<int> roles;
768 roles << Qt::DisplayRole;
769 emit dataChanged(topLeft, bottomRight, roles);
770}
771
772//=============================================================================================================
773
774QSharedPointer<FIFFLIB::FiffEvokedSet> EvokedSetModel::getEvokedSet()
775{
776 if (!m_pEvokedSet) {
777 return Q_NULLPTR;
778 } else {
779 return m_pEvokedSet;
780 }
781}
#define FIFF_UNIT_NONE
#define FIFFV_COIL_NONE
Set of averaged evoked responses sharing a FiffInfo, plus the ave-style category / rejection descript...
Full FIFF measurement metadata: everything from FIFFB_MEAS / FIFFB_MEAS_INFO needed to interpret a re...
QAbstractTableModel wrapping a FiffEvokedSet so views can render per-condition averages without copyi...
FIFF file I/O, in-memory data structures and high-level readers/writers.
qint32 fiff_int_t
Definition fiff_types.h:86
2-D display widgets and visualisation helpers (charts, topography, colour maps).
QPair< QString, DISPLIB::RowVectorPair > AvrTypeRowVectorPair
QPair< QString, Eigen::RowVectorXd > AvrTypeRowVector
FIFFLIB::fiff_int_t getUnit(qint32 row) const
QSharedPointer< QMap< QString, bool > > getAverageActivation() const
void setAverageActivation(const QSharedPointer< QMap< QString, bool > > qMapAverageActivation)
QVariant data(int row, int column, int role=Qt::DisplayRole) const
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
void newSelection(QList< qint32 > selection)
void newAverageActivationMap(const QSharedPointer< QMap< QString, bool > > qMapAverageActivation)
float getSamplingFrequency() const
void newAverageColorMap(const QSharedPointer< QMap< QString, QColor > > qMapAverageColor)
void selectRows(const QList< qint32 > &selection)
void updateProjection(const QList< FIFFLIB::FiffProj > &projs)
void setAverageColor(const QSharedPointer< QMap< QString, QColor > > qMapAverageColor)
const QMap< qint32, qint32 > & getIdxSelMap() const
qint32 getNumPreStimSamples() const
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
QPair< QVariant, QVariant > getBaselineInfo() const
QSharedPointer< QMap< QString, QColor > > getAverageColor() const
FIFFLIB::fiff_int_t getCoil(qint32 row) const
bool getIsChannelBad(qint32 row) const
void setEvokedSet(QSharedPointer< FIFFLIB::FiffEvokedSet > pEvokedSet)
QSharedPointer< FIFFLIB::FiffEvokedSet > getEvokedSet()
EvokedSetModel(QObject *parent=0)
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
FIFFLIB::fiff_int_t getKind(qint32 row) const
One CTF software-gradient compensation matrix: grade kind, calibration flag and the gradiometer × ref...
FiffNamedMatrix::SDPtr data
static Eigen::RowVectorXi pick_channels(const QStringList &ch_names, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList)