Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
camitk::RendererWidget Class Reference

RendererWidget implements all support methods to use camiTK with Qt interface. More...

#include <RendererWidget.h>

+ Inheritance diagram for camitk::RendererWidget:
+ Collaboration diagram for camitk::RendererWidget:

Public Types

enum  CameraOrientation {
  RIGHT_DOWN , LEFT_UP , RIGHT_UP , LEFT_BACK ,
  BACK_DOWN
}
 describes the initial position and orientation of the default camera. More...
 
enum  ControlMode { JOYSTICK , TRACKBALL , TRACKBALL_2D , NONE }
 list of possible user interaction control mode More...
 
enum  MouseButtonState { NO_BUTTON , LEFT_BUTTON , MIDDLE_BUTTON , RIGHT_BUTTON }
 state of the pressed button (for 3 buttons mouse) More...
 

Public Member Functions

 RendererWidget (QWidget *parent=nullptr, ControlMode mode=RendererWidget::TRACKBALL)
 constructors.
 
 ~RendererWidget () override
 destructor
 
view/camera/interactor settings

Set/unset backface culling on all actors

void setBackfaceCulling (bool)
 
bool getBackfaceCulling () const
 Get the current state of backface culling.
 
void setFxaaAntialiasing (bool)
 Set/unset FXAA Antialiasing in renderer.
 
bool getFxaaAntialiasing () const
 Get the current state of FXAA Antialiasing in renderer.
 
void setCameraOrientation (RendererWidget::CameraOrientation)
 Set the current axes mode.
 
RendererWidget::CameraOrientation getCameraOrientation () const
 Return the current axes mode.
 
void setLightFollowCamera (bool)
 Set/unset the light to follow the camera.
 
bool getLightFollowCamera () const
 Get the current state of the property.
 
void setPointSize (double size)
 set the default point size
 
double getPointSize () const
 get the current value of point size
 
void rotateCamera (double angle, int axe)
 Rotate the camera around param "axe" of "angle" degrees.
 
void resetCamera ()
 reset the camera to the default position, default FOV.
 
void resetCamera (double *bounds)
 reset the camera to the default position, default FOV and use the given bounds to focus on
 
void getCameraSettings (double *position, double *focalPoint, double *viewUp)
 get camera settings information (position, what is looked at and how) in world coordinates
 
void setActiveCamera (vtkCamera *cam)
 set active camera
 
vtkCamera * getActiveCamera ()
 get the active camera
 
vtkSmartPointer< QVTKInteractor > getInteractor ()
 get the current interactor (utility to manage VTK7/VTK8 and VTK9 compatibility)
 
vtkSmartPointer< vtkRenderWindow > getRenderWindow ()
 get the render window (utility to manage VTK7/VTK8 and VTK9 compatibility)
 
void getMouse3DCoordinates (double &x, double &y, double &z)
 get the mouse coordinates in 3D
 
void setBackgroundColor (double, double, double)
 set the background color (rgb)
 
void getBackgroundColor (double &, double &, double &)
 get the background color (rgb)
 
bool getGradientBackground ()
 get the current state of the gradient background
 
void setGradientBackground (bool)
 set the gradient background
 
void toogle3DRedBlue ()
 toggle stereo 3D red/blue rendering (you will need red/blue glasses)
 
void toggleLogo (bool)
 toggle logo
 
void toggleAxes (bool)
 display the axes
 
void updateAxes ()
 update the axes sizes
 
void toggleOrientationDecorations (bool)
 display orientation decorations
 
void setOrientationDecorationsLetters (QStringList letters)
 give the letters for orientation decoration: Left, Right, Top, Down
 
void setColorScale (bool)
 display the color scale in the viewport, use setColorScaleMinMax to change the displayed values
 
bool getColorScale () const
 get the color display state
 
void setColorScaleMinMax (double m, double M)
 set the min and max values.
 
void setColorScaleTitle (QString t)
 set the color scale title.
 
