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 41 of file ctkVTKAbstractView.h.

Member Typedef Documentation

Definition at line 60 of file ctkVTKAbstractView.h.

Constructor & Destructor Documentation

ctkVTKAbstractView::ctkVTKAbstractView ( QWidget *  parent = 0)
explicit
virtual ctkVTKAbstractView::~ctkVTKAbstractView ( )
virtual
ctkVTKAbstractView::ctkVTKAbstractView ( ctkVTKAbstractViewPrivate *  pimpl,
QWidget *  parent 
)
protected

Member Function Documentation

virtual QColor ctkVTKAbstractView::backgroundColor ( ) const
virtual

Get background color.

Reimplemented in ctkVTKSliceView.

virtual QColor ctkVTKAbstractView::backgroundColor2 ( ) const
virtual

Get the second background color.

Q_INVOKABLE vtkCornerAnnotation* ctkVTKAbstractView::cornerAnnotation ( ) const
QString ctkVTKAbstractView::cornerAnnotationText ( ) const

Get corner annotation text.

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.

double ctkVTKAbstractView::fps ( ) const

Return the current FPS.

virtual bool ctkVTKAbstractView::gradientBackground ( ) const
virtual

Is the background a gradient.

virtual bool ctkVTKAbstractView::hasHeightForWidth ( ) const
virtual
virtual int ctkVTKAbstractView::heightForWidth ( int  width) const
virtual
Q_INVOKABLE vtkRenderWindowInteractor* ctkVTKAbstractView::interactor ( ) const

Set/Get window interactor.

Q_INVOKABLE vtkInteractorObserver* ctkVTKAbstractView::interactorStyle ( ) const

Get current interactor style.

bool ctkVTKAbstractView::isFPSVisible ( ) const

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

virtual QSize ctkVTKAbstractView::minimumSizeHint ( ) const
virtual
static int ctkVTKAbstractView::multiSamples ( )
static

Return the current multisamples default

See also
setMultiSamples()
void ctkVTKAbstractView::onRender ( )
protectedslot
bool ctkVTKAbstractView::renderEnabled ( ) const

Return if rendering is enabled.

Q_INVOKABLE vtkRenderWindow* ctkVTKAbstractView::renderWindow ( ) const

Get underlying RenderWindow.

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.

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

Set the background color of the rendering screen.

Reimplemented in ctkVTKSliceView.

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

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

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

Set corner annotation text.

void ctkVTKAbstractView::setFPSVisible ( bool  show)
slot

Show/Hide the FPS annotation.

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.

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.

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
void ctkVTKAbstractView::setRenderEnabled ( bool  value)
slot

Enable/Disable rendering.

void ctkVTKAbstractView::setUseDepthPeeling ( bool  use)
slot

Set the useDepthPeeling property value.

See also
useDepthPeeling
virtual QSize ctkVTKAbstractView::sizeHint ( ) const
virtual
void ctkVTKAbstractView::updateFPS ( )
protectedslot
bool ctkVTKAbstractView::useDepthPeeling ( ) const

Return the useDepthPeeling property value.

See also
useDepthPeeling
Q_INVOKABLE QVTKWidget* ctkVTKAbstractView::VTKWidget ( ) const

Get the underlying QVTKWidget.

Member Data Documentation

QScopedPointer<ctkVTKAbstractViewPrivate> ctkVTKAbstractView::d_ptr
protected

Definition at line 169 of file ctkVTKAbstractView.h.

Property Documentation

QColor ctkVTKAbstractView::backgroundColor
readwrite

Definition at line 46 of file ctkVTKAbstractView.h.

QColor ctkVTKAbstractView::backgroundColor2
readwrite

Definition at line 47 of file ctkVTKAbstractView.h.

QString ctkVTKAbstractView::cornerAnnotationText
readwrite

Definition at line 45 of file ctkVTKAbstractView.h.

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 53 of file ctkVTKAbstractView.h.

bool ctkVTKAbstractView::gradientBackground
readwrite

Definition at line 48 of file ctkVTKAbstractView.h.

bool ctkVTKAbstractView::renderEnabled
readwrite

Definition at line 49 of file ctkVTKAbstractView.h.

bool ctkVTKAbstractView::useDepthPeeling
readwrite

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

Definition at line 57 of file ctkVTKAbstractView.h.


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