v2.0.0
Loading...
Searching...
No Matches
ieeg_implantation.h
Go to the documentation of this file.
1//=============================================================================================================
17
18#ifndef IEEG_IMPLANTATION_H
19#define IEEG_IMPLANTATION_H
20
21//=============================================================================================================
22// INCLUDES
23//=============================================================================================================
24
25#include "ieeg_global.h"
26
27//=============================================================================================================
28// EIGEN INCLUDES
29//=============================================================================================================
30
31#include <Eigen/Core>
32
33//=============================================================================================================
34// QT INCLUDES
35//=============================================================================================================
36
37#include <QString>
38#include <QVector>
39
40//=============================================================================================================
41// DEFINE NAMESPACE IEEGLIB
42//=============================================================================================================
43
44namespace IEEGLIB
45{
46
47//=============================================================================================================
51enum class IeegLeadType
52{
56};
57
58//=============================================================================================================
65{
66 QString name;
67 Eigen::Vector3f position = Eigen::Vector3f::Zero();
68 QString lead;
69};
70
71//=============================================================================================================
78{
79 QString name;
81 QVector<int> contacts;
82 int rows = 0;
83 int cols = 0;
84};
85
86//=============================================================================================================
93{
94public:
96 static constexpr float kMaxDepthSpacing = 0.006f;
97
98 IeegImplantation() = default;
99
100 //=========================================================================================================
113 explicit IeegImplantation(const QVector<IeegContact>& contacts, const QString& coordinateSystem = QString());
114
115 //=========================================================================================================
129 static IeegImplantation readBids(const QString& electrodesTsv, QString* error = nullptr);
130
132 const QVector<IeegContact>& contacts() const
133 {
134 return m_contacts;
135 }
136
138 const QVector<IeegLead>& leads() const
139 {
140 return m_leads;
141 }
142
144 QString coordinateSystem() const
145 {
146 return m_coordinateSystem;
147 }
148
150 bool isEmpty() const
151 {
152 return m_contacts.isEmpty();
153 }
154
164 bool setLeadType(const QString& lead, IeegLeadType type, int rows = 0, int cols = 0);
165
170 int indexOf(const QString& name) const;
171
173 Eigen::MatrixX3f positions() const;
174
180 bool isScannerRas() const;
181
187 IeegImplantation transformed(const Eigen::Matrix4f& trans, const QString& frame) const;
188
189private:
190 QVector<IeegContact> m_contacts;
191 QVector<IeegLead> m_leads;
192 QString m_coordinateSystem;
193};
194
195} // namespace IEEGLIB
196
197#endif // IEEG_IMPLANTATION_H
IEEGLIB shared-library export macro and build-info accessors for the intracranial EEG library.
#define IEEGSHARED_EXPORT
Definition ieeg_global.h:32
Intracranial EEG (sEEG, ECoG): implantation, bipolar referencing, cortical mapping.
IeegLeadType
Kind of lead a contact sits on.
One recording contact.
Eigen::Vector3f position
One lead: a depth shaft, a strip or a grid.
QVector< int > contacts
Contacts of an sEEG / ECoG implantation and the leads they belong to.
static constexpr float kMaxDepthSpacing
const QVector< IeegLead > & leads() const
static IeegImplantation readBids(const QString &electrodesTsv, QString *error=nullptr)
const QVector< IeegContact > & contacts() const