v2.0.0
Loading...
Searching...
No Matches
FWDLIB::ComputeFwd Class Reference

Top-level driver for MEG/EEG forward-solution computation. More...

#include <compute_fwd.h>

Public Member Functions

 ComputeFwd (std::shared_ptr< ComputeFwdSettings > pSettings)
virtual ~ComputeFwd ()
std::unique_ptr< MNELIB::MNEForwardSolutioncalculateFwd ()
bool updateHeadPos (const FIFFLIB::FiffCoordTrans &transDevHead, MNELIB::MNEForwardSolution &fwd)

Detailed Description

Top-level driver for MEG/EEG forward-solution computation.

Implements the forward-solution computation driver.

ComputeFwd is the worker/factory that takes a ComputeFwdSettings, initialises all required data structures (coil definitions, BEM or sphere model, source spaces, compensation data, coordinate transforms) and assembles the MEG/EEG lead-field matrix G one dipole column at a time. The computed MNEForwardSolution is returned by calculateFwd; updateHeadPos rebuilds only the MEG block after a new device-to-head transform.

Definition at line 99 of file compute_fwd.h.

Constructor & Destructor Documentation

◆ ComputeFwd()

ComputeFwd::ComputeFwd ( std::shared_ptr< ComputeFwdSettings > pSettings)
explicit

Constructs a ComputeFwd and initialises all data structures needed for the forward computation according to pSettings.

Parameters
[in]pSettingsShared pointer to the forward computation settings.

Definition at line 55 of file compute_fwd.cpp.

◆ ~ComputeFwd()

ComputeFwd::~ComputeFwd ( )
virtual

Destructor.

Definition at line 67 of file compute_fwd.cpp.

Member Function Documentation

◆ calculateFwd()

std::unique_ptr< MNEForwardSolution > ComputeFwd::calculateFwd ( )

Perform the forward calculation.

Returns
The computed forward solution, or nullptr on error.

Definition at line 507 of file compute_fwd.cpp.

◆ updateHeadPos()

bool ComputeFwd::updateHeadPos ( const FIFFLIB::FiffCoordTrans & transDevHead,
MNELIB::MNEForwardSolution & fwd )

Update the head position with a new device-to-head transform and recompute the MEG portion of the forward solution.

Parameters
[in]transDevHeadThe updated device-to-head coordinate transform.
[in,out]fwdThe forward solution to update in place.
Returns
True on success, false on error.

Definition at line 607 of file compute_fwd.cpp.


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