v2.0.0
Loading...
Searching...
No Matches
ecd_set.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef ECD_SET_H
38#define ECD_SET_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "../inverse_global.h"
45#include "ecd.h"
46
47//=============================================================================================================
48// QT INCLUDES
49//=============================================================================================================
50
51#include <QSharedPointer>
52#include <QList>
53#include <QString>
54
55//=============================================================================================================
56// EIGEN INCLUDES
57//=============================================================================================================
58
59//=============================================================================================================
60// FORWARD DECLARATIONS
61//=============================================================================================================
62
63//=============================================================================================================
64// DEFINE NAMESPACE INVERSELIB
65//=============================================================================================================
66
67namespace INVERSELIB {
68
69//=============================================================================================================
70// FIFFLIB FORWARD DECLARATIONS
71//=============================================================================================================
72
73//=============================================================================================================
79
81{
82
83public:
84 typedef QSharedPointer<ECDSet> SPtr;
85 typedef QSharedPointer<const ECDSet> ConstSPtr;
86
87 //=========================================================================================================
91 ECDSet();
92
93 //=========================================================================================================
99 ECDSet(const ECDSet &p_ECDSet);
100
101 //=========================================================================================================
105 ~ECDSet();
106
107 //=========================================================================================================
111 void addEcd(const ECD& p_ecd);
112
113 //=========================================================================================================
119 static ECDSet read_dipoles_dip(const QString& fileName);
120
121 //=========================================================================================================
127 bool save_dipoles_bdip(const QString& fileName);
128
129 //=========================================================================================================
135 bool save_dipoles_dip(const QString& fileName) const;
136
137 //=========================================================================================================
143 inline qint32 size() const;
144
145 //=========================================================================================================
153 const ECD& operator[] (int idx) const;
154
155 //=========================================================================================================
163 ECD& operator[] (int idx);
164
165 //=========================================================================================================
173 ECDSet& operator<< (const ECD& p_ecd);
174
175public:
176 QString dataname;
177
178private:
179 QList<ECD> m_qListDips;
180
181// ### OLD STRUCT ###
182// typedef struct {
183// char *dataname; /* The associated data file */
184// int ndip; /* How many dipoles */
185// ecd *dips; /* The dipoles themselves */
186// } *ecdSet,ecdSetRec; /* A set of ECDs */
187};
188
189//=============================================================================================================
190// INLINE DEFINITIONS
191//=============================================================================================================
192
193inline qint32 ECDSet::size() const
194{
195 return m_qListDips.size();
196}
197} // NAMESPACE INVERSELIB
198
199#ifndef metatype_ecdset
200#define metatype_ecdset
202#endif
203
204#endif // ECD_SET_H
Q_DECLARE_METATYPE(INVERSELIB::ECDSet)
Electric Current Dipole (ECD) class declaration.
inverse library export/import macros.
#define INVERSESHARED_EXPORT
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
Single equivalent current dipole with position, orientation, amplitude, and goodness-of-fit.
Definition ecd.h:73
Holds a set of Electric Current Dipoles.
Definition ecd_set.h:81
static ECDSet read_dipoles_dip(const QString &fileName)
Definition ecd_set.cpp:169
bool save_dipoles_dip(const QString &fileName) const
Definition ecd_set.cpp:270
QSharedPointer< const ECDSet > ConstSPtr
Definition ecd_set.h:85
QSharedPointer< ECDSet > SPtr
Definition ecd_set.h:84
bool save_dipoles_bdip(const QString &fileName)
Definition ecd_set.cpp:212
void addEcd(const ECD &p_ecd)
Definition ecd_set.cpp:162
qint32 size() const
Definition ecd_set.h:193