Signals | Public Member Functions | Static Public Member Functions

TransferWidget Class Reference

#include <TransferWidget.hpp>

List of all members.

Signals

void transferChanged ()

Public Member Functions

 TransferWidget (QWidget *parent)
void redrawScene ()
float * getTransferValues ()
float * getTransferControlValues ()
int getNumPoints ()
void clear ()
void setNewRGBXY (float _red, float _green, float _blue, float _x, float _y)
void resizeEvent (QResizeEvent *event)
void removePoint (TransferPoint *_pnt)

Static Public Member Functions

static TransferWidget getTransferWidget ()

Detailed Description

The transfer widget in which the transfer funtion can be set.

Author:
Christian Hirsch
Clemens Roegner

Constructor & Destructor Documentation

TransferWidget::TransferWidget ( QWidget *  parent = 0 )

Constructor. Creates a new class, which represents the transfer function.

Parameters:
parentPointer to the parent QWidget element.

Member Function Documentation

void TransferWidget::clear (  )

Removes the current transfer function values.

int TransferWidget::getNumPoints (  )

Retuns the number of current points.

Returns:
Number of current points.
float * TransferWidget::getTransferControlValues (  )

Returns a float pointer to the transfer function control values, which are used to store in an file. (Format: RGBXY)

Returns:
Pointer to float values of the control points.
float * TransferWidget::getTransferValues (  )

Calculates the values for the transfer function and returns the pointer to the float values. 4096 RGBA float values are stored.

Returns:
Pointer to the float values.
void TransferWidget::redrawScene (  )

Redraws the Scene. Redraws the scene with the current set transfer function. Under the points you can see the color-flow, which will be applied to the volume data.

void TransferWidget::removePoint ( TransferPoint _pnt )

Removes a transfer control point. This function removes a control point of the transfer function.

Parameters:
_pntPointer to the pnt whicht should be removed.
void TransferWidget::resizeEvent ( QResizeEvent *  event )

Handles the resize event. When the transfer widget resizes, all control point positions should be updated and the transfer widget should be redrawn.

Parameters:
eventPointer to the calling event.
void TransferWidget::setNewRGBXY ( float  _red,
float  _green,
float  _blue,
float  _x,
float  _y 
)

Creates a new control point for the transfer function.

Parameters:
_redThe red value in range 0.0 - 1.0
_greenThe green value in range 0.0 - 1.0
_blueThe blue value in range 0.0 - 1.0
_xThe relative x position of the new control point in range 0.0 - 1.0
_yThe relative y position of the new control point in range 0.0 - 1.0

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