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