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