open_iA 2023.02
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | List of all members
iARendererImpl Class Reference

Displays several helper widgets for a 3D vtk 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 ()
 
- Signals inherited from iARenderer
void cellsSelected (vtkPoints *selCellPoints)
 
void noCellsSelected ()
 
void onSetCamera ()
 

Public Member Functions

 iARendererImpl (QObject *parent, vtkGenericOpenGLRenderWindow *renderWindow)
 
virtual ~iARendererImpl ()
 
void adaptSceneBoundsToNewObject (iAAABB const &newObjectBox) override
 adapts the bounds of the scene according to the given bounding box; adapts axes markers, plane indicators etc.
 
void addRenderer (vtkRenderer *renderer) override
 Adds a custom renderer to the render window.
 
void applySettings (iARenderSettings const &settings, bool slicePlaneVisibility[3]) override
 apply the given settings to the renderer
 
vtkCamera * camera () override
 Get/Set the VTK camera object (shared by main and label renderer)
 
void camPosition (double *camOptions)
 Returns viewup, position and focal point information of a renderer in a double array.
 
vtkTransform * coordinateSystemTransform () override
 
void enableInteractor (bool enable)
 
iARenderObservergetRenderObserver () override
 Access to the renderer observer.
 
vtkRenderWindowInteractor * interactor () override
 Access to the render window interactor.
 
bool isInteractorEnabled () const
 
vtkOpenGLRenderer * labelRenderer () override
 Access to "label" VTK renderer, used for text (which should be shown in front of volumes).
 
vtkPlane * plane1 () override
 Access to the slice planes.
 
vtkPlane * plane2 () override
 
vtkPlane * plane3 () override
 
vtkOpenGLRenderer * 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=2)
 move out of here
 
void setAxesTransform (vtkTransform *transform) override
 Access to the transform of the coordinate system axis actor.
 
void setBackgroundColors (iARenderSettings const &settings)
 
void setCamera (vtkCamera *c) override
 
void setCamPosition (double *camOptions, bool rsParallelProjection)
 Sets viewup, position and focal point of a renderer from the information in a double array.
 
void setCamPosition (int pos)
 Sets one of the pre-defined camera positions.
 
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 setSlicePlaneOpacity (float opc)
 sets opacity of the slicing planes
 
void setSlicePlanePos (int planeID, double originX, double originY, double originZ)
 
void setSlicingBounds (const int roi[6], const double *spacing)
 
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 showHelpers (bool show)
 
void showRPosition (bool show)
 
void showSlicePlane (int axis, bool show)
 show or hide the slice plane for the given axis
 
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 ()
 
virtual void adaptSceneBoundsToNewObject (iAAABB const &newObjectBox)=0
 adapts the bounds of the scene according to the given bounding box; adapts axes markers, plane indicators etc.
 
virtual void addRenderer (vtkRenderer *renderer)=0
 Adds a custom renderer to the render window.
 
virtual void applySettings (iARenderSettings const &settings, bool slicePlaneVisibility[3])=0
 Apply the given settings to the renderer.
 
virtual iARenderObservergetRenderObserver ()=0
 Access to the renderer observer.
 
virtual vtkRenderWindowInteractor * interactor ()=0
 Access to the render window interactor.
 
virtual vtkOpenGLRenderer * labelRenderer ()=0
 Access to "label" VTK renderer, used for text (which should be shown in front of volumes).
 
virtual vtkOpenGLRenderer * renderer ()=0
 Access to "main" VTK renderer, used for volumes etc.
 
virtual vtkRenderWindow * renderWindow ()=0
 Access to the render window.
 
virtual vtkActor * selectedActor ()=0
 Access to selected actor (when selection is enabled).
 
virtual void setDefaultInteractor ()=0
 Set the default interactor style.
 
virtual void update ()=0
 Update the view (to be called if something has changed in the underlying data which requires VTK to redraw the scene).
 

Detailed Description

Displays several helper widgets for a 3D vtk rendering window.

Constructor & Destructor Documentation

◆ iARendererImpl()

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

◆ ~iARendererImpl()

