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//=============================================================================================================
74{
75public:
76 typedef QSharedPointer<InvBeamformer> SPtr;
77 typedef QSharedPointer<const InvBeamformer> ConstSPtr;
78
79 //=========================================================================================================
84
85 //=========================================================================================================
91 inline bool isValid() const;
92
93 //=========================================================================================================
99 inline int nSources() const;
100
101 //=========================================================================================================
107 inline int nChannels() const;
108
109 //=========================================================================================================
115 inline int nOrient() const;
116
117 //=========================================================================================================
123 inline int nFreqs() const;
124
125public:
126 QString kind;
127
128 // --- Spatial filter weights ---
129 std::vector<Eigen::MatrixXd> weights;
131
132 // --- Whitening & projection ---
133 Eigen::MatrixXd whitener;
134 Eigen::MatrixXd proj;
135
136 // --- Source space info ---
137 Eigen::VectorXi vertices;
138 int nVerticesLh = -1;
139 Eigen::MatrixX3f sourceNn;
140 bool isFreOri;
142 QString srcType;
143 QString subject;
144
145 // --- Filter parameters ---
146 QStringList chNames;
150 double reg;
151 int rank;
152
153 // --- Max-power orientation (if pickOri == MaxPower) ---
154 Eigen::MatrixX3d maxPowerOri;
155
156 // --- Frequency info (DICS only) ---
157 Eigen::VectorXd frequencies;
158};
159
160//=============================================================================================================
161// INLINE DEFINITIONS
162//=============================================================================================================
163
164inline bool InvBeamformer::isValid() const
165{
166 return !weights.empty() && weights[0].size() > 0;
167}
168
169//=============================================================================================================
170
171inline int InvBeamformer::nSources() const
172{
173 return nSourcesTotal;
174}
175
176//=============================================================================================================
177
178inline int InvBeamformer::nChannels() const
179{
180 return weights.empty() ? 0 : static_cast<int>(weights[0].cols());
181}
182
183//=============================================================================================================
184
185inline int InvBeamformer::nOrient() const
186{
187 return isFreOri ? 3 : 1;
188}
189
190//=============================================================================================================
191
192inline int InvBeamformer::nFreqs() const
193{
194 return static_cast<int>(weights.size());
195}
196
197} // NAMESPACE INVLIB
198
199#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