Implementation of the INVLIB::tokenize / INVLIB::fromTokens free functions. More...
#include "inv_source_estimate_token.h"#include "inv_source_estimate.h"#include <algorithm>#include <cmath>
Go to the source code of this file.
Namespaces | |
| namespace | INVLIB |
| Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting). | |
Functions | |
| std::vector< InvToken > | INVLIB::tokenize (const InvSourceEstimate &estimate, const InvTokenizeOptions &options=InvTokenizeOptions()) |
| Serialise an InvSourceEstimate into a flat token sequence. | |
| InvSourceEstimate | INVLIB::fromTokens (const std::vector< InvToken > &tokens) |
| Reconstruct an InvSourceEstimate from a token sequence. | |
Implementation of the INVLIB::tokenize / INVLIB::fromTokens free functions.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Walks the InvSourceEstimate in canonical order — metadata, positions, dense grid, coupling groups, focal dipoles, connectivity layers — emitting structural tokens around each section so the parser can re-section the stream without look-ahead. Continuous values (amplitudes, positions, times, correlations) are paired with their InvTokenId in the value field of InvToken; structural tokens leave it at zero. The inverse path is a single-pass state machine that rebuilds each layer as its *Begin / *End brackets are consumed.
Definition in file inv_source_estimate_token.cpp.