v2.0.0
Loading...
Searching...
No Matches
DISP3DLIB Namespace Reference

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

Classes

class  DataLoader
 Pure I/O helpers that load MNE data files and return results. More...
struct  ViewVisibilityProfile
 Per-view toggle flags controlling which data layers (brain, sensors, sources, network) are visible. More...
struct  SubView
 Viewport subdivision holding its own camera, projection, and scissor rectangle. More...
class  MeshFactory
 Static factory for procedural mesh primitives. More...
class  GeometryInfo
 This class holds static methods for sensor-to-mesh mapping and surface constrained distance calculation on a mesh. More...
class  Interpolation
 This class holds methods for creating distance-based weight matrices and for interpolating signals. More...
struct  CameraResult
 Computed camera matrices (projection, view, model) and vectors for a single viewport. More...
class  CameraController
 Camera state and matrix computation. More...
struct  RayHit
 Result of a ray–mesh intersection test containing the hit point, triangle index, and distance. More...
class  RayPicker
 Ray casting and intersection testing. More...
class  BrainTreeModel
 Hierarchical item model organizing all 3-D scene objects (surfaces, sensors, sources, networks) for QTreeView. More...
class  AbstractTreeItem
 Base tree item providing check-state, visibility, and data-role storage for all 3-D scene items. More...
class  BemTreeItem
 Tree item representing a BEM surface layer in the 3-D scene hierarchy. More...
class  DigitizerSetTreeItem
 Digitizer point set container tree item. More...
class  DigitizerTreeItem
 Digitizer point group tree item. More...
class  DipoleTreeItem
 Tree item representing a set of fitted dipoles in the 3-D scene hierarchy. More...
class  NetworkTreeItem
 Tree item representing a connectivity network. More...
class  SensorTreeItem
 Tree item representing MEG or EEG sensor positions in the 3-D scene hierarchy. More...
class  SourceSpaceTreeItem
 Source space point tree item. More...
class  SurfaceTreeItem
 Tree item representing a FreeSurfer cortical surface in the 3-D scene hierarchy. More...
struct  VertexData
 Interleaved vertex attributes (position, normal, color, curvature) for brain surface GPU upload. More...
class  BrainSurface
 Renderable cortical surface mesh with per-vertex color, curvature data, and GPU buffer management. More...
class  DipoleObject
 Renderable dipole arrow set with instanced GPU rendering for QRhi. More...
struct  ElectrodeContact
 Single contact on a depth electrode shaft. More...
struct  ElectrodeArray
 One electrode array — sEEG depth shaft, ECoG strip, or ECoG grid. More...
class  ElectrodeObject
 Data model for stereotactic depth electrode (sEEG) visualization. More...
class  NetworkObject
 Renderable network visualization for QRhi. More...
class  PolylineObject
 Connected line segments through an ordered list of points. More...
class  SliceObject
 Data model for a single 2-D MRI volume slice. More...
class  SourceEstimateOverlay
 Color-mapped source estimate overlay that interpolates activation values onto a cortical surface mesh. More...
class  VideoOverlay
 Camera-facing textured quad rendered at a focus point in the 3-D scene. More...
struct  SceneLayer
 Opaque, type-erased handle to a layer payload. More...
class  MultimodalScene
 Host-app-agnostic controller that owns the ordered renderable set and dispatches picks back to the producing layer. More...
struct  PickResult
 Uniform payload for object-id picking across the multimodal scene. More...
class  RtSensorStreamManager
 Real-time sensor streaming lifecycle manager. More...
class  SensorFieldMapper
 Sensor-to-surface field mapper that interpolates MEG/EEG measurements onto cortical meshes and generates iso-contour overlays. More...
class  SourceEstimateManager
 Source estimate lifecycle manager. More...
class  BrainRenderer
 Qt RHI-based 3-D renderer managing scene objects, lighting, camera, and render pipeline for brain visualization. More...
struct  LiveMarker
 Lightweight live overlay marker rendered as a single sphere. More...
class  BrainView
 Top-level QWidget hosting the QRhi-based 3-D brain visualization with mouse interaction and multi-view support. More...
