Top-level QWidget hosting the QRhi-based 3-D brain visualization with mouse interaction and multi-view support. More...
#include <brainview.h>
Public Types | |
| enum | ViewMode { SingleView , MultiView } |
Public Slots | |
| void | onRowsInserted (const QModelIndex &parent, int first, int last) |
| void | onDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles) |
| void | setActiveSurface (const QString &type) |
| void | setShaderMode (const QString &mode) |
| void | setBemShaderMode (const QString &mode) |
| void | syncBemShadersToBrainShaders () |
| void | setVisualizationMode (const QString &mode) |
| void | setHemiVisible (int hemiIdx, bool visible) |
| void | setBemVisible (const QString &name, bool visible) |
| void | setBemHighContrast (bool enabled) |
| void | setSensorVisible (const QString &type, bool visible) |
| void | setSensorTransEnabled (bool enabled) |
| void | setMegHelmetOverride (const QString &path) |
| bool | loadMegHelmetSurface (const QString &helmetFilePath) |
| void | setDipoleVisible (bool visible) |
| bool | loadNetwork (const CONNECTIVITYLIB::Network &network, const QString &name="Network") |
| void | setNetworkVisible (bool visible) |
| void | setNetworkThreshold (double threshold) |
| void | setNetworkColormap (const QString &name) |
| void | setLightingEnabled (bool enabled) |
| void | setAutomatedRotation (bool enabled) |
| bool | automatedRotation () const |
| void | setHeadMovementPath (const QVector< Eigen::Vector3f > &vecPositions) |
| void | clearHeadMovementPath () |
| bool | saveSnapshot () |
| bool | takeScreenshot (const QString &fileName) |
| bool | savePng (const QString &path, int width=1200, int height=800, const QString &surfaceType=QStringLiteral("pial")) |
| void | showSingleView () |
| void | showMultiView () |
| void | setViewCount (int count) |
| int | viewCount () const |
| void | setViewportEnabled (int index, bool enabled) |
| void | setViewportCameraPreset (int index, int preset) |
| void | resetSingleViewCameraState () |
| void | resetViewportCameraState (int index) |
| void | resetAllSubViewState () |
| int | viewportCameraPreset (int index) const |
| void | resetMultiViewLayout () |
| void | setVisualizationEditTarget (int target) |
| int | visualizationEditTarget () const |
| QString | activeSurfaceForTarget (int target) const |
| QString | shaderModeForTarget (int target) const |
| QString | bemShaderModeForTarget (int target) const |
| QString | overlayModeForTarget (int target) const |
| bool | objectVisibleForTarget (const QString &object, int target) const |
| bool | megFieldMapOnHeadForTarget (int target) const |
| bool | isViewportEnabled (int index) const |
| void | setInfoPanelVisible (bool visible) |
| bool | isInfoPanelVisible () const |
| ViewMode | viewMode () const |
| bool | loadSourceEstimate (const QString &lhPath, const QString &rhPath) |
| bool | loadSensors (const QString &fifPath) |
| QMap< int, QVector3D > | cardinalFiducialsInMri () const |
| Return cardinal fiducials (NAS/LPA/RPA) transformed to MRI coordinates. | |
| bool | bemTopVertexInMri (QVector3D &pos) const |
| Return the highest-Z vertex of the BEM head surface in MRI coords. | |
| bool | loadDipoles (const QString &dipPath) |
| bool | loadSourceSpace (const QString &fwdPath) |
| static QStringList | probeEvokedSets (const QString &evokedPath) |
| bool | loadSensorField (const QString &evokedPath, int aveIndex=0) |
| void | setSourceSpaceVisible (bool visible) |
| bool | loadTransformation (const QString &transPath) |
| void | setTimePoint (int index) |
| void | castRay (const QPoint &pos) |
| void | setSourceColormap (const QString &name) |
| void | setSourceThresholds (float min, float mid, float max) |
| void | setSensorFieldTimePoint (int index) |
| void | setSensorFieldVisible (const QString &type, bool visible) |
| void | setSensorFieldContourVisible (const QString &type, bool visible) |
| void | setMegFieldMapOnHead (bool useHead) |
| void | setSensorFieldColormap (const QString &name) |
| float | stcStep () const |
| float | stcTmin () const |
| int | stcNumTimePoints () const |
| int | closestSensorFieldIndex (float timeSec) const |
| int | closestStcIndex (float timeSec) const |
| void | startRealtimeStreaming () |
| void | stopRealtimeStreaming () |
| bool | isRealtimeStreaming () const |
| void | pushRealtimeSourceData (const Eigen::VectorXd &matData) |
| void | setRealtimeInterval (int msec) |
| void | setRealtimeLooping (bool enabled) |
| bool | sensorFieldTimeRange (float &tmin, float &tmax) const |
| void | startRealtimeSensorStreaming (const QString &modality=QStringLiteral("MEG")) |
| void | stopRealtimeSensorStreaming () |
| bool | isRealtimeSensorStreaming () const |
| void | pushRealtimeSensorData (const Eigen::VectorXf &vecData) |
| void | setRealtimeSensorInterval (int msec) |
| void | setRealtimeSensorLooping (bool enabled) |
| void | setRealtimeSensorAverages (int numAvr) |
| void | setRealtimeSensorColormap (const QString &name) |
| void | clearSurfaces () |
| void | clearBem () |
| void | clearSourceEstimate () |
| void | clearDipoles () |
| void | clearSourceSpace () |
| void | clearSensors () |
| void | setLiveMarkers (const QVector< LiveMarker > &markers) |
| void | clearLiveMarkers () |
| void | setLiveRay (const QVector3D &from, const QVector3D &to, const QColor &color, float radius=0.001f) |
| void | clearLiveRay () |
| void | setProbeVisualization (const QVector3D &tip, const QVector3D &direction, float length, const QColor &color, const QColor &glowColor=QColor(0, 0, 0, 0), const QQuaternion &orientation=QQuaternion(0, 0, 0, 0)) |
| void | clearProbeVisualization () |
| void | setStaticMarkers (const QVector< LiveMarker > &markers) |
| void | clearStaticMarkers () |
| void | setCameraFocusOverride (const QVector3D ¢er, float size) |
| void | clearCameraFocusOverride () |
| void | clearEvoked () |
| void | clearTransformation () |
| void | clearNetwork () |
| void | stopAllStreaming () |
| void | setVideoOverlayEnabled (bool enabled) |
| bool | isVideoOverlayEnabled () const |
| void | setVideoOverlayFocusPosition (const QVector3D &position) |
| void | setVideoOverlayUpHint (const QVector3D &dir) |
| void | setVideoOverlaySize (float meters) |
| void | setVideoOverlayOpacity (float opacity) |
| void | pushVideoOverlayFrame (const QImage &frame) |
| void | setVideoDepthEnabled (bool enabled) |
| void | setVideoDepthScale (float scale) |
| void | setVideoDepthSteps (int steps) |
| void | pushVideoDepthFrame (const QImage &depthFrame) |
| bool | intersectWorldRay (const QVector3D &origin, const QVector3D &direction, QVector3D &hitPoint) const |
| Intersect a world-space ray with loaded scene geometry. | |
| void | setSlice (int slotIndex, DISP3DLIB::SliceObject *slice) |
| void | setSliceVisible (int slotIndex, bool visible) |
| void | setMriSlicesVisible (bool visible) |
| void | setElectrodes (DISP3DLIB::ElectrodeObject *electrodes) |
| void | setElectrodeValues (const QMap< QString, float > &values) |
Signals | |
| void | timePointChanged (int index, float time) |
| void | sourceEstimateLoaded (int numTimePoints) |
| void | sensorFieldLoaded (int numTimePoints, int initialTimePoint=0) |
| void | sourceThresholdsUpdated (float min, float mid, float max) |
| void | stcLoadingProgress (int percent, const QString &message) |
| void | sensorFieldTimePointChanged (int index, float time) |
| void | hoveredRegionChanged (const QString ®ionName) |
| void | electrodeContactClicked (const QString &contactName, const QVector3D &position) |
| void | visualizationEditTargetChanged (int target) |
| void | viewCountChanged (int count) |
| void | shaderModeChanged (const QString &modeName) |
| void | surfacePointClicked (const QVector3D &worldPos) |
| void | surfacePointDoubleClicked (const QVector3D &worldPos) |
Public Member Functions | |
| BrainView (QWidget *parent=nullptr) | |
| ~BrainView () | |
| void | setModel (BrainTreeModel *model) |
| void | setInitialCameraRotation (const QQuaternion &rotation) |
Protected Member Functions | |
| void | initialize (QRhiCommandBuffer *cb) override |
| void | render (QRhiCommandBuffer *cb) override |
| void | releaseResources () override |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| void | mouseDoubleClickEvent (QMouseEvent *event) override |
| void | wheelEvent (QWheelEvent *event) override |
| void | keyPressEvent (QKeyEvent *event) override |
| void | resizeEvent (QResizeEvent *event) override |
Top-level QWidget hosting the QRhi-based 3-D brain visualization with mouse interaction and multi-view support.
BrainView is the main widget for the 3D brain visualization. It handles user interaction, surface loading, and coordinates with the BrainRenderer.
Definition at line 107 of file brainview.h.

