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 class FiffNamedMatrix;
72}
73
74namespace MNELIB {
76}
77
78//=============================================================================================================
79// DEFINE NAMESPACE FWDLIB
80//=============================================================================================================
81
82namespace FWDLIB
83{
84
85//=============================================================================================================
100{
101public:
102 //=========================================================================================================
109 explicit ComputeFwd(std::shared_ptr<ComputeFwdSettings> pSettings);
110
111 //=========================================================================================================
115 virtual ~ComputeFwd();
116
117 //=========================================================================================================
123 std::unique_ptr<MNELIB::MNEForwardSolution> calculateFwd();
124
125 //=========================================================================================================
135
136private:
137 //=========================================================================================================
143 void initFwd();
144
145 //=========================================================================================================
150 void populateMetadata(MNELIB::MNEForwardSolution& fwd);
151
152 //=========================================================================================================
153 // Computation state
154 //=========================================================================================================
155
156 std::vector<MNELIB::MNESourceSpace::UPtr> m_spaces;
157 int m_iNSource = 0;
158 FwdCoilSet::UPtr m_templates;
159 FwdCoilSet::UPtr m_megcoils;
160 FwdCoilSet::UPtr m_compcoils;
161 FwdCoilSet::UPtr m_eegels;
163 FwdEegSphereModelSet::UPtr m_eegModels;
164 FwdEegSphereModel::UPtr m_eegModel;
165 FwdBemModel::UPtr m_bemModel;
166
167 QList<FIFFLIB::FiffChInfo> m_listMegChs;
168 QList<FIFFLIB::FiffChInfo> m_listEegChs;
169 QList<FIFFLIB::FiffChInfo> m_listCompChs;
170 int m_iNChan = 0;
171
172 FIFFLIB::FiffId m_mri_id;
173 FIFFLIB::FiffId m_meas_id;
174 FIFFLIB::FiffCoordTrans m_mri_head_t;
175 FIFFLIB::FiffCoordTrans m_meg_head_t;
176
177 QSharedPointer<FIFFLIB::FiffInfoBase> m_pInfoBase;
178 std::shared_ptr<ComputeFwdSettings> m_pSettings;
179
180 QSharedDataPointer<FIFFLIB::FiffNamedMatrix> m_meg_forward;
181 QSharedDataPointer<FIFFLIB::FiffNamedMatrix> m_meg_forward_grad;
182 QSharedDataPointer<FIFFLIB::FiffNamedMatrix> m_eeg_forward;
183 QSharedDataPointer<FIFFLIB::FiffNamedMatrix> m_eeg_forward_grad;
184
185 QString m_qPath;
186};
187
188//=============================================================================================================
189// INLINE DEFINITIONS
190//=============================================================================================================
191
192} // namespace FWDLIB
193
194#endif // COMPUTE_FWD_H
Symbol-visibility macro and build-info entry points for the FWDLIB (MEG/EEG forward-modelling) librar...
#define FWDSHARED_EXPORT
Definition fwd_global.h:44
Named container of FwdEegSphereModel objects loaded from an mne_setup_eeg_sphere_model parameter file...
Boundary Element Method (BEM) volume-conductor model — layered triangulated surfaces,...
Parameter object holding the CLI/script-level configuration consumed by ComputeFwd.
Container of FwdCoil instances representing either a sensor-type template database or a concrete per-...
Set of CTF compensation matrices plus the currently active grade.
Single-hemisphere source space (cortical surface or volume grid) loaded from FIFF.
Minimal measurement-info subset (channel list, sampling rate, basic transforms) shared by FIFF reader...
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.
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:83
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:66
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.