class  MultiViewLayout
 Multi-view geometry computations. More...
class  RtSensorDataController
 Controller for real-time sensor data streaming. More...
class  RtSensorDataWorker
 Background worker for real-time sensor data streaming. More...
class  RtSensorInterpolationMatWorker
 Background worker for computing sensor field mapping matrices. More...
class  RtSourceDataController
 Controller for real-time source estimate streaming. More...
class  RtSourceDataWorker
 Background worker for real-time source estimate streaming. More...
class  RtSourceInterpolationMatWorker
 Background worker for computing source interpolation matrices. More...
class  StcLoadingWorker
 Background worker that loads source estimate (STC) files and emits loaded data for visualization. More...

Typedefs

using FieldMap = FWDLIB::FwdFieldMap

Enumerations

enum  ShaderMode {
  Standard , Holographic , Anatomical , Dipole ,
  XRay , ShowNormals
}
enum  VisualizationMode { ModeSurface , ModeAnnotation , ModeScientific , ModeSourceEstimate }
enum class  ElectrodeLayout { Depth = 0 , Strip , Grid }
 Geometry layout for an electrode array. More...
enum class  SliceOrientation { Axial = 0 , Coronal = 1 , Sagittal = 2 }
 Orientation for an orthogonal MRI slice. More...
enum class  SceneLayerKind {
  BrainSurface = 0 , MriSlice , Sensor , Helmet ,
  Electrode , Dipole , SourceOverlay , Network ,
  Custom
}
 Modality of a layer in the multimodal scene. More...
enum class  PickKind {
  None = 0 , CorticalVertex , ElectrodeContact , Sensor ,
  MriVoxel , Dipole , Bem , Custom
}
 Kind of object that produced a 3-D pick. More...
enum class  SplitterHit { None , Vertical , Horizontal , Both }

Functions

uint32_t packABGR (uint32_t r, uint32_t g, uint32_t b, uint32_t a=0xFF)
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)
bool isTrue (const QVariant &value, bool fallback)
const char * buildDateTime ()
const char * buildHash ()
const char * buildHashLong ()
bool isHit (const PickResult &r) noexcept

Detailed Description

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

Typedef Documentation

◆ FieldMap

Deprecated
Use FWDLIB::FwdFieldMap instead.

Definition at line 24 of file field_map.h.

Enumeration Type Documentation

◆ ElectrodeLayout

enum class DISP3DLIB::ElectrodeLayout
strong

Geometry layout for an electrode array.

Added in v2.3.0 to extend the original sEEG-only ElectrodeObject with ECoG strip and grid topologies. The renderer interprets the layout field on ElectrodeArray:

  • Depth — render the cylindrical shaft + sphere instances per contact (the only mode supported in v2.2.0).
  • Strip — render sphere instances only, no shaft (a 1×N ECoG strip).
  • Grid — render sphere instances on a regular gridRows × gridCols lattice, optionally with a translucent quad mesh linking the contacts as a visual reference.
Enumerator
Depth 

Stereotactic depth electrode (cylinder + contacts).

Strip 

1×N ECoG strip — spheres only.

Grid 

gridRows × gridCols ECoG grid — spheres + optional mesh.

Definition at line 92 of file electrodeobject.h.

◆ PickKind

enum class DISP3DLIB::PickKind
strong

Kind of object that produced a 3-D pick.

The enum is intentionally flat (rather than a class hierarchy) so that PickResult stays a trivially copyable POD that can be queued, signalled, and serialized without owning any GPU resources.

Enumerator
None 

No hit.

CorticalVertex 

Vertex on a cortical surface.

ElectrodeContact 

Contact on an sEEG / ECoG / EEG electrode.

Sensor 

MEG / EEG sensor element.

MriVoxel 

Voxel on an MRI ortho slice.

Dipole 

Dipole renderable.

Bem 

Triangle on a BEM surface.

Custom 

User-supplied renderable.

Definition at line 49 of file pickresult.h.

◆ SceneLayerKind

enum class DISP3DLIB::SceneLayerKind
strong

