v2.0.0
Loading...
Searching...
No Matches
SubView Struct Reference

#include <viewstate.h>

Public Member Functions

bool matchesSurfaceType (const QString &key) const
bool shouldRenderSurface (const QString &key) const
void applyOverlayToSurfaces (QMap< QString, std::shared_ptr< BrainSurface > > &surfaces) const
void load (const QSettings &settings, const QString &prefix, const QQuaternion &fallbackRotation=QQuaternion())
void save (QSettings &settings, const QString &prefix) const

Static Public Member Functions

static bool isBrainSurfaceKey (const QString &key)
static SubView defaultForIndex (int index)

Public Attributes

QString surfaceType = "pial"
ShaderMode brainShader = Standard
ShaderMode bemShader = Standard
VisualizationMode overlayMode = ModeSurface
ViewVisibilityProfile visibility
float zoom = 0.0f
QVector2D pan
QQuaternion perspectiveRotation
int preset = 1
bool enabled = true

Detailed Description

Encapsulates all per-view state for a single viewport (single view or one pane in multi-view).

The class stores shader, surface type, overlay mode, visibility flags, zoom, pan, camera rotation, and view preset — everything that can differ between two viewports showing the same scene.

Definition at line 143 of file viewstate.h.

Member Function Documentation

◆ applyOverlayToSurfaces()

void SubView::applyOverlayToSurfaces ( QMap< QString, std::shared_ptr< BrainSurface > > & surfaces) const

Apply this view's overlayMode to every brain surface whose key matches surfaceType. Non-brain surfaces are never touched.

Definition at line 217 of file viewstate.cpp.

◆ defaultForIndex()

SubView SubView::defaultForIndex ( int index)
static

Return default SubView configuration for viewport index.

The preset cycles through the 7 camera orientations (Top, Perspective, Front, Left, Bottom, Back, Right) and the shader cycles through Anatomical → Standard → Holographic.

Definition at line 293 of file viewstate.cpp.

◆ isBrainSurfaceKey()

bool SubView::isBrainSurfaceKey ( const QString & key)
static

True when key identifies a brain-tissue surface (lh_/rh_) as opposed to BEM, sensor, digitizer, or source-space geometry.

Definition at line 169 of file viewstate.cpp.

◆ load()

void SubView::load ( const QSettings & settings,
const QString & prefix,
const QQuaternion & fallbackRotation = QQuaternion() )

Load this SubView's state from QSettings under the given prefix.

Parameters
[in]settingsSettings store to read from.
[in]prefixKey prefix (e.g. "multi0_").
[in]fallbackRotationRotation to use if no saved quaternion exists.

Definition at line 397 of file viewstate.cpp.

◆ matchesSurfaceType()

bool SubView::matchesSurfaceType ( const QString & key) const

True when the brain-surface key matches this view's surfaceType (e.g. "lh_pial" matches surfaceType "pial").

Definition at line 180 of file viewstate.cpp.

◆ save()

void SubView::save ( QSettings & settings,
const QString & prefix ) const

Save this SubView's state to QSettings under the given prefix.

Parameters
[out]settingsSettings store to write to.
[in]prefixKey prefix (e.g. "multi0_").

Definition at line 435 of file viewstate.cpp.

◆ shouldRenderSurface()

bool SubView::shouldRenderSurface ( const QString & key) const

True when the surface identified by key should be rendered according to this view's visibility profile.

Definition at line 187 of file viewstate.cpp.

Member Data Documentation

◆ bemShader

ShaderMode SubView::bemShader = Standard

Definition at line 148 of file viewstate.h.

◆ brainShader

ShaderMode SubView::brainShader = Standard

Definition at line 147 of file viewstate.h.

◆ enabled

bool SubView::enabled = true

Definition at line 157 of file viewstate.h.

◆ overlayMode

VisualizationMode SubView::overlayMode = ModeSurface

Definition at line 149 of file viewstate.h.

◆ pan

QVector2D SubView::pan

Definition at line 154 of file viewstate.h.

◆ perspectiveRotation

QQuaternion SubView::perspectiveRotation

Definition at line 155 of file viewstate.h.

◆ preset

int SubView::preset = 1

Definition at line 156 of file viewstate.h.

◆ surfaceType

QString SubView::surfaceType = "pial"

Definition at line 146 of file viewstate.h.

◆ visibility

ViewVisibilityProfile SubView::visibility

Definition at line 150 of file viewstate.h.

◆ zoom

float SubView::zoom = 0.0f

Definition at line 153 of file viewstate.h.


The documentation for this struct was generated from the following files: