ARender Class Reference

Abstract base class for all image renderers. More...

#include <ARender.h>

Inheritance diagram for ARender:

Inheritance graph
[legend]
Collaboration diagram for ARender:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~ARender ()
virtual Color getPixelColor (unsigned int x, unsigned int y)=0
 Gets the color of a specified screen pixel.
virtual Size getImageSize () const =0
 Gets the intrinsic size of the image per the current settings.
virtual void render (unsigned char *buffer)=0
 Render the image into a provided buffer, in RGBA (native-endian) format.
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 (TransferFunc *aFunc)
 Must be called when the threshold of a transfer function changes.

Protected Member Functions

Color applyTransferFunctions (unsigned short aDataValue) const
 Passes a data value through all the transfer functions to produce a color value.

Private Attributes

std::vector< TransferFunc * > mFunctions

Detailed Description

Abstract base class for all image renderers.

All renderers take data as input and produce an image as output. They can either be asked for the color of an individual pixel in the image, or to fill in a provided ARGB image buffer. This class provides a few methods for configuring the renderers (especially transfer functions), but most functions can be found on subclasses.


Constructor & Destructor Documentation

virtual ARender::~ARender  )  [inline, virtual]
 


Member Function Documentation

void ARender::addTransferFunction TransferFunc aFunc  ) 
 

Adds a transfer function to use.

Color ARender::applyTransferFunctions unsigned short  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.

virtual Size ARender::getImageSize  )  const [pure virtual]
 

Gets the intrinsic size of the image per the current settings.

Implemented in RayCaster, and SliceRenderer.

virtual Color ARender::getPixelColor unsigned int  x,
unsigned int  y
[pure virtual]
 

Gets the color of a specified screen pixel.

Implemented in RayCaster, and SliceRenderer.

void ARender::removeTransferFunction TransferFunc aFunc  ) 
 

Removes a transfer function from the renderer's list.

virtual void ARender::render unsigned char *  buffer  )  [pure virtual]
 

Render the image into a provided buffer, in RGBA (native-endian) format.

Buffer must be of size getImageSize.width() * getImageSize.height() * 4.

Implemented in RayCaster, and SliceRenderer.

void ARender::transferFunctionsChanged TransferFunc aFunc  ) 
 

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.

Parameters:
aFunc The function that was changed. May be null.


Member Data Documentation

std::vector<TransferFunc*> ARender::mFunctions [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Dec 19 00:13:41 2005 for Visualization by  doxygen 1.4.5