Implementation of per-viewport SubView / ViewVisibilityProfile state and QSettings round-trip. More...
#include "viewstate.h"#include "renderable/brainsurface.h"#include "view/brainrenderer.h"#include <QSettings>#include <cmath>#include <limits>
Go to the source code of this file.
Functions | |
| QQuaternion | perspectivePresetRotation () |
| QString | multiViewPresetName (int preset) |
| QQuaternion | multiViewPresetOffset (int preset) |
| bool | multiViewPresetIsPerspective (int preset) |
| int | normalizedVisualizationTarget (int target, int maxIndex) |
| ShaderMode | shaderModeFromName (const QString &name) |
| QString | shaderModeName (ShaderMode mode) |
| VisualizationMode | visualizationModeFromName (const QString &name) |
| QString | visualizationModeName (VisualizationMode mode) |
| QRgb | mneAnalyzeColor (double v) |
Implementation of per-viewport SubView / ViewVisibilityProfile state and QSettings round-trip.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Definition in file viewstate.cpp.
| QRgb mneAnalyzeColor | ( | double | v | ) |
MNE analyze colormap: teal → blue → gray → red → yellow.
Port of mne_analyze_colormap(format='vtk') from MNE-Python. Input v is normalised to [0,1] where 0.5 corresponds to zero field.
| [in] | v | Normalised value in [0,1]. |
Definition at line 349 of file viewstate.cpp.
| bool multiViewPresetIsPerspective | ( | int | preset | ) |
Whether a preset is a perspective (free-rotate) camera rather than an orthographic-style fixed camera.
Definition at line 271 of file viewstate.cpp.
| QString multiViewPresetName | ( | int | preset | ) |
Human-readable name for a multi-view preset index (0–6).
Definition at line 225 of file viewstate.cpp.
| QQuaternion multiViewPresetOffset | ( | int | preset | ) |
Camera rotation quaternion for a multi-view preset index (0–6).
Definition at line 241 of file viewstate.cpp.
| int normalizedVisualizationTarget | ( | int | target, |
| int | maxIndex = 3 ) |
Clamp a visualization target index to [-1, maxIndex].
| [in] | target | Raw target index (-1 = single view, 0+ = multi pane). |
| [in] | maxIndex | Upper bound (inclusive). Defaults to 3 for backwards compatibility, but callers should pass viewportCount-1. |
Definition at line 301 of file viewstate.cpp.
| QQuaternion perspectivePresetRotation | ( | ) |
Default perspective rotation quaternion used for the "Perspective" camera.
Definition at line 218 of file viewstate.cpp.
| ShaderMode shaderModeFromName | ( | const QString & | name | ) |
Convert a shader name ("Standard", "Holographic", "Anatomical") to enum.
Definition at line 308 of file viewstate.cpp.
| QString shaderModeName | ( | ShaderMode | mode | ) |
Convert a ShaderMode enum to display string.
Definition at line 318 of file viewstate.cpp.
| VisualizationMode visualizationModeFromName | ( | const QString & | name | ) |
Convert a visualization mode name to enum.
Definition at line 327 of file viewstate.cpp.
| QString visualizationModeName | ( | VisualizationMode | mode | ) |
Convert a VisualizationMode enum to display string.
Definition at line 337 of file viewstate.cpp.