MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
DISP3DLIB::View3D Class Reference

Visualizes 3D data. More...

#include <view3D.h>

Public Types

typedef QSharedPointer< View3DSPtr
 
typedef QSharedPointer< const View3DConstSPtr
 

Signals

void pickEventOccured (Qt3DRender::QPickEvent *qPickEvent)
 

Public Member Functions

 View3D ()
 
 ~View3D ()
 
void setModel (QSharedPointer< DISP3DLIB::Data3DTreeModel > pModel)
 
void setSceneColor (const QColor &colSceneColor)
 
void startStopCameraRotation (bool bChecked)
 
void setCameraRotation (float fAngle)
 
Qt3DCore::QTransform getCameraTransform ()
 
void toggleCoordAxis (bool bChecked)
 
void showFullScreen (bool bChecked)
 
void setLightColor (const QColor &color)
 
void setLightIntensity (double value)
 
void takeScreenshot ()
 
void activatePicker (const bool bActivatePicker)
 
void showSingleView ()
 
void showMultiView ()
 

Protected Types

enum  MultiViewOrientation { Horizontal, Veritical }
 

Protected Member Functions

void saveScreenshot ()
 
void initLight ()
 
void initObjectPicking ()
 
void keyPressEvent (QKeyEvent *e) override
 
void createCoordSystem (Qt3DCore::QEntity *parent)
 
void handlePickerPress (Qt3DRender::QPickEvent *qPickEvent)
 
void initSingleCam ()
 
void initMultiCams ()
 
void initSingleView ()
 
void initMultiView ()
 
void updateMultiViewAspectRatio ()
 
void setMultiViewVertical ()
 
void setMultiViewHorizontal ()
 
void resizeEvent (QResizeEvent *) override
 

Protected Attributes

QPointer< Qt3DCore::QEntity > m_pRootEntity
 
QPointer< Qt3DCore::QEntity > m_p3DObjectsEntity
 
QPointer< Qt3DCore::QEntity > m_pLightEntity
 
QSharedPointer< Qt3DCore::QEntity > m_pCoordSysEntity
 
QPointer< CustomFrameGraphm_pFrameGraph
 
QPointer< Qt3DRender::QRenderSurfaceSelector > m_pMultiFrame
 
QPointer< Qt3DRender::QCamera > m_pCamera
 
QPointer< Qt3DRender::QCamera > m_pMultiCam1
 
QPointer< Qt3DRender::QCamera > m_pMultiCam2
 
QPointer< Qt3DRender::QCamera > m_pMultiCam3
 
QPointer< Qt3DRender::QViewport > m_pMultiViewport1
 
QPointer< Qt3DRender::QViewport > m_pMultiViewport2
 
QPointer< Qt3DRender::QViewport > m_pMultiViewport3
 
QPointer< Qt3DRender::QRenderCaptureReply > m_pScreenCaptureReply
 
QPointer< Qt3DRender::QObjectPicker > m_pPicker
 
QPointer< OrbitalCameraControllerm_pCamController
 
QPointer< QPropertyAnimation > m_pCameraAnimation
 
QList< QPointer< Qt3DRender::QPointLight > > m_lLightSources
 
MultiViewOrientation m_MultiViewOrientation
 

Detailed Description

Visualizes 3D data.

Visualizes 3D/2D objects in a 3D space such as brain, DTI, MRI, sensor, helmet data.

Definition at line 90 of file view3D.h.

Inheritance diagram for DISP3DLIB::View3D:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const View3D> DISP3DLIB::View3D::ConstSPtr

Const shared pointer type for View3D class.

Definition at line 96 of file view3D.h.

◆ SPtr

typedef QSharedPointer<View3D> DISP3DLIB::View3D::SPtr

Shared pointer type for View3D class.

Definition at line 95 of file view3D.h.

Constructor & Destructor Documentation

◆ View3D()

View3D::View3D ( )
explicit

Default constructor

Definition at line 93 of file view3D.cpp.

◆ ~View3D()

View3D::~View3D ( )

Default destructor

Definition at line 132 of file view3D.cpp.

Member Function Documentation

◆ activatePicker()

void View3D::activatePicker ( const bool  bActivatePicker)

Initilize the object picking.

Parameters
[in]bActivatePickerWheater to activate the object picker.

