#include <TFWidget.h>
Public Types | |
| enum | Type { INTENSITY, GRADIENT } |
Public Member Functions | |
| void | bindTransferFunction (VolumeRendering::TransferFunction *tf) |
| void | bindVolumeData (VolumeRendering::VolumeData *volume) |
| VolumeRendering::TransferFunction * | getTransferFunction () |
| QWidget * | getWidget () const |
| void | loadTFFromFile (std::string &filePath) |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| void | mousePressEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *mouseEvent) |
| void | saveTFToFile (std::string &filePath) |
| TFWidget (QWidget *parent=0, int width=256, int height=100, Type t=INTENSITY) | |
| void | updateHistogram () |
| ~TFWidget () | |
Defines if the transfer function is used for intensity values or for gradient magnitude values.
| VolVis::Gui::TFWidget::TFWidget | ( | QWidget * | parent = 0, |
|
| int | width = 256, |
|||
| int | height = 100, |
|||
| Type | t = INTENSITY | |||
| ) |
Constructor. Sets up all widgets and gui objects.
| parent | widget, only used for the constructor of the base class | |
| width | width of the widget | |
| height | height of the widget | |
| t | defines the type. Default value is INTENSITY |
| VolVis::Gui::TFWidget::~TFWidget | ( | ) |
Destructor.
| void VolVis::Gui::TFWidget::bindTransferFunction | ( | VolumeRendering::TransferFunction * | tf | ) |
Binds the transfer function which is edited by this widget.
| tf | Transfer function assigned to this widget |
| void VolVis::Gui::TFWidget::bindVolumeData | ( | VolumeRendering::VolumeData * | volume | ) |
Binds the volume data which contains the histogram to the widget.
| volume | Volume data whose histogram is visualized. |
| VolumeRendering::TransferFunction* VolVis::Gui::TFWidget::getTransferFunction | ( | ) |
Returns the transfer function where the values edited in this widget are stored
| QWidget* VolVis::Gui::TFWidget::getWidget | ( | ) | const |
This method gives access to the wrapper widget in which the graphics scene is embedded. Use this widget to place the tf widget in the gui.
| void VolVis::Gui::TFWidget::loadTFFromFile | ( | std::string & | filePath | ) |
Load a transfer function which is stored in a file and pass the arguments to the bounded TransferFunction.
| filePath | path to the file which contains the transfer function to be loaded. |
| void VolVis::Gui::TFWidget::mouseDoubleClickEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) |
With a double click the color of a node can be changed. This method is inherited by QGraphicsScene and is called when a mouse button is clicked twice.
| mouseEvent | contains the parameters of the mouse event (e.g. which mouse button has been used) |
| void VolVis::Gui::TFWidget::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) |
A node can be moved with the left mouse button. If a node has been selected is checked in the method mousePressEvent. The selected node is stored in a member variable. This method is inherited by QGraphicsScene and is called when the mouse is moved over the widget.
| mouseEvent | contains the parameters of the mouse event (e.g. which mouse button has been used) |
| void VolVis::Gui::TFWidget::mousePressEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) |
Depending on which mouse button has been pressed, a node is added, changed or removed. This method is inherited by QGraphicsScene and is called when a mouse button is pressed.
| mouseEvent | contains the parameters of the mouse event (e.g. which mouse button has been used) |
| void VolVis::Gui::TFWidget::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) |
Releases the selected node which has been stored for moving. This method is inherited by QGraphicsScene and is called when a pressed mouse button is released.
| mouseEvent | contains the parameters of the mouse event (e.g. which mouse button has been used) |
| void VolVis::Gui::TFWidget::saveTFToFile | ( | std::string & | filePath | ) |
Save a transfer function to a file.
| filePath | path to the file where the transfer function should be saved. |
| void VolVis::Gui::TFWidget::updateHistogram | ( | ) |
In this method the histogram values are loaded from the bounded volume and the histogram is rendered completely new.
1.5.1-p1