v2.0.0
Loading...
Searching...
No Matches
compute_fwd_settings.cpp
Go to the documentation of this file.
1//=============================================================================================================
12
13//=============================================================================================================
14// INCLUDES
15//=============================================================================================================
16
18
19//=============================================================================================================
20// USED NAMESPACES
21//=============================================================================================================
22
23using namespace Eigen;
24using namespace FIFFLIB;
25using namespace FWDLIB;
26
27//=============================================================================================================
28// DEFINES
29//=============================================================================================================
30
31//=============================================================================================================
32// STATIC DEFINITIONS
33//=============================================================================================================
34
35//=============================================================================================================
36// DEFINE MEMBER METHODS
37//=============================================================================================================
38
43{
44 initMembers();
45}
46
47//=============================================================================================================
48
53{
54 //ToDo Garbage collection
55}
56
57//=============================================================================================================
58
66{
67 if (srcname.isEmpty()) {
68 qCritical("Source space name is missing. Use the --src option to specify it.");
69 return false;
70 }
71 if (!mri_head_ident) {
72 if (mriname.isEmpty() && transname.isEmpty()) {
73 qCritical("MRI <-> head coordinate transformation is missing. Use the --mri or --trans option to specify it.");
74 return false;
75 }
76 }
77 if (measname.isEmpty()) {
78 qCritical("Source of coil and electrode locations is missing. Use the --meas option to specify it.");
79 return false;
80 }
81 if (solname.isEmpty()) {
82 qCritical("Solution name is missing. Use the --fwd option to specify it.");
83 return false;
84 }
85 if (!(include_meg || include_eeg)) {
86 qCritical("Employ the --meg and --eeg options to select MEG and/or EEG");
87 return false;
88 }
89 return true;
90}
91
92//=============================================================================================================
93
97void ComputeFwdSettings::initMembers()
98{
99 // Init origin
100 r0 << 0.0f, 0.0f, 0.04f;
101
102 mri_head_ident = false;
103 filter_spaces = true;
104 accurate = false;
105 fixed_ori = false;
106 include_meg = false;
107 include_eeg = false;
108 compute_grad = false;
109 mindist = 0.0f;
111 do_all = false;
112 nlabel = 0;
113
114 eeg_sphere_rad = 0.09f;
115 scale_eeg_pos = false;
116 use_equiv_eeg = true;
117 use_threads = true;
118
119 pFiffInfo = nullptr;
121}
constexpr auto FIFFV_COORD_HEAD
return FiffCoordTrans(from_frame, to_frame, R, moveVec)
Parameter object holding the CLI/script-level configuration consumed by ComputeFwd.
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
FIFFLIB::FiffCoordTrans meg_head_t
QSharedPointer< FIFFLIB::FiffInfo > pFiffInfo