Definition at line 165 of file view3D.cpp.

◆ createCoordSystem()

void View3D::createCoordSystem ( Qt3DCore::QEntity *  parent)
protected

Creates a coordiante system (x/Green, y/Red, z/Blue).

Parameters
[in]parentThe parent identity which will "hold" the coordinate system.

Definition at line 326 of file view3D.cpp.

◆ getCameraTransform()

Qt3DCore::QTransform DISP3DLIB::View3D::getCameraTransform ( )

Returns the camera's position via transform.

Returns
The transform.

◆ handlePickerPress()

void View3D::handlePickerPress ( Qt3DRender::QPickEvent *  qPickEvent)
protected

Handle Picking events.

Parameters
[in]qPickEventThe picking event that occured.

Definition at line 172 of file view3D.cpp.

◆ initLight()

void View3D::initLight ( )
protected

Init the light for the 3D view

Definition at line 182 of file view3D.cpp.

◆ initMultiCams()

void View3D::initMultiCams ( )
protected

Initialize multi-view camera parameters.

Definition at line 432 of file view3D.cpp.

◆ initMultiView()

void View3D::initMultiView ( )
protected

Initilize multiview viewports.

Definition at line 467 of file view3D.cpp.

◆ initObjectPicking()

void View3D::initObjectPicking ( )
protected

Initilize the object picking.

Definition at line 147 of file view3D.cpp.

◆ initSingleCam()

void View3D::initSingleCam ( )
protected

Initilaize single view camera parameters.

Definition at line 417 of file view3D.cpp.

◆ initSingleView()

void View3D::initSingleView ( )
protected

Initialize single view viewport/framegraph.

Definition at line 456 of file view3D.cpp.

◆ keyPressEvent()

void View3D::keyPressEvent ( QKeyEvent *  e)
overrideprotected

Window function

Definition at line 315 of file view3D.cpp.

◆ resizeEvent()

void View3D::resizeEvent ( QResizeEvent *  event)
overrideprotected

Handles resize event for non-default multiview cameras.

Definition at line 502 of file view3D.cpp.

◆ setCameraRotation()

void View3D::setCameraRotation ( float  fAngle)

Rotate camera arround given angle.

Parameters
[in]iAngleThe to rotate the camera.

Definition at line 377 of file view3D.cpp.

◆ setLightColor()

void View3D::setLightColor ( const QColor &  color)

Change light color.

Definition at line 255 of file view3D.cpp.

◆ setLightIntensity()

void View3D::setLightIntensity ( double  value)

Set light intensity.

Definition at line 264 of file view3D.cpp.

◆ setModel()

void View3D::setModel ( QSharedPointer< DISP3DLIB::Data3DTreeModel pModel)

Return the tree model which holds the subject information.

Parameters
[in]pModelThe tree model holding the 3d models.

Definition at line 222 of file view3D.cpp.

◆ setMultiViewHorizontal()

void View3D::setMultiViewHorizontal ( )
protected

Sets multiview views to horizontal layout.

Definition at line 546 of file view3D.cpp.

◆ setMultiViewVertical()

void View3D::setMultiViewVertical ( )
protected

Sets multiview views to vertical layout.

Definition at line 533 of file view3D.cpp.

◆ setSceneColor()

void View3D::setSceneColor ( const QColor &  colSceneColor)

Set the background color of the scene.

Parameters
[in]colSceneColorThe new background color of the view.

Definition at line 229 of file view3D.cpp.

◆ showFullScreen()

void View3D::showFullScreen ( bool  bChecked)

Show fullscreen.

Definition at line 243 of file view3D.cpp.

◆ showMultiView()

void View3D::showMultiView ( )

Toggles view to display multi-view.

Definition at line 566 of file view3D.cpp.

◆ showSingleView()

void View3D::showSingleView ( )

Toggles view to display single view.

Definition at line 559 of file view3D.cpp.

◆ startStopCameraRotation()

void View3D::startStopCameraRotation ( bool  bChecked)

Starts or stops to rotate camera around 3D models.

Definition at line 396 of file view3D.cpp.

◆ takeScreenshot()

void View3D::takeScreenshot ( )

Renders a screenshot of the view and saves it to the passed path. SVG and PNG supported.

Parameters
[in]fileNameThe file name and path where to store the screenshot.

