v2.0.0
Loading...
Searching...
No Matches
source_morph.h
Go to the documentation of this file.
1//=============================================================================================================
23
24#ifndef SOURCE_MORPH_H
25#define SOURCE_MORPH_H
26
27//=============================================================================================================
28// INCLUDES
29//=============================================================================================================
30
31#include "../inv_global.h"
33
34//=============================================================================================================
35// EIGEN INCLUDES
36//=============================================================================================================
37
38#include <Eigen/Core>
39#include <Eigen/Sparse>
40
41//=============================================================================================================
42// QT INCLUDES
43//=============================================================================================================
44
45#include <QString>
46#include <QList>
47
48//=============================================================================================================
49// DEFINE NAMESPACE INVLIB
50//=============================================================================================================
51
52namespace INVLIB
53{
54
55//=============================================================================================================
67{
68public:
69 SourceMorph() = default;
70
71 //=========================================================================================================
82 void compute(const Eigen::VectorXi& verticesFrom,
83 const Eigen::VectorXi& verticesTo,
84 const Eigen::SparseMatrix<double>& morphMap);
85
86 //=========================================================================================================
94 InvSourceEstimate apply(const InvSourceEstimate& stcFrom) const;
95
96 //=========================================================================================================
100 bool isComputed() const { return m_bComputed; }
101
102 //=========================================================================================================
106 int nVerticesTo() const { return static_cast<int>(m_verticesTo.size()); }
107
108private:
109 bool m_bComputed = false;
110 Eigen::VectorXi m_verticesFrom;
111 Eigen::VectorXi m_verticesTo;
112 Eigen::SparseMatrix<double> m_morphMatrix;
113};
114
115} // namespace INVLIB
116
117#endif // SOURCE_MORPH_H
InvSourceEstimate value type — central source-space data container produced by every INVLIB inverse s...
INVLIB library export/import macros, build-info accessors, and namespace docstring for the inverse-so...
#define INVSHARED_EXPORT
Definition inv_global.h:38
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
Source-space inverse-solution container with dense grid plus optional focal-dipole,...
int nVerticesTo() const
Get the number of target vertices.
bool isComputed() const
Check if the morph has been computed.
InvSourceEstimate apply(const InvSourceEstimate &stcFrom) const
Apply the morphing to a source estimate.
void compute(const Eigen::VectorXi &verticesFrom, const Eigen::VectorXi &verticesTo, const Eigen::SparseMatrix< double > &morphMap)
Compute the morphing transformation.