v2.0.0
Loading...
Searching...
No Matches
mne_bem.h
Go to the documentation of this file.
1//=============================================================================================================
37
38#ifndef MNE_BEM_H
39#define MNE_BEM_H
40
41//=============================================================================================================
42// INCLUDES
43//=============================================================================================================
44
45#include "mne_global.h"
46#include "mne_bem_surface.h"
47
48#include <fiff/fiff_types.h>
49#include <fiff/fiff_dir_node.h>
50#include <fiff/fiff.h>
51
52#include <algorithm>
53#include <vector>
54
55//=============================================================================================================
56// QT INCLUDES
57//=============================================================================================================
58
59#include <QList>
60#include <QIODevice>
61#include <QSharedPointer>
62
63//=============================================================================================================
64// FORWARD DECLARATIONS
65//=============================================================================================================
66
67namespace FSLIB
68{
69class Label;
70}
71
72//=============================================================================================================
73// DEFINE NAMESPACE MNELIB
74//=============================================================================================================
75
76namespace MNELIB
77{
78
79//=============================================================================================================
80// MNELIB FORWARD DECLARATIONS
81//=============================================================================================================
82
83//=============================================================================================================
90{
91
92public:
93 typedef QSharedPointer<MNEBem> SPtr;
94 typedef QSharedPointer<const MNEBem> ConstSPtr;
95
96 //=========================================================================================================
100 MNEBem();
101
102 //=========================================================================================================
108 MNEBem(const MNEBem &p_MNEBem);
109
110 //=========================================================================================================
114 MNEBem(QIODevice &p_IODevice);
115
116 //=========================================================================================================
120 ~MNEBem();
121
122 //=========================================================================================================
126 void clear();
127
128 //=========================================================================================================
134 inline bool isEmpty() const;
135
136 //=========================================================================================================
147 static bool readFromStream(FIFFLIB::FiffStream::SPtr& p_pStream, bool add_geom, MNEBem &p_Bem);
148
149 //=========================================================================================================
155 inline qint32 size() const;
156
157 //=========================================================================================================
165 void write(QIODevice &p_IODevice);
166
167 //=========================================================================================================
175 void writeToStream(FIFFLIB::FiffStream *p_pStream);
176
177 //=========================================================================================================
185 const MNEBemSurface& operator[] (qint32 idx) const;
186
187 //=========================================================================================================
195 MNEBemSurface& operator[] (qint32 idx);
196
197 //=========================================================================================================
205 MNEBem& operator<< (const MNEBemSurface& surf);
206
207 //=========================================================================================================
215 MNEBem& operator<< (const MNEBemSurface* surf);
216
217 //=========================================================================================================
224 void warp(const Eigen::MatrixXf &sLm, const Eigen::MatrixXf &dLm);
225
226 //=========================================================================================================
232 void transform(const FIFFLIB::FiffCoordTrans& trans);
233
234 //=========================================================================================================
240 void invtransform(const FIFFLIB::FiffCoordTrans& trans);
241
242protected:
243 //=========================================================================================================
254 static bool readBemSurface(FIFFLIB::FiffStream::SPtr& p_pStream, const FIFFLIB::FiffDirNode::SPtr& p_Tree, MNEBemSurface& p_BemSurface);
255
256private:
257 QList<MNEBemSurface> m_qListBemSurface;
258};
259
260//=============================================================================================================
261// INLINE DEFINITIONS
262//=============================================================================================================
263
264inline bool MNEBem::isEmpty() const
265{
266 return m_qListBemSurface.size() == 0;
267}
268
269//=============================================================================================================
270
271inline qint32 MNEBem::size() const
272{
273 return m_qListBemSurface.size();
274}
275} // NAMESPACE
276
277#ifndef metatype_bem
278#define metatype_bem
280#endif
281
282#ifndef metatype_bem_sptr
283#define metatype_bem_sptr
285#endif
286
287#endif // MNE_BEM_H
FIFF class declaration, which provides static wrapper functions to stay consistent with mne matlab to...
FiffDirNode class declaration, which provides fiff dir tree processing methods.
Old fiff_type declarations - replace them.
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:52
Q_DECLARE_METATYPE(MNELIB::MNEBem)
MNEBemSurface class declaration.
Core MNE data structures (source spaces, source estimates, hemispheres).
FreeSurfer surface and annotation I/O.
Coordinate transformation description.
QSharedPointer< FiffDirNode > SPtr
FIFF File I/O routines.
QSharedPointer< FiffStream > SPtr
Freesurfer/MNE label.
Definition label.h:81
BEM descritpion.
Definition mne_bem.h:90
QSharedPointer< const MNEBem > ConstSPtr
Definition mne_bem.h:94
qint32 size() const
Definition mne_bem.h:271
QSharedPointer< MNEBem > SPtr
Definition mne_bem.h:93
void invtransform(const FIFFLIB::FiffCoordTrans &trans)
Definition mne_bem.cpp:467
void transform(const FIFFLIB::FiffCoordTrans &trans)
Definition mne_bem.cpp:453
static bool readBemSurface(FIFFLIB::FiffStream::SPtr &p_pStream, const FIFFLIB::FiffDirNode::SPtr &p_Tree, MNEBemSurface &p_BemSurface)
Definition mne_bem.cpp:190
void writeToStream(FIFFLIB::FiffStream *p_pStream)
Definition mne_bem.cpp:376
void warp(const Eigen::MatrixXf &sLm, const Eigen::MatrixXf &dLm)
Definition mne_bem.cpp:433
void write(QIODevice &p_IODevice)
Definition mne_bem.cpp:361
static bool readFromStream(FIFFLIB::FiffStream::SPtr &p_pStream, bool add_geom, MNEBem &p_Bem)
Definition mne_bem.cpp:114
bool isEmpty() const
Definition mne_bem.h:264
BEM surface provides geometry information.