v2.0.0
Loading...
Searching...
No Matches
mne_source_space.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef MNESOURCESPACE_H
38#define MNESOURCESPACE_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "mne_global.h"
46
47//=============================================================================================================
48// EIGEN INCLUDES
49//=============================================================================================================
50
51#include <Eigen/Core>
52
53//=============================================================================================================
54// STL INCLUDES
55//=============================================================================================================
56
57#include <memory>
58
59//=============================================================================================================
60// DEFINE NAMESPACE MNELIB
61//=============================================================================================================
62
63namespace MNELIB
64{
65
66//=============================================================================================================
67// FORWARD DECLARATIONS
68//=============================================================================================================
69
70//=============================================================================================================
77{
78public:
79 using SPtr = std::shared_ptr<MNESourceSpace>;
80 using ConstSPtr = std::shared_ptr<const MNESourceSpace>;
81
82 //=========================================================================================================
86 MNESourceSpace(int np = 0);
87
88 //=========================================================================================================
92 ~MNESourceSpace() override;
93
94 //=========================================================================================================
100 virtual MNESourceSpace::SPtr clone() const;
101
102 //=========================================================================================================
106 void enable_all_sources();
107
108 //=========================================================================================================
115 int is_left_hemi() const;
116
117 //=========================================================================================================
124 qint32 find_source_space_hemi() const;
125
126 //=========================================================================================================
132 void update_inuse(Eigen::VectorXi new_inuse);
133
134 //=========================================================================================================
142
143 //=========================================================================================================
149 int add_patch_stats();
150
151 //=========================================================================================================
157
158 //=========================================================================================================
166 static std::unique_ptr<MNESourceSpace> create_source_space(int np);
167
168 //=========================================================================================================
176 static std::unique_ptr<MNESourceSpace> load_surface(const QString& surf_file,
177 const QString& curv_file);
178
179 //=========================================================================================================
189 static std::unique_ptr<MNESourceSpace> load_surface_geom(const QString& surf_file,
190 const QString& curv_file,
191 int add_geometry,
192 int check_too_many_neighbors);
193
194 //=========================================================================================================
209 float grid,
210 float exclude,
211 float mindist);
212
213 //=========================================================================================================
214 // Source-space filtering, I/O, and label helpers (moved from MNESurfaceOrVolume)
215 //=========================================================================================================
216
217 static int filter_source_spaces(const MNESurface& surf,
218 float limit,
219 const FIFFLIB::FiffCoordTrans& mri_head_t,
220 std::vector<std::unique_ptr<MNESourceSpace>>& spaces,
221 QTextStream *filtered);
222
223 static void filter_source_space(FilterThreadArg *arg);
224
225 static int filter_source_spaces(float limit,
226 const QString& bemfile,
227 const FIFFLIB::FiffCoordTrans& mri_head_t,
228 std::vector<std::unique_ptr<MNESourceSpace>>& spaces,
229 QTextStream *filtered,
230 bool use_threads);
231
232 static int read_source_spaces(const QString& name,
233 std::vector<std::unique_ptr<MNESourceSpace>>& spaces);
234
237 std::vector<std::unique_ptr<MNESourceSpace>>& spaces);
238
239 static int restrict_sources_to_labels(std::vector<std::unique_ptr<MNESourceSpace>>& spaces,
240 const QStringList& labels,
241 int nlabel);
242
243 static int read_label(const QString& label,
244 Eigen::VectorXi& sel);
245};
246
247//=============================================================================================================
248// INLINE DEFINITIONS
249//=============================================================================================================
250} // NAMESPACE MNELIB
251
252#endif // MNESOURCESPACE_H
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:52
MNE Surface or Volume (MNESurfaceOrVolume) class declaration.
Core MNE data structures (source spaces, source estimates, hemispheres).
Coordinate transformation description.
Thread-local arguments for parallel raw data filtering (channel range, filter kernel,...
virtual MNESourceSpace::SPtr clone() const
static std::unique_ptr< MNESourceSpace > load_surface_geom(const QString &surf_file, const QString &curv_file, int add_geometry, int check_too_many_neighbors)
static std::unique_ptr< MNESourceSpace > load_surface(const QString &surf_file, const QString &curv_file)
qint32 find_source_space_hemi() const
std::shared_ptr< MNESourceSpace > SPtr
static int restrict_sources_to_labels(std::vector< std::unique_ptr< MNESourceSpace > > &spaces, const QStringList &labels, int nlabel)
static int filter_source_spaces(const MNESurface &surf, float limit, const FIFFLIB::FiffCoordTrans &mri_head_t, std::vector< std::unique_ptr< MNESourceSpace > > &spaces, QTextStream *filtered)
static int read_source_spaces(const QString &name, std::vector< std::unique_ptr< MNESourceSpace > > &spaces)
static std::unique_ptr< MNESourceSpace > create_source_space(int np)
static void filter_source_space(FilterThreadArg *arg)
static MNESourceSpace * make_volume_source_space(const MNESurface &surf, float grid, float exclude, float mindist)
std::shared_ptr< const MNESourceSpace > ConstSPtr
int transform_source_space(const FIFFLIB::FiffCoordTrans &t)
static int read_label(const QString &label, Eigen::VectorXi &sel)
static int transform_source_spaces_to(int coord_frame, const FIFFLIB::FiffCoordTrans &t, std::vector< std::unique_ptr< MNESourceSpace > > &spaces)
void update_inuse(Eigen::VectorXi new_inuse)
This defines a surface.
Definition mne_surface.h:79
MNESurfaceOrVolume()
Constructs the MNE Surface or Volume.