BrainView
Namespace: DISP3DLIB · Library: 3D Display Library
#include <disp3D/brainview.h>
class DISP3DLIB::BrainView
BrainView is the main widget for the 3D brain visualization.
It handles user interaction, surface loading, and coordinates with the BrainRenderer.
Top-level QWidget hosting the QRhi-based 3-D brain visualization with mouse interaction and multi-view support.
BrainView view; // QRhi widget; nothing is rendered until it is shown
view.setViewCount(2);
const bool twoPanes = view.viewCount() == 2 && view.viewMode() == BrainView::MultiView;
LiveMarker trackerTip;
trackerTip.position = QVector3D(0.0f, 0.08f, 0.04f);
trackerTip.color = Qt::yellow;
view.setLiveMarkers({trackerTip}); // transient, does not move the camera
view.clearLiveMarkers();
view.setViewCount(1);
Inheritance
Public Methods
BrainView(parent)
Constructor.
Parameters:
- parent : *QWidget ** Parent widget.
~BrainView()
Destructor.
setModel(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).
Parameters:
- model : *BrainTreeModel **
Pointer to
BrainTreeModel, or nullptr to detach.
setInitialCameraRotation(rotation)
Set the initial camera rotation for this view.
Each view can start from a different orientation (e.g., top, front, left).
Parameters:
- rotation : const QQuaternion & Initial camera rotation quaternion.
Example
- Full source:
src/examples/ex_disp3d_scene/main.cpp - Build target:
ex_disp3d_scene(runs under CTest)
Used in examples
ex_disp3d_scene
Disp3D scene data: sensor-to-surface interpolation, electrodes, MRI slices, video overlay and layers.
QApplication app(argc, argv); // BrainView is a widget
bool ok = true;
ex_clustered_inverse_mne
Example of a Clustered Inverse Minimum Norm Estimation application.
BrainView* pBrainView = new BrainView();
BrainTreeModel* pModel = new BrainTreeModel();
pBrainView->setModel(pModel);
ex_clustered_inverse_mne_raw
Example of the computation of a clustered inverse mne raw.
BrainView* pBrainView = new BrainView();
BrainTreeModel* pModel = new BrainTreeModel();
pBrainView->setModel(pModel);
Also used in ex_clustered_inverse_pwl_rap_music_raw, ex_clustered_inverse_rap_music_raw, ex_connectivity, ex_connectivity_comparison, ex_disp_3D, ex_inverse_mne_raw, ex_inverse_pwl_rap_music, ex_inverse_rap_music, ex_roi_clustered_inverse_pwl_rap_music, ex_st_clustered_inverse_pwl_rap_music, ex_coreg, ex_fs_surface, ex_read_fwd_disp_3D.
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>