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

Per-viewport state (camera preset, zoom, pan, visibility filter) and serialisation helpers. More...

#include "../disp3D_global.h"
#include "rendertypes.h"
#include <QString>
#include <QMap>
#include <QQuaternion>
#include <QVector2D>
#include <QVariant>
#include <QColor>
#include <algorithm>
#include <memory>
Include dependency graph for viewstate.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DISP3DLIB::ViewVisibilityProfile
 Per-view toggle flags controlling which data layers (brain, sensors, sources, network) are visible. More...
struct  DISP3DLIB::SubView
 Viewport subdivision holding its own camera, projection, and scissor rectangle. More...

Namespaces

namespace  DISP3DLIB
 3-D brain visualisation using the Qt RHI rendering backend.

Functions

QQuaternion DISP3DLIB::perspectivePresetRotation ()
QString DISP3DLIB::multiViewPresetName (int preset)
QQuaternion DISP3DLIB::multiViewPresetOffset (int preset)
bool DISP3DLIB::multiViewPresetIsPerspective (int preset)
int DISP3DLIB::normalizedVisualizationTarget (int target, int maxIndex)
ShaderMode DISP3DLIB::shaderModeFromName (const QString &name)
QString DISP3DLIB::shaderModeName (ShaderMode mode)
VisualizationMode DISP3DLIB::visualizationModeFromName (const QString &name)
QString DISP3DLIB::visualizationModeName (VisualizationMode mode)
QRgb DISP3DLIB::mneAnalyzeColor (double v)
bool DISP3DLIB::isTrue (const QVariant &value, bool fallback)

Detailed Description

Per-viewport state (camera preset, zoom, pan, visibility filter) and serialisation helpers.

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

A disp3D scene can be displayed either in a single interactive viewport or in a 2x2 multi-view grid. DISP3DLIB::SubView holds the per-pane camera state — preset (Top / Left / Front / Perspective), zoom, pan offset and rotation quaternion — and DISP3DLIB::ViewVisibilityProfile holds the per-pane visibility mask (hide skin in the cortex view, hide dipoles in the sensor view, ...).

Both structs are POD-like and round-trip through QSettings so the user's last camera and per-pane filter are restored when the host application is relaunched.

Definition in file viewstate.h.