v2.0.0
Loading...
Searching...
No Matches
mne_deriv_set.h
Go to the documentation of this file.
1//=============================================================================================================
19
20#ifndef MNEDERIVSET_H
21#define MNEDERIVSET_H
22
23//=============================================================================================================
24// INCLUDES
25//=============================================================================================================
26
27#include "mne_global.h"
28#include "mne_deriv.h"
29
30#include <fiff/fiff_ch_info.h>
31
32//=============================================================================================================
33// QT INCLUDES
34//=============================================================================================================
35
36#include <QList>
37#include <QMap>
38#include <QString>
39#include <QStringList>
40
41//=============================================================================================================
42// STL INCLUDES
43//=============================================================================================================
44
45#include <memory>
46#include <optional>
47#include <vector>
48
49//=============================================================================================================
50// DEFINE NAMESPACE MNELIB
51//=============================================================================================================
52
53namespace MNELIB
54{
55
56//=============================================================================================================
63{
64public:
66 using Definition = QPair<QString, QMap<QString, double>>;
67
68 MNEDerivSet() = default;
71 ~MNEDerivSet() = default;
72
73 //=========================================================================================================
80 {
81 append(other);
82 }
83
84 //=========================================================================================================
93 {
94 if (this != &other) {
95 derivs.clear();
96 append(other);
97 }
98 return *this;
99 }
100
101 //=========================================================================================================
109 static std::optional<MNEDerivSet> read(const QString& path);
110
111 //=========================================================================================================
125 static std::optional<MNEDerivSet> readText(const QString& path);
126
127 //=========================================================================================================
136 static MNEDerivSet fromDefinitions(const QList<Definition>& definitions, const QString& name = QString());
137
138 //=========================================================================================================
146 bool write(const QString& path) const;
147
148 //=========================================================================================================
154 QList<Definition> definitions() const;
155
156 //=========================================================================================================
162 void append(const MNEDerivSet& other);
163
164 //=========================================================================================================
173 std::unique_ptr<MNEDeriv> match(const QStringList& chNames) const;
174
175 //=========================================================================================================
181 int count() const;
182
183 std::vector<std::unique_ptr<MNEDeriv>> derivs;
184};
185
186//=============================================================================================================
187// INLINE DEFINITIONS
188//=============================================================================================================
189} // NAMESPACE MNELIB
190
191#endif // MNEDERIVSET_H
FIFF channel descriptor record (FIFF_CH_INFO): per-channel logical/scanner numbers,...
One channel derivation: a sparse matrix whose rows define virtual channels as weighted sums of record...
MNELIB shared-library export/import macros and library build metadata.
#define MNESHARED_EXPORT
Definition mne_global.h:40
Core MNE data structures (source spaces, source estimates, hemispheres).
Collection of channel derivations.
QPair< QString, QMap< QString, double > > Definition
MNEDerivSet(const MNEDerivSet &other)
MNEDerivSet & operator=(const MNEDerivSet &other)
void append(const MNEDerivSet &other)
MNEDerivSet(MNEDerivSet &&)=default
MNEDerivSet & operator=(MNEDerivSet &&)=default
std::vector< std::unique_ptr< MNEDeriv > > derivs
~MNEDerivSet()=default