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_fSps(1024.0f)
58, m_bIsFreezed(false)
59, m_bProjActivated(false)
60, m_bCompActivated(false)
61, m_bIsInit(false)
62, m_qMapAverageColor(QSharedPointer<QMap<QString, QColor> >::create())
63, m_qMapAverageActivation(QSharedPointer<QMap<QString, bool> >::create())
64, m_qMapAverageColorOld(QSharedPointer<QMap<QString, QColor> >::create())
65, m_qMapAverageActivationOld(QSharedPointer<QMap<QString, bool> >::create())
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_lAvrTypes.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 break;
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 break;
154 }
155 } // end role switch
156 } // end column check
157
158 //******** 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) ********
159 if(index.column()==2) {
160 QVariant v;
161 QList<DISPLIB::AvrTypeRowVectorPair> lRowDataPerTrigType;
163
164 switch(role) {
166 if(m_bIsFreezed){
167 // data freeze
168 for(int i = 0; i < m_matDataFreeze.size(); ++i) {
169 averagedData.first = m_lAvrTypes.at(i);
170 averagedData.second.first = m_matDataFreeze.at(i).data();
171 averagedData.second.second = m_matDataFreeze.at(i).cols();
172
173 lRowDataPerTrigType.append(averagedData);
174 }
175 } else {
176 for(int i = 0; i < m_matData.size(); ++i) {
177 averagedData.first = m_lAvrTypes.at(i);
178 averagedData.second.first = m_matData.at(i).data();
179 averagedData.second.second = m_matData.at(i).cols();
180
181 lRowDataPerTrigType.append(averagedData);
182 }
183 }
184
185 v.setValue(lRowDataPerTrigType);
186 }
187 }
188
189 return v;
190 }//end column check
191
192 } // end index.valid() check
193
194 return QVariant();
195}
196
197//=============================================================================================================
198
199QVariant EvokedSetModel::headerData(int section, Qt::Orientation orientation, int role) const
200{
201 if(role != Qt::DisplayRole && role != Qt::TextAlignmentRole) {
202 return QVariant();
203 }
204
205 if(orientation == Qt::Horizontal) {
206 switch(section) {
207 case 0: //chname column
208 return QVariant();
209 case 1: //data plot column
210 switch(role) {
211 case Qt::DisplayRole:
212 return QVariant("data plot");
213 case Qt::TextAlignmentRole:
214 return QVariant(Qt::AlignLeft);
215 }
216 return QVariant("data plot");
217 }
218 }
219 else if(orientation == Qt::Vertical) {
220 QModelIndex chname = createIndex(section,0);
221 switch(role) {
222 case Qt::DisplayRole:
223 return QVariant(data(chname).toString());
224 }
225 }
226
227 return QVariant();
228}
229
230//=============================================================================================================
231
232void EvokedSetModel::setEvokedSet(QSharedPointer<FiffEvokedSet> pEvokedSet)
233{
234 m_pEvokedSet = pEvokedSet;
235
236 if(!m_bIsInit) {
237 init();
238 }
239
240 updateData();
241}
242
243//=============================================================================================================
244
246{
247 if(!m_pEvokedSet) {
248 return;
249 }
250
251 beginResetModel();
252
253 //Generate bad channel index list
254 RowVectorXi sel;// = RowVectorXi(0,0);
255 QStringList emptyExclude;
256
257 if(m_pEvokedSet->info.bads.size() > 0) {
258 sel = FiffInfoBase::pick_channels(m_pEvokedSet->info.ch_names, m_pEvokedSet->info.bads, emptyExclude);
259 }
260
261 m_vecBadIdcs = sel;
262
263 m_fSps = m_pEvokedSet->info.sfreq;
264
265 m_matSparseProjMult = SparseMatrix<double>(m_pEvokedSet->info.chs.size(),m_pEvokedSet->info.chs.size());
266 m_matSparseCompMult = SparseMatrix<double>(m_pEvokedSet->info.chs.size(),m_pEvokedSet->info.chs.size());
267 m_matSparseProjCompMult = SparseMatrix<double>(m_pEvokedSet->info.chs.size(),m_pEvokedSet->info.chs.size());
268
269 m_matSparseProjMult.setIdentity();
270 m_matSparseCompMult.setIdentity();
271 m_matSparseProjCompMult.setIdentity();
272
273 m_qMapAverageActivation->clear();
274 m_qMapAverageColor->clear();
275 m_qMapAverageActivationOld->clear();
276 m_qMapAverageColorOld->clear();
277
278 //Create the initial SSP projector
279 updateProjection(m_pEvokedSet->info.projs);
280
281 //Create the initial Compensator projector
283
284 endResetModel();
285
287
288 m_bIsInit = true;
289}
290
291//=============================================================================================================
292
294{
295 if(!m_pEvokedSet) {
296 return;
297 }
298
299 m_matData.clear();
300 m_lAvrTypes.clear();
301
302 for(int i = 0; i < m_pEvokedSet->evoked.size(); ++i) {
303 bool doProj = m_bProjActivated && m_pEvokedSet->evoked.at(i).data.cols() > 0 && m_pEvokedSet->evoked.at(i).data.rows() == m_matProj.cols() ? true : false;
304
305 bool doComp = m_bCompActivated && m_pEvokedSet->evoked.at(i).data.cols() > 0 && m_pEvokedSet->evoked.at(i).data.rows() == m_matComp.cols() ? true : false;
306
307 if(doComp) {
308 if(doProj) {
309 //Comp + Proj
310 m_matData.append(m_matSparseProjCompMult * m_pEvokedSet->evoked.at(i).data);
311 } else {
312 //Comp
313 m_matData.append(m_matSparseCompMult * m_pEvokedSet->evoked.at(i).data);
314 }
315 } else {
316 if(doProj) {
317 //Proj
318 m_matData.append(m_matSparseProjMult * m_pEvokedSet->evoked.at(i).data);
319 } else {
320 //None - Raw
321 m_matData.append(m_pEvokedSet->evoked.at(i).data);
322 }
323 }
324
325 m_pairBaseline = m_pEvokedSet->evoked.at(i).baseline;
326
327 m_lAvrTypes.append(m_pEvokedSet->evoked.at(i).comment);
328 }
329
330 // Update average selection information map. Use old colors if existing.
331 QStringList slCurrentAvrComments;
332 int iSizeAvrActivation = m_qMapAverageActivation->size();
333 int iSizeAvrColor = m_qMapAverageColor->size();
334
335 for(int i = 0; i < m_pEvokedSet->evoked.size(); ++i) {
336 slCurrentAvrComments << m_pEvokedSet->evoked.at(i).comment;
337
338 if(!m_qMapAverageActivation->contains(m_pEvokedSet->evoked.at(i).comment)) {
339 if(m_qMapAverageActivationOld->contains(m_pEvokedSet->evoked.at(i).comment)) {
340 m_qMapAverageActivation->insert(m_pEvokedSet->evoked.at(i).comment, m_qMapAverageActivationOld->value(m_pEvokedSet->evoked.at(i).comment));
341 } else {
342 m_qMapAverageActivation->insert(m_pEvokedSet->evoked.at(i).comment, true);
343 }
344 }
345
346 if(!m_qMapAverageColor->contains(m_pEvokedSet->evoked.at(i).comment)) {
347 if(m_qMapAverageColorOld->contains(m_pEvokedSet->evoked.at(i).comment)) {
348 m_qMapAverageColor->insert(m_pEvokedSet->evoked.at(i).comment, m_qMapAverageColorOld->value(m_pEvokedSet->evoked.at(i).comment));
349 } else {
350 m_qMapAverageColor->insert(m_pEvokedSet->evoked.at(i).comment, Qt::yellow);
351 }
352 }
353 }
354
355 // Delete average color and activation if they are no longer present in the evoked set
356 QMutableMapIterator<QString, bool> itrActivation(*m_qMapAverageActivation);
357 while(itrActivation.hasNext()) {
358 itrActivation.next();
359 if(!slCurrentAvrComments.contains(itrActivation.key())) {
360 m_qMapAverageActivationOld->insert(itrActivation.key(),itrActivation.value());
361 itrActivation.remove();
362 }
363 }
364
365 QMutableMapIterator<QString, QColor> itrColor(*m_qMapAverageColor);
366 while(itrColor.hasNext()) {
367 itrColor.next();
368 if(!slCurrentAvrComments.contains(itrColor.key())) {
369 m_qMapAverageColorOld->insert(itrColor.key(),itrColor.value());
370 itrColor.remove();
371 }
372 }
373
374 // Only emit new colors and activations if evoked types were added or deleted
375 if(iSizeAvrColor != m_qMapAverageColor->size()) {
376 emit newAverageColorMap(m_qMapAverageColor);
377 }
378
379 if(iSizeAvrActivation != m_qMapAverageActivation->size()) {
380 emit newAverageActivationMap(m_qMapAverageActivation);
381 }
382
383 //Update data content
384 QModelIndex topLeft = this->index(0,1);
385 QModelIndex bottomRight = this->index(m_pEvokedSet->info.nchan-1,1);
386 QVector<int> roles; roles << Qt::DisplayRole;
387
388 emit dataChanged(topLeft, bottomRight, roles);
389}
390
391//=============================================================================================================
392
393QSharedPointer<QMap<QString, QColor> > EvokedSetModel::getAverageColor() const
394{
395 return m_qMapAverageColor;
396}
397
398//=============================================================================================================
399
400QSharedPointer<QMap<QString, bool> > EvokedSetModel::getAverageActivation() const
401{
402 return m_qMapAverageActivation;
403}
404
405//=============================================================================================================
406
407void EvokedSetModel::setAverageColor(const QSharedPointer<QMap<QString, QColor> > qMapAverageColor)
408{
409 m_qMapAverageColor = qMapAverageColor;
410}
411
412//=============================================================================================================
413
414void EvokedSetModel::setAverageActivation(const QSharedPointer<QMap<QString, bool> > qMapAverageActivation)
415{
416 m_qMapAverageActivation = qMapAverageActivation;
417}
418
419//=============================================================================================================
420
421fiff_int_t EvokedSetModel::getKind(qint32 row) const
422{
423 if(row < m_qMapIdxRowSelection.size()) {
424 qint32 chRow = m_qMapIdxRowSelection[row];
425 return m_pEvokedSet->info.chs[chRow].kind;
426 }
427
428 return 0;
429}
430
431//=============================================================================================================
432
434{
435 bool bIsBad = false;
436
437 if(row < m_qMapIdxRowSelection.size()) {
438 qint32 chRow = m_qMapIdxRowSelection[row];
439 bIsBad = m_pEvokedSet->info.bads.contains(m_pEvokedSet->info.chs[chRow].ch_name);
440 }
441
442 return bIsBad;
443}
444
445//=============================================================================================================
446
447fiff_int_t EvokedSetModel::getUnit(qint32 row) const
448{
449 if(row < m_qMapIdxRowSelection.size()) {
450 qint32 chRow = m_qMapIdxRowSelection[row];
451 return m_pEvokedSet->info.chs[chRow].unit;
452 }
453
454 return FIFF_UNIT_NONE;
455}
456
457//=============================================================================================================
458
459fiff_int_t EvokedSetModel::getCoil(qint32 row) const
460{
461 if(row < m_qMapIdxRowSelection.size()) {
462 qint32 chRow = m_qMapIdxRowSelection[row];
463 return m_pEvokedSet->info.chs[chRow].chpos.coil_type;
464 }
465
466 return FIFFV_COIL_NONE;
467}
468
469//=============================================================================================================
470
472{
473 return m_bIsInit;
474}
475
476//=============================================================================================================
477
479{
480 qint32 iNumSamples = 0;
481
482 if(!m_matData.isEmpty()) {
483 iNumSamples = m_matData.first().cols();
484 }
485
486 return m_bIsInit ? iNumSamples : 0;
487}
488
489//=============================================================================================================
490
491QVariant EvokedSetModel::data(int row, int column, int role) const
492{
493 return data(index(row, column), role);
494}
495
496//=============================================================================================================
497
498const QMap<qint32,qint32>& EvokedSetModel::getIdxSelMap() const
499{
500 return m_qMapIdxRowSelection;
501}
502
503//=============================================================================================================
504
506{
507 qint32 iNumSamples = 0;
508
509 if(!m_matData.isEmpty()) {
510 iNumSamples = m_matData.first().cols();
511 }
512
513 return (qint32)(iNumSamples/m_fSps) - 1;
514}
515
516//=============================================================================================================
517
519{
520 int iPreSamples = 0;
521
522 if(!m_pEvokedSet) {
523 return iPreSamples;
524 }
525
526 if (!m_pEvokedSet->evoked.isEmpty()) {
527 RowVectorXf times = m_pEvokedSet->evoked.first().times;
528
529 // Search for stim onset via times
530 for(int i = 0; i < times.cols(); i++) {
531 if(times(i) == 0.0f) {
532 break;
533 }
534
535 iPreSamples++;
536 }
537 }
538
539 return iPreSamples;
540}
541
542//=============================================================================================================
543
545{
546 return m_fSps;
547}
548
549//=============================================================================================================
550
552{
553 return m_bIsFreezed;
554}
555
556//=============================================================================================================
557
559{
560 //std::cout<<floor((m_matData.cols()/m_fSps)*10)<<std::endl;
561 qint32 iNumSamples = 0;
562
563 if(!m_matData.isEmpty()) {
564 iNumSamples = m_matData.first().cols();
565 }
566
567 return floor((iNumSamples/m_fSps)*10);
568}
569
570//=============================================================================================================
571
572QPair<QVariant,QVariant> EvokedSetModel::getBaselineInfo() const
573{
574 //qDebug()<<floor((m_matData.cols()/m_fSps)*10);
575 return m_pairBaseline;
576}
577
578//=============================================================================================================
579
581{
582 return m_matData.size();
583}
584
585//=============================================================================================================
586
587void EvokedSetModel::selectRows(const QList<qint32> &selection)
588{
589 if(!m_pEvokedSet) {
590 return;
591 }
592
593 beginResetModel();
594
595 m_qMapIdxRowSelection.clear();
596
597 qint32 count = 0;
598 for(qint32 i = 0; i < selection.size(); ++i) {
599 if(selection[i] < m_pEvokedSet->info.nchan) {
600 m_qMapIdxRowSelection.insert(count,selection[i]);
601 ++count;
602 }
603 }
604
605 emit newSelection(selection);
606
607 endResetModel();
608}
609
610//=============================================================================================================
611
613{
614 if(!m_pEvokedSet) {
615 return;
616 }
617
618 beginResetModel();
619
620 m_qMapIdxRowSelection.clear();
621
622 for(qint32 i = 0; i < m_pEvokedSet->info.nchan; ++i) {
623 m_qMapIdxRowSelection.insert(i,i);
624 }
625
626 endResetModel();
627}
628
629//=============================================================================================================
630
631void EvokedSetModel::updateProjection(const QList<FiffProj>& projs)
632{
633 if(!m_pEvokedSet) {
634 return;
635 }
636
637 // Update the SSP projector
638 if(m_pEvokedSet->info.chs.size() > 0) {
639 m_pEvokedSet->info.projs = projs;
640 m_bProjActivated = false;
641 for(qint32 i = 0; i < projs.size(); ++i) {
642 if(m_pEvokedSet->info.projs[i].active) {
643 m_bProjActivated = true;
644 }
645 }
646
647 m_pEvokedSet->info.make_projector(m_matProj);
648 //qDebug() << "EvokedSetModel::updateProjection - New projection calculated. m_bProjActivated is "<<m_bProjActivated;
649
650 //set columns of matrix to zero depending on bad channels indexes
651 RowVectorXi sel;// = RowVectorXi(0,0);
652 QStringList emptyExclude;
653
654 if(m_pEvokedSet->info.bads.size() > 0) {
655 sel = FiffInfoBase::pick_channels(m_pEvokedSet->info.ch_names, m_pEvokedSet->info.bads, emptyExclude);
656 }
657
658 m_vecBadIdcs = sel;
659
660 for(qint32 j = 0; j < m_vecBadIdcs.cols(); ++j) {
661 m_matProj.col(m_vecBadIdcs[j]).setZero();
662 }
663
664// qDebug() << "Bads\n" << m_vecBadIdcs;
665// qDebug() << "Proj\n";
666// qDebug() << m_matProj.block(0,0,10,10);
667
668 qint32 nchan = m_pEvokedSet->info.nchan;
669 qint32 i, k;
670
671 typedef Eigen::Triplet<double> T;
672 std::vector<T> tripletList;
673 tripletList.reserve(nchan);
674
675 //
676 // Make proj sparse
677 //
678 tripletList.clear();
679 tripletList.reserve(m_matProj.rows()*m_matProj.cols());
680 for(i = 0; i < m_matProj.rows(); ++i) {
681 for(k = 0; k < m_matProj.cols(); ++k) {
682 if(m_matProj(i,k) != 0) {
683 tripletList.push_back(T(i, k, m_matProj(i,k)));
684 }
685 }
686 }
687
688 m_matSparseProjMult = SparseMatrix<double>(m_matProj.rows(),m_matProj.cols());
689 if(tripletList.size() > 0) {
690 m_matSparseProjMult.setFromTriplets(tripletList.begin(), tripletList.end());
691 }
692
693 //Create full multiplication matrix
694 m_matSparseProjCompMult = m_matSparseProjMult * m_matSparseCompMult;
695 }
696}
697
698//=============================================================================================================
699
701{
702 if(!m_pEvokedSet) {
703 return;
704 }
705
706 // Update the compensator
707 if(m_pEvokedSet->info.chs.size() > 0)
708 {
709 if(to == 0) {
710 m_bCompActivated = false;
711 } else {
712 m_bCompActivated = true;
713 }
714
715// qDebug()<<"to"<<to;
716// qDebug()<<"from"<<from;
717// qDebug()<<"m_bCompActivated"<<m_bCompActivated;
718
719 FiffCtfComp newComp;
720 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
721
722 //We do not need to call this->m_pFiffInfo->set_current_comp(to);
723 //Because we will set the compensators to the coil in the same FiffInfo which is already used to write to file.
724 //Note that the data is written in raw form not in compensated form.
725 m_matComp = newComp.data->data;
726
727 //
728 // Make proj sparse
729 //
730 qint32 nchan = m_pEvokedSet->info.nchan;
731 qint32 i, k;
732
733 typedef Eigen::Triplet<double> T;
734 std::vector<T> tripletList;
735 tripletList.reserve(nchan);
736
737 tripletList.clear();
738 tripletList.reserve(m_matComp.rows()*m_matComp.cols());
739 for(i = 0; i < m_matComp.rows(); ++i) {
740 for(k = 0; k < m_matComp.cols(); ++k) {
741 if(m_matComp(i,k) != 0) {
742 tripletList.push_back(T(i, k, m_matComp(i,k)));
743 }
744 }
745 }
746
747 m_matSparseCompMult = SparseMatrix<double>(m_matComp.rows(),m_matComp.cols());
748 if(tripletList.size() > 0) {
749 m_matSparseCompMult.setFromTriplets(tripletList.begin(), tripletList.end());
750 }
751
752 //Create full multiplication matrix
753 m_matSparseProjCompMult = m_matSparseProjMult * m_matSparseCompMult;
754 }
755}
756
757//=============================================================================================================
758
760{
761 m_bIsFreezed = !m_bIsFreezed;
762
763 if(m_bIsFreezed) {
764 m_matDataFreeze = m_matData;
765 }
766
767 //Update data content
768 QModelIndex topLeft = this->index(0,1);
769 QModelIndex bottomRight = this->index(this->rowCount(),1);
770 QVector<int> roles; roles << Qt::DisplayRole;
771 emit dataChanged(topLeft, bottomRight, roles);
772}
773
774//=============================================================================================================
775
776QSharedPointer<FIFFLIB::FiffEvokedSet> EvokedSetModel::getEvokedSet()
777{
778 if (!m_pEvokedSet){
779 return Q_NULLPTR;
780 } else {
781 return m_pEvokedSet;
782 }
783}
QAbstractTableModel wrapping a FiffEvokedSet so views can render per-condition averages without copyi...
#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...
FIFF file I/O, in-memory data structures and high-level readers/writers.
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)