v2.0.0
Loading...
Searching...
No Matches
inv_beamformer.h
Go to the documentation of this file.
1//=============================================================================================================
21
22#ifndef INV_BEAMFORMER_H
23#define INV_BEAMFORMER_H
24
25//=============================================================================================================
26// INCLUDES
27//=============================================================================================================
28
29#include "../inv_global.h"
31
32//=============================================================================================================
33// EIGEN INCLUDES
34//=============================================================================================================
35
36#include <Eigen/Core>
37
38//=============================================================================================================
39// QT INCLUDES
40//=============================================================================================================
41
42#include <QSharedPointer>
43#include <QString>
44#include <QStringList>
45#include <QList>
46
47//=============================================================================================================
48// STL INCLUDES
49//=============================================================================================================
50
51#include <vector>
52
53//=============================================================================================================
54// DEFINE NAMESPACE INVLIB
55//=============================================================================================================
56
57namespace INVLIB
58{
59
60//=============================================================================================================
72{
73public:
74 typedef QSharedPointer<InvBeamformer> SPtr;
75 typedef QSharedPointer<const InvBeamformer> ConstSPtr;
76
77 //=========================================================================================================
82
83 //=========================================================================================================
87 inline bool isValid() const;
88
89 //=========================================================================================================
93 inline int nSources() const;
94
95 //=========================================================================================================
99 inline int nChannels() const;
100
101 //=========================================================================================================
105 inline int nOrient() const;
106
107 //=========================================================================================================
111 inline int nFreqs() const;
112
113public:
114 QString kind;
115
116 // --- Spatial filter weights ---
117 std::vector<Eigen::MatrixXd> weights;
119
120 // --- Whitening & projection ---
121 Eigen::MatrixXd whitener;
122 Eigen::MatrixXd proj;
123
124 // --- Source space info ---
125 Eigen::VectorXi vertices;
126 Eigen::MatrixX3f sourceNn;
127 bool isFreOri;
129 QString srcType;
130 QString subject;
131
132 // --- Filter parameters ---
133 QStringList chNames;
137 double reg;
138 int rank;
139
140 // --- Max-power orientation (if pickOri == MaxPower) ---
141 Eigen::MatrixX3d maxPowerOri;
142
143 // --- Frequency info (DICS only) ---
144 Eigen::VectorXd frequencies;
145};
146
147//=============================================================================================================
148// INLINE DEFINITIONS
149//=============================================================================================================
150
151inline bool InvBeamformer::isValid() const
152{
153 return !weights.empty() && weights[0].size() > 0;
154}
155
156//=============================================================================================================
157
158inline int InvBeamformer::nSources() const
159{
160 return nSourcesTotal;
161}
162
163//=============================================================================================================
164
165inline int InvBeamformer::nChannels() const
166{
167 return weights.empty() ? 0 : static_cast<int>(weights[0].cols());
168}
169
170//=============================================================================================================
171
172inline int InvBeamformer::nOrient() const
173{
174 return isFreOri ? 3 : 1;
175}
176
177//=============================================================================================================
178
179inline int InvBeamformer::nFreqs() const
180{
181 return static_cast<int>(weights.size());
182}
183
184} // NAMESPACE INVLIB
185
186#endif // INV_BEAMFORMER_H
Strongly-typed enumerations shared by the LCMV and DICS beamformer pipelines.
INVLIB library export/import macros, build-info accessors, and namespace docstring for the inverse-so...
#define INVSHARED_EXPORT
Definition inv_global.h:38
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
BeamformerPickOri pickOri
Eigen::VectorXd frequencies
BeamformerWeightNorm weightNorm
Eigen::MatrixX3f sourceNn
BeamformerInversion inversion
Eigen::MatrixX3d maxPowerOri
QSharedPointer< InvBeamformer > SPtr
QSharedPointer< const InvBeamformer > ConstSPtr
Eigen::VectorXi vertices
std::vector< Eigen::MatrixXd > weights
Eigen::MatrixXd whitener