BackgroundRenderer Class Reference

Shows a background image which is a color-coded data piece representation. More...

#include <BackgroundRenderer.h>

Inheritance diagram for BackgroundRenderer:

Inheritance graph
[legend]
Collaboration diagram for BackgroundRenderer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BackgroundRenderer (const Data &aData)
virtual void render (QPixmap *pixmap)
 Render data into a provided pixmap.
void setDataIndex (int newIndex)
 index of additional data pieces
int dataIndex ()
void addTransferFunction (TransferFunc *aFunc)
 Adds a transfer function to use.
void removeTransferFunction (TransferFunc *aFunc)
 Removes a transfer function from the renderer's list.
void transferFunctionsChanged ()
 Must be called when the threshold of a transfer function changes.

Protected Member Functions

QColor applyTransferFunctions (float aDataValue) const
 Passes a data value through all the transfer functions to produce a color value.

Protected Attributes

std::vector< TransferFunc * > mFunctions
unsigned int mDataIndex

Detailed Description

Shows a background image which is a color-coded data piece representation.

Set the desired data piece index using setDataIndex(). Colors are specified using transfer functions, between which they will be linearly interpolated.


Constructor & Destructor Documentation

BackgroundRenderer::BackgroundRenderer const Data aData  ) 
 


Member Function Documentation

void BackgroundRenderer::addTransferFunction TransferFunc aFunc  ) 
 

Adds a transfer function to use.

QColor BackgroundRenderer::applyTransferFunctions float  aDataValue  )  const [protected]
 

Passes a data value through all the transfer functions to produce a color value.

If no functions exist, this function falls back to creating an opaque greyscale value.

int BackgroundRenderer::dataIndex  )  [inline]
 

Returns:
index of additional data pieces

void BackgroundRenderer::removeTransferFunction TransferFunc aFunc  ) 
 

Removes a transfer function from the renderer's list.

void BackgroundRenderer::render QPixmap *  pixmap  )  [virtual]
 

Render data into a provided pixmap.

The size of the pixmap must be getImageSize().

Implements ARender.

void BackgroundRenderer::setDataIndex int  newIndex  ) 
 

index of additional data pieces

void BackgroundRenderer::transferFunctionsChanged  ) 
 

Must be called when the threshold of a transfer function changes.

This resorts our list of functions and sets the correct next and prev threshold values.


Member Data Documentation

unsigned int BackgroundRenderer::mDataIndex [protected]
 

std::vector<TransferFunc*> BackgroundRenderer::mFunctions [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Jan 23 19:44:58 2006 for Visualization by  doxygen 1.4.6