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