Signals | 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)

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::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
void TransferWidget::transferChanged (  ) [signal]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends Defines