v2.0.0
Loading...
Searching...
No Matches
INVLIB::SourceMorph Class Reference

Morphs source estimates from one subject's source space to another. More...

#include <source_morph.h>

Public Member Functions

 SourceMorph ()=default
void compute (const Eigen::VectorXi &verticesFrom, const Eigen::VectorXi &verticesTo, const Eigen::SparseMatrix< double > &morphMap)
 Compute the morphing transformation.
InvSourceEstimate apply (const InvSourceEstimate &stcFrom) const
 Apply the morphing to a source estimate.
bool isComputed () const
 Check if the morph has been computed.
int nVerticesTo () const
 Get the number of target vertices.

Detailed Description

Morphs source estimates from one subject's source space to another.

Usage:

morph.compute(srcVerticesFrom, srcVerticesTo, morphMapLh, morphMapRh);
InvSourceEstimate morphed = morph.apply(stc);
Source-space inverse-solution container with dense grid plus optional focal-dipole,...
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.

Definition at line 66 of file source_morph.h.

Constructor & Destructor Documentation

◆ SourceMorph()

INVLIB::SourceMorph::SourceMorph ( )
default

Member Function Documentation

◆ apply()

InvSourceEstimate SourceMorph::apply ( const InvSourceEstimate & stcFrom) const

Apply the morphing to a source estimate.

Parameters
[in]stcFromSource estimate in the "from" subject's space.
Returns
Morphed source estimate in the "to" subject's space.

Definition at line 68 of file source_morph.cpp.

◆ compute()

void SourceMorph::compute ( const Eigen::VectorXi & verticesFrom,
const Eigen::VectorXi & verticesTo,
const Eigen::SparseMatrix< double > & morphMap )

Compute the morphing transformation.

Builds a sparse interpolation matrix that maps source estimate data from one vertex set to another using nearest-neighbor interpolation.

Parameters
[in]verticesFromSource vertices in the "from" subject's source space.
[in]verticesToTarget vertices in the "to" subject's source space.
[in]morphMapSparse interpolation matrix (nTo x nFrom) — e.g. from MNEMorphMap::map.

Definition at line 44 of file source_morph.cpp.

◆ isComputed()

bool INVLIB::SourceMorph::isComputed ( ) const
inline

Check if the morph has been computed.

Definition at line 100 of file source_morph.h.

◆ nVerticesTo()

int INVLIB::SourceMorph::nVerticesTo ( ) const
inline

Get the number of target vertices.

Definition at line 106 of file source_morph.h.


The documentation for this class was generated from the following files: