v2.0.0
Loading...
Searching...
No Matches
inv_beamformer.h
Go to the documentation of this file.
1//=============================================================================================================
34
35#ifndef INV_BEAMFORMER_H
36#define INV_BEAMFORMER_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
42#include "../inv_global.h"
44
45//=============================================================================================================
46// EIGEN INCLUDES
47//=============================================================================================================
48
49#include <Eigen/Core>
50
51//=============================================================================================================
52// QT INCLUDES
53//=============================================================================================================
54
55#include <QSharedPointer>
56#include <QString>
57#include <QStringList>
58#include <QList>
59
60//=============================================================================================================
61// STL INCLUDES
62//=============================================================================================================
63
64#include <vector>
65
66//=============================================================================================================
67// DEFINE NAMESPACE INVLIB
68//=============================================================================================================
69
70namespace INVLIB
71{
72
73//=============================================================================================================
85{
86public:
87 typedef QSharedPointer<InvBeamformer> SPtr;
88 typedef QSharedPointer<const InvBeamformer> ConstSPtr;
89
90 //=========================================================================================================
95
96 //=========================================================================================================
100 inline bool isValid() const;
101
102 //=========================================================================================================
106 inline int nSources() const;
107
108 //=========================================================================================================
112 inline int nChannels() const;
113
114 //=========================================================================================================
118 inline int nOrient() const;
119
120 //=========================================================================================================
124 inline int nFreqs() const;
125
126public:
127 QString kind;
128
129 // --- Spatial filter weights ---
130 std::vector<Eigen::MatrixXd> weights;
132
133 // --- Whitening & projection ---
134 Eigen::MatrixXd whitener;
135 Eigen::MatrixXd proj;
136
137 // --- Source space info ---
138 Eigen::VectorXi vertices;
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
Beamformer settings and enumerations.
inverse library export/import macros.
#define INVSHARED_EXPORT
Definition inv_global.h:52
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