open_iA 2024.9
Loading...
Searching...
No Matches
iARendererImpl Class Reference

Concrete implementation of iARenderer, displays several helper widgets for a 3D rendering window. More...

#include <iARendererImpl.h>

Inheritance diagram for iARendererImpl:
[legend]
Collaboration diagram for iARendererImpl:
[legend]

Public Slots

void mouseLeftButtonReleasedSlot ()
 
void mouseRightButtonReleasedSlot ()
 
void setProfileHandlesOn (bool isOn)
 
void setProfilePoint (int pointIndex, double const *coords)
 

Signals

void bgColorChanged (QColor bgTop, QColor bgBottom)
 
void cellsSelected (vtkPoints *selCellPoints)
 
void interactionModeChanged (bool camera)
 called when user presses 'a'/'A' or 'c'/'C' key to change between modifying actors and camera
 
void noCellsSelected ()
 
void onSetCamera ()
 
void onSetupRenderer ()
 
void reInitialized ()
 
void settingsChanged ()
 
- Signals inherited from iARenderer
void cellsSelected (vtkPoints *selCellPoints)
 
void ctrlShiftMouseWheel (int dir)
 
void noCellsSelected ()
 
void onSetCamera ()
 

Public Member Functions

 iARendererImpl (QObject *parent, vtkGenericOpenGLRenderWindow *renderWindow)
 
virtual ~iARendererImpl ()
 
void addRenderer (vtkRenderer *renderer) override
 Adds a custom renderer to the render window.
 
void applySettings (QVariantMap const &paramValues) override
 Apply the given settings to the renderer.
 
vtkCamera * camera () override
 Get/Set the VTK camera object (shared by main and label renderer)
 
void editSettings ()
 
void enableInteractor (bool enable)
 
iARenderObservergetRenderObserver () override
 Access to the renderer observer.
 
