FAST
3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
|
#include <TransferFunction.hpp>
Public Member Functions | |
TransferFunction () | |
TransferFunction (std::initializer_list< float > values) | |
int | addPoint (float intensity, Vector4f color) |
void | removePoint (int i) |
void | clear () |
int | getSize () const |
std::tuple< float, Vector4f > | getPoint (int i) const |
cl::Buffer | getAsOpenCLBuffer (OpenCLDevice::pointer device) const |
Static Public Member Functions | |
static TransferFunction | CT_Blood_And_Bone () |
static TransferFunction | CT_Bone () |
static TransferFunction | CT_Blood () |
static TransferFunction | Ultrasound () |
Protected Member Functions | |
void | checkData () const |
Protected Attributes | |
std::vector< float > | m_data |
A class for defining a transfer function used in volume rendering. The transfer function contains a set of 5-tuple points (intensity, red, green, blue, alpha).
|
inline |
Creates an empty transfer function
fast::TransferFunction::TransferFunction | ( | std::initializer_list< float > | values | ) |
Initialize the transfer function. The input values have to be a multiple of 5. Thus a set of 5-tuples (intensity, red, green, blue, alpha)
values |
int fast::TransferFunction::addPoint | ( | float | intensity, |
Vector4f | color | ||
) |
Add a point to the transfer function. Intensity must be larger than previous point. I.e. the transfer function has to be sorted on increasing intensity
intensity | |
color | (red, green, blue, alpha) |
|
protected |
Validate the internal data structure of TransferFunction. Throws exception if invalid.
void fast::TransferFunction::clear | ( | ) |
Remove all points in the transfer function.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
cl::Buffer fast::TransferFunction::getAsOpenCLBuffer | ( | OpenCLDevice::pointer | device | ) | const |
Create an OpenCL buffer from the transfer function data.
device | OpenCL device to transfer data to |
std::tuple<float, Vector4f> fast::TransferFunction::getPoint | ( | int | i | ) | const |
Get intensity and color at index i
i | index |
int fast::TransferFunction::getSize | ( | ) | const |
void fast::TransferFunction::removePoint | ( | int | i | ) |
Remove transfer function point at index i
i | index |
|
inlinestatic |
|
protected |