TFView Class Reference

Display widget for the transfer function. More...

List of all members.

Public Slots

Public Member Functions


Detailed Description

Provides the widget that displays the transfer function as a series of coloured nodes connected by dotted lines. The x-axis represents the density values, the y-axis the opacity of a node. A histogram of the currently loaded volume dataset is shown in the background.


Constructor & Destructor Documentation

TFView::TFView ( QGraphicsScene *  scene,
TFTexture transferFunction 
)

Constructor.

Parameters:
scene The Qt scene used by this view.
transferFunction The transfer function to display.
See also:
~TFView()
TFView::~TFView ( void   ) 

Default destructor.

See also:
TFView()

Member Function Documentation

void TFView::mousePressEvent ( QMouseEvent *  event  ) 

Event handler called when a mouse button is clicked on the widget.

If the left mouse button is clicked outside an existing node, a colour chooser dialog opens and a new node is created at the clicked position with the selected colour. If the right mouse button is clicked on a node, the node is deleted. If the right mouse button is clicked outside an existing node, the transfer function is cleared. Afterwards the view is redrawn and the underlying transfer function is re-generated.

Parameters:
event The mouse event being handled.
See also:
drawTF()
void TFView::drawTF (  ) 

Generates the scene and draws the view.

First clears the scene, then creates the bars for the histogram, the nodes, and the lines connecting them, then finally updates the widget.

See also:
clear()
void TFView::clear ( void   ) 

Helper function that clears the scene.

Removes all items in the scene.

void TFView::clearTF (  )  [slot]

Slot that clears the transfer function.

Clears the underlying transfer function, then redraws the scene.


Generated on Thu Jan 21 00:31:55 2010 for simpleVIS by  doxygen 1.6.1