v2.0.0
Loading...
Searching...
No Matches
compute_fwd.h
Go to the documentation of this file.
1//=============================================================================================================
29
30#ifndef COMPUTE_FWD_H
31#define COMPUTE_FWD_H
32
33//=============================================================================================================
34// INCLUDES
35//=============================================================================================================
36
37#include "../fwd_global.h"
39
41#include <fiff/fiff_types.h>
42#include <fiff/fiff_info_base.h>
43
44#include "../fwd_coil_set.h"
46#include "../fwd_bem_model.h"
47
50
51//=============================================================================================================
52// STL INCLUDES
53//=============================================================================================================
54
55#include <vector>
56#include <memory>
57
58//=============================================================================================================
59// QT INCLUDES
60//=============================================================================================================
61
62#include <QSharedDataPointer>
63#include <QSharedPointer>
64#include <QString>
65
66//=============================================================================================================
67// FORWARD DECLARATIONS
68//=============================================================================================================
69
70namespace FIFFLIB
71{
72class FiffNamedMatrix;
73}
74
75namespace MNELIB
76{
78}
79
80//=============================================================================================================
81// DEFINE NAMESPACE FWDLIB
82//=============================================================================================================
83
84namespace FWDLIB
85{
86
87//=============================================================================================================
104{
105public:
106 //=========================================================================================================
113 explicit ComputeFwd(std::shared_ptr<ComputeFwdSettings> pSettings);
114
115 //=========================================================================================================
119 virtual ~ComputeFwd();
120
121 //=========================================================================================================
127 std::unique_ptr<MNELIB::MNEForwardSolution> calculateFwd();
128
129 //=========================================================================================================
139
140private:
141 //=========================================================================================================
147 void initFwd();
148
149 //=========================================================================================================
154 void populateMetadata(MNELIB::MNEForwardSolution& fwd);
155
156 //=========================================================================================================
157 // Computation state
158 //=========================================================================================================
159
160 std::vector<MNELIB::MNESourceSpace::UPtr> m_spaces;
161 int m_iNSource = 0;
162 FwdCoilSet::UPtr m_templates;
163 FwdCoilSet::UPtr m_megcoils;
164 FwdCoilSet::UPtr m_compcoils;
165 FwdCoilSet::UPtr m_eegels;
167 FwdEegSphereModelSet::UPtr m_eegModels;
168 FwdEegSphereModel::UPtr m_eegModel;
169 FwdBemModel::UPtr m_bemModel;
170 bool m_bInitialized = false;
171
172 QList<FIFFLIB::FiffChInfo> m_listMegChs;
173 QList<FIFFLIB::FiffChInfo> m_listEegChs;
174 QList<FIFFLIB::FiffChInfo> m_listCompChs;
175 int m_iNChan = 0;
176
177 FIFFLIB::FiffId m_mri_id;
178 FIFFLIB::FiffId m_meas_id;
179 FIFFLIB::FiffCoordTrans m_mri_head_t;
180 FIFFLIB::FiffCoordTrans m_meg_head_t;
181
182 QSharedPointer<FIFFLIB::FiffInfoBase> m_pInfoBase;
183 std::shared_ptr<ComputeFwdSettings> m_pSettings;
184
185 QSharedDataPointer<FIFFLIB::FiffNamedMatrix> m_meg_forward;
186 QSharedDataPointer<FIFFLIB::FiffNamedMatrix> m_meg_forward_grad;
187 QSharedDataPointer<FIFFLIB::FiffNamedMatrix> m_eeg_forward;
188 QSharedDataPointer<FIFFLIB::FiffNamedMatrix> m_eeg_forward_grad;
189
190 QString m_qPath;
191};
192
193//=============================================================================================================
194// INLINE DEFINITIONS
195//=============================================================================================================
196
197} // namespace FWDLIB
198
199#endif // COMPUTE_FWD_H
4x4 affine FIFF coordinate transform (FIFF_COORD_TRANS) annotated with source/destination coordinate-...
Primitive scalar typedefs and forward-compatible aliases backing the FIFF type system.
Minimal measurement-info subset (channel list, sampling rate, basic transforms) shared by FIFF reader...
Container of FwdCoil instances representing either a sensor-type template database or a concrete per-...
Named container of FwdEegSphereModel objects loaded from an mne_setup_eeg_sphere_model parameter file...
Symbol-visibility macro and build-info entry points for the FWDLIB (MEG/EEG forward-modelling) librar...
#define FWDSHARED_EXPORT
Definition fwd_global.h:44
Boundary Element Method (BEM) volume-conductor model — layered triangulated surfaces,...
Parameter object holding the CLI/script-level configuration consumed by ComputeFwd.
Set of CTF compensation matrices plus the currently active grade.
Single-hemisphere source space (cortical surface or volume grid) loaded from FIFF.
Core MNE data structures (source spaces, source estimates, hemispheres).
FIFF file I/O, in-memory data structures and high-level readers/writers.
Forward modelling — BEM solver, spherical models, sensor/coil definitions and the lead-field assembly...
Definition compute_fwd.h:85
Labelled 4x4 FIFF affine: source frame, destination frame, rotation, translation and cached inverse.
128-bit FIFF identifier: hardware machine ID plus creation time, stamped on every file and block.
Definition fiff_id.h:69
FIFF named matrix: dense / sparse Eigen matrix plus row-name and column-name string lists.
std::unique_ptr< MNELIB::MNEForwardSolution > calculateFwd()
bool updateHeadPos(const FIFFLIB::FiffCoordTrans &transDevHead, MNELIB::MNEForwardSolution &fwd)
ComputeFwd(std::shared_ptr< ComputeFwdSettings > pSettings)
std::unique_ptr< FwdBemModel > UPtr
std::unique_ptr< FwdCoilSet > UPtr
std::unique_ptr< FwdEegSphereModel > UPtr
std::unique_ptr< FwdEegSphereModelSet > UPtr
std::unique_ptr< MNECTFCompDataSet > UPtr
In-memory representation of an -fwd.fif forward solution.