MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
annotationset.h
Go to the documentation of this file.
1//=============================================================================================================
37#ifndef ANNOTATION_SET_H
38#define ANNOTATION_SET_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "fs_global.h"
45#include "annotation.h"
46
47//=============================================================================================================
48// QT INCLUDES
49//=============================================================================================================
50
51#include <QString>
52#include <QSharedPointer>
53#include <QMap>
54
55//=============================================================================================================
56// EIGEN INCLUDES
57//=============================================================================================================
58
59#include <Eigen/Core>
60
61//=============================================================================================================
62// DEFINE NAMESPACE FSLIB
63//=============================================================================================================
64
65namespace FSLIB
66{
67
68//=============================================================================================================
69// FORWARD DECLARATIONS
70//=============================================================================================================
71
72class SurfaceSet;
73
74//=============================================================================================================
81{
82public:
83 typedef QSharedPointer<AnnotationSet> SPtr;
84 typedef QSharedPointer<const AnnotationSet> ConstSPtr;
86 //=========================================================================================================
91
92 //=========================================================================================================
101 explicit AnnotationSet(const QString &subject_id, qint32 hemi, const QString &atlas, const QString &subjects_dir);
102
103 //=========================================================================================================
111 explicit AnnotationSet(const QString &path, qint32 hemi, const QString &atlas);
112
113 //=========================================================================================================
120 explicit AnnotationSet(const Annotation& p_LHAnnotation, const Annotation& p_RHAnnotation);
121
122 //=========================================================================================================
129 explicit AnnotationSet(const QString& p_sLHFileName, const QString& p_sRHFileName);
130
131 //=========================================================================================================
136
137 //=========================================================================================================
141 void clear();
142
143 //=========================================================================================================
149 inline QMap<qint32, Annotation>& data();
150
151 //=========================================================================================================
157 inline bool isEmpty() const;
158
159 //=========================================================================================================
165 void insert(const Annotation& p_Annotation);
166
167 //=========================================================================================================
177 static bool read(const QString& p_sLHFileName, const QString& p_sRHFileName, AnnotationSet &p_AnnotationSet);
178
179 //=========================================================================================================
192 bool toLabels(const SurfaceSet &p_surfSet,
193 QList<Label> &p_qListLabels,
194 QList<Eigen::RowVector4i> &p_qListLabelRGBAs,
195 const QStringList& lLabelPicks = QStringList()) const;
196
197 //=========================================================================================================
205 Annotation& operator[] (qint32 idx);
206
207 //=========================================================================================================
215 const Annotation operator[] (qint32 idx) const;
216
217 //=========================================================================================================
225 Annotation& operator[] (QString idt);
226
227 //=========================================================================================================
235 const Annotation operator[] (QString idt) const;
236
237 //=========================================================================================================
243 inline qint32 size() const;
244
245private:
246 QMap<qint32, Annotation> m_qMapAnnots;
247};
248
249//=============================================================================================================
250// INLINE DEFINITIONS
251//=============================================================================================================
252
253inline QMap<qint32, Annotation>& AnnotationSet::data()
254{
255 return m_qMapAnnots;
256}
257
258//=============================================================================================================
259
260inline bool AnnotationSet::isEmpty() const
261{
262 return m_qMapAnnots.isEmpty();
263}
264
265//=============================================================================================================
266
267inline qint32 AnnotationSet::size() const
268{
269 return m_qMapAnnots.size();
270}
271} // NAMESPACE
272
273#endif // ANNOTATION_SET_H
Fs library export/import macros.
#define FSSHARED_EXPORT
Definition fs_global.h:56
Annotation class declaration.
Free surfer annotation.
Definition annotation.h:81
Annotation set.
QMap< qint32, Annotation > & data()
QSharedPointer< AnnotationSet > SPtr
QSharedPointer< const AnnotationSet > ConstSPtr
qint32 size() const
A hemisphere set of surfaces.
Definition surfaceset.h:72