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

Viewport subdivision holding its own camera, projection, and scissor rectangle. More...

#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
int currentTimePoint = 0
double playbackSpeed = 1.0
double stcStepAccum = 0.0
bool isPlaying = false

Detailed Description

Viewport subdivision holding its own camera, projection, and scissor rectangle.

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 142 of file viewstate.h.

Member Function Documentation

◆ applyOverlayToSurfaces()

void DISP3DLIB::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.

Parameters
[in,out]surfacesSurface map keyed by surface name; matching surfaces get their visualization mode updated.

Definition at line 280 of file viewstate.cpp.

◆ defaultForIndex()

SubView DISP3DLIB::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.

Parameters
[in]indexZero-based viewport index.
Returns
Enabled SubView with preset index % 7 and the cycled brain shader.

Definition at line 358 of file viewstate.cpp.

◆ isBrainSurfaceKey()

bool DISP3DLIB::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.

Parameters
[in]keySurface map key to classify.
Returns
True if the key is non-empty and has no bem_, sens_, srcsp_ or dig_ prefix.

Definition at line 200 of file viewstate.cpp.

◆ load()

void DISP3DLIB::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 475 of file viewstate.cpp.

◆ matchesSurfaceType()

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

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

Parameters
[in]keySurface map key to test.
Returns
True if the key is a brain surface key ending with surfaceType.

Definition at line 217 of file viewstate.cpp.

◆ save()

void DISP3DLIB::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 510 of file viewstate.cpp.

◆ shouldRenderSurface()

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

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

Parameters
[in]keySurface map key to test.
Returns
True if the visibility profile enables this surface; unknown keys return true.

Definition at line 224 of file viewstate.cpp.

Member Data Documentation

◆ bemShader

ShaderMode DISP3DLIB::SubView::bemShader = Standard

Definition at line 147 of file viewstate.h.

◆ brainShader

ShaderMode DISP3DLIB::SubView::brainShader = Standard

Definition at line 146 of file viewstate.h.

◆ currentTimePoint

int DISP3DLIB::SubView::currentTimePoint = 0

Definition at line 159 of file viewstate.h.

◆ enabled

bool DISP3DLIB::SubView::enabled = true

Definition at line 156 of file viewstate.h.

◆ isPlaying

bool DISP3DLIB::SubView::isPlaying = false

Definition at line 162 of file viewstate.h.

◆ overlayMode

VisualizationMode DISP3DLIB::SubView::overlayMode = ModeSurface

Definition at line 148 of file viewstate.h.

◆ pan

QVector2D DISP3DLIB::SubView::pan

Definition at line 153 of file viewstate.h.

◆ perspectiveRotation

QQuaternion DISP3DLIB::SubView::perspectiveRotation

Definition at line 154 of file viewstate.h.

◆ playbackSpeed

double DISP3DLIB::SubView::playbackSpeed = 1.0

Definition at line 160 of file viewstate.h.

◆ preset

int DISP3DLIB::SubView::preset = 1

Definition at line 155 of file viewstate.h.

◆ stcStepAccum

double DISP3DLIB::SubView::stcStepAccum = 0.0

Definition at line 161 of file viewstate.h.

◆ surfaceType

QString DISP3DLIB::SubView::surfaceType = "pial"

Definition at line 145 of file viewstate.h.

◆ visibility

ViewVisibilityProfile DISP3DLIB::SubView::visibility

Definition at line 149 of file viewstate.h.

◆ zoom

float DISP3DLIB::SubView::zoom = 0.0f

Definition at line 152 of file viewstate.h.


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