InvDipoleFitSettings
Namespace: INVLIB · Library: Inverse Library
#include <inv/inv_dipole_fit_settings.h>
class INVLIB::InvDipoleFitSettings
Command-line and programmatic settings for the mne_dipole_fit driver: BEM / sphere model, EEG model, guess-grid parameters, noise-covariance file, measurement file + time window, projection list, per-channel-type regularisation and output dip/bdip file names.
Can be populated from argc / argv or directly by application code.
Settings for the mne_dipole_fit driver (forward model, guess grid, data, projections, output).
Public Methods
InvDipoleFitSettings()
Default Constructor.
InvDipoleFitSettings(argc, argv)
Constructs Dipole Fit Settings.
Parameters:
-
argc : *int ** (argument count) is an integer that indicates how many arguments were entered on the command line when the program was started.
-
argv : *char *** (argument vector) is an array of pointers to arrays of character objects. The array objects are null-terminated strings, representing the arguments that were entered on the command line when the program was started.
~InvDipoleFitSettings()
Destructs the Dipole Fit Settings.
checkIntegrity()
Check whether Dipole Fit Settings are correctly set and report them.
Returns:
- bool — true if all required settings are present; otherwise the missing one is reported.
Used in examples
ex_inv_dipole_fit
Inverse library: equivalent current dipole fitting in a sphere model.
InvDipoleFitSettings settings; // the options of the MNE-C mne_dipole_fit tool
settings.measname = tmp.filePath("synthetic-ave.fif");
settings.include_meg = true;
settings.include_eeg = false;
settings.guess_mindist = 0.0f;
settings.tmin = 0.0f;
settings.dipname = tmp.filePath("fit.dat"); // MNE-C .dat dipole file
settings.checkIntegrity();
InvDipoleFit fit(&settings);
InvEcdSet dipoles = fit.calculateFit();
const bool saved = dipoles.save_dipoles_dip(tmp.filePath("fit.dip")); // readable by mne.read_dipole
const InvEcdSet reread = InvEcdSet::read_dipoles_dip(tmp.filePath("fit.dip"));
const Vector3d posMm = dipoles.size() > 0 ? Vector3d(1e3 * dipoles[0].rd.cast<double>()) : Vector3d::Zero();
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>