CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Public Slots | Public Member Functions | Properties | List of all members
ctkVTKRenderView Class Reference

#include <Libs/Visualization/VTK/Widgets/ctkVTKRenderView.h>

Inheritance diagram for ctkVTKRenderView:
Inheritance graph
[legend]
Collaboration diagram for ctkVTKRenderView:
Collaboration graph
[legend]

Public Types

enum  RotateDirection {
  PitchUp , PitchDown , RollLeft , RollRight ,
  YawLeft , YawRight
}
 
typedef ctkVTKAbstractView Superclass
 
- Public Types inherited from ctkVTKAbstractView
typedef QWidget Superclass
 

Public Slots

void lookFromAxis (const ctkAxesWidget::Axis &axis, double fov=10.)
 Change camera to look from a given axis to the focal point Translate/Rotate the camera to look from a given axis The Field of View (fov) controls how far from the focal point the camera must be (final_pos = focal_point + 3*fov). More...
 
void pitch ()
 
void resetFocalPoint ()
 Reset focal point The visible scene bbox is computed, then the camera is recentered around its centroid. More...
 
void roll ()
 
void setAnimationIntervalMs (int ms)
 
void setFocalPoint (double x, double y, double z)
 Set the focal point. More...
 
void setOrientationWidgetVisible (bool visible)
 Show/Hide Orientation widget. More...
 
void setPitchRollYawIncrement (double newPitchRollYawIncrement)
 
void setRockEnabled (bool enabled)
 Enable or Disbled the animated rock of the view. More...
 
void setRockIncrement (int newRockIncrement)
 
void setRockLength (int newRockLength)
 Set length of a complete rock period (in number of animation steps) More...
 
void setSpinEnabled (bool enabled)
 Enable or Disbled the animated spin of the view. More...
 
void setSpinIncrement (double newSpinIncrement)
 
void setZoomFactor (double newZoomFactor)
 Set zoom factor zoomFactor is a value between 0.0 and 1.0. More...
 
void yaw ()
 
void zoomIn ()
 
void zoomOut ()
 
- Public Slots inherited from ctkVTKAbstractView
virtual void forceRender ()
 
virtual bool isRenderPaused () const
 
virtual int pauseRender ()
 
virtual int resumeRender ()
 
virtual void scheduleRender ()
 
virtual void setBackgroundColor (const QColor &newBackgroundColor)
 Set the background color of the rendering screen. More...
 
virtual void setBackgroundColor2 (const QColor &newBackgroundColor)
 
virtual void setCornerAnnotationText (const QString &text)
 Set corner annotation text. More...
 
void setFPSVisible (bool show)
 Show/Hide the FPS annotation. More...
 
virtual void setGradientBackground (bool enable)
 
void setMaximumUpdateRate (double fps)
 
void setRenderEnabled (bool value)
 Enable/Disable rendering. More...
 
virtual int setRenderPaused (bool pause)
 
void setUseDepthPeeling (bool use)
 

Public Member Functions

vtkCamera * activeCamera ()
 Get active camera. More...
 
int animationIntervalMs () const
 
 ctkVTKRenderView (QWidget *parent=0)
 
bool orientationWidgetVisible ()
 Get Orientation widget visibility. More...
 
RotateDirection pitchDirection () const
 
double pitchRollYawIncrement () const
 Return pitch, roll or yaw increment (in degree) More...
 
vtkRenderer * renderer () const
 Get a reference to the associated vtkRenderer. More...
 
void resetCamera ()
 Reset camera. More...
 
bool rockEnabled () const
 Return if animated rock is enabled. More...
 
int rockIncrement () const
 
int rockLength () const
 Return length of the rock animation. More...
 
RotateDirection rollDirection () const
 
virtual void setInteractor (vtkRenderWindowInteractor *interactor)
 
void setPitchDirection (RotateDirection newPitchDirection)
 
void setRollDirection (RotateDirection newRollDirection)
 
void setSpinDirection (RotateDirection newSpinDirection)
 
void setYawDirection (RotateDirection newYawDirection)
 
RotateDirection spinDirection () const
 
bool spinEnabled () const
 Return if animated spin is enabled. More...
 
double spinIncrement () const
 
RotateDirection yawDirection () const
 
double zoomFactor () const
 Return zoom factor. More...
 
virtual ~ctkVTKRenderView ()
 
- Public Member Functions inherited from ctkVTKAbstractView
virtual QColor backgroundColor () const
 Get background color. More...
 
virtual QColor backgroundColor2 () const
 Get the second background color. More...
 
Q_INVOKABLE vtkCornerAnnotation * cornerAnnotation () const
 
QString cornerAnnotationText () const
 Get corner annotation text. More...
 
 ctkVTKAbstractView (QWidget *parent=0)
 
double fps () const
 Return the current FPS. More...
 
virtual bool gradientBackground () const
 Is the background a gradient. More...
 
virtual bool hasHeightForWidth () const
 
virtual int heightForWidth (int width) const
 
Q_INVOKABLE vtkRenderWindowInteractor * interactor () const
 Set/Get window interactor. More...
 
