Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting). More...
Classes | |
| class | InvBeamformer |
| Computed beamformer spatial filter container. More... | |
| class | InvBeamformerCompute |
| Core beamformer math. More... | |
| class | InvDICS |
| DICS beamformer (frequency-domain). More... | |
| class | InvLCMV |
| LCMV beamformer (time-domain). More... | |
| class | InvDipoleFit |
| High-level driver for sequential dipole fitting. More... | |
| struct | dipoleFitFuncsRec |
| Forward field computation function pointers and client data for MEG and EEG dipole fitting. More... | |
| struct | FitDipUserRec |
| Workspace for the dipole fitting objective function, holding forward model, measured field, and fit limits. More... | |
| class | InvDipoleFitData |
| Dipole fit workspace holding sensor geometry, forward model, noise covariance, and projection data. More... | |
| class | InvDipoleFitSettings |
Settings for the mne_dipole_fit driver (forward model, guess grid, data, projections, output). More... | |
| class | InvDipoleForward |
| Stores forward field matrices and SVD decomposition for magnetic dipole fitting. More... | |
| class | InvEcd |
| Single equivalent current dipole with position, orientation, amplitude, and goodness-of-fit. More... | |
| struct | bdipEcdRec |
| Binary-format dipole record for file I/O, storing fitted dipole parameters and error estimates. More... | |
| class | InvEcdSet |
| Holds a set of Electric Current Dipoles. More... | |
| class | InvGuessData |
| Precomputed guess point grid with forward fields for initial dipole position candidates. More... | |
| class | InvHpiDataUpdater |
| Preprocesses raw HPI coil data (SSP projection, compensation, sinusoidal model fitting) before dipole localization. More... | |
| struct | CoilParam |
| Estimated dipole parameters (position, moment, goodness-of-fit) for a single HPI coil. More... | |
| struct | HpiFitResult |
| Complete HPI fit output: per-coil dipole parameters, head-to-device transform, fit error, and head movement distance. More... | |
| class | InvHpiFit |
| Drives one HPI fit (per-coil dipole localisation, coil ordering, dewar-to-head transform). More... | |
| struct | DipFitError |
| Residual error and moment vector from a single magnetic dipole fit iteration. More... | |
| struct | HPISortStruct |
| Helper for sorting HPI coil dipole fits by matching each fit to the nearest expected coil position. More... | |
| class | InvHpiFitData |
| Per-coil magnetic-dipole fitter (leadfield, residual, Nelder-Mead refinement) for the HPI pipeline. More... | |
| class | InvHpiModelParameters |
| Configuration parameters for the HPI signal model (line frequency, coil frequencies, sample rate, buffer size). More... | |
| class | InvSensorSet |
| Stores MEG sensor geometry (positions, orientations, weights, coil count) for a single sensor type. More... | |
| class | InvSensorSetCreator |
| Builds InvSensorSet objects from FiffInfo channel definitions, applying SSP projections and compensation. More... | |
| class | InvSignalModel |
| Generates the forward sinusoidal model matrix for HPI coil signals at known drive frequencies. More... | |
| struct | InvConnectivity |
| Pairwise source connectivity matrix with measure, directionality, and frequency/time metadata. More... | |
| struct | InvFocalDipole |
| Single focal dipole with free 3D position, moment, and fit-quality metrics. More... | |
| class | InvLabelTimeCourse |
| Extract ROI-level time courses from vertex-level source estimates. More... | |
| class | InvResolutionMatrix |
| Resolution matrix analysis for linear inverse operators. More... | |
| struct | InvSourceCoupling |
| N-tuple of correlated grid sources with orientations and correlation matrix. More... | |
| class | InvSourceEstimate |
| Source-space inverse-solution container with dense grid plus optional focal-dipole, coupling and connectivity layers. More... | |
| class | InvSourceEstimateIO |
| Extended I/O methods for InvSourceEstimate. More... | |
| struct | InvToken |
| One element of a tokenised neural-source representation. More... | |
| struct | InvTokenizeOptions |
| Tokenization options controlling layer inclusion and sub-sampling. More... | |
| class | InvVectorSourceEstimate |
| Vector source estimate: each vertex carries a 3D orientation vector across time. More... | |
| class | InvVolumeSourceEstimate |
| Volume source estimate: scalar values at voxel locations. More... | |
| struct | InvCMNEResult |
| CMNE result. More... | |
| class | InvCMNE |
| CMNE inverse solver. More... | |
| struct | InvCMNESettings |
| CMNE settings. More... | |
| class | InvMinimumNorm |
| Minimum norm estimation. More... | |
| class | SourceMorph |
| Morphs source estimates from one subject's source space to another. More... | |
| class | InvDipole |
| Stores position, orientation, and correlation of a single current dipole estimated by RAP MUSIC. More... | |
| struct | InvDipolePair |
| Pair of correlated dipole indices and orientations found by the RAP MUSIC scanning step. More... | |
| class | InvPwlRapMusic |
| Powell-accelerated RAP MUSIC variant using gradient-free optimization for refined dipole fitting. More... | |
| struct | Pair |
| Index pair representing two grid points evaluated together in the RAP MUSIC subspace scan. More... | |
| class | InvRapMusic |
| RAP MUSIC (Recursively Applied and Projected Multiple Signal Classification) source localization algorithm. More... | |
| struct | TrapMusicDipole |
| Result of a TRAP-MUSIC source scan. More... | |
| class | InvTrapMusic |
| TRAP-MUSIC (Truncated RAP-MUSIC) source localization. More... | |
| struct | InvGammaMapResult |
| class | InvGammaMap |
| Gamma-MAP sparse inverse solver. More... | |
| struct | InvMxneResult |
| class | InvMxne |
| MxNE sparse inverse solver. More... | |
| struct | InvTfMxneResult |
| Result structure for the TF-MxNE solver. More... | |
| struct | InvTfMxneParams |
| Parameters for the TF-MxNE solver. More... | |
| class | InvTfMxne |
| Time-Frequency Mixed-Norm Estimate (TF-MxNE) sparse inverse solver. More... | |
Typedefs | |
| using | dipoleFitFuncs = dipoleFitFuncsRec* |
| Pointer alias for dipoleFitFuncsRec, used throughout the dipole fitting module. | |
| using | bdipEcd = bdipEcdRec* |
Functions | |
| INVSHARED_EXPORT QList< InvSourceEstimate > | applyInverseEpochs (const QList< Eigen::MatrixXd > &epochs, const MNELIB::MNEInverseOperator &inverse, float lambda2, const QString &method="dSPM", float tmin=0.0f, float tstep=0.001f, bool pickNormal=false) |
| Apply inverse operator to each epoch in a list. | |
| INVSHARED_EXPORT InvSourceEstimate | applyInverseRaw (const FIFFLIB::FiffRawData &raw, const MNELIB::MNEInverseOperator &inverse, float lambda2, const QString &method="dSPM", int from=-1, int to=-1, bool pickNormal=false) |
| Apply inverse operator to raw data in blocks. | |
| INVSHARED_EXPORT QPair< Eigen::VectorXd, Eigen::RowVectorXf > | estimateSnr (const FIFFLIB::FiffEvoked &evoked, const MNELIB::MNEInverseOperator &inverse, const QString &method="dSPM") |
| Estimate SNR from evoked data and inverse operator. | |
| INVSHARED_EXPORT QPair< Eigen::MatrixXd, int > | computeWhitener (const FIFFLIB::FiffCov &noiseCov, int rank=0) |
| Compute whitening matrix from a noise covariance. | |
| INVSHARED_EXPORT QPair< Eigen::MatrixXd, Eigen::VectorXd > | computeSourcePsd (const InvSourceEstimate &stc, float sfreq, float fmin=0.0f, float fmax=-1.0f, int nFft=0) |
| Compute PSD for a source estimate using Welch's method. | |
| INVSHARED_EXPORT QMap< QString, Eigen::VectorXd > | computeSourceBandPower (const InvSourceEstimate &stc, float sfreq, const QMap< QString, QPair< float, float > > &bands) |
| Compute band power for source estimate. | |
| INVSHARED_EXPORT const char * | buildDateTime () |
| INVSHARED_EXPORT const char * | buildHash () |
| INVSHARED_EXPORT const char * | buildHashLong () |
| std::vector< InvToken > | tokenize (const InvSourceEstimate &estimate, const InvTokenizeOptions &options=InvTokenizeOptions()) |
| Serialise an InvSourceEstimate into a flat token sequence. | |
| InvSourceEstimate | fromTokens (const std::vector< InvToken > &tokens) |
| Reconstruct an InvSourceEstimate from a token sequence. | |
| std::vector< int32_t > | tokenIds (const std::vector< InvToken > &tokens) |
| std::vector< float > | tokenValues (const std::vector< InvToken > &tokens) |
Variables | |
| constexpr double | BIG_TIME = 1e6 |
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
| using INVLIB::bdipEcd = bdipEcdRec* |
Definition at line 111 of file inv_ecd_set.cpp.
| using INVLIB::dipoleFitFuncs = dipoleFitFuncsRec* |
Pointer alias for dipoleFitFuncsRec, used throughout the dipole fitting module.
Definition at line 93 of file inv_dipole_fit_data.h.
|
strong |
| Enumerator | |
|---|---|
| high | |
| medium | |
| low | |
Definition at line 67 of file inv_sensor_set.h.
|
strong |
Method for inverting the beamformer denominator matrix G^H Cm^{-1} G.
| Enumerator | |
|---|---|
| Matrix | Full matrix inversion per source. |
| Single | Scalar (diagonal) inversion per source. |
Definition at line 66 of file inv_beamformer_settings.h.
|
strong |
Orientation picking mode for beamformer filters.
Definition at line 54 of file inv_beamformer_settings.h.
|
strong |
Weight normalization strategy for beamformer spatial filters.
References:
Definition at line 42 of file inv_beamformer_settings.h.
|
strong |
Enumerates the inverse estimation method that produced a source estimate.
| Enumerator | |
|---|---|
| Unknown | |
| MNE | |
| dSPM | |
| sLORETA | |
| eLORETA | |
| LCMV | |
| DICS | |
| SAM | |
| MixedNorm | |
| GammaMAP | |
| DipoleFit | |
| RapMusic | |
| PwlRapMusic | |
Definition at line 36 of file inv_types.h.
|
strong |
Enumerates the orientation constraint used during source estimation.
| Enumerator | |
|---|---|
| Unknown | |
| Fixed | |
| Free | |
| Loose | |
Definition at line 70 of file inv_types.h.
|
strong |
Enumerates the source space type underlying a source estimate.
| Enumerator | |
|---|---|
| Unknown | |
| Surface | |
| Volume | |
| Mixed | |
| Discrete | |
Definition at line 57 of file inv_types.h.
|
strong |
Token vocabulary for the InvSourceEstimate tokenization format.
IDs are organised into ranges: 0..9 Special tokens (PAD, BOS, EOS, SEP) 10..19 Metadata section markers 20..29 Grid section markers 30..39 Coupling section markers 40..49 Focal-dipole section markers 50..59 Connectivity section markers 60..69 Positions section markers 100..149 Method labels 150..169 Source-space labels 170..189 Orientation labels 200..249 Value-carrier tokens (id + continuous float) 250..279 Boolean tokens 280..299 Dimension/size tokens (id + int-as-float) 300..349 Connectivity measure name tokens 1000+ Reserved for external quantisation bins
Definition at line 62 of file inv_token.h.
| INVSHARED_EXPORT QList< InvSourceEstimate > INVLIB::applyInverseEpochs | ( | const QList< Eigen::MatrixXd > & | epochs, |
| const MNELIB::MNEInverseOperator & | inverse, | ||
| float | lambda2, | ||
| const QString & | method = "dSPM", | ||
| float | tmin = 0.0f, | ||
| float | tstep = 0.001f, | ||
| bool | pickNormal = false ) |
Apply inverse operator to each epoch in a list.
For each epoch (data matrix), applies the minimum norm inverse and returns a list of source estimates. This is the equivalent of MNE-Python's mne.minimum_norm.apply_inverse_epochs().
| [in] | epochs | List of epoch data matrices (n_channels x n_times each). |
| [in] | inverse | Pre-computed inverse operator. |
| [in] | lambda2 | Regularization parameter (1/SNR^2). |
| [in] | method | "MNE", "dSPM", or "sLORETA". |
| [in] | tmin | Start time of each epoch (seconds). |
| [in] | tstep | Time step (1/sfreq). |
| [in] | pickNormal | If true, keep only the normal component. |
| INVSHARED_EXPORT InvSourceEstimate INVLIB::applyInverseRaw | ( | const FIFFLIB::FiffRawData & | raw, |
| const MNELIB::MNEInverseOperator & | inverse, | ||
| float | lambda2, | ||
| const QString & | method = "dSPM", | ||
| int | from = -1, | ||
| int | to = -1, | ||
| bool | pickNormal = false ) |
Apply inverse operator to raw data in blocks.
Reads and processes the raw data in chunks, applying the inverse operator to produce a continuous source estimate. Equivalent of MNE-Python's mne.minimum_norm.apply_inverse_raw().
| [in] | raw | Raw data object. |
| [in] | inverse | Pre-computed inverse operator. |
| [in] | lambda2 | Regularization parameter (1/SNR^2). |
| [in] | method | "MNE", "dSPM", or "sLORETA". |
| [in] | from | First sample to process (default: first_samp). |
| [in] | to | Last sample to process (default: last_samp). |
| [in] | pickNormal | If true, keep only the normal component. |
| const char * INVLIB::buildDateTime | ( | ) |
Returns build date and time.
Definition at line 29 of file inv_global.cpp.
| const char * INVLIB::buildHash | ( | ) |
Returns abbreviated build git hash.
Definition at line 33 of file inv_global.cpp.
| const char * INVLIB::buildHashLong | ( | ) |
Returns full build git hash.
Definition at line 37 of file inv_global.cpp.
| QMap< QString, VectorXd > INVLIB::computeSourceBandPower | ( | const InvSourceEstimate & | stc, |
| float | sfreq, | ||
| const QMap< QString, QPair< float, float > > & | bands ) |
Compute band power for source estimate.
Integrates source PSD within specified frequency bands.
| [in] | stc | Source estimate. |
| [in] | sfreq | Sampling frequency (Hz). |
| [in] | bands | Map of band name -> (fmin, fmax) pairs. |
Definition at line 329 of file inv_convenience.cpp.
| QPair< MatrixXd, VectorXd > INVLIB::computeSourcePsd | ( | const InvSourceEstimate & | stc, |
| float | sfreq, | ||
| float | fmin = 0.0f, | ||
| float | fmax = -1.0f, | ||
| int | nFft = 0 ) |
Compute PSD for a source estimate using Welch's method.
Takes a source estimate (n_sources x n_times) and computes the power spectral density at each source vertex. Equivalent to MNE-Python's mne.minimum_norm.compute_source_psd().
| [in] | stc | Source estimate. |
| [in] | sfreq | Sampling frequency (Hz). |
| [in] | fmin | Minimum frequency of interest (Hz). |
| [in] | fmax | Maximum frequency of interest (Hz). |
| [in] | nFft | FFT length (0 = use data length). |
Definition at line 273 of file inv_convenience.cpp.
| QPair< MatrixXd, int > INVLIB::computeWhitener | ( | const FIFFLIB::FiffCov & | noiseCov, |
| int | rank = 0 ) |
Compute whitening matrix from a noise covariance.
Returns a whitening matrix W such that W * data has identity covariance. Matches MNE-Python's mne.cov.compute_whitener().
| [in] | noiseCov | Noise covariance matrix. |
| [in] | rank | Desired rank (0 = auto from eigenvalues). |
Definition at line 217 of file inv_convenience.cpp.
| QPair< VectorXd, RowVectorXf > INVLIB::estimateSnr | ( | const FIFFLIB::FiffEvoked & | evoked, |
| const MNELIB::MNEInverseOperator & | inverse, | ||
| const QString & | method = "dSPM" ) |
Estimate SNR from evoked data and inverse operator.
Computes source-space SNR estimate using the GFP (Global Field Power) of the evoked data and the noise normalization from the inverse operator.
| [in] | evoked | Evoked data. |
| [in] | inverse | Inverse operator. |
| [in] | method | "MNE", "dSPM", or "sLORETA". |
Definition at line 185 of file inv_convenience.cpp.
| INVSHARED_EXPORT InvSourceEstimate INVLIB::fromTokens | ( | const std::vector< InvToken > & | tokens | ) |
Reconstruct an InvSourceEstimate from a token sequence.
Parses a token stream previously produced by tokenize() and rebuilds the InvSourceEstimate fields (metadata, grid data, positions, couplings, focal dipoles, connectivity). Unknown or out-of-order tokens are silently skipped.
| [in] | tokens | The token sequence to decode. |
Definition at line 353 of file inv_source_estimate_token.cpp.
|
inline |
Extract just the integer token IDs from a token sequence (discarding continuous values). Useful for feeding into a purely discrete embedding table.
| [in] | tokens | The token sequence. |
Definition at line 224 of file inv_token.h.
| INVSHARED_EXPORT std::vector< InvToken > INVLIB::tokenize | ( | const InvSourceEstimate & | estimate, |
| const InvTokenizeOptions & | options = InvTokenizeOptions() ) |
Serialise an InvSourceEstimate into a flat token sequence.
Converts the full multimodal content of an InvSourceEstimate (grid amplitudes, positions, couplings, focal dipoles, connectivity matrices) into a linear sequence of InvToken elements. Each token carries a vocabulary ID and an optional continuous float value.
The options parameter controls which data layers are emitted and allows sub-sampling of dense grids to fit context-limited attention windows.
| [in] | estimate | The source estimate to tokenize. |
| [in] | options | Controls layer inclusion and sub-sampling (default: all layers, no sub-sampling). |
Definition at line 198 of file inv_source_estimate_token.cpp.
|
inline |
Extract just the continuous values from a token sequence (discarding IDs). Useful as the real-valued branch in a hybrid discrete-continuous embedding.
| [in] | tokens | The token sequence. |
Definition at line 240 of file inv_token.h.
|
inlineconstexpr |
Definition at line 59 of file inv_dipole_fit_settings.h.