|
Kinetic Visualization (Visualisierung 2 - S2012)
|
This is a transfer function picker widget. More...
#include <TransferFunctionWidget.h>
Signals | |
| void | colorsChanged () |
Public Member Functions | |
| TransferFunctionWidget (QWidget *parent) | |
| ~TransferFunctionWidget (void) | |
| void | setGradientStops (const QGradientStops &stops) |
| Sets the gradient stops. | |
| void | setHistogram (const std::vector< float > &hist) |
| Sets the histogram. | |
| QSize | sizeHint () const |
| QPolygonF | points () const |
| Returns the positions of the opacity-points. | |
| HoverPoints * | hoverPoints () const |
| void | paintEvent (QPaintEvent *) |
| uint | colorAt (int x) |
| Returns the color at position x (RGBA) | |
| void | resetPoints () |
| Resets the opacity points positions. | |
| virtual void | resizeEvent (QResizeEvent *ev) |
Private Member Functions | |
| void | generateHistogramImage () |
| Generates the histogram image. | |
| void | generateShade () |
| Generates the gradient image. | |
| void | scaleHistogram () |
| scales our histogram, so that many values are visible | |
Private Attributes | |
| std::vector< float > | _histogram |
| Stores the histogram. | |
| QImage | _histImage |
| Stores the histogram image. | |
| QImage | _shade |
| Stores the background image. | |
| HoverPoints * | _hoverPoints |
| Stores the opacity-points. | |
| QLinearGradient | _alphaGradient |
| Stores a gradient consisting of the gradient-stops obtained from the GradientStopWidget by the setGradientStops method. | |
This is a transfer function picker widget.
This is somewhat inspired from a QT gradient demo.
| TransferFunctionWidget::TransferFunctionWidget | ( | QWidget * | parent | ) |
| TransferFunctionWidget::~TransferFunctionWidget | ( | void | ) |
| uint TransferFunctionWidget::colorAt | ( | int | x | ) |
Returns the color at position x (RGBA)
|
signal |
|
private |
Generates the histogram image.
|
private |
Generates the gradient image.
|
inline |
| void TransferFunctionWidget::paintEvent | ( | QPaintEvent * | ) |
| QPolygonF TransferFunctionWidget::points | ( | ) | const |
Returns the positions of the opacity-points.
| void TransferFunctionWidget::resetPoints | ( | ) |
Resets the opacity points positions.
|
virtual |
|
private |
scales our histogram, so that many values are visible
| void TransferFunctionWidget::setGradientStops | ( | const QGradientStops & | stops | ) |
Sets the gradient stops.
| void TransferFunctionWidget::setHistogram | ( | const std::vector< float > & | hist | ) |
Sets the histogram.
|
inline |
|
private |
Stores a gradient consisting of the gradient-stops obtained from the GradientStopWidget by the setGradientStops method.
|
private |
Stores the histogram image.
|
private |
Stores the histogram.
|
private |
Stores the opacity-points.
|
private |
Stores the background image.
1.8.1