VolumeWidget Class Reference

OpenGL Widget which renders the 3D Volume or the 2D Slices of the Volume (depending on the render mode). More...

#include <VolumeWidget.h>

List of all members.

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.


Detailed Description

OpenGL Widget which renders the 3D Volume or the 2D Slices of the Volume (depending on the render mode).

See also:
QGLWidget

Constructor & Destructor Documentation

VolumeWidget::VolumeWidget ( Volume *  vol,
const QGLFormat &  format,
QWidget *  parent = 0,
const QGLWidget *  shareWidget = 0,
Qt::WindowFlags  f = 0 
)

Constructor of VolumeWidget Class.

Parameters:
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
See also:
QGLWidget


Member Function Documentation

const int VolumeWidget::GetNextPowerOfTwo ( const int  iNumber  ) 

Calculates the next power of 2.

Parameters:
iNumber Int value of which the next power of 2 will be calculated.
Returns:
The next power of 2.

unsigned int VolumeWidget::getTexture (  ) 

Returns the Texture Handle of the Volume 3D Texture.

Returns:
The Texture Handle

unsigned int * VolumeWidget::getTextureP (  ) 

Returns a Pointer to the Texture Handle of the Volume 3D Texture.

Returns:
Pointer to the Texture Handle

bool VolumeWidget::isVolumeRenderingActive (  ) 

Returns true if Volume Rendering is the current render mode.

Returns:
true if Volume Rendering is active.

QSize VolumeWidget::minimumSizeHint (  )  const

Returns the minimum Size of the Widget.

Returns:
Minimum Size of the Widget.

void VolumeWidget::setCubeScale ( float  x,
float  y,
float  z 
)

Sets the scale of the 3D Volume.

Parameters:
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.

Parameters:
value Slice number.

void VolumeWidget::setViewDir ( char  dir  )  [slot]

Sets the orientation of the Slice in the 3D Volume.

Parameters:
dir Orientation: a -> axial, s -> sagital, k -> coronal

void VolumeWidget::setVolume ( Volume *  vol  ) 

Sets the volume which will be rendered.

Parameters:
vol The Volume

void VolumeWidget::setVolumeDepth ( int  value  ) 

Sets Volume Depth.

Parameters:
value Depth.

void VolumeWidget::setVolumeHeight ( int  value  ) 

Sets Volume Height.

Parameters:
value Height.

void VolumeWidget::setVolumeWidth ( int  value  ) 

Sets Volume Width.

Parameters:
value Width.

void VolumeWidget::setXRotation ( int  angle  )  [slot]

Sets the Rotation around the X-Axis of the 3D Volume.

Parameters:
angle Rotation angle.

void VolumeWidget::setYRotation ( int  angle  )  [slot]

Sets the Rotation around the Y-Axis of the 3D Volume.

Parameters:
angle Rotation angle.

void VolumeWidget::setZRotation ( int  angle  )  [slot]

Sets the Rotation around the Z-Axis of the 3D Volume.

Parameters:
angle Rotation angle.

QSize VolumeWidget::sizeHint (  )  const

Returns the Size of the Widget.

Returns:
Size of the Widget.


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

Generated on Wed Dec 24 00:05:46 2008 for Volume Visualization by  doxygen 1.5.7.1