Q_INVOKABLE vtkInteractorObserver * interactorStyle () const
 Get current interactor style. More...
 
bool isFPSVisible () const
 Return true if the FPS annotation is visible, false otherwise. More...
 
double maximumUpdateRate () const
 
virtual QSize minimumSizeHint () const
 
bool renderEnabled () const
 Return if rendering is enabled. More...
 
Q_INVOKABLE vtkRenderWindow * renderWindow () const
 Get underlying RenderWindow. More...
 
virtual QSize sizeHint () const
 
bool useDepthPeeling () const
 
Q_INVOKABLE ctkVTKOpenGLNativeWidgetVTKWidget () const
 Get the underlying QVTKWidget. More...
 
virtual ~ctkVTKAbstractView ()
 

Properties

int animationIntervalMs
 
bool orientationWidgetVisible
 
RotateDirection pitchDirection
 
double pitchRollYawIncrement
 
bool rockEnabled
 
int rockLength
 
RotateDirection rollDirection
 
RotateDirection spinDirection
 
bool spinEnabled
 
double spinIncrement
 
RotateDirection yawDirection
 
double zoomFactor
 
- Properties inherited from ctkVTKAbstractView
QColor backgroundColor
 
QColor backgroundColor2
 
QVTK_OBJECTQString cornerAnnotationText
 
bool fpsVisible
 
bool gradientBackground
 
double maximumUpdateRate
 Set a maximum rate (in frames per second) for rendering. More...
 
bool renderEnabled
 
bool useDepthPeeling
 

Additional Inherited Members

- Static Public Member Functions inherited from ctkVTKAbstractView
static int multiSamples ()
 
static void setMultiSamples (int)
 
- Protected Slots inherited from ctkVTKAbstractView
void onRender ()
 
virtual void requestRender ()
 
void updateFPS ()
 
- Protected Member Functions inherited from ctkVTKAbstractView
 ctkVTKAbstractView (ctkVTKAbstractViewPrivate *pimpl, QWidget *parent)
 
- Protected Attributes inherited from ctkVTKAbstractView
QScopedPointer< ctkVTKAbstractViewPrivate > d_ptr
 

Detailed Description

Definition at line 33 of file ctkVTKRenderView.h.

Member Typedef Documentation

◆ Superclass

Definition at line 55 of file ctkVTKRenderView.h.

Member Enumeration Documentation

◆ RotateDirection

Enumerator
PitchUp 
PitchDown 
RollLeft 
RollRight 
YawLeft 
YawRight 

Definition at line 53 of file ctkVTKRenderView.h.

Constructor & Destructor Documentation

◆ ctkVTKRenderView()

ctkVTKRenderView::ctkVTKRenderView ( QWidget *  parent = 0)
explicit

◆ ~ctkVTKRenderView()

virtual ctkVTKRenderView::~ctkVTKRenderView ( )
virtual

Member Function Documentation

◆ activeCamera()

vtkCamera* ctkVTKRenderView::activeCamera ( )

Get active camera.

◆ animationIntervalMs()

int ctkVTKRenderView::animationIntervalMs ( ) const

Amount of waiting time between spin or rock increment

See also
setAnimationIntervalMs

◆ lookFromAxis

void ctkVTKRenderView::lookFromAxis ( const ctkAxesWidget::Axis axis,
double  fov = 10. 
)
slot

Change camera to look from a given axis to the focal point Translate/Rotate the camera to look from a given axis The Field of View (fov) controls how far from the focal point the camera must be (final_pos = focal_point + 3*fov).

◆ orientationWidgetVisible()

bool ctkVTKRenderView::orientationWidgetVisible ( )

Get Orientation widget visibility.

◆ pitch

void ctkVTKRenderView::pitch ( )
slot

Pitch view of X degrees. X been set using setPitchRollYawIncrement

See also
setPitchRollYawIncrement setPitchDirection

◆ pitchDirection()

RotateDirection ctkVTKRenderView::pitchDirection ( ) const

◆ pitchRollYawIncrement()

double ctkVTKRenderView::pitchRollYawIncrement ( ) const

Return pitch, roll or yaw increment (in degree)

◆ renderer()

vtkRenderer* ctkVTKRenderView::renderer ( ) const

Get a reference to the associated vtkRenderer.

◆ resetCamera()

void ctkVTKRenderView::resetCamera ( )

Reset camera.

◆ resetFocalPoint

void ctkVTKRenderView::resetFocalPoint ( )
slot

Reset focal point The visible scene bbox is computed, then the camera is recentered around its centroid.

◆ rockEnabled()

bool ctkVTKRenderView::rockEnabled ( ) const

Return if animated rock is enabled.

◆ rockIncrement()

int ctkVTKRenderView::rockIncrement ( ) const

Return current increment value of animated rock. Rocking will be centered around the position where increment is set to 0.

◆ rockLength()

int ctkVTKRenderView::rockLength ( ) const

Return length of the rock animation.

◆ roll

void ctkVTKRenderView::roll ( )
slot

