v2.0.0
Loading...
Searching...
No Matches
mne_ctf_comp_data_set.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef MNECTFCOMPDATASET_H
38#define MNECTFCOMPDATASET_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "mne_global.h"
45
46#include "mne_named_matrix.h"
48
49//=============================================================================================================
50// STL INCLUDES
51//=============================================================================================================
52
53#include <memory>
54#include <vector>
55
56//=============================================================================================================
57// EIGEN INCLUDES
58//=============================================================================================================
59
60#include <Eigen/Core>
61
62//=============================================================================================================
63// QT INCLUDES
64//=============================================================================================================
65
66#include <QSharedPointer>
67#include <QList>
68
69//=============================================================================================================
70// DEFINE NAMESPACE MNELIB
71//=============================================================================================================
72
73namespace MNELIB
74{
75
76//=============================================================================================================
77// FORWARD DECLARATIONS
78//=============================================================================================================
79
80class MNECTFCompData;
81
82//=============================================================================================================
91{
92public:
93 typedef QSharedPointer<MNECTFCompDataSet> SPtr;
94 typedef QSharedPointer<const MNECTFCompDataSet> ConstSPtr;
95 typedef std::unique_ptr<MNECTFCompDataSet> UPtr;
96
97 //=========================================================================================================
102
103 //=========================================================================================================
110
111 //=========================================================================================================
116
117 //=========================================================================================================
126 static std::unique_ptr<MNECTFCompDataSet> read(const QString& name);
127
128 //=========================================================================================================
141 int make_comp(const QList<FIFFLIB::FiffChInfo>& chs,
142 int nch,
143 QList<FIFFLIB::FiffChInfo> compchs,
144 int ncomp);
145
146 //=========================================================================================================
157 static int set_comp(QList<FIFFLIB::FiffChInfo> &chs,
158 int nch,
159 int comp);
160
161 //=========================================================================================================
172 int apply(bool do_it,
173 Eigen::Ref<Eigen::VectorXf> data,
174 Eigen::Ref<const Eigen::VectorXf> compdata);
175
176 //=========================================================================================================
185 int apply(bool do_it,
186 Eigen::Ref<Eigen::VectorXf> data);
187
188 //=========================================================================================================
198 int apply_transpose(bool do_it,
199 Eigen::MatrixXf& data);
200
201 //=========================================================================================================
211 static int get_comp(const QList<FIFFLIB::FiffChInfo>& chs,int nch);
212
213 //=========================================================================================================
222 static int map_comp_kind(int grad);
223
224 //=========================================================================================================
232 static QString explain_comp(int kind);
233
234 //=========================================================================================================
247 int set_compensation(int compensate_to,
248 QList<FIFFLIB::FiffChInfo>& chs,
249 int nchan,
250 QList<FIFFLIB::FiffChInfo> comp_chs,
251 int ncomp_chan);
252
253public:
254 std::vector<std::unique_ptr<MNECTFCompData>> comps;
255 int ncomp;
256 QList<FIFFLIB::FiffChInfo> chs;
257 int nch;
258 std::unique_ptr<MNECTFCompData> undo;
259 std::unique_ptr<MNECTFCompData> current;
260};
261
262//=============================================================================================================
263// INLINE DEFINITIONS
264//=============================================================================================================
265} // NAMESPACE MNELIB
266
267#endif // MNECTFCOMPDATASET_H
FiffSparseMatrix class declaration.
MNENamedMatrix class declaration.
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:52
Core MNE data structures (source spaces, source estimates, hemispheres).
Represents a single CTF compensation data element.
std::vector< std::unique_ptr< MNECTFCompData > > comps
std::unique_ptr< MNECTFCompData > undo
int make_comp(const QList< FIFFLIB::FiffChInfo > &chs, int nch, QList< FIFFLIB::FiffChInfo > compchs, int ncomp)
std::unique_ptr< MNECTFCompData > current
QList< FIFFLIB::FiffChInfo > chs
QSharedPointer< MNECTFCompDataSet > SPtr
static int set_comp(QList< FIFFLIB::FiffChInfo > &chs, int nch, int comp)
static std::unique_ptr< MNECTFCompDataSet > read(const QString &name)
int apply(bool do_it, Eigen::Ref< Eigen::VectorXf > data, Eigen::Ref< const Eigen::VectorXf > compdata)
int apply_transpose(bool do_it, Eigen::MatrixXf &data)
static QString explain_comp(int kind)
std::unique_ptr< MNECTFCompDataSet > UPtr
QSharedPointer< const MNECTFCompDataSet > ConstSPtr
static int get_comp(const QList< FIFFLIB::FiffChInfo > &chs, int nch)
int set_compensation(int compensate_to, QList< FIFFLIB::FiffChInfo > &chs, int nchan, QList< FIFFLIB::FiffChInfo > comp_chs, int ncomp_chan)