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//=============================================================================================================
64{
65public:
66 SourceMorph() = default;
67
68 //=========================================================================================================
79 void compute(const Eigen::VectorXi& verticesFrom,
80 const Eigen::VectorXi& verticesTo,
81 const Eigen::SparseMatrix<double>& morphMap);
82
83 //=========================================================================================================
91 InvSourceEstimate apply(const InvSourceEstimate& stcFrom) const;
92
93 //=========================================================================================================
99 bool isComputed() const
100 {
101 return m_bComputed;
102 }
103
104 //=========================================================================================================
110 int nVerticesTo() const
111 {
112 return static_cast<int>(m_verticesTo.size());
113 }
114
115private:
116 bool m_bComputed = false;
117 Eigen::VectorXi m_verticesFrom;
118 Eigen::VectorXi m_verticesTo;
119 Eigen::SparseMatrix<double> m_morphMatrix;
120};
121
122} // namespace INVLIB
123
124#endif // SOURCE_MORPH_H
INVLIB library export/import macros, build-info accessors, and namespace docstring for the inverse-so...
#define INVSHARED_EXPORT
Definition inv_global.h:38
InvSourceEstimate value type — central source-space data container produced by every INVLIB inverse s...
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.