MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
mne_bem.h
Go to the documentation of this file.
1//=============================================================================================================
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;
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
283#define metatype_bem
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.
Definitions for describing the objects in a FIFF file.
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:56
Q_DECLARE_METATYPE(MNELIB::MNEBem)
MNEBemSurface class declaration.
Coordinate transformation description.
QSharedPointer< FiffDirNode > SPtr
FIFF File I/O routines.
QSharedPointer< FiffStream > SPtr
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
bool isEmpty() const
Definition mne_bem.h:264
BEM surface provides geometry information.