v2.0.0
Loading...
Searching...
No Matches
inv_source_estimate_token.h File Reference

Tokeniser and de-tokeniser that turn an INVLIB::InvSourceEstimate into a flat sequence consumable by foundation-model architectures. More...

#include "inv_global.h"
#include "inv_token.h"
#include <vector>
Include dependency graph for inv_source_estimate_token.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  INVLIB
 Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).

Functions

std::vector< InvTokenINVLIB::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.

Detailed Description

Tokeniser and de-tokeniser that turn an INVLIB::InvSourceEstimate into a flat sequence consumable by foundation-model architectures.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
March 2026

Declares the free functions INVLIB::tokenize and INVLIB::fromTokens that round-trip an InvSourceEstimate through the InvToken vocabulary defined in inv_token.h. The tokeniser walks the estimate's metadata, dense grid, vertex list, focal dipoles, coupling groups and connectivity layers and emits a self-describing sequence framed by BOS / EOS markers. The InvTokenizeOptions struct enables sub-sampling or layer omission for context-limited transformer windows, while the inverse parser silently skips unknown tokens to keep the format forward-compatible.

Definition in file inv_source_estimate_token.h.