Visualization 2 - Lab Course
 All Classes Functions Enumerations Enumerator
Classes | Signals | Public Member Functions | List of all members
TransferWidget Class Reference

#include <TransferWidget.hpp>

Inherits QGraphicsView.

Classes

struct  TransferFeature
 

Signals

void transferChanged ()
 

Public Member Functions

 TransferWidget (QWidget *parent)
 
void redrawScene ()
 
std::vector< TransferFeaturegetTransferControlValues ()
 
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.
std::vector< TransferWidget::TransferFeature > 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.
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

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