Kinetic Visualization (Visualisierung 2 - S2012)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Signals | Public Member Functions | Private Member Functions | Private Attributes
TransferFunctionWidget Class Reference

This is a transfer function picker widget. More...

#include <TransferFunctionWidget.h>

List of all members.

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.
HoverPointshoverPoints () 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.

Detailed Description

This is a transfer function picker widget.

This is somewhat inspired from a QT gradient demo.


Constructor & Destructor Documentation

TransferFunctionWidget::TransferFunctionWidget ( QWidget *  parent)
TransferFunctionWidget::~TransferFunctionWidget ( void  )

Member Function Documentation

uint TransferFunctionWidget::colorAt ( int  x)

Returns the color at position x (RGBA)

void TransferFunctionWidget::colorsChanged ( )
signal
void TransferFunctionWidget::generateHistogramImage ( )
private

Generates the histogram image.

void TransferFunctionWidget::generateShade ( )
private

Generates the gradient image.

HoverPoints* TransferFunctionWidget::hoverPoints ( ) const
inline
void TransferFunctionWidget::paintEvent ( QPaintEvent *  )
QPolygonF TransferFunctionWidget::points ( ) const

Returns the positions of the opacity-points.

void TransferFunctionWidget::resetPoints ( )

Resets the opacity points positions.

void TransferFunctionWidget::resizeEvent ( QResizeEvent *  ev)
virtual
void TransferFunctionWidget::scaleHistogram ( )
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.

QSize TransferFunctionWidget::sizeHint ( ) const
inline

Member Data Documentation

QLinearGradient TransferFunctionWidget::_alphaGradient
private

Stores a gradient consisting of the gradient-stops obtained from the GradientStopWidget by the setGradientStops method.

QImage TransferFunctionWidget::_histImage
private

Stores the histogram image.

std::vector<float> TransferFunctionWidget::_histogram
private

Stores the histogram.

HoverPoints* TransferFunctionWidget::_hoverPoints
private

Stores the opacity-points.

QImage TransferFunctionWidget::_shade
private

Stores the background image.


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