#include <GLWidget.hpp>
List of all members.
Detailed Description
Class which represents the OpenGL rendering window. In this Class all needed functions for handling the volume and slice rendering are implemented.
- Author:
- Christian Hirsch
-
Clemens Roegner
Constructor & Destructor Documentation
GLWidget::GLWidget |
( |
QWidget * |
parent = 0 ) |
|
Constructor. This constructor creates a new OpenGL render window.
- Parameters:
-
parent | Parent QWidget element. |
GLWidget::~GLWidget |
( |
) |
[virtual] |
Destructor. Releases all the needed (graphics) memory.
Member Function Documentation
void GLWidget::initializeGL |
( |
) |
[protected] |
Initializes all data needed for rendering (including devil + glut).
void GLWidget::loadData |
( |
const std::string & |
strFilename ) |
|
Loads new volume data.
- Parameters:
-
_path | String to the path of the volume data. |
void GLWidget::mouseMoveEvent |
( |
QMouseEvent * |
event ) |
[protected] |
Sets variables needed for rotation.
- Parameters:
-
event | Event which calls this function. |
void GLWidget::mousePressEvent |
( |
QMouseEvent * |
event ) |
[protected] |
Saves the current mouse position, for handling rotation.
- Parameters:
-
event | Event which calls this funtion. |
void GLWidget::paintGL |
( |
) |
[protected] |
Render function. Renders either the slices or the full volume data.
void GLWidget::rangeChanged |
( |
int |
_min, |
|
|
int |
_max |
|
) |
| [signal] |
Signal which is emitted, when the slice range changes.
- Parameters:
-
_min | The new minimum value. |
_max | The new maximum value. |
void GLWidget::resetSettings |
( |
) |
[slot] |
Resets the settings to standard volume rendering (compositing - front to back, with perspective projection and without shading.
void GLWidget::resizeGL |
( |
int |
width, |
|
|
int |
height |
|
) |
| [protected] |
Initializes the OpenGL render window when the window is resized.
- Parameters:
-
width | The new width of the render window. |
height | The new height of the render window. |
void GLWidget::saveScreenshot |
( |
) |
|
This function saves a screenhot in the programs folder. The file name is created automatically.
void GLWidget::setCompositingMode |
( |
bool |
_f2b ) |
[slot] |
Sets the mode for compositing rendering.
- Parameters:
-
_f2b | If true, then front to back rendering is used, otherwise back to front is used. |
void GLWidget::setLight |
( |
int |
_state ) |
[slot] |
Sets the shader mode.
- Parameters:
-
_state | If Qt::Checked then shading is applyed, otherwise shading isn't applyed. |
void GLWidget::setProjection |
( |
int |
_proj ) |
[slot] |
Stets the projection mode.
- Parameters:
-
_proj | If Qt::checked, perpective projection is used, otherwise orthogonal projection is used. |
void GLWidget::setRenderMode |
( |
int |
_mode ) |
[slot] |
Sets the render mode (slice/volume rendering).
- Parameters:
-
_mode | The new mode which should be used. 0 = slice, 1 = volume |
void GLWidget::setSliceDirection |
( |
int |
_dir ) |
[slot] |
Sets the new slice direction.
- Parameters:
-
_dir | The new direction which should be rendered. 0 = x, 1 = y, 2 = z |
void GLWidget::setStepSize |
( |
double |
_stepSize ) |
[slot] |
Sets the new step size.
- Parameters:
-
_stepSize | The new step size which is used. |
void GLWidget::setTransferValues |
( |
float * |
_values ) |
|
Sets the new transfer values and updates the 1D texture.
- Parameters:
-
_value | Pointer to the location of the transfer values. |
void GLWidget::setVolumeRenderMode |
( |
int |
_mode ) |
[slot] |
Sets the new volume render mode.
- Parameters:
-
_mode | The new mode which should be used. 0 = compositing, 1 = MIP, 2 = averaging |
void GLWidget::setXPlane |
( |
int |
_xPlane ) |
[slot] |
Sets the position of the x-plane.
- Parameters:
-
_xPlane | Position of the x plane. If positive, then the plane will be on the left side, otherwise on the right side. |
void GLWidget::setYPlane |
( |
int |
_yPlane ) |
[slot] |
Sets the position of the y-plane.
- Parameters:
-
_yPlane | Position of the y plane. If positive, then the plane will be on the bottom, otherwise on the top. |
void GLWidget::setZPlane |
( |
int |
_zPlane ) |
[slot] |
Sets the position of the z-plane.
- Parameters:
-
_zPlane | Position of the z plane. If positive, then the plane will be on the bottom, otherwise on the top. |
void GLWidget::updateSlice |
( |
int |
_value ) |
[slot] |
Renders a slice.
- Parameters:
-
_value | Number of slice, which should be rendered. |
The documentation for this class was generated from the following files: