Visualization 2 - Lab Course
 All Classes Functions Enumerations Enumerator
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
RenderWindow Class Reference

#include <renderwindow.h>

Inherits QWindow.

Public Types

enum  RenderType { RENDER_SLICE = 0, RENDER_VOLUME }
 
enum  ProjectionType { ORTHOGONAL = 0, PERSPECTIVE }
 
enum  VolumeCompositionMode { FRONT_TO_BACK = true, BACK_TO_FRONT = false }
 
enum  VolumeRenderMode { COMPOSITION = 0, AVERAGING, MAXIMUM_INTENSITY_PROJECTION }
 

Public Slots

void onMessageLogged (QOpenGLDebugMessage message)
 
void onTimeout ()
 
void updateSlice (int _value)
 
void setSliceDirection (int _dir)
 
void setRenderType (int _renderType)
 
void setIsPerspectiveProjection (bool _perspectiveProjection)
 
void setRenderShaded (bool _renderShaded)
 
void setVolumeStepSize (double _stepSize)
 
void setVolumeRenderMode (int _volumeRenderMode)
 
void setVolumeCompositionMode (bool _compositingMode)
 
void setRenderCannyEdges (bool _showCannyEdges)
 
void setRenderJunctions (bool _showJunctions)
 
void setRenderXJunctions (bool _showXJunctions)
 
void setUseBlurredTF (bool _useBlurredTF)
 
void calculateDepthEnergy ()
 

Signals

void depthOrderChanged (float)
 

Public Member Functions

 RenderWindow (QScreen *screen=0)
 
 ~RenderWindow ()
 
void initialize ()
 
void update ()
 
void render ()
 
void updateAndRender ()
 
void resize (int width, int height)
 
void setVolumeData (const std::string &strFilename)
 
void setTransferfunction (const vector< TransferWidget::TransferFeature > &features)
 
void initializeMatrices ()
 
void initializeSettings ()
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void wheelEvent (QWheelEvent *event)
 

Detailed Description

Main rendering window. The main rendering window, which is on the one hand used to do all the OpenGL rendering and on the other hand to show additional stuff.

See Also
QWindow
Author
Christian Hirsch
Clemens Roegner

Member Enumeration Documentation

Projection types.

Enumerator
ORTHOGONAL 

Use orthogonal projection for 3D rendering.

PERSPECTIVE 

Use perspective projection for 3D rendering.

Render types.

Enumerator
RENDER_SLICE 

Render single slices of the volume.

RENDER_VOLUME 

Do 3D volume rendering.

Volume rendering composition modes.

Enumerator
FRONT_TO_BACK 

Use front to back composition.

BACK_TO_FRONT 

Use back to front composition.

Volume rendering modes.

Enumerator
COMPOSITION 

Use composition of volume intensities.

AVERAGING 

Use averaging of volume intensities.

MAXIMUM_INTENSITY_PROJECTION 

Use maximum intensity projection.

Constructor & Destructor Documentation

RenderWindow::RenderWindow ( QScreen *  screen = 0)

Constructor. Creates a new instance of the RenderWindow class.

Parameters
screenThe screen used to display.
RenderWindow::~RenderWindow ( )

Destructor.

Member Function Documentation

void RenderWindow::calculateDepthEnergy ( )
slot

Calculate the depth order (energy value).

void RenderWindow::depthOrderChanged ( float  )
signal

Is emitted when depth order (energy value) has changed.

void RenderWindow::initialize ( )

Initialization method. Initializes all the necessary objects, settings etc. that are used for the (OpenGL) rendering.

void RenderWindow::initializeMatrices ( )

Initializes the matrices for OpenGL (viewing, projection, model matrix).

void RenderWindow::initializeSettings ( )

Initializes the settings for the whole volume rendering.

void RenderWindow::mouseMoveEvent ( QMouseEvent *  event)
protected

Sets variables needed for rotation.

Parameters
eventEvent which calls this function.
void RenderWindow::mousePressEvent ( QMouseEvent *  event)
protected