Modality of a layer in the multimodal scene.

The scene draws layers in modality order so opaque geometry (cortex, BEM, MRI slices) renders before translucent overlays (source-estimate, sensor, dipole, electrode highlights, network graph).

Enumerator
BrainSurface 

Cortical or BEM surface.

MriSlice 

MRI orthogonal slice.

Sensor 

MEG/EEG sensor positions.

Helmet 

MEG helmet shell.

Electrode 

sEEG / ECoG electrode array.

Dipole 

Dipole renderable.

SourceOverlay 

Source-estimate activation overlay.

Network 

Connectivity network graph.

Custom 

Host-app-specific renderable.

Definition at line 57 of file multimodalscene.h.

◆ ShaderMode

Shader pipeline modes supported by the renderer.

Each mode corresponds to a different GPU shader program and visual style. Values are kept compatible with the original BrainRenderer::ShaderMode enum.

Enumerator
Standard 

Default Phong-style shading.

Holographic 

Two-sided holographic effect.

Anatomical 

Anatomical / curvature-based coloring.

Dipole 

Specialized dipole rendering.

XRay 

Semi-transparent X-ray effect.

ShowNormals 

Visualise surface normals as colour.

Definition at line 63 of file rendertypes.h.

◆ SliceOrientation

enum class DISP3DLIB::SliceOrientation
strong

Orientation for an orthogonal MRI slice.

Enumerator
Axial 

XY plane (Z = const).

Coronal 

XZ plane (Y = const).

Sagittal 

YZ plane (X = const).

Definition at line 60 of file sliceobject.h.

◆ SplitterHit

enum class DISP3DLIB::SplitterHit
strong

Identifies which splitter(s) are hit by a cursor position.

Enumerator
None 
Vertical 
Horizontal 
Both 

Definition at line 42 of file multiviewlayout.h.

◆ VisualizationMode

Overlay visualisation modes for brain surfaces.

Controls which vertex-colour channel drives the final appearance. Values are kept compatible with the original BrainSurface::VisualizationMode enum.

Enumerator
ModeSurface 

Plain surface colours (curvature-derived).

ModeAnnotation 

Atlas / parcellation annotation colours.

ModeScientific 

Scientific colourmap (curvature).

ModeSourceEstimate 

Source-estimate overlay colours.

Definition at line 80 of file rendertypes.h.

Function Documentation

◆ buildDateTime()

const char * DISP3DLIB::buildDateTime ( )

Returns build date and time.

Returns
Static C string with the build timestamp.

Definition at line 29 of file disp3D_global.cpp.

◆ buildHash()

const char * DISP3DLIB::buildHash ( )

Returns abbreviated build git hash.

Returns
Static C string with the short git commit hash.

Definition at line 33 of file disp3D_global.cpp.

◆ buildHashLong()

const char * DISP3DLIB::buildHashLong ( )

Returns full build git hash.

Returns
Static C string with the full git commit hash.

Definition at line 37 of file disp3D_global.cpp.

◆ isHit()

bool DISP3DLIB::isHit ( const PickResult & r)
inlinenoexcept
Parameters
[in]rPick result to test.
Returns
True iff the pick reports a hit (kind != None).

Definition at line 128 of file pickresult.h.

◆ isTrue()

bool DISP3DLIB::isTrue ( const QVariant & value,
bool fallback )
inline

Read a boolean from QSettings with a default fallback.

Parameters
[in]valueValue read from QSettings.
[in]fallbackResult to use when the value is invalid (key missing).
Returns
The value converted to bool, or fallback if the value is invalid.

Definition at line 345 of file viewstate.h.

◆ mneAnalyzeColor()

DISP3DSHARED_EXPORT QRgb DISP3DLIB::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.

Parameters
[in]vNormalised value in [0,1].
Returns
Packed QRgb colour.

Definition at line 438 of file viewstate.cpp.

◆ multiViewPresetIsPerspective()

DISP3DSHARED_EXPORT bool DISP3DLIB::multiViewPresetIsPerspective ( int preset)

Whether a preset is a perspective (free-rotate) camera rather than an orthographic-style fixed camera.

