#include <TransferFunction.h>
Public Member Functions | |
TransferFunction () | |
~TransferFunction () | |
void | initHistogram (FlowChannel *_channel) |
void | draw () |
bool | mouseButton (int button, int state, int x, int y) |
bool | mouseMove (int x, int y) |
bool | passiveMouseMove (int x, int y) |
void | init () |
void | save (string fileName) |
void | load (string fileName) |
Static Public Member Functions | |
static TransferFunction * | getInstance () |
Public Attributes | |
GLuint | histogramTexture |
TransferFunction::TransferFunction | ( | ) |
Constructor.
TransferFunction::~TransferFunction | ( | ) |
Destructor.
static TransferFunction* TransferFunction::getInstance | ( | ) | [static] |
Returns an instance of the TransferFunction.
void TransferFunction::initHistogram | ( | FlowChannel * | _channel | ) |
Computes the histogram for a given volume.
_volume | The volume for which the histogram has to be computed. |
void TransferFunction::draw | ( | ) |
Renderes the TransferFunction.
bool TransferFunction::mouseButton | ( | int | button, | |
int | state, | |||
int | x, | |||
int | y | |||
) |
Handles the mousebutton interaction.
button | The glut-mousebutton | |
state | The glut-mousestate | |
x | The x-position of the mouse. | |
y | The y-position of the mouse. |
bool TransferFunction::mouseMove | ( | int | x, | |
int | y | |||
) |
Handles the mousemovement interaction, when a button is pressed.
x | The x-position of the mouse. | |
y | The y-position of the mouse. |
bool TransferFunction::passiveMouseMove | ( | int | x, | |
int | y | |||
) |
Handles the mousemovement interaction, when no button is pressed.
x | The x-position of the mouse. | |
y | The y-position of the mouse. |
void TransferFunction::init | ( | ) |
Initializes the TransferFunction
void TransferFunction::save | ( | string | fileName | ) |
Saves the TransferFunction.
fileName | The filename where the TransferFunction should be saved. |
void TransferFunction::load | ( | string | fileName | ) |
Loads a TransferFunction.
fileName | The filename from where the TransferFunction should be loaded. |
Texture, where the color and alpha values can be looked up for each density value inside the shaders.