iARendererImpl::~iARendererImpl ( void  )
virtual

Member Function Documentation

◆ adaptSceneBoundsToNewObject()

void iARendererImpl::adaptSceneBoundsToNewObject ( iAAABB const &  newObjectBox)
overridevirtual

adapts the bounds of the scene according to the given bounding box; adapts axes markers, plane indicators etc.

to be properly visible for an added object with the given bounding box

Implements iARenderer.

◆ addRenderer()

void iARendererImpl::addRenderer ( vtkRenderer *  renderer)
overridevirtual

Adds a custom renderer to the render window.

Implements iARenderer.

◆ applySettings()

void iARendererImpl::applySettings ( iARenderSettings const &  settings,
bool  slicePlaneVisibility[3] 
)
overridevirtual

apply the given settings to the renderer

Parameters
settingsdata holder for all settings.
slicePlaneVisibilityinitial visibility of the single slice planes (can be modified independently via showSlicePlanes as well).

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.

◆ camPosition()

void iARendererImpl::camPosition ( double *  camOptions)

Returns viewup, position and focal point information of a renderer in a double array.

Parameters
camOptionsdouble array where all informations about the camera will be stored

◆ cellsSelected

void iARendererImpl::cellsSelected ( vtkPoints *  selCellPoints)
signal

◆ coordinateSystemTransform()

vtkTransform * iARendererImpl::coordinateSystemTransform ( )
overridevirtual

Implements iARenderer.

◆ enableInteractor()

void iARendererImpl::enableInteractor ( bool  enable)

◆ finalSelection()

vtkUnstructuredGrid * iARendererImpl::finalSelection ( )

◆ getRenderObserver()

iARenderObserver * iARendererImpl::getRenderObserver ( )
overridevirtual

Access to the renderer observer.

Implements iARenderer.

◆ 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

◆ labelRenderer()

vtkOpenGLRenderer * 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

◆ plane1()

vtkPlane * iARendererImpl::plane1 ( )
overridevirtual

Access to the slice planes.

Implements iARenderer.

◆ plane2()

vtkPlane * iARendererImpl::plane2 ( )
overridevirtual

Implements iARenderer.

◆ plane3()

vtkPlane * iARendererImpl::plane3 ( )
overridevirtual

Implements iARenderer.

◆ reInitialized

void iARendererImpl::reInitialized ( )
signal

◆ renderer()

vtkOpenGLRenderer * 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 = 2 
)

move out of here

◆ selectedActor()

vtkActor * iARendererImpl::selectedActor ( )
overridevirtual

check for better way to get access to these in PickCallbackFunction

Implements iARenderer.

◆ selectedMapper()

vtkDataSetMapper * iARendererImpl::selectedMapper ( )

◆ setAxesTransform()

void iARendererImpl::setAxesTransform ( vtkTransform *  transform)
overridevirtual

Access to the transform of the coordinate system axis actor.

Implements iARenderer.

◆ setBackgroundColors()

void iARendererImpl::setBackgroundColors ( iARenderSettings const &  settings)

◆ setCamera()

void iARendererImpl::setCamera ( vtkCamera *  c)
overridevirtual

Implements iARenderer.

◆ setCamPosition() [1/2]

void iARendererImpl::setCamPosition ( double *  camOptions,
bool  rsParallelProjection 
)

Sets viewup, position and focal point of a renderer from the information in a double array.

Parameters
camOptionsAll informations of the camera stored in a double array
rsParallelProjectionboolean variable to determine if parallel projection option is on.

◆ setCamPosition() [2/2]

void iARendererImpl::setCamPosition ( int  pos)

Sets one of the pre-defined camera positions.

Parameters
posdescriptor of the position,
See also
iACameraPosition

◆ 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.

◆ setSlicePlaneOpacity()

void iARendererImpl::setSlicePlaneOpacity ( float  opc)

sets opacity of the slicing planes

◆ setSlicePlanePos()

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

◆ setSlicingBounds()

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

◆ 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.

◆ showHelpers()

void iARendererImpl::showHelpers ( 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

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

◆ 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.


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