#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) |
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.
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. |
RenderWindow::RenderWindow | ( | QScreen * | screen = 0 ) |
Constructor. Creates a new instance of the RenderWindow class.
screen | The screen used to display. |
RenderWindow::~RenderWindow | ( | ) |
Destructor.
|
slot |
Calculate the depth order (energy value).
|
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.
|
protected |
Sets variables needed for rotation.
event | Event which calls this function. |
|
protected |
Saves the current mouse position, for handling rotation.
event | Event which calls this funtion. |
|
protected |
Documents when a mouse button has been released.
event | Event which calls this funtion. |
|
slot |
Log OpenGL messages.
message | QOpenGLDebugMessage that should be logged. |
|
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.)
width | New width of the window. |
height | new height of the window. |
|
slot |
Sets the projection type.
_perspectiveProjection | True if perspective projection to use. |
|
slot |
Sets the rendering of the canny edges
_showCannyEdges | True if canny edges to render. |
|
slot |
Sets the rendering of the junctions.
_showJunctions | True if junctions to render. |
|
slot |
Sets the shading mode.
_renderShaded | True if shaded rendering should be used. |
|
slot |
|
slot |
Sets the rendering of the X-junctions.
_showXJunctions | True if X junctions to render. |
|
slot |
Sets the new slice direction.
_dir | The 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.
features | The control points of the transferfunction. |
|
slot |
Sets the use of gaussian transferfunction.
_useBlurredTF | True if gaussian (blurred) transferfunctions to use. |
|
slot |
Sets the new volume composition mode.
_compositingMode | The new volume composition mode. |
void RenderWindow::setVolumeData | ( | const std::string & | strFilename) |
Sets volume data. Loads new volume data from an given path.
strFilename | Path to the new volume data file. |
|
slot |
Sets the new volume render mode.
_volumeRenderMode | The new volume render mode. |
|
slot |
Sets the new step size for scanning 3D volume.
_stepSize | The 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 | ( | ) |
|
slot |
Renders a slice.
_value | Number of slice, which should be rendered. |
|
protected |
Is used to handle zooming.
event | Event which calls this funtion. |