#include <ARender.h>
Inheritance diagram for ARender:
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 |
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.
|
|
|
Adds a transfer function to use.
|
|
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. |
|
Gets the intrinsic size of the image per the current settings.
Implemented in RayCaster, and SliceRenderer. |
|
Gets the color of a specified screen pixel.
Implemented in RayCaster, and SliceRenderer. |
|
Removes a transfer function from the renderer's list.
|
|
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. |
|
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.
|
|
|