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

Real-time continuous Head-Position-Indicator (cHPI) coil-localisation worker. More...

#include "../dsp_global.h"
#include <inv/hpi/inv_sensor_set.h>
#include <inv/hpi/inv_signal_model.h>
#include <Eigen/Core>
#include <QThread>
#include <QMutex>
#include <QSharedPointer>
#include <QVector>
Include dependency graph for rt_hpis.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RTPROCESSINGLIB::RtHpiWorker
 Background worker thread that runs continuous HPI coil localization. More...
class  RTPROCESSINGLIB::RtHpi
 Controller that manages RtHpiWorker for continuous head position tracking. More...

Namespaces

namespace  FIFFLIB
 FIFF file I/O, in-memory data structures and high-level readers/writers.
namespace  INVLIB
 Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
namespace  RTPROCESSINGLIB

Detailed Description

Real-time continuous Head-Position-Indicator (cHPI) coil-localisation worker.

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.1.0
Date
March 2026

RtHpi runs the inverse-library HPI fitter (INVLIB::InvHpiFit) on each incoming data window from a background QThread. For every window the worker extracts the narrow-band cHPI carriers at the configured coil frequencies, fits a single-dipole model to each carrier amplitude / phase pattern and emits an INVLIB::HpiFitResult containing the estimated coil positions, the head-to-device transform and per-coil goodness-of-fit values.

The continuously updated head-to-device transform is the input to Maxwell movement compensation (MaxwellMovementComp), to the live coordinate-frame display, and to dynamic forward-solution updates. The threaded design keeps the GUI responsive even when the HPI fit is run at the full block rate of a multi-channel acquisition.

Definition in file rt_hpis.h.