#include <VolumeWidget.h>
Public Slots | |
void | IdleFunc () |
Called whenever nothing else has to be done. Responsible for updating and rendering. | |
void | setSlice (int value) |
Sets the Slice which will be rendered. | |
void | setViewDir (char dir) |
Sets the orientation of the Slice in the 3D Volume. | |
void | setXRotation (int angle) |
Sets the Rotation around the X-Axis of the 3D Volume. | |
void | setYRotation (int angle) |
Sets the Rotation around the Y-Axis of the 3D Volume. | |
void | setZRotation (int angle) |
Sets the Rotation around the Z-Axis of the 3D Volume. | |
void | takeScreenshot () |
Stores a Screenshot of the current Frame of the rendering widget in a file. | |
Public Member Functions | |
VolumeWidget (Volume *vol, const QGLFormat &format, QWidget *parent=0, const QGLWidget *shareWidget=0, Qt::WindowFlags f=0) | |
Constructor of VolumeWidget Class. | |
QSize | minimumSizeHint () const |
Returns the minimum Size of the Widget. | |
QSize | sizeHint () const |
Returns the Size of the Widget. | |
void | setVolume (Volume *vol) |
Sets the volume which will be rendered. | |
void | setVolumeDepth (int value) |
Sets Volume Depth. | |
void | setVolumeHeight (int value) |
Sets Volume Height. | |
void | setVolumeWidth (int value) |
Sets Volume Width. | |
void | loadTexture () |
Loads the 3D Volume in a Texture on the graphic hardware. | |
unsigned int | getTexture () |
Returns the Texture Handle of the Volume 3D Texture. | |
unsigned int * | getTextureP () |
Returns a Pointer to the Texture Handle of the Volume 3D Texture. | |
const int | GetNextPowerOfTwo (const int iNumber) |
Calculates the next power of 2. | |
void | toggleRenderMode () |
Toggles the render mode between Slices and 3D Volume. | |
bool | isVolumeRenderingActive () |
Returns true if Volume Rendering is the current render mode. | |
void | setCubeScale (float x, float y, float z) |
Sets the scale of the 3D Volume. | |
Protected Member Functions | |
void | initializeGL () |
Initializes the OpenGL Context. | |
void | paintGL () |
This method covers the OpenGL render loop. | |
void | resizeGL (int width, int height) |
Updates the Viewport and Projection if the widged is resized. |
VolumeWidget::VolumeWidget | ( | Volume * | vol, | |
const QGLFormat & | format, | |||
QWidget * | parent = 0 , |
|||
const QGLWidget * | shareWidget = 0 , |
|||
Qt::WindowFlags | f = 0 | |||
) |
Constructor of VolumeWidget Class.
vol | Volume which should be loaded at startup. | |
format | The format argument specifies the desired rendering options. | |
parent | Pointer to parent Widget | |
shareWidget | Pointer to GLWidget which shares Textures and DisplayLists with this GLWidget. | |
f | Qt::WindowFlags |
const int VolumeWidget::GetNextPowerOfTwo | ( | const int | iNumber | ) |
Calculates the next power of 2.
iNumber | Int value of which the next power of 2 will be calculated. |
unsigned int VolumeWidget::getTexture | ( | ) |
Returns the Texture Handle of the Volume 3D Texture.
unsigned int * VolumeWidget::getTextureP | ( | ) |
Returns a Pointer to the Texture Handle of the Volume 3D Texture.
bool VolumeWidget::isVolumeRenderingActive | ( | ) |
Returns true if Volume Rendering is the current render mode.
QSize VolumeWidget::minimumSizeHint | ( | ) | const |
Returns the minimum Size of the Widget.
void VolumeWidget::setCubeScale | ( | float | x, | |
float | y, | |||
float | z | |||
) |
Sets the scale of the 3D Volume.
x | Scale in X-Axis direction. | |
y | Scale in Y-Axis direction. | |
z | Scale in Z-Axis direction. |
void VolumeWidget::setSlice | ( | int | value | ) | [slot] |
Sets the Slice which will be rendered.
value | Slice number. |
void VolumeWidget::setViewDir | ( | char | dir | ) | [slot] |
Sets the orientation of the Slice in the 3D Volume.
dir | Orientation: a -> axial, s -> sagital, k -> coronal |
void VolumeWidget::setVolume | ( | Volume * | vol | ) |
Sets the volume which will be rendered.
vol | The Volume |
void VolumeWidget::setVolumeDepth | ( | int | value | ) |
Sets Volume Depth.
value | Depth. |
void VolumeWidget::setVolumeHeight | ( | int | value | ) |
Sets Volume Height.
value | Height. |
void VolumeWidget::setVolumeWidth | ( | int | value | ) |
Sets Volume Width.
value | Width. |
void VolumeWidget::setXRotation | ( | int | angle | ) | [slot] |
Sets the Rotation around the X-Axis of the 3D Volume.
angle | Rotation angle. |
void VolumeWidget::setYRotation | ( | int | angle | ) | [slot] |
Sets the Rotation around the Y-Axis of the 3D Volume.
angle | Rotation angle. |
void VolumeWidget::setZRotation | ( | int | angle | ) | [slot] |
Sets the Rotation around the Z-Axis of the 3D Volume.
angle | Rotation angle. |
QSize VolumeWidget::sizeHint | ( | ) | const |
Returns the Size of the Widget.