Rool view of X degrees. X been set using setPitchRollYawIncrement

See also
setPitchRollYawIncrement setRollDirection

◆ rollDirection()

RotateDirection ctkVTKRenderView::rollDirection ( ) const

◆ setAnimationIntervalMs

void ctkVTKRenderView::setAnimationIntervalMs ( int  ms)
slot

Amount of wait time between spin or rock increments

See also
setSpinIncrement setRockIncrement

◆ setFocalPoint

void ctkVTKRenderView::setFocalPoint ( double  x,
double  y,
double  z 
)
slot

Set the focal point.

◆ setInteractor()

virtual void ctkVTKRenderView::setInteractor ( vtkRenderWindowInteractor *  interactor)
virtual

Set window interactor Reimplemented to propagate interaction to Orientation widget

Reimplemented from ctkVTKAbstractView.

◆ setOrientationWidgetVisible

void ctkVTKRenderView::setOrientationWidgetVisible ( bool  visible)
slot

Show/Hide Orientation widget.

◆ setPitchDirection()

void ctkVTKRenderView::setPitchDirection ( RotateDirection  newPitchDirection)

◆ setPitchRollYawIncrement

void ctkVTKRenderView::setPitchRollYawIncrement ( double  newPitchRollYawIncrement)
slot

Set absolute amount degrees the view should be either pitched, rolled or yawed with.

See also
pitch setPitchDirection roll setRollDirection yaw setYawDirection
Note
The default is 5 degrees

◆ setRockEnabled

void ctkVTKRenderView::setRockEnabled ( bool  enabled)
slot

Enable or Disbled the animated rock of the view.

◆ setRockIncrement

void ctkVTKRenderView::setRockIncrement ( int  newRockIncrement)
slot

Set current rocking position Rocking will be centered around the position where increment is set to 0.

◆ setRockLength

void ctkVTKRenderView::setRockLength ( int  newRockLength)
slot

Set length of a complete rock period (in number of animation steps)

◆ setRollDirection()

void ctkVTKRenderView::setRollDirection ( RotateDirection  newRollDirection)

◆ setSpinDirection()

void ctkVTKRenderView::setSpinDirection ( RotateDirection  newSpinDirection)

◆ setSpinEnabled

void ctkVTKRenderView::setSpinEnabled ( bool  enabled)
slot

Enable or Disbled the animated spin of the view.

◆ setSpinIncrement

void ctkVTKRenderView::setSpinIncrement ( double  newSpinIncrement)
slot

Set number of degrees in spin increment

See also
setSpinDirection setSpinIntervalMs

◆ setYawDirection()

void ctkVTKRenderView::setYawDirection ( RotateDirection  newYawDirection)

◆ setZoomFactor

void ctkVTKRenderView::setZoomFactor ( double  newZoomFactor)
slot

Set zoom factor zoomFactor is a value between 0.0 and 1.0.

Note
The default value is 0.05

◆ spinDirection()

RotateDirection ctkVTKRenderView::spinDirection ( ) const

◆ spinEnabled()

bool ctkVTKRenderView::spinEnabled ( ) const

Return if animated spin is enabled.

◆ spinIncrement()

double ctkVTKRenderView::spinIncrement ( ) const

Return spin increment (in degrees)

See also
setSpinIncrement

◆ yaw

void ctkVTKRenderView::yaw ( )
slot

Yaw view of X degrees. X been set using setPitchRollYawIncrement

See also
setPitchRollYawIncrement setYawDirection

◆ yawDirection()

RotateDirection ctkVTKRenderView::yawDirection ( ) const

◆ zoomFactor()

double ctkVTKRenderView::zoomFactor ( ) const

Return zoom factor.

◆ zoomIn

void ctkVTKRenderView::zoomIn ( )
slot

Zoom in using the zoomfactor

See also
setZoomFactor

◆ zoomOut

void ctkVTKRenderView::zoomOut ( )
slot

Zoom out using the zoomfactor

See also
setZoomFactor

Property Documentation

◆ animationIntervalMs

int ctkVTKRenderView::animationIntervalMs
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ orientationWidgetVisible

bool ctkVTKRenderView::orientationWidgetVisible
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ pitchDirection

RotateDirection ctkVTKRenderView::pitchDirection
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ pitchRollYawIncrement

double ctkVTKRenderView::pitchRollYawIncrement
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ rockEnabled

bool ctkVTKRenderView::rockEnabled
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ rockLength

int ctkVTKRenderView::rockLength
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ rollDirection

RotateDirection ctkVTKRenderView::rollDirection
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ spinDirection

RotateDirection ctkVTKRenderView::spinDirection
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ spinEnabled

bool ctkVTKRenderView::spinEnabled
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ spinIncrement

double ctkVTKRenderView::spinIncrement
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ yawDirection

RotateDirection ctkVTKRenderView::yawDirection
readwrite

Definition at line 1 of file ctkVTKRenderView.h.

◆ zoomFactor

double ctkVTKRenderView::zoomFactor
readwrite

Definition at line 1 of file ctkVTKRenderView.h.


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