void computeVisiblePropBounds (double *bounds)
 get the bounding box of all visible actors [xmin,xmax, ymin,ymax, zmin,zmax]
 
void resetClippingPlanes (double *bounds=nullptr)
 reset the camera clipping plane to a given bounding box If no bounds are given, reset to show all visible actors
 
add/manipulate actors
void addProp (vtkSmartPointer< vtkProp > p, bool refresh=false)
 add a vtkActor or vtkActor2D, updating the cull face depending on the current state.
 
bool containsProp (vtkSmartPointer< vtkProp >)
 is the given vtkProp (e.g. vtkActor or vtkActor2D) in this renderer
 
void removeProp (vtkSmartPointer< vtkProp > p, bool refresh=false)
 remove the given vtkProp (e.g.
 

Protected Member Functions

void mouseMoveEvent (QMouseEvent *event) override
 mouse move handler overriden to manage different version of VTK
 
void mousePressEvent (QMouseEvent *event) override
 mouse press handler overriden to manage different version of VTK
 
void mouseReleaseEvent (QMouseEvent *event) override
 mouse release handler overriden to manage different version of VTK
 

Protected Attributes

callback and interaction
vtkSmartPointer< vtkInteractorStylePickpickInteractorStyle
 picking interactor
 
extra actors managements

is the gradient background displayed

bool displayGradient
 
bool displayLogo
 is the logo displayed
 
vtkSmartPointer< vtkLogoWidget > logoWidget
 logo widget
 
bool displayColorScale
 is the color scale currently displayed
 
vtkSmartPointer< vtkScalarBarActor > colorScale
 the color scale displaying the lookup table + values
 
vtkSmartPointer< vtkScalarBarWidget > colorBarWidget
 the scalar bar widget
 
vtkSmartPointer< vtkAxesActor > axes
 axes actor
 
vtkSmartPointer< vtkAnnotatedCubeActor > annotatedCube
 annotated cube actor
 
vtkSmartPointer< vtkActor2D > orientationDecorationActors [4]
 annotated cube text actors
 
vtkSmartPointer< vtkTextMapper > orientationDecorationsTextMapper [4]
 annotated cube text
 

picking and interaction

to manage interactions

vtkSmartPointer< QVTKInteractor > renderWindowInteractor
 
vtkSmartPointer< vtkInteractorStyle > controlInteractorStyle
 for the interaction with the scene
 
ControlMode controlMode
 current control mode
 
void setAreaPicking (bool areaPicking)
 
ControlMode getControlMode () const
 get the current control mode
 
void setControlMode (ControlMode mode)
 Set the interaction like trackball or joystick style.
 
void setPicker (vtkSmartPointer< vtkAbstractPropPicker > woodyWood)
 set the picker to handle the action
 
void keyPressEvent (QKeyEvent *e) override
 key events (do nothing but pass on e to the parent widget), please do not add any shortcut management here (see note in implementation)!
 
void screenshot (QString filename)
 save the screenshot in a file
 
void refresh ()
 refresh the display
 
void startPicking ()
 
void endPicking ()
 end picking
 
void actorPicked (vtkSmartPointer< vtkPicker >)
 
void rightButtonPressed ()
 send when the mouse right button is clicked
 

view/camera settings

Reset camera settings (position, what is looked at and how)

vtkSmartPointer< vtkRenderer > renderer
 The current renderer.
 
bool backfaceCulling
 Is back face culling on?
 
bool fxaaAntialiasing
 
CameraOrientation cameraOrientation
 state of the initial camera orientation
 
bool lightFollowCamera
 Is the light following the camera.
 
double pointSize
 default point size
 
bool rendering3DRedBlue
 is rendering in 3D stereo red/blue
 
void resetCameraSettings ()
 

Detailed Description

RendererWidget implements all support methods to use camiTK with Qt interface.

This class wraps the necessary VTK method for rendering, interactions, and signal/slot connections. This class should be usable completely independently of Core.

The Core companion class is InteractiveViewer (which delegates all vtk stuff to RendererWidget.

It is directly based on QVTKWidget2, the GUI support class available in Vtk version >= 5.0 This is a pure Qt/vtk wrapper class (no Core stuff).

For developers: please check the coding policy in InteractiveViewer API documentation first.

Member Enumeration Documentation

◆ CameraOrientation

describes the initial position and orientation of the default camera.

The world coordinate system is not changed by the CameraOrientation, only the inital position and orientation of the camera. 6 keywords can be used to determine the direction of the x and y axis as intially viewed by the camera: RIGHT, LEFT, UP, DOWN, FRONT, BACK. The first part of the enum name describes the x direction, the second part corresponds to the y direction. The camera is positionned and orientated in order to view the axes as described by the keywords. E.g. RIGHT_DOWN will set the camera so that the x axis points toward the right direction and the y axis points toward the down direction.

Enumerator
RIGHT_DOWN 

World axes are seen so that x points to the right, y points downward.

LEFT_UP 

World axes are seen so that x points to the left, y points upward.

RIGHT_UP 

World axes are seen so that x points to the right, y points upward.

LEFT_BACK 
BACK_DOWN 

< World axes are seen so that x points to the left, y points backward. For Medical Images Coronal Views (see Image Reorientation Action Documentation)

◆ ControlMode

list of possible user interaction control mode

Enumerator
JOYSTICK 

the mouse is used a joystick

TRACKBALL 

the mouse is used as a trackball (default)

TRACKBALL_2D 

same as TRACKBALL but does not allow rotation using left button (but zoom and displacement parallel to slice is allowed)

NONE 

◆ MouseButtonState

state of the pressed button (for 3 buttons mouse)

Enumerator
NO_BUTTON 

no buttons are currently pressed

LEFT_BUTTON 

the mouse left button is currently pressed

MIDDLE_BUTTON 

the mouse middle button is currently pressed (or 3rd button emulation)

RIGHT_BUTTON 

the mouse right button is currently pressed

Constructor & Destructor Documentation

◆ RendererWidget()

camitk::RendererWidget::RendererWidget ( QWidget *  parent = nullptr,
ControlMode  mode = RendererWidget::TRACKBALL 
)

constructors.

By default:

  • the backface culling is off,
  • the interaction mode is controlling the camera
  • the light follow the camera
  • the logo is shown
  • the gradient background is not shown
Parameters
parentthe parent widget
modethe mouse interaction control mode (default is TRACKBALL)

References addProp(), annotatedCube, axes, backfaceCulling, cameraOrientation, colorBarWidget, controlInteractorStyle, controlMode, displayColorScale, displayGradient, displayLogo, fxaaAntialiasing, getRenderWindow(), logoWidget, NONE, orientationDecorationActors, orientationDecorationsTextMapper, pickInteractorStyle, pointSize, renderer, rendering3DRedBlue, renderWindowInteractor, RIGHT_DOWN, setBackgroundColor(), setCameraOrientation(), and setControlMode().

+ Here is the call graph for this function:

◆ ~RendererWidget()

camitk::RendererWidget::~RendererWidget ( )
override

destructor

Member Function Documentation

◆ actorPicked

void camitk::RendererWidget::actorPicked ( vtkSmartPointer< vtkPicker >  )
signal

◆ addProp()

void camitk::RendererWidget::addProp ( vtkSmartPointer< vtkProp >  p,
bool  refresh = false 
)

add a vtkActor or vtkActor2D, updating the cull face depending on the current state.

The method checks it is not already there first. This method is "clever": it does different things (that should be documented below), depending on the type of the vtkProp

Action performed depending on the vtkProp (true) type:

  • vtkActor: apply the current backface culling and point size property to the actor.
    Parameters
    pthe vtkProp to add to the scene
    refreshif true the axes are refreshed (default false)

References backfaceCulling, containsProp(), pointSize, refresh(), renderer, and updateAxes().

Referenced by camitk::InteractiveViewer::addActor(), ReorientImage::modelChanged(), and RendererWidget().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ computeVisiblePropBounds()

void camitk::RendererWidget::computeVisiblePropBounds ( double *  bounds)

get the bounding box of all visible actors [xmin,xmax, ymin,ymax, zmin,zmax]

References renderer.

Referenced by camitk::InteractiveViewer::getBounds(), camitk::InteractiveViewer::keyPressEvent(), and updateAxes().

+ Here is the caller graph for this function:

◆ containsProp()

bool camitk::RendererWidget::containsProp ( vtkSmartPointer< vtkProp >  prop)

is the given vtkProp (e.g. vtkActor or vtkActor2D) in this renderer

References renderer.

Referenced by addProp(), and removeProp().

+ Here is the caller graph for this function:

◆ endPicking

void camitk::RendererWidget::endPicking ( )
protectedslot

end picking

References controlInteractorStyle, refresh(), and renderWindowInteractor.

Referenced by mouseReleaseEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActiveCamera()

vtkCamera * camitk::RendererWidget::getActiveCamera ( )

get the active camera

References renderer.

Referenced by BitmapViewer::BitmapViewer(), camitk::InteractiveViewer::init(), and InteractiveSliceViewer::InteractiveSliceViewer().

+ Here is the caller graph for this function:

◆ getBackfaceCulling()

bool camitk::RendererWidget::getBackfaceCulling ( ) const

Get the current state of backface culling.

References backfaceCulling.

Referenced by camitk::InteractiveViewer::keyPressEvent().

+ Here is the caller graph for this function:

◆ getBackgroundColor()

void camitk::RendererWidget::getBackgroundColor ( double &  r,
double &  g,
double &  b 
)

get the background color (rgb)

References renderer.

◆ getCameraOrientation()

RendererWidget::CameraOrientation camitk::RendererWidget::getCameraOrientation ( ) const

Return the current axes mode.

References cameraOrientation.

◆ getCameraSettings()

void camitk::RendererWidget::getCameraSettings ( double *  position,
double *  focalPoint,
double *  viewUp 
)

get camera settings information (position, what is looked at and how) in world coordinates

References renderer.

Referenced by camitk::InteractiveViewer::keyPressEvent().

+ Here is the caller graph for this function:

◆ getColorScale()

bool camitk::RendererWidget::getColorScale ( ) const

get the color display state

References displayColorScale.

Referenced by camitk::InteractiveViewer::getColorScale(), and camitk::InteractiveViewer::keyPressEvent().

+ Here is the caller graph for this function:

◆ getControlMode()

RendererWidget::ControlMode camitk::RendererWidget::getControlMode ( ) const

get the current control mode

References controlMode.

◆ getFxaaAntialiasing()

bool camitk::RendererWidget::getFxaaAntialiasing ( ) const

Get the current state of FXAA Antialiasing in renderer.

References renderer.

◆ getGradientBackground()

bool camitk::RendererWidget::getGradientBackground ( )

get the current state of the gradient background

References displayGradient.

◆ getInteractor()

vtkSmartPointer< QVTKInteractor > camitk::RendererWidget::getInteractor ( )

get the current interactor (utility to manage VTK7/VTK8 and VTK9 compatibility)

Referenced by getMouse3DCoordinates(), MeshClipping::getWidget(), camitk::InteractiveViewer::init(), camitk::InteractiveViewer::picked(), and setPicker().

+ Here is the caller graph for this function:

◆ getLightFollowCamera()

bool camitk::RendererWidget::getLightFollowCamera ( ) const

Get the current state of the property.

References lightFollowCamera.

Referenced by camitk::InteractiveViewer::keyPressEvent().

+ Here is the caller graph for this function:

◆ getMouse3DCoordinates()

void camitk::RendererWidget::getMouse3DCoordinates ( double &  x,
double &  y,
double &  z 
)

get the mouse coordinates in 3D

References getInteractor(), and renderer.

+ Here is the call graph for this function:

◆ getPointSize()

double camitk::RendererWidget::getPointSize ( ) const

get the current value of point size

References pointSize.

◆ getRenderWindow()

vtkSmartPointer< vtkRenderWindow > camitk::RendererWidget::getRenderWindow ( )

get the render window (utility to manage VTK7/VTK8 and VTK9 compatibility)

Referenced by refresh(), RendererWidget(), VRMLComponentExtension::save(), screenshot(), and toogle3DRedBlue().

+ Here is the caller graph for this function:

◆ keyPressEvent()

void camitk::RendererWidget::keyPressEvent ( QKeyEvent *  e)
override

key events (do nothing but pass on e to the parent widget), please do not add any shortcut management here (see note in implementation)!

◆ mouseMoveEvent()

void camitk::RendererWidget::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected

mouse move handler overriden to manage different version of VTK

◆ mousePressEvent()

void camitk::RendererWidget::mousePressEvent ( QMouseEvent *  event)
overrideprotected

mouse press handler overriden to manage different version of VTK

References pickInteractorStyle, rightButtonPressed(), and startPicking().

+ Here is the call graph for this function:

◆ mouseReleaseEvent()

void camitk::RendererWidget::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected

mouse release handler overriden to manage different version of VTK

References endPicking(), and renderWindowInteractor.

+ Here is the call graph for this function:

◆ refresh()

void camitk::RendererWidget::refresh ( )

refresh the display

References getRenderWindow().

Referenced by addProp(), endPicking(), camitk::InteractiveViewer::eventFilter(), camitk::InteractiveViewer::keyPressEvent(), camitk::InteractiveViewer::refresh(), removeProp(), resetClippingPlanes(), screenshot(), setBackfaceCulling(), setControlMode(), setPointSize(), startPicking(), camitk::InteractiveViewer::toggleAxes(), camitk::InteractiveViewer::toggleLogo(), and camitk::InteractiveViewer::toggleOrientationDecorations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeProp()

void camitk::RendererWidget::removeProp ( vtkSmartPointer< vtkProp >  p,
bool  refresh = false 
)

remove the given vtkProp (e.g.

vtkActor or vtkActor2D, such as color scale)

Parameters
pthe vtkProp to add to the scene
refreshif true the axes are refreshed (default false)

References containsProp(), refresh(), renderer, and updateAxes().

Referenced by ReorientImage::modelChanged(), and camitk::InteractiveViewer::removeAllActors().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetCamera() [1/2]

void camitk::RendererWidget::resetCamera ( )

reset the camera to the default position, default FOV.

The camera focal is set so that all the things in the scenes are visible (i.e. reset the camera clipping range based on the bounds of the visible actors. This ensures that no props are cut off)

References renderer, resetCameraSettings(), and resetClippingPlanes().

Referenced by camitk::InteractiveViewer::resetCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetCamera() [2/2]

void camitk::RendererWidget::resetCamera ( double *  bounds)

reset the camera to the default position, default FOV and use the given bounds to focus on

References renderer, resetCameraSettings(), and resetClippingPlanes().

+ Here is the call graph for this function:

◆ resetCameraSettings()

void camitk::RendererWidget::resetCameraSettings ( )
protected

References BACK_DOWN, cameraOrientation, LEFT_BACK, LEFT_UP, renderer, RIGHT_DOWN, and RIGHT_UP.

Referenced by resetCamera(), and resetCamera().

+ Here is the caller graph for this function:

◆ resetClippingPlanes()

void camitk::RendererWidget::resetClippingPlanes ( double *  bounds = nullptr)

reset the camera clipping plane to a given bounding box If no bounds are given, reset to show all visible actors

Parameters
boundsthe clipping plane will be set to the bounding box [xmin,xmax, ymin,ymax, zmin,zmax]

References refresh(), and renderer.

Referenced by camitk::InteractiveViewer::refresh(), resetCamera(), resetCamera(), and rotateCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rightButtonPressed

void camitk::RendererWidget::rightButtonPressed ( )
signal

send when the mouse right button is clicked

Referenced by mousePressEvent().

+ Here is the caller graph for this function:

◆ rotateCamera()

void camitk::RendererWidget::rotateCamera ( double  angle,
int  axe 
)

Rotate the camera around param "axe" of "angle" degrees.

References renderer, and resetClippingPlanes().

Referenced by camitk::InteractiveViewer::keyPressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ screenshot()

void camitk::RendererWidget::screenshot ( QString  filename)

save the screenshot in a file

Parameters
filenamethe filename extension (suffix) must be supported (use getScreenshotFormatInfo to get the correct extension)

References camitk::ScreenshotFormatInfo::BMP, CAMITK_WARNING_IF, camitk::ScreenshotFormatInfo::defaultFormat(), description, displayGradient, camitk::ScreenshotFormatInfo::EPS, camitk::ScreenshotFormatInfo::extension, camitk::ScreenshotFormatInfo::get(), getRenderWindow(), camitk::ScreenshotFormatInfo::JPG, camitk::ScreenshotFormatInfo::NOT_SUPPORTED, camitk::ScreenshotFormatInfo::OBJ, camitk::ScreenshotFormatInfo::PDF, camitk::ScreenshotFormatInfo::PNG, camitk::ScreenshotFormatInfo::PS, refresh(), camitk::ScreenshotFormatInfo::RIB, setGradientBackground(), camitk::ScreenshotFormatInfo::SVG, camitk::ScreenshotFormatInfo::TEX, and camitk::ScreenshotFormatInfo::VRML.

Referenced by camitk::InteractiveViewer::screenshot().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActiveCamera()

void camitk::RendererWidget::setActiveCamera ( vtkCamera *  cam)

set active camera

References renderer.

Referenced by camitk::InteractiveViewer::setActiveCamera().

+ Here is the caller graph for this function:

◆ setAreaPicking()

void camitk::RendererWidget::setAreaPicking ( bool  areaPicking)

References pickInteractorStyle.

Referenced by camitk::InteractiveViewer::initPicking().

+ Here is the caller graph for this function:

◆ setBackfaceCulling()

void camitk::RendererWidget::setBackfaceCulling ( bool  culling)

References backfaceCulling, refresh(), and renderer.

Referenced by camitk::InteractiveViewer::eventFilter(), and camitk::InteractiveViewer::keyPressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBackgroundColor()

void camitk::RendererWidget::setBackgroundColor ( double  r,
double  g,
double  b 
)

set the background color (rgb)

References renderer.

Referenced by BitmapViewer::BitmapViewer(), camitk::InteractiveViewer::eventFilter(), and RendererWidget().

+ Here is the caller graph for this function:

◆ setCameraOrientation()

void camitk::RendererWidget::setCameraOrientation ( RendererWidget::CameraOrientation  a)

Set the current axes mode.

References cameraOrientation.

Referenced by BitmapViewer::BitmapViewer(), RendererWidget(), and camitk::InteractiveViewer::setCameraOrientation().

+ Here is the caller graph for this function:

◆ setColorScale()

void camitk::RendererWidget::setColorScale ( bool  state)

display the color scale in the viewport, use setColorScaleMinMax to change the displayed values

References colorBarWidget, and displayColorScale.

Referenced by camitk::InteractiveViewer::setColorScale(), setColorScaleMinMax(), and setColorScaleTitle().

+ Here is the caller graph for this function:

◆ setColorScaleMinMax()

void camitk::RendererWidget::setColorScaleMinMax ( double  m,
double  M 
)

set the min and max values.

Parameters
mminimum value (blue)
Mmaximum value (red)

References colorBarWidget, displayColorScale, and setColorScale().

Referenced by camitk::InteractiveViewer::setColorScaleMinMax().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setColorScaleTitle()

void camitk::RendererWidget::setColorScaleTitle ( QString  t)

set the color scale title.

Parameters
ttitle of the color scale

References colorBarWidget, displayColorScale, and setColorScale().

Referenced by camitk::InteractiveViewer::setColorScaleTitle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setControlMode()

void camitk::RendererWidget::setControlMode ( ControlMode  mode)

Set the interaction like trackball or joystick style.

References controlInteractorStyle, controlMode, JOYSTICK, refresh(), renderWindowInteractor, TRACKBALL, and TRACKBALL_2D.

Referenced by camitk::InteractiveViewer::initSettings(), camitk::InteractiveViewer::keyPressEvent(), RendererWidget(), and camitk::InteractiveViewer::viewControlModeChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFxaaAntialiasing()

void camitk::RendererWidget::setFxaaAntialiasing ( bool  antialiasing)

Set/unset FXAA Antialiasing in renderer.

References renderer.

Referenced by camitk::InteractiveViewer::eventFilter().

+ Here is the caller graph for this function:

◆ setGradientBackground()

void camitk::RendererWidget::setGradientBackground ( bool  gb)

set the gradient background

References displayGradient, and renderer.

Referenced by BitmapViewer::BitmapViewer(), camitk::InteractiveViewer::eventFilter(), and screenshot().

+ Here is the caller graph for this function:

◆ setLightFollowCamera()

void camitk::RendererWidget::setLightFollowCamera ( bool  lightFollow)

Set/unset the light to follow the camera.

References lightFollowCamera, renderer, and renderWindowInteractor.

Referenced by camitk::InteractiveViewer::keyPressEvent().

+ Here is the caller graph for this function:

◆ setOrientationDecorationsLetters()

void camitk::RendererWidget::setOrientationDecorationsLetters ( QStringList  letters)

give the letters for orientation decoration: Left, Right, Top, Down

References CAMITK_TRACE, and orientationDecorationsTextMapper.

Referenced by camitk::InteractiveViewer::setCameraOrientation().

+ Here is the caller graph for this function:

◆ setPicker()

void camitk::RendererWidget::setPicker ( vtkSmartPointer< vtkAbstractPropPicker >  woodyWood)

set the picker to handle the action

Parameters
woodyWoodthe picker (sorry, I could not resist this one!)

References getInteractor().

Referenced by camitk::InteractiveViewer::initPicking().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPointSize()

void camitk::RendererWidget::setPointSize ( double  size)

set the default point size

References pointSize, refresh(), and renderer.

Referenced by camitk::InteractiveViewer::eventFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startPicking

void camitk::RendererWidget::startPicking ( )
protectedslot

References pickInteractorStyle, refresh(), and renderWindowInteractor.

Referenced by mousePressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleAxes()

void camitk::RendererWidget::toggleAxes ( bool  f)

display the axes

References annotatedCube, axes, and updateAxes().

Referenced by camitk::InteractiveViewer::toggleAxes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleLogo()

void camitk::RendererWidget::toggleLogo ( bool  c)

toggle logo

References displayLogo, and logoWidget.

Referenced by camitk::InteractiveViewer::toggleLogo().

+ Here is the caller graph for this function:

◆ toggleOrientationDecorations()

void camitk::RendererWidget::toggleOrientationDecorations ( bool  f)

display orientation decorations

References orientationDecorationActors.

Referenced by BitmapViewer::BitmapViewer(), camitk::InteractiveViewer::initSettings(), and camitk::InteractiveViewer::toggleOrientationDecorations().

+ Here is the caller graph for this function:

◆ toogle3DRedBlue()

void camitk::RendererWidget::toogle3DRedBlue ( )

toggle stereo 3D red/blue rendering (you will need red/blue glasses)

References getRenderWindow(), and rendering3DRedBlue.

Referenced by camitk::InteractiveViewer::keyPressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateAxes()

void camitk::RendererWidget::updateAxes ( )

update the axes sizes

References annotatedCube, axes, and computeVisiblePropBounds().

Referenced by addProp(), camitk::InteractiveViewer::refresh(), removeProp(), and toggleAxes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ annotatedCube

vtkSmartPointer<vtkAnnotatedCubeActor> camitk::RendererWidget::annotatedCube
protected

annotated cube actor

Referenced by RendererWidget(), toggleAxes(), and updateAxes().

◆ axes

vtkSmartPointer<vtkAxesActor> camitk::RendererWidget::axes
protected

axes actor

Referenced by RendererWidget(), toggleAxes(), and updateAxes().

◆ backfaceCulling

bool camitk::RendererWidget::backfaceCulling
protected

Is back face culling on?

Referenced by addProp(), getBackfaceCulling(), RendererWidget(), and setBackfaceCulling().

◆ cameraOrientation

CameraOrientation camitk::RendererWidget::cameraOrientation
protected

state of the initial camera orientation

Referenced by getCameraOrientation(), RendererWidget(), resetCameraSettings(), and setCameraOrientation().

◆ colorBarWidget

vtkSmartPointer<vtkScalarBarWidget> camitk::RendererWidget::colorBarWidget
protected

the scalar bar widget

Referenced by RendererWidget(), setColorScale(), setColorScaleMinMax(), and setColorScaleTitle().

◆ colorScale

vtkSmartPointer<vtkScalarBarActor> camitk::RendererWidget::colorScale
protected

the color scale displaying the lookup table + values

◆ controlInteractorStyle

vtkSmartPointer<vtkInteractorStyle> camitk::RendererWidget::controlInteractorStyle
protected

for the interaction with the scene

Referenced by endPicking(), RendererWidget(), and setControlMode().

◆ controlMode

ControlMode camitk::RendererWidget::controlMode
protected

current control mode

Referenced by getControlMode(), RendererWidget(), and setControlMode().

◆ displayColorScale

bool camitk::RendererWidget::displayColorScale
protected

is the color scale currently displayed

Referenced by getColorScale(), RendererWidget(), setColorScale(), setColorScaleMinMax(), and setColorScaleTitle().

◆ displayGradient

bool camitk::RendererWidget::displayGradient
protected

◆ displayLogo

bool camitk::RendererWidget::displayLogo
protected

is the logo displayed

Referenced by RendererWidget(), and toggleLogo().

◆ fxaaAntialiasing

bool camitk::RendererWidget::fxaaAntialiasing
protected

Referenced by RendererWidget().

◆ lightFollowCamera

bool camitk::RendererWidget::lightFollowCamera
protected

Is the light following the camera.

Referenced by getLightFollowCamera(), and setLightFollowCamera().

◆ logoWidget

vtkSmartPointer<vtkLogoWidget> camitk::RendererWidget::logoWidget
protected

logo widget

Referenced by RendererWidget(), and toggleLogo().

◆ orientationDecorationActors

vtkSmartPointer<vtkActor2D> camitk::RendererWidget::orientationDecorationActors[4]
protected

annotated cube text actors

Referenced by RendererWidget(), and toggleOrientationDecorations().

◆ orientationDecorationsTextMapper

vtkSmartPointer<vtkTextMapper> camitk::RendererWidget::orientationDecorationsTextMapper[4]
protected

annotated cube text

Referenced by RendererWidget(), and setOrientationDecorationsLetters().

◆ pickInteractorStyle

vtkSmartPointer<vtkInteractorStylePick> camitk::RendererWidget::pickInteractorStyle
protected

picking interactor

Referenced by mousePressEvent(), RendererWidget(), setAreaPicking(), and startPicking().

◆ pointSize

double camitk::RendererWidget::pointSize
protected

default point size

Referenced by addProp(), getPointSize(), RendererWidget(), and setPointSize().

◆ renderer

◆ rendering3DRedBlue

bool camitk::RendererWidget::rendering3DRedBlue
protected

is rendering in 3D stereo red/blue

Referenced by RendererWidget(), and toogle3DRedBlue().

◆ renderWindowInteractor

vtkSmartPointer<QVTKInteractor> camitk::RendererWidget::renderWindowInteractor
protected

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