View mode for single or multi-viewport display.
| Enumerator | |
|---|---|
| SingleView | Single viewport with interactive camera |
| MultiView | Three viewports with fixed cameras (top, left, front) |
Definition at line 115 of file brainview.h.
|
explicit |
| DISP3DLIB::BrainView::~BrainView | ( | ) |
Destructor
Definition at line 223 of file brainview.cpp.
|
slot |
Get configured surface type for a target view.
Definition at line 671 of file brainview.cpp.
|
slot |
Whether automated rotation is currently active.
Definition at line 977 of file brainview.cpp.
|
slot |
Get configured BEM shader mode name for a target view.
Definition at line 685 of file brainview.cpp.
|
slot |
Return the highest-Z vertex of the BEM head surface in MRI coords.
This is the top-of-head (vertex/CZ) reference used for orientation validation during Polhemus coregistration.
| [out] | pos | The vertex position (metres, MRI/surface-RAS). |
Definition at line 2682 of file brainview.cpp.
|
slot |
Return cardinal fiducials (NAS/LPA/RPA) transformed to MRI coordinates.
Returns an empty map when no cardinal dig points are loaded or when no head-to-MRI transform is available. Keys are the FIFF ident values (FIFFV_POINT_LPA=1, FIFFV_POINT_NASION=2, FIFFV_POINT_RPA=3).
Definition at line 2660 of file brainview.cpp.
|
slot |
Cast rays from screen position to find intersected objects.
| [in] | pos | 2D mouse position. |
Definition at line 2868 of file brainview.cpp.
|
slot |
Remove all BEM surfaces from the scene.
Definition at line 3156 of file brainview.cpp.
|
slot |
Remove the camera focus override; revert to auto-computed bounds.
Definition at line 3498 of file brainview.cpp.
|
slot |
Remove dipole objects from the scene.
Definition at line 3203 of file brainview.cpp.
|
slot |
Remove evoked / sensor field mapping data.
Definition at line 3517 of file brainview.cpp.
|
slot |
Remove the head movement path from the scene.
Definition at line 1005 of file brainview.cpp.
|
slot |
Remove all live overlay markers.
Definition at line 3256 of file brainview.cpp.
|
slot |
Remove the live ray from the scene.
Definition at line 3287 of file brainview.cpp.
|
slot |
Remove the connectivity network from the scene.
Definition at line 3537 of file brainview.cpp.
|
slot |
Remove the probe visualization from the scene.
Definition at line 3422 of file brainview.cpp.
|
slot |
Remove sensor geometry, digitizer points, and the MEG helmet surface.
Definition at line 3508 of file brainview.cpp.
|
slot |
Remove source estimate data and restore surface colours.
Definition at line 3189 of file brainview.cpp.
|
slot |
Remove source space points from the scene.
Definition at line 3224 of file brainview.cpp.
|
slot |
Remove all static overlay markers.
Definition at line 3472 of file brainview.cpp.
|
slot |
Remove all brain surfaces (pial, white, inflated) and their annotations.
Definition at line 3147 of file brainview.cpp.
|
slot |
Remove the head-to-MRI coordinate transformation.
Definition at line 3527 of file brainview.cpp.
|
slot |
Find the closest sensor field time index for a given time in seconds.
| [in] | timeSec | Time in seconds. |
Definition at line 2504 of file brainview.cpp.
|
slot |
Find the closest STC time index for a given time in seconds.
| [in] | timeSec | Time in seconds. |
Definition at line 2524 of file brainview.cpp.
|
signal |
Emitted when a click lands on an electrode contact.
| [in] | contactName | Name of the clicked contact. |
| [in] | position | Contact position. |
|
signal |
Emitted when the hovered brain region changes.
| [in] | regionName | Name of the region under the cursor. |
|
overrideprotected |
Definition at line 1596 of file brainview.cpp.
|
slot |
Intersect a world-space ray with loaded scene geometry.
Tests the ray against all visible surfaces (BEM, cortical, sensors) and returns the closest hit point.
| [in] | origin | Ray origin in world (model) space (metres). |
| [in] | direction | Ray direction (unit vector). |
| [out] | hitPoint | Intersection point in world (model) space. |
true if the ray hits a surface; false otherwise. Definition at line 3684 of file brainview.cpp.
|
inlineslot |
Whether the info panel is currently visible.
Definition at line 536 of file brainview.h.
|
slot |
Check whether real-time sensor streaming is active.
Definition at line 2559 of file brainview.cpp.
|
slot |
Check whether real-time streaming is active.
Definition at line 2290 of file brainview.cpp.
|
slot |
Definition at line 3580 of file brainview.cpp.
|
slot |
Check if a multi-view viewport is enabled.
| [in] | index | Viewport index (0=Top, 1=Perspective, 2=Front, 3=Left). |
Definition at line 1168 of file brainview.cpp.
|
overrideprotected |
Definition at line 2219 of file brainview.cpp.
|
slot |
Load dipoles from a .dip or .bdip file.
| [in] | dipPath | Path to the dipole file. |
Definition at line 2719 of file brainview.cpp.
|
slot |
Load a standalone MEG helmet surface, replacing the current one.
The Device→Head transform from the last loadSensors() call is applied automatically when available.
| [in] | helmetFilePath | Absolute path to a helmet BEM FIF file. |
Definition at line 2701 of file brainview.cpp.
|
slot |
Load a connectivity network for visualization.
| [in] | network | The connectivity network to visualize. |
| [in] | name | Display name for the network. |
Definition at line 2733 of file brainview.cpp.
|
slot |
Load sensor measurements from an evoked/average FIF file.
| [in] | evokedPath | Path to the evoked/average FIF file. |
| [in] | aveIndex | Dataset index to load from the file. |
Definition at line 2350 of file brainview.cpp.
|
slot |
Load sensors (MEG/EEG/Digitizers) from a FIF file.
| [in] | fifPath | Path to the FIF file. |
Definition at line 2619 of file brainview.cpp.
|
slot |
Load source estimate files (.stc) for both hemispheres.
| [in] | lhPath | Path to left hemisphere .stc file. |
| [in] | rhPath | Path to right hemisphere .stc file. |
Definition at line 2234 of file brainview.cpp.
|
slot |
Load source space from a FIF file (forward solution or source space file).
| [in] | fwdPath | Path to the FIF file containing source space data. |
Definition at line 2789 of file brainview.cpp.
|
slot |
Load a coordinate transformation from a FIF file.
| [in] | transPath | Path to the transformation file. |
Definition at line 2814 of file brainview.cpp.
|
slot |
Check whether MEG field mapping uses head surface for a target.
| [in] | target | -1=Single, 0=Top, 1=Perspective, 2=Front, 3=Left. |
Definition at line 741 of file brainview.cpp.
|
overrideprotected |
Definition at line 2185 of file brainview.cpp.
|
overrideprotected |
Definition at line 2077 of file brainview.cpp.
|
overrideprotected |
Definition at line 2035 of file brainview.cpp.
|
overrideprotected |
Definition at line 2146 of file brainview.cpp.
|
slot |
Check object visibility for a given target view.
| [in] | object | Object key (e.g. "lh", "bem_head", "sens_meg"). |
| [in] | target | -1=Single, 0=Top, 1=Perspective, 2=Front, 3=Left. |
Definition at line 734 of file brainview.cpp.
|
slot |
Definition at line 481 of file brainview.cpp.
|
slot |
Definition at line 277 of file brainview.cpp.
|
slot |
Get configured overlay mode name for a target view.
Definition at line 692 of file brainview.cpp.
|
staticslot |
Probe evoked data sets in a FIF file.
Returns a list of descriptive strings for each evoked set found (e.g. "0: Left Auditory (Average, nave=55)"). The list is empty if the file cannot be read.
| [in] | evokedPath | Path to the evoked/average FIF file. |
Definition at line 2385 of file brainview.cpp.
|
slot |
Push a single sensor measurement vector into the real-time sensor pipeline. The vector should contain one value per picked channel (matching the active mapping matrix column count).
| [in] | vecData | Sensor measurement vector. |
Definition at line 2566 of file brainview.cpp.
|
slot |
Push a single source-data vector into the real-time pipeline. The vector should contain source values for all sources (LH + RH concatenated).
| [in] | matData | Source activity vector. |
Definition at line 2297 of file brainview.cpp.
|
slot |
Push a monocular depth map corresponding to the current video frame.
Definition at line 3673 of file brainview.cpp.
|
slot |
Push a new video frame to the overlay (e.g. from QVideoSink).
Definition at line 3629 of file brainview.cpp.
|
overrideprotected |
Definition at line 1610 of file brainview.cpp.
|
overrideprotected |
Definition at line 1618 of file brainview.cpp.
|
slot |
Reset all per-pane SubView state (camera, visibility, shaders, surface type, overlay) to its index-specific factory defaults and reset the single-view state too. Use this when an embedding application wants a clean slate that ignores any settings persisted by previous runs or other hosts of BrainView.
Definition at line 1552 of file brainview.cpp.
|
slot |
Reset the multi-view splitter layout to equal-sized panes.
Definition at line 1156 of file brainview.cpp.
|
slot |
Reset single-view camera state (rotation and zoom) to defaults.
Definition at line 1525 of file brainview.cpp.
|
slot |
Reset one multi-view pane's camera state (zoom, pan, perspective rotation).
| [in] | index | Viewport index (0–3). |
Definition at line 1536 of file brainview.cpp.
|
overrideprotected |
Definition at line 1587 of file brainview.cpp.
|
slot |
Render the scene offscreen and save to a PNG file.
Uses Qt::WA_DontShowOnScreen so no window manager surface is created — works on headless CI runners without Xvfb. The widget is temporarily shown to trigger QRhi initialization, then grabFramebuffer() reads pixels back from the GPU.
| [in] | path | Output PNG file path. |
| [in] | width | Render width in pixels (default 1200). |
| [in] | height | Render height in pixels (default 800). |
| [in] | surfaceType | Surface type to match (default "pial"). |
Definition at line 1042 of file brainview.cpp.
|
slot |
Save the current view as ./Screenshots/<date>-<time>-3DView.png, like the other MNE-CPP views.
Definition at line 1018 of file brainview.cpp.
|
signal |
Emitted when sensor field data is loaded.
| [in] | numTimePoints | Number of time samples. |
|
signal |
Emitted when the sensor field time point changes.
| [in] | index | Time sample index. |
| [in] | time | Time in seconds. |
|
slot |
Get the time range of the loaded sensor field (evoked) data.
| [out] | tmin | Start time in seconds. |
| [out] | tmax | End time in seconds. |
Definition at line 2531 of file brainview.cpp.
|
slot |
Set the active surface type to search for (e.g. "pial").
| [in] | type | The surface type to activate. |
Definition at line 532 of file brainview.cpp.
|
slot |
Enable or disable continuous automated rotation of the scene.
The rotation is applied to the camera, not to the individual object transformation matrices, so head, sensor and all other surfaces keep their relative alignment and their coregistration transforms.
| [in] | enabled | True to start rotating, false to stop. |
Definition at line 938 of file brainview.cpp.
|
slot |
Set whether BEM surfaces should use their standard (colorful) definition or white.
| [in] | enabled | True to use standard colors (Red/Green/Blue), False for White. |
Definition at line 916 of file brainview.cpp.
|
slot |
Set the shader mode for BEM surfaces (Standard, Holographic, Atlas).
| [in] | mode | The shader mode to set. |
Definition at line 780 of file brainview.cpp.
|
slot |
Toggle visibility of a BEM surface layer.
| [in] | name | "head", "outer_skull", or "inner_skull". |
| [in] | visible | Visibility state. |
Definition at line 907 of file brainview.cpp.
|
slot |
Override the auto-computed scene center and size. While active, updateSceneBounds() results are ignored for camera framing.
Definition at line 3489 of file brainview.cpp.
|
slot |
Toggle visibility of dipoles.
| [in] | visible | Visibility state. |
Definition at line 854 of file brainview.cpp.
|
slot |
Set the sEEG / ECoG electrodes to draw, picked under the pointer like the other scene objects.
| [in] | electrodes | Non-owning pointer; it must outlive this view or be reset to nullptr. |
Definition at line 3736 of file brainview.cpp.
|
slot |
Show one value per contact (e.g. high-gamma power) on the contacts and the cortex around them, as MNE-Python's stc_near_sensors. Weights come from each hemisphere's pial (or white) surface and colour every surface of that hemisphere. This replaces a source estimate overlay; an empty map clears both.
| [in] | values | Map of contact name -> value. |
Definition at line 3163 of file brainview.cpp.
|
slot |
Show the path the subject's head travelled as a connected line.
Intended for HPI fitting: pass the head positions recorded over the course of a measurement (see RealTimeHpiResult::headPositionHistory) and they are drawn as a polyline, oldest to newest, so the study conductor can judge how much the subject moved.
Passing fewer than two positions clears the path.
| [in] | vecPositions | Head positions in metres, oldest first. |
Definition at line 984 of file brainview.cpp.
|
slot |
Toggle visibility of a hemisphere.
| [in] | hemiIdx | 0 for LH, 1 for RH. |
| [in] | visible | Visibility state. |
Definition at line 892 of file brainview.cpp.
|
slot |
Show or hide the info panel (FPS, vertices, shader).
| [in] | visible | True to show, false to hide. |
Definition at line 1578 of file brainview.cpp.
| void DISP3DLIB::BrainView::setInitialCameraRotation | ( | const QQuaternion & | rotation | ) |
Set the initial camera rotation for this view. Each view can start from a different orientation (e.g., top, front, left).
| [in] | rotation | Initial camera rotation quaternion. |
Definition at line 269 of file brainview.cpp.
|
slot |
Enable or disable lighting for the scene.
| [in] | enabled | True to enable lighting, false to disable. |
Definition at line 929 of file brainview.cpp.
|
slot |
Replace the set of live overlay markers.
Renders each marker as a small sphere without touching the model or recalculating scene bounds, so the camera stays locked.
Definition at line 3231 of file brainview.cpp.
|
slot |
Set a semi-transparent ray cylinder between two world-space points.
| [in] | from | Ray origin (metres). |
| [in] | to | Ray end point (metres). |
| [in] | color | Ray color (alpha channel controls transparency). |
| [in] | radius | Cylinder radius (metres, default 0.001 = 1 mm). |
Definition at line 3273 of file brainview.cpp.
|
slot |
Choose MEG mapping surface (helmet or head).
| [in] | useHead | True to map MEG on head surface. |
Definition at line 2450 of file brainview.cpp.
|
slot |
Override the auto-selected MEG helmet surface path.
| [in] | path | Absolute path to a helmet surface file. Empty to use auto selection. |
Definition at line 849 of file brainview.cpp.
| void DISP3DLIB::BrainView::setModel | ( | BrainTreeModel * | model | ) |
Set the data model and show the objects it already holds. Objects of a previous model are removed from the view (the previous model is not modified).
| [in] | model | Pointer to BrainTreeModel, or nullptr to detach. |
Definition at line 230 of file brainview.cpp.
|
slot |
Toggle MRI slice visibility for the current edit-target viewport.
| [in] | visible | Whether MRI slices should be drawn in the active viewport. |
Definition at line 3757 of file brainview.cpp.
|
slot |
Set the colormap for connectivity network visualization.
| [in] | name | Colormap name ("Hot", "Jet", etc.). |
Definition at line 2778 of file brainview.cpp.
|
slot |
Set the threshold for connectivity network edge filtering.
| [in] | threshold | Threshold value (0.0–1.0). |
Definition at line 2767 of file brainview.cpp.
|
slot |
Toggle visibility of connectivity network.
| [in] | visible | Visibility state. |
Definition at line 2753 of file brainview.cpp.
|
slot |
Show a catheter-style probe visualization (cylinder shaft + sphere tip with an optional pulsing glow aura).
| [in] | tip | Probe tip position (metres, model space). |
| [in] | direction | Probe forward axis (unit vector, model space). |
| [in] | length | Visible shaft length behind the tip (metres). |
| [in] | color | Probe core color. |
| [in] | glowColor | Outer glow aura color (default: transparent = no glow). |
| [in] | orientation | Full probe orientation for drawing a debug coordinate frame (X=red, Y=green, Z=blue). Pass a null quaternion to skip axes. |
Definition at line 3295 of file brainview.cpp.
|
slot |
Set the streaming speed (interval between frames).
| [in] | msec | Interval in milliseconds. |
Definition at line 2304 of file brainview.cpp.
|
slot |
Enable or disable looping for real-time streaming.
| [in] | enabled | True to loop. |
Definition at line 2311 of file brainview.cpp.
|
slot |
Set the number of averages for sensor streaming.
| [in] | numAvr | Number of averages. |
Definition at line 2587 of file brainview.cpp.
|
slot |
Set the colormap used for sensor streaming visualization.
| [in] | name | Colormap name. |
Definition at line 2594 of file brainview.cpp.
|
slot |
Set the streaming speed for sensor streaming (interval between frames).
| [in] | msec | Interval in milliseconds. |
Definition at line 2573 of file brainview.cpp.
|
slot |
Enable or disable looping for real-time sensor streaming.
| [in] | enabled | True to loop. |
Definition at line 2580 of file brainview.cpp.
|
slot |
Set colormap for sensor field maps.
| [in] | name | Colormap name. |
Definition at line 2470 of file brainview.cpp.
|
slot |
Set contour visibility for sensor field maps.
| [in] | type | "MEG" or "EEG". |
| [in] | visible | Visibility state. |
Definition at line 2431 of file brainview.cpp.
|
slot |
Set the time point for sensor field maps.
| [in] | index | Time sample index. |
Definition at line 2392 of file brainview.cpp.
|
slot |
Set visibility for sensor field maps.
| [in] | type | "MEG" or "EEG". |
| [in] | visible | Visibility state. |
Definition at line 2412 of file brainview.cpp.
|
slot |
Set whether sensor transformations (if loaded) should be applied.
| [in] | enabled | True to apply transformations, False to show original positions. |
Definition at line 837 of file brainview.cpp.
|
slot |
Toggle visibility of sensor groups.
| [in] | type | "MEG", "EEG", or "Digitizer". |
| [in] | visible | Visibility state. |
Definition at line 808 of file brainview.cpp.
|
slot |
Set the shader mode (Standard, Holographic, Atlas).
| [in] | mode | The shader mode to set. |
Definition at line 608 of file brainview.cpp.
|
slot |
Set an MRI slice to be rendered in the 3-D scene.
| [in] | slotIndex | Slot index (0=axial, 1=coronal, 2=sagittal). |
| [in] | slice | Pointer to SliceObject, or nullptr to hide. |
Definition at line 3727 of file brainview.cpp.
|
slot |
Toggle visibility of an MRI slice slot.
| [in] | slotIndex | Slot index (0=axial, 1=coronal, 2=sagittal). |
| [in] | visible | Whether this slice should be drawn. |
Definition at line 3746 of file brainview.cpp.
|
slot |
Set the colormap for source estimate visualization.
| [in] | name | Colormap name ("Hot", "Jet", etc.). |
Definition at line 2259 of file brainview.cpp.
|
slot |
Toggle visibility of source space points.
| [in] | visible | Visibility state. |
Definition at line 2803 of file brainview.cpp.
|
slot |
Set threshold values for source estimate visualization.
| [in] | min | Minimum threshold. |
| [in] | mid | Mid-point threshold. |
| [in] | max | Maximum threshold. |
Definition at line 2267 of file brainview.cpp.
|
slot |
Replace the set of static overlay markers (fiducials, acquired points). These persist across frames and are always visible.
Definition at line 3452 of file brainview.cpp.
|
slot |
Set the current time point for source estimate visualization.
| [in] | index | Time sample index. |
Definition at line 2250 of file brainview.cpp.
|
slot |
Enable or disable depth-based parallax relief on the video overlay.
Definition at line 3640 of file brainview.cpp.
|
slot |
Set the parallax occlusion displacement scale [0..1].
Definition at line 3651 of file brainview.cpp.
|
slot |
Set the number of POM ray-march steps (quality vs. performance).
Definition at line 3662 of file brainview.cpp.
|
slot |
Enable or disable the generic live video overlay decal that is drawn on top of the head surface at the current focus position.
Definition at line 3569 of file brainview.cpp.
|
slot |
Set the world-space focus position (metres) of the overlay quad.
Definition at line 3585 of file brainview.cpp.
|
slot |
Set the overall opacity of the overlay [0..1].
Definition at line 3618 of file brainview.cpp.
|
slot |
Set the side length of the overlay quad (metres). Default ≈ 0.06 m.
Definition at line 3607 of file brainview.cpp.
|
slot |
Set the orientation hint for the overlay quad (world-space direction).
Definition at line 3596 of file brainview.cpp.
|
slot |
Set the number of visible viewport panes (1–4).
| [in] | count | Number of panes: 1 = single, 2 = side-by-side, 3 = two + one, 4 = 2×2 grid. |
Definition at line 1124 of file brainview.cpp.
|
slot |
Set the camera preset for a specific viewport.
| [in] | index | Viewport index (0–3). |
| [in] | preset | Camera preset (0=Top, 1=Perspective, 2=Front, 3=Left, 4=Bottom, 5=Back, 6=Right). |
Definition at line 1509 of file brainview.cpp.
|
slot |
Enable or disable a specific viewport in multi-view mode.
| [in] | index | Viewport index (0=Top, 1=Perspective, 2=Front, 3=Left). |
| [in] | enabled | True to enable, false to disable. |
Definition at line 1495 of file brainview.cpp.
|
slot |
Select which view's visualization settings are edited by UI controls.
| [in] | target | -1=Single, 0=Top, 1=Perspective, 2=Front, 3=Left. |
Definition at line 622 of file brainview.cpp.
|
slot |
Set the overlay mode (FsSurface, FsAnnotation, Scientific).
| [in] | mode | The visualization mode to set. |
Definition at line 866 of file brainview.cpp.
|
signal |
Emitted whenever the active brain shader mode changes — either via setShaderMode or after restoring persisted state in BrainView::loadMultiViewSettings "loadMultiViewSettings".
| [in] | modeName | Shader name as accepted by setShaderMode. |
|
slot |
Get configured shader mode name for a target view.
Definition at line 678 of file brainview.cpp.
|
slot |
Switch to multi-view mode (four viewports: top, perspective, front, left).
Definition at line 1112 of file brainview.cpp.
|
slot |
Switch to single-view mode (one viewport, interactive camera).
Definition at line 1097 of file brainview.cpp.
|
signal |
Emitted when a source estimate is loaded.
| [in] | numTimePoints | Number of time samples in the source estimate. |
|
signal |
Emitted when auto-thresholds are set from loaded source estimate data.
| [in] | min | Minimum threshold. |
| [in] | mid | Mid threshold. |
| [in] | max | Maximum threshold. |
|
slot |
Start real-time sensor data streaming for the specified modality. Creates the controller (if needed), feeds the loaded evoked data column-by-column, and begins the timer-driven streaming loop.
Requires that sensor field data (evoked) has been loaded and the mapping matrix is built.
| [in] | modality | "MEG" or "EEG". |
Definition at line 2545 of file brainview.cpp.
|
slot |
Start real-time source data streaming. Creates the controller (if needed), feeds the loaded STC data column-by-column, and begins the timer-driven streaming loop.
Definition at line 2275 of file brainview.cpp.
|
signal |
Emitted to report STC loading progress.
| [in] | percent | Progress percentage (0-100). |
| [in] | message | Status message. |
|
slot |
Get the number of time points in the loaded source estimate.
Definition at line 2497 of file brainview.cpp.
|
slot |
Get the time step of the loaded source estimate.
Definition at line 2483 of file brainview.cpp.
|
slot |
Get the start time of the loaded source estimate.
Definition at line 2490 of file brainview.cpp.
|
slot |
Stop all active background streaming (source estimate + sensor). Call before destruction to avoid blocking thread joins in destructors.
Definition at line 3558 of file brainview.cpp.
|
slot |
Stop real-time sensor data streaming.
Definition at line 2552 of file brainview.cpp.
|
slot |
Stop real-time source data streaming.
Definition at line 2283 of file brainview.cpp.
|
signal |
Emitted on left-click when the click hits a surface.
| [in] | worldPos | Hit point in world (model) coordinates. |
|
signal |
Emitted on double-click when the click hits a surface.
| [in] | worldPos | Hit point in world (model) coordinates. |
|
slot |
Synchronize all BEM shader targets to their respective brain shader targets.
Definition at line 794 of file brainview.cpp.
|
slot |
Save the current rendered frame to an image file; missing parent directories are created.
| [in] | fileName | Output file; the format follows the suffix (e.g. .png, .jpg). |
Definition at line 1026 of file brainview.cpp.
|
signal |
Emitted when the time point changes.
| [in] | index | Time sample index. |
| [in] | time | Time in seconds. |
|
inlineslot |
Definition at line 407 of file brainview.h.
|
signal |
Emitted whenever the number of viewports changes — either via setViewCount or after restoring persisted state in BrainView::loadMultiViewSettings "loadMultiViewSettings". UI consumers (e.g. host toolbars) should connect to this to keep their controls in sync.
| [in] | count | Number of viewports (1..kDefaultViewportCount). |
|
inlineslot |
|
slot |
Get the camera preset for a specific viewport.
| [in] | index | Viewport index (0–3). |
Definition at line 1569 of file brainview.cpp.
|
slot |
Get current visualization edit target.
Definition at line 664 of file brainview.cpp.
|
signal |
Emitted when the active visualization edit target changes.
| [in] | target | New target index (-1 = single, 0..N-1 = multi pane). |
|
overrideprotected |
Definition at line 2199 of file brainview.cpp.