Saves the current mouse position, for handling rotation.

Parameters
eventEvent which calls this funtion.
void RenderWindow::mouseReleaseEvent ( QMouseEvent *  event)
protected

Documents when a mouse button has been released.

Parameters
eventEvent which calls this funtion.
void RenderWindow::onMessageLogged ( QOpenGLDebugMessage  message)
slot

Log OpenGL messages.

Parameters
messageQOpenGLDebugMessage that should be logged.
void RenderWindow::onTimeout ( )
slot

If timer is used, this slot should be triggered.

void RenderWindow::render ( )

Renders the image. Renders the image to the screen.

void RenderWindow::resize ( int  width,
int  height 
)

Resize the window. This method needs to be called when the window size changes (framebuffers/textures need to be reallocated etc.)

Parameters
widthNew width of the window.
heightnew height of the window.
void RenderWindow::setIsPerspectiveProjection ( bool  _perspectiveProjection)
slot

Sets the projection type.

Parameters
_perspectiveProjectionTrue if perspective projection to use.
See Also
ProjectionType
void RenderWindow::setRenderCannyEdges ( bool  _showCannyEdges)
slot

Sets the rendering of the canny edges

Parameters
_showCannyEdgesTrue if canny edges to render.
void RenderWindow::setRenderJunctions ( bool  _showJunctions)
slot

Sets the rendering of the junctions.

Parameters
_showJunctionsTrue if junctions to render.
void RenderWindow::setRenderShaded ( bool  _renderShaded)
slot

Sets the shading mode.

Parameters
_renderShadedTrue if shaded rendering should be used.
void RenderWindow::setRenderType ( int  _renderType)
slot

Sets a new render type.

Parameters
_renderTypeThe new render type to be used.
See Also
RenderType
void RenderWindow::setRenderXJunctions ( bool  _showXJunctions)
slot

Sets the rendering of the X-junctions.

Parameters
_showXJunctionsTrue if X junctions to render.
void RenderWindow::setSliceDirection ( int  _dir)
slot

Sets the new slice direction.

Parameters
_dirThe new direction which should be rendered. 0 = x, 1 = y, 2 = z
void RenderWindow::setTransferfunction ( const vector< TransferWidget::TransferFeature > &  features)

Sets the transfer function. Creates a new texture which stores the interpolated transferfunction values with the given control points.

Parameters
featuresThe control points of the transferfunction.
void RenderWindow::setUseBlurredTF ( bool  _useBlurredTF)
slot

Sets the use of gaussian transferfunction.

Parameters
_useBlurredTFTrue if gaussian (blurred) transferfunctions to use.
void RenderWindow::setVolumeCompositionMode ( bool  _compositingMode)
slot

Sets the new volume composition mode.

Parameters
_compositingModeThe new volume composition mode.
See Also
VolumeCompositionMode
void RenderWindow::setVolumeData ( const std::string &  strFilename)

Sets volume data. Loads new volume data from an given path.

Parameters
strFilenamePath to the new volume data file.
void RenderWindow::setVolumeRenderMode ( int  _volumeRenderMode)
slot

Sets the new volume render mode.

Parameters
_volumeRenderModeThe new volume render mode.
See Also
VolumeRenderMode
void RenderWindow::setVolumeStepSize ( double  _stepSize)
slot

Sets the new step size for scanning 3D volume.

Parameters
_stepSizeThe step size to use for scanning the volume.
void RenderWindow::update ( )

Updates the settings. Updates the settings, should be called when viewing, lightning etc. has changed.

void RenderWindow::updateAndRender ( )

Updates the settings and renders the image.

See Also
update
render
void RenderWindow::updateSlice ( int  _value)
slot

Renders a slice.

Parameters
_valueNumber of slice, which should be rendered.
void RenderWindow::wheelEvent ( QWheelEvent *  event)
protected

Is used to handle zooming.

Parameters
eventEvent which calls this funtion.

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