v2.0.0
Loading...
Searching...
No Matches
mne_morph_map.h
Go to the documentation of this file.
1//=============================================================================================================
19
20#ifndef MNEMORPHMAP_H
21#define MNEMORPHMAP_H
22
23//=============================================================================================================
24// INCLUDES
25//=============================================================================================================
26
27#include "mne_global.h"
29
30//=============================================================================================================
31// STL INCLUDES
32//=============================================================================================================
33
34#include <memory>
35#include <optional>
36
37//=============================================================================================================
38// EIGEN INCLUDES
39//=============================================================================================================
40
41#include <Eigen/Core>
42#include <Eigen/SparseCore>
43
44//=============================================================================================================
45// QT INCLUDES
46//=============================================================================================================
47
48#include <QList>
49#include <QSharedPointer>
50#include <QString>
51
52//=============================================================================================================
53// FORWARD DECLARATIONS
54//=============================================================================================================
55
56//=============================================================================================================
57// DEFINE NAMESPACE MNELIB
58//=============================================================================================================
59
60namespace MNELIB
61{
62
63//=============================================================================================================
64// MNELIB FORWARD DECLARATIONS
65//=============================================================================================================
66
67//=============================================================================================================
74{
75public:
76 typedef QSharedPointer<MNEMorphMap> SPtr;
77 typedef QSharedPointer<const MNEMorphMap> ConstSPtr;
78
79 MNEMorphMap() = default;
82 ~MNEMorphMap() = default;
83
84 //=========================================================================================================
90 MNEMorphMap(const MNEMorphMap& other);
91
92 //=========================================================================================================
107 static MNEMorphMap compute(const Eigen::MatrixX3f& fromRr, const Eigen::MatrixX3i& fromTris, const Eigen::MatrixX3f& toRr);
108
109 //=========================================================================================================
120 static std::optional<MNEMorphMap> read(const QString& path, const QString& fromSubj, const QString& toSubj, int hemi);
121
122 //=========================================================================================================
131 static bool write(const QString& path, const QList<const MNEMorphMap*>& maps);
132
133 //=========================================================================================================
139 Eigen::SparseMatrix<double> toEigen() const;
140
141public:
142 std::unique_ptr<FIFFLIB::FiffSparseMatrix> map;
143 Eigen::VectorXi best;
144 int hemi = -1;
145 QString from_subj;
146 QString to_subj;
147};
148
149//=============================================================================================================
150// INLINE DEFINITIONS
151//=============================================================================================================
152} // NAMESPACE MNELIB
153
154#endif // MNEMORPHMAP_H
FIFF sparse matrix: column / row-compressed sparse storage backed by Eigen::SparseMatrix.
MNELIB shared-library export/import macros and library build metadata.
#define MNESHARED_EXPORT
Definition mne_global.h:40
Core MNE data structures (source spaces, source estimates, hemispheres).
Eigen::VectorXi best
QSharedPointer< MNEMorphMap > SPtr
~MNEMorphMap()=default
static bool write(const QString &path, const QList< const MNEMorphMap * > &maps)
MNEMorphMap(MNEMorphMap &&)=default
static std::optional< MNEMorphMap > read(const QString &path, const QString &fromSubj, const QString &toSubj, int hemi)
std::unique_ptr< FIFFLIB::FiffSparseMatrix > map
MNEMorphMap & operator=(MNEMorphMap &&)=default
Eigen::SparseMatrix< double > toEigen() const
static MNEMorphMap compute(const Eigen::MatrixX3f &fromRr, const Eigen::MatrixX3i &fromTris, const Eigen::MatrixX3f &toRr)
QSharedPointer< const MNEMorphMap > ConstSPtr