Parameters
[in]presetPreset index (0=Top, 1=Perspective, ..., 6=Right).
Returns
True only for preset 1 (Perspective).

Definition at line 349 of file viewstate.cpp.

◆ multiViewPresetName()

DISP3DSHARED_EXPORT QString DISP3DLIB::multiViewPresetName ( int preset)

Human-readable name for a multi-view preset index (0–6).

Parameters
[in]presetPreset index (0=Top, 1=Perspective, ..., 6=Right).
Returns
Preset name such as "Front"; out-of-range indices return "Top".

Definition at line 301 of file viewstate.cpp.

◆ multiViewPresetOffset()

DISP3DSHARED_EXPORT QQuaternion DISP3DLIB::multiViewPresetOffset ( int preset)

Camera rotation quaternion for a multi-view preset index (0–6).

Parameters
[in]presetPreset index (0=Top, 1=Perspective, ..., 6=Right).
Returns
Camera rotation for the preset; out-of-range indices return the Top rotation.

Definition at line 325 of file viewstate.cpp.

◆ normalizedVisualizationTarget()

DISP3DSHARED_EXPORT int DISP3DLIB::normalizedVisualizationTarget ( int target,
int maxIndex = 3 )

Clamp a visualization target index to [-1, maxIndex].

Parameters
[in]targetRaw target index (-1 = single view, 0+ = multi pane).
[in]maxIndexUpper bound (inclusive). Defaults to 3 for backwards compatibility, but callers should pass viewportCount-1.
Returns
Target index clamped to [-1, maxIndex].

Definition at line 379 of file viewstate.cpp.

◆ packABGR()

uint32_t DISP3DLIB::packABGR ( uint32_t r,
uint32_t g,
uint32_t b,
uint32_t a = 0xFF )
inline

Pack RGBA colour components into a single ABGR uint32_t suitable for GPU vertex attributes declared as UNormByte4.

Parameters
[in]rRed channel (0–255).
[in]gGreen channel (0–255).
[in]bBlue channel (0–255).
[in]aAlpha channel (0–255, default 255).
Returns
Packed ABGR colour.

Definition at line 51 of file rendertypes.h.

◆ perspectivePresetRotation()

DISP3DSHARED_EXPORT QQuaternion DISP3DLIB::perspectivePresetRotation ( )

Default perspective rotation quaternion used for the "Perspective" camera.

Returns
Rotation built from Euler angles (-45, -40, -130) degrees.

Definition at line 294 of file viewstate.cpp.

◆ shaderModeFromName()

DISP3DSHARED_EXPORT ShaderMode DISP3DLIB::shaderModeFromName ( const QString & name)

Convert a shader name ("Standard", "Holographic", "Anatomical") to enum.

Parameters
[in]nameShader name; "XRay" is also recognised.
Returns
Matching ShaderMode, or Standard for unknown names.

Definition at line 386 of file viewstate.cpp.

◆ shaderModeName()

DISP3DSHARED_EXPORT QString DISP3DLIB::shaderModeName ( ShaderMode mode)

Convert a ShaderMode enum to display string.

Parameters
[in]modeShader mode to convert.
Returns
"Holographic", "Anatomical", or "Standard" for all other modes.

Definition at line 399 of file viewstate.cpp.

◆ visualizationModeFromName()

DISP3DSHARED_EXPORT VisualizationMode DISP3DLIB::visualizationModeFromName ( const QString & name)

Convert a visualization mode name to enum.

Parameters
[in]nameMode name ("Annotation", "Scientific", "Source Estimate").
Returns
Matching VisualizationMode, or ModeSurface for unknown names.

Definition at line 410 of file viewstate.cpp.

◆ visualizationModeName()

DISP3DSHARED_EXPORT QString DISP3DLIB::visualizationModeName ( VisualizationMode mode)

Convert a VisualizationMode enum to display string.

Parameters
[in]modeVisualization mode to convert.
Returns
"Annotation", "Scientific", "Source Estimate", or "Surface".

Definition at line 423 of file viewstate.cpp.