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 | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | List of all members
ctkVTKAbstractView Class Reference

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

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

Public Types

typedef QWidget Superclass
 

Public Slots

virtual void forceRender ()
 
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 setRenderEnabled (bool value)
 Enable/Disable rendering. More...
 
void setUseDepthPeeling (bool use)
 

Public Member Functions

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...
 
virtual QSize minimumSizeHint () const
 
bool renderEnabled () const
 Return if rendering is enabled. More...
 
Q_INVOKABLE vtkRenderWindow * renderWindow () const
 Get underlying RenderWindow. More...
 
virtual void setInteractor (vtkRenderWindowInteractor *interactor)
 
virtual QSize sizeHint () const
 
bool useDepthPeeling () const
 
Q_INVOKABLE QVTKWidget * VTKWidget () const
 Get the underlying QVTKWidget. More...
 
virtual ~ctkVTKAbstractView ()
 

Static Public Member Functions

static int multiSamples ()
 
static void setMultiSamples (int)
 

Protected Slots

void onRender ()
 
void updateFPS ()
 

Protected Member Functions

 ctkVTKAbstractView (ctkVTKAbstractViewPrivate *pimpl, QWidget *parent)
 

Protected Attributes

QScopedPointer< ctkVTKAbstractViewPrivate > d_ptr
 

Properties

QColor backgroundColor
 
QColor backgroundColor2
 
QString cornerAnnotationText
 
bool fpsVisible
 
bool gradientBackground
 
bool renderEnabled
 
bool useDepthPeeling
 

Detailed Description

Definition at line 45 of file ctkVTKAbstractView.h.

Member Typedef Documentation

◆ Superclass

Definition at line 64 of file ctkVTKAbstractView.h.

Constructor & Destructor Documentation

◆ ctkVTKAbstractView() [1/2]

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

◆ ~ctkVTKAbstractView()

virtual ctkVTKAbstractView::~ctkVTKAbstractView ( )
virtual

◆ ctkVTKAbstractView() [2/2]

ctkVTKAbstractView::ctkVTKAbstractView ( ctkVTKAbstractViewPrivate *  pimpl,
QWidget *  parent 
)
protected

Member Function Documentation

◆ backgroundColor()

virtual QColor ctkVTKAbstractView::backgroundColor ( ) const
virtual

Get background color.

Reimplemented in ctkVTKSliceView.

◆ backgroundColor2()

virtual QColor ctkVTKAbstractView::backgroundColor2 ( ) const
virtual

Get the second background color.

◆ cornerAnnotation()

Q_INVOKABLE vtkCornerAnnotation* ctkVTKAbstractView::cornerAnnotation ( ) const

◆ cornerAnnotationText()

QString ctkVTKAbstractView::cornerAnnotationText ( ) const

Get corner annotation text.

◆ forceRender

virtual void ctkVTKAbstractView::forceRender ( )
virtualslot

Force a render even if a render is already ocurring Be careful when calling forceRender() as it can slow down your application. It is preferable to use scheduleRender() instead.

◆ fps()

double ctkVTKAbstractView::fps ( ) const

Return the current FPS.

◆ gradientBackground()

virtual bool ctkVTKAbstractView::gradientBackground ( ) const
virtual

Is the background a gradient.

◆ hasHeightForWidth()

virtual bool ctkVTKAbstractView::hasHeightForWidth ( ) const
virtual

◆ heightForWidth()

virtual int ctkVTKAbstractView::heightForWidth ( int  width) const
virtual

◆ interactor()

Q_INVOKABLE vtkRenderWindowInteractor* ctkVTKAbstractView::interactor ( ) const

Set/Get window interactor.

◆ interactorStyle()

Q_INVOKABLE vtkInteractorObserver* ctkVTKAbstractView::interactorStyle ( ) const

Get current interactor style.

◆ isFPSVisible()

bool ctkVTKAbstractView::isFPSVisible ( ) const

Return true if the FPS annotation is visible, false otherwise.

◆ minimumSizeHint()

virtual QSize ctkVTKAbstractView::minimumSizeHint ( ) const
virtual

◆ multiSamples()

static int ctkVTKAbstractView::multiSamples ( )
static

Return the current multisamples default

See also
setMultiSamples()

◆ onRender

void ctkVTKAbstractView::onRender ( )
protectedslot

◆ renderEnabled()

bool ctkVTKAbstractView::renderEnabled ( ) const

Return if rendering is enabled.