Definition at line 273 of file view3D.cpp.

◆ toggleCoordAxis()

void View3D::toggleCoordAxis ( bool  bChecked)

Toggle the coord axis visibility.

Definition at line 236 of file view3D.cpp.

◆ updateMultiViewAspectRatio()

void View3D::updateMultiViewAspectRatio ( )
protected

Update multiview camera parameters based on aspect ratio.

Definition at line 512 of file view3D.cpp.

Member Data Documentation

◆ m_lLightSources

QList<QPointer<Qt3DRender::QPointLight> > DISP3DLIB::View3D::m_lLightSources
protected

The light sources.

Definition at line 317 of file view3D.h.

◆ m_MultiViewOrientation

MultiViewOrientation DISP3DLIB::View3D::m_MultiViewOrientation
protected

The current orientation of the multiview viewports.

Definition at line 319 of file view3D.h.

◆ m_p3DObjectsEntity

QPointer<Qt3DCore::QEntity> DISP3DLIB::View3D::m_p3DObjectsEntity
protected

The root/most top level entity buffer.

Definition at line 295 of file view3D.h.

◆ m_pCamController

QPointer<OrbitalCameraController> DISP3DLIB::View3D::m_pCamController
protected

The controller for camera position.

Definition at line 314 of file view3D.h.

◆ m_pCamera

QPointer<Qt3DRender::QCamera> DISP3DLIB::View3D::m_pCamera
protected

The camera entity.

Definition at line 302 of file view3D.h.

◆ m_pCameraAnimation

QPointer<QPropertyAnimation> DISP3DLIB::View3D::m_pCameraAnimation
protected

The animations to rotate the camera.

Definition at line 315 of file view3D.h.

◆ m_pCoordSysEntity

QSharedPointer<Qt3DCore::QEntity> DISP3DLIB::View3D::m_pCoordSysEntity
protected

The entity representing the x/y/z coord system.

Definition at line 297 of file view3D.h.

◆ m_pFrameGraph

QPointer<CustomFrameGraph> DISP3DLIB::View3D::m_pFrameGraph
protected

The frameGraph entity.

Definition at line 299 of file view3D.h.

◆ m_pLightEntity

QPointer<Qt3DCore::QEntity> DISP3DLIB::View3D::m_pLightEntity
protected

The root/most top level entity buffer.

Definition at line 296 of file view3D.h.

◆ m_pMultiCam1

QPointer<Qt3DRender::QCamera> DISP3DLIB::View3D::m_pMultiCam1
protected

First multiview camera entity.

Definition at line 303 of file view3D.h.

◆ m_pMultiCam2

QPointer<Qt3DRender::QCamera> DISP3DLIB::View3D::m_pMultiCam2
protected

Second multiview camera entity.

Definition at line 304 of file view3D.h.

◆ m_pMultiCam3

QPointer<Qt3DRender::QCamera> DISP3DLIB::View3D::m_pMultiCam3
protected

Third multiview camera entity.

Definition at line 305 of file view3D.h.

◆ m_pMultiViewport1

QPointer<Qt3DRender::QViewport> DISP3DLIB::View3D::m_pMultiViewport1
protected

First multiview viewport.

Definition at line 307 of file view3D.h.

◆ m_pMultiViewport2

QPointer<Qt3DRender::QViewport> DISP3DLIB::View3D::m_pMultiViewport2
protected

Second multiview viewport.

Definition at line 308 of file view3D.h.

◆ m_pMultiViewport3

QPointer<Qt3DRender::QViewport> DISP3DLIB::View3D::m_pMultiViewport3
protected

Third multiview viewport.

Definition at line 309 of file view3D.h.

◆ m_pPicker

QPointer<Qt3DRender::QObjectPicker> DISP3DLIB::View3D::m_pPicker
protected

The Picker entity.

Definition at line 312 of file view3D.h.

◆ m_pRootEntity

QPointer<Qt3DCore::QEntity> DISP3DLIB::View3D::m_pRootEntity
protected

The root/most top level entity buffer.

Definition at line 294 of file view3D.h.

◆ m_pScreenCaptureReply

QPointer<Qt3DRender::QRenderCaptureReply> DISP3DLIB::View3D::m_pScreenCaptureReply
protected

The capture reply object to save screenshots.

Definition at line 311 of file view3D.h.


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