void initProfilePoints (double const *start, double const *end)
 initialize profile points (set positions, without triggering an update
 
vtkRenderWindowInteractor * interactor () override
 Access to the render window interactor.
 
bool isInteractorEnabled () const
 
bool isShowSlicePlanes () const
 Whether showing slice planes is generally enabled or disabled.
 
vtkRenderer * labelRenderer () override
 Access to "label" VTK renderer, used for text (which should be shown in front of volumes).
 
vtkRenderer * renderer () override
 Access to "main" VTK renderer, used for volumes etc.
 
vtkRenderWindow * renderWindow () override
 Access to the render window.
 
void saveMovie (const QString &fileName, int mode, int qual, int fps, int numSteps)
 move out of here
 
iAAABB sceneBounds () const override
 see iARenderer
 
void setCamera (vtkCamera *c) override
 
void setCamPosition (int pos)
 Sets one of the pre-defined camera positions.
 
void setCuttingActive (bool enabled) override
 see iARenderer
 
void setDefaultInteractor () override
 Set the default interactor style.
 
void setPlaneNormals (vtkTransform *tr)
 
void setPositionMarkerCenter (double x, double y, double z)
 Set the position of the position marker to the given world coordinates.
 
void setROIVisible (bool visible)
 Visibility of the ROI indicator.
 
void setSceneBounds (iAAABB const &boundingBox) override
 see iARenderer
 
void setSlicePlaneOpacity (float opc)
 sets opacity of the slicing planes
 
void setSlicePlanePos (int planeID, double originX, double originY, double originZ)
 update the position of a specific slice plane
 
void setSlicingBounds (const int roi[6], const double *spacing)
 
QVariantMap const & settings () const
 Access to current settings.
 
void setUnitSize (std::array< double, 3 > size)
 Set size of a single standard "unit" across all shown datasets; used for the size of the position marker and the width of the slice planes unit: world coordinates.
 
void showAxesCube (bool show)
 
void showOriginIndicator (bool show)
 
void showRPosition (bool show)
 
void showSlicePlane (int axis, bool show)
 Show or hide the slice plane for the given axis.
 
std::array< vtkPlane *, 3 > slicePlanes () const override
 see iARenderer
 
void touchScaleSlot (float relScale)
 
void touchStart ()
 
vtkTextActor * txtActor ()
 
void update () override
 Update the view (to be called if something has changed in the underlying data which requires VTK to redraw the scene).
 
vtkActor * selectedActor () override
 check for better way to get access to these in PickCallbackFunction
 
vtkUnstructuredGrid * finalSelection ()
 
vtkDataSetMapper * selectedMapper ()
 
- Public Member Functions inherited from iARenderer
 iARenderer (QObject *parent)
 
virtual ~iARenderer ()
 

Static Public Member Functions

static iAAttributesdefaultSettings ()
 proxy access to default settings object
 

Static Public Attributes

static constexpr const char BackgroundBottom [] = "Background Bottom"
 
static constexpr const char BackgroundTop [] = "Background Top"
 
static constexpr const char DepthPeelOcclusionRatio [] = "Depth Peels Occlusion Ratio"
 
static constexpr const char DepthPeelsMax [] = "Depth Peels Maximum Number"
 
static constexpr const char MagicLensFrameWidth [] = "Magic Lens Frame Width"
 
static constexpr const char MagicLensSize [] = "Magic Lens size"
 
static constexpr const char MultiSamples [] = "MultiSamples"
 
static constexpr const char ParallelProjection [] = "Parallel Projection"
 
static constexpr const char ShowAxesCube [] = "Show Axes Cube"
 
static constexpr const char ShowFPS [] = "Show Frames Per Second"
 
static constexpr const char ShowOriginIndicator [] = "Show Origin Indicator"
 
static constexpr const char ShowPosition [] = "Show Position"
 
static constexpr const char ShowSlicePlanes [] = "Show Slice Planes"
 
static constexpr const char SlicePlaneOpacity [] = "Slice Plane Opacity"
 
static constexpr const char SSAOBias [] = "Screen Space Ambient Occlusion Bias"
 
static constexpr const char SSAOBlur [] = "Screen Space Ambient Occlusion Blur"
 
static constexpr const char SSAOKernelSize [] = "Screen Space Ambient Occlusion Kernel Size"
 
static constexpr const char SSAORadius [] = "Screen Space Ambient Occlusion Radius"
 
static constexpr const char StereoRenderMode [] = "Stereo Render Mode"
 
static constexpr const char UseDepthPeeling [] = "Use Depth Peeling"
 
static constexpr const char UseFXAA [] = "Use Fast Approximate Anti-aliasing"
 
static constexpr const char UseSSAO [] = "Use Screen Space Ambient Occlusion"
 
static constexpr const char UseStyleBGColor [] = "Use Style Background Color"
 

Detailed Description

Concrete implementation of iARenderer, displays several helper widgets for a 3D rendering window.

Constructor & Destructor Documentation

◆ iARendererImpl()

iARendererImpl::iARendererImpl ( QObject * parent,
vtkGenericOpenGLRenderWindow * renderWindow )

◆ ~iARendererImpl()

iARendererImpl::~iARendererImpl ( void )
virtual

Member Function Documentation

◆ addRenderer()

void iARendererImpl::addRenderer ( vtkRenderer * renderer)
overridevirtual

Adds a custom renderer to the render window.

Implements iARenderer.

◆ applySettings()

void iARendererImpl::applySettings ( QVariantMap const & paramValues)
overridevirtual

Apply the given settings to the renderer.

Parameters
paramValuesvalues for all settings.

Implements iARenderer.

◆ bgColorChanged

void iARendererImpl::bgColorChanged ( QColor bgTop,
QColor bgBottom )
signal

◆ camera()

vtkCamera * iARendererImpl::camera ( )
overridevirtual

Get/Set the VTK camera object (shared by main and label renderer)

Implements iARenderer.

◆ cellsSelected

void iARendererImpl::cellsSelected ( vtkPoints * selCellPoints)
signal

◆ defaultSettings()

iAAttributes & iARendererImpl::defaultSettings ( )
static

proxy access to default settings object

◆ editSettings()

void iARendererImpl::editSettings ( )

◆ enableInteractor()

void iARendererImpl::enableInteractor ( bool enable)

◆ finalSelection()

vtkUnstructuredGrid * iARendererImpl::finalSelection ( )

◆ getRenderObserver()

iARenderObserver * iARendererImpl::getRenderObserver ( )
overridevirtual

Access to the renderer observer.

Implements iARenderer.

◆ initProfilePoints()

void iARendererImpl::initProfilePoints ( double const * start,
double const * end )

initialize profile points (set positions, without triggering an update

◆ interactionModeChanged

void iARendererImpl::interactionModeChanged ( bool camera)
signal

called when user presses 'a'/'A' or 'c'/'C' key to change between modifying actors and camera

◆ interactor()

vtkRenderWindowInteractor * iARendererImpl::interactor ( )
overridevirtual

Access to the render window interactor.

Implements iARenderer.

◆ isInteractorEnabled()

bool iARendererImpl::isInteractorEnabled ( ) const

◆ isShowSlicePlanes()

bool iARendererImpl::isShowSlicePlanes ( ) const

Whether showing slice planes is generally enabled or disabled.

◆ labelRenderer()

vtkRenderer * iARendererImpl::labelRenderer ( )
overridevirtual

Access to "label" VTK renderer, used for text (which should be shown in front of volumes).

Implements iARenderer.

◆ mouseLeftButtonReleasedSlot

void iARendererImpl::mouseLeftButtonReleasedSlot ( )
slot

◆ mouseRightButtonReleasedSlot

void iARendererImpl::mouseRightButtonReleasedSlot ( )
slot

◆ noCellsSelected

void iARendererImpl::noCellsSelected ( )
signal

◆ onSetCamera

void iARendererImpl::onSetCamera ( )
signal

◆ onSetupRenderer

void iARendererImpl::onSetupRenderer ( )
signal

◆ reInitialized

void iARendererImpl::reInitialized ( )
signal

◆ renderer()

vtkRenderer * iARendererImpl::renderer ( )
overridevirtual

Access to "main" VTK renderer, used for volumes etc.

Implements iARenderer.

◆ renderWindow()

vtkRenderWindow * iARendererImpl::renderWindow ( )
overridevirtual

Access to the render window.

Implements iARenderer.

◆ saveMovie()

void iARendererImpl::saveMovie ( const QString & fileName,
int mode,
int qual,
int fps,
int numSteps )

move out of here

◆ sceneBounds()

iAAABB iARendererImpl::sceneBounds ( ) const
overridevirtual

see iARenderer

Implements iARenderer.

◆ selectedActor()

vtkActor * iARendererImpl::selectedActor ( )
overridevirtual

check for better way to get access to these in PickCallbackFunction

Implements iARenderer.

◆ selectedMapper()

vtkDataSetMapper * iARendererImpl::selectedMapper ( )

◆ setCamera()

void iARendererImpl::setCamera ( vtkCamera * c)
overridevirtual

Implements iARenderer.

◆ setCamPosition()

void iARendererImpl::setCamPosition ( int pos)

Sets one of the pre-defined camera positions.

Parameters
posdescriptor of the position,
See also
iACameraPosition

◆ setCuttingActive()

void iARendererImpl::setCuttingActive ( bool enabled)
overridevirtual

see iARenderer

Implements iARenderer.

◆ setDefaultInteractor()

void iARendererImpl::setDefaultInteractor ( )
overridevirtual

Set the default interactor style.

Implements iARenderer.

◆ setPlaneNormals()

void iARendererImpl::setPlaneNormals ( vtkTransform * tr)

◆ setPositionMarkerCenter()

void iARendererImpl::setPositionMarkerCenter ( double x,
double y,
double z )

Set the position of the position marker to the given world coordinates.

◆ setProfileHandlesOn

void iARendererImpl::setProfileHandlesOn ( bool isOn)
slot

◆ setProfilePoint

void iARendererImpl::setProfilePoint ( int pointIndex,
double const * coords )
slot

◆ setROIVisible()

void iARendererImpl::setROIVisible ( bool visible)

Visibility of the ROI indicator.

◆ setSceneBounds()

void iARendererImpl::setSceneBounds ( iAAABB const & boundingBox)
overridevirtual

see iARenderer

Implements iARenderer.

◆ setSlicePlaneOpacity()

void iARendererImpl::setSlicePlaneOpacity ( float opc)

sets opacity of the slicing planes

◆ setSlicePlanePos()

void iARendererImpl::setSlicePlanePos ( int planeID,
double originX,
double originY,
double originZ )

update the position of a specific slice plane

◆ setSlicingBounds()

void iARendererImpl::setSlicingBounds ( const int roi[6],
const double * spacing )

◆ settings()

QVariantMap const & iARendererImpl::settings ( ) const

Access to current settings.

◆ settingsChanged

void iARendererImpl::settingsChanged ( )
signal

◆ setUnitSize()

void iARendererImpl::setUnitSize ( std::array< double, 3 > size)

Set size of a single standard "unit" across all shown datasets; used for the size of the position marker and the width of the slice planes unit: world coordinates.

◆ showAxesCube()

void iARendererImpl::showAxesCube ( bool show)

◆ showOriginIndicator()

void iARendererImpl::showOriginIndicator ( bool show)

◆ showRPosition()

void iARendererImpl::showRPosition ( bool show)

◆ showSlicePlane()

void iARendererImpl::showSlicePlane ( int axis,
bool show )

Show or hide the slice plane for the given axis.

Method for setting visibility of a single slice plane (used to make plane visibility depending on whether the respective slicer view is currently shown); for the slice plane to be visible, also the "Show slice plane" setting has to be enabled.

Parameters
axisindex of the axis (x..0, y..1, z..2)
showwhether to show (true) or hide (false) the given axis slice plane

◆ slicePlanes()

std::array< vtkPlane *, 3 > iARendererImpl::slicePlanes ( ) const
overridevirtual

see iARenderer

Implements iARenderer.

◆ touchScaleSlot()

void iARendererImpl::touchScaleSlot ( float relScale)

◆ touchStart()

void iARendererImpl::touchStart ( )

◆ txtActor()

vtkTextActor * iARendererImpl::txtActor ( )

◆ update()

void iARendererImpl::update ( )
overridevirtual

Update the view (to be called if something has changed in the underlying data which requires VTK to redraw the scene).

Implements iARenderer.

Member Data Documentation

◆ BackgroundBottom

const char iARendererImpl::BackgroundBottom[] = "Background Bottom"
staticconstexpr

◆ BackgroundTop

const char iARendererImpl::BackgroundTop[] = "Background Top"
staticconstexpr

◆ DepthPeelOcclusionRatio

const char iARendererImpl::DepthPeelOcclusionRatio[] = "Depth Peels Occlusion Ratio"
staticconstexpr

◆ DepthPeelsMax

const char iARendererImpl::DepthPeelsMax[] = "Depth Peels Maximum Number"
staticconstexpr

◆ MagicLensFrameWidth

const char iARendererImpl::MagicLensFrameWidth[] = "Magic Lens Frame Width"
staticconstexpr

◆ MagicLensSize

const char iARendererImpl::MagicLensSize[] = "Magic Lens size"
staticconstexpr

◆ MultiSamples

const char iARendererImpl::MultiSamples[] = "MultiSamples"
staticconstexpr

◆ ParallelProjection

const char iARendererImpl::ParallelProjection[] = "Parallel Projection"
staticconstexpr

◆ ShowAxesCube

const char iARendererImpl::ShowAxesCube[] = "Show Axes Cube"
staticconstexpr

◆ ShowFPS

const char iARendererImpl::ShowFPS[] = "Show Frames Per Second"
staticconstexpr

◆ ShowOriginIndicator

const char iARendererImpl::ShowOriginIndicator[] = "Show Origin Indicator"
staticconstexpr

◆ ShowPosition

const char iARendererImpl::ShowPosition[] = "Show Position"
staticconstexpr

◆ ShowSlicePlanes

const char iARendererImpl::ShowSlicePlanes[] = "Show Slice Planes"
staticconstexpr

◆ SlicePlaneOpacity

const char iARendererImpl::SlicePlaneOpacity[] = "Slice Plane Opacity"
staticconstexpr

◆ SSAOBias

const char iARendererImpl::SSAOBias[] = "Screen Space Ambient Occlusion Bias"
staticconstexpr

◆ SSAOBlur

const char iARendererImpl::SSAOBlur[] = "Screen Space Ambient Occlusion Blur"
staticconstexpr

◆ SSAOKernelSize

const char iARendererImpl::SSAOKernelSize[] = "Screen Space Ambient Occlusion Kernel Size"
staticconstexpr

◆ SSAORadius

const char iARendererImpl::SSAORadius[] = "Screen Space Ambient Occlusion Radius"
staticconstexpr

◆ StereoRenderMode

const char iARendererImpl::StereoRenderMode[] = "Stereo Render Mode"
staticconstexpr

◆ UseDepthPeeling

const char iARendererImpl::UseDepthPeeling[] = "Use Depth Peeling"
staticconstexpr

◆ UseFXAA

const char iARendererImpl::UseFXAA[] = "Use Fast Approximate Anti-aliasing"
staticconstexpr

◆ UseSSAO

const char iARendererImpl::UseSSAO[] = "Use Screen Space Ambient Occlusion"
staticconstexpr

◆ UseStyleBGColor

const char iARendererImpl::UseStyleBGColor[] = "Use Style Background Color"
staticconstexpr

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