◆ renderWindow()

Q_INVOKABLE vtkRenderWindow* ctkVTKAbstractView::renderWindow ( ) const

Get underlying RenderWindow.

◆ scheduleRender

virtual void ctkVTKAbstractView::scheduleRender ( )
virtualslot

Notify QVTKWidget that the view needs to be rendered. scheduleRender() respects the desired framerate of the render window, it won't render the window more than what the current render window framerate is.

◆ setBackgroundColor

virtual void ctkVTKAbstractView::setBackgroundColor ( const QColor &  newBackgroundColor)
virtualslot

Set the background color of the rendering screen.

Reimplemented in ctkVTKSliceView.

◆ setBackgroundColor2

virtual void ctkVTKAbstractView::setBackgroundColor2 ( const QColor &  newBackgroundColor)
virtualslot

Set the second background color of the rendering screen for gradient backgrounds.

◆ setCornerAnnotationText

virtual void ctkVTKAbstractView::setCornerAnnotationText ( const QString &  text)
virtualslot

Set corner annotation text.

◆ setFPSVisible

void ctkVTKAbstractView::setFPSVisible ( bool  show)
slot

Show/Hide the FPS annotation.

◆ setGradientBackground

virtual void ctkVTKAbstractView::setGradientBackground ( bool  enable)
virtualslot

Set/Get whether this view should have a gradient background using the Background (top) and Background2 (bottom) colors. Default is off.

◆ setInteractor()

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

QVTKWidget catches all render requests, and ensure the desired framerate is respected. The interactor never calls Render() on the render window. TBD: can we only set a QVTKRenderWindowInteractor ?

Reimplemented in ctkVTKRenderView.

◆ setMultiSamples()

static void ctkVTKAbstractView::setMultiSamples ( int  )
static

Set the default number of multisamples to use. Note that a negative value means "auto", which means the renderer will attempt to select the maximum number (but is not guaranteed to work).

WARNING: Multisampling should be set before creation of the OpenGL context (e.g., initializing the rendering window) in order to have an effect. Consider using setMultisamples before instantiating ctkVTKAbstractView objects.

See also
multiSamples

◆ setRenderEnabled

void ctkVTKAbstractView::setRenderEnabled ( bool  value)
slot

Enable/Disable rendering.

◆ setUseDepthPeeling

void ctkVTKAbstractView::setUseDepthPeeling ( bool  use)
slot

Set the useDepthPeeling property value.

See also
useDepthPeeling

◆ sizeHint()

virtual QSize ctkVTKAbstractView::sizeHint ( ) const
virtual

◆ updateFPS

void ctkVTKAbstractView::updateFPS ( )
protectedslot

◆ useDepthPeeling()

bool ctkVTKAbstractView::useDepthPeeling ( ) const

Return the useDepthPeeling property value.

See also
useDepthPeeling

◆ VTKWidget()

Q_INVOKABLE QVTKWidget* ctkVTKAbstractView::VTKWidget ( ) const

Get the underlying QVTKWidget.

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkVTKAbstractViewPrivate> ctkVTKAbstractView::d_ptr
protected

Definition at line 177 of file ctkVTKAbstractView.h.

Property Documentation

◆ backgroundColor

QColor ctkVTKAbstractView::backgroundColor
readwrite

Definition at line 50 of file ctkVTKAbstractView.h.

◆ backgroundColor2

QColor ctkVTKAbstractView::backgroundColor2
readwrite

Definition at line 51 of file ctkVTKAbstractView.h.

◆ cornerAnnotationText

QString ctkVTKAbstractView::cornerAnnotationText
readwrite

Definition at line 49 of file ctkVTKAbstractView.h.

◆ fpsVisible

bool ctkVTKAbstractView::fpsVisible
readwrite

This property controls whether a corner annotation is visible with the last frames per second (FPS) value. false by default.

Definition at line 57 of file ctkVTKAbstractView.h.

◆ gradientBackground

bool ctkVTKAbstractView::gradientBackground
readwrite

Definition at line 52 of file ctkVTKAbstractView.h.

◆ renderEnabled

bool ctkVTKAbstractView::renderEnabled
readwrite

Definition at line 53 of file ctkVTKAbstractView.h.

◆ useDepthPeeling

bool ctkVTKAbstractView::useDepthPeeling
readwrite

This property controls whether the render window uses depth peeling or not. false by default.

Definition at line 61 of file ctkVTKAbstractView.h.


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