#include <vuTFIntensity.h>
Inheritance diagram for vuTFIntensity:
Public Member Functions | |
vuTFIntensity () | |
Default constructor initializing all colour components (+ alpha) to zero. | |
vuTFIntensity (dword ncomp, dword range) | |
vuTFIntensity (const vuTFIntensity &inst) | |
Copy constructor. | |
virtual | ~vuTFIntensity () |
Destructor. | |
vuTFIntensity & | operator= (const vuTFIntensity &rhs) |
Assignment operator. | |
const float * | operator[] (dword intensity) const |
Access operator for converting intensity to an rgba value. | |
dword | getNComponents () const |
Returns number of components for colour model (RGBA -> 4). | |
dword | getRange () const |
Returns range for which the LUT should be defined (8-bit -> 256). | |
virtual void | getRGBa (dword i, vuColourRGBa &rgba) const |
returns an interpolated colour from the look-up table. | |
virtual float | getOpacityAtPos (dword i) |
returns an interpolated opacity value according to the entry in the look-up table. | |
bool | resize (dword ncomp, dword range) |
changes the size of the lookup table | |
float * | getLight () |
returns a float* to the spectral components of the light. | |
void | normalizeAlphaToOne () |
Weight all colours by their alpha values and set alpha to one. | |
void | fromMap (const vuMap &map) |
Create a transfer function from a given vuMap. | |
vuTFIntensity () | |
Default constructor initializing all colour components (+ alpha) to zero. | |
vuTFIntensity (dword ncomp, dword range) | |
vuTFIntensity (const vuTFIntensity &inst) | |
Copy constructor. | |
virtual | ~vuTFIntensity () |
Destructor. | |
vuTFIntensity & | operator= (const vuTFIntensity &rhs) |
Assignment operator. | |
const float * | operator[] (dword intensity) const |
Access operator for converting intensity to an rgba value. | |
dword | getNComponents () const |
Returns number of components for colour model (RGBA -> 4). | |
dword | getRange () const |
Returns range for which the LUT should be defined (8-bit -> 256). | |
virtual void | getRGBa (dword i, vuColourRGBa &rgba) const |
returns an interpolated colour from the look-up table. | |
virtual float | getOpacityAtPos (dword i) |
returns an interpolated opacity value according to the entry in the look-up table. | |
bool | resize (dword ncomp, dword range) |
changes the size of the lookup table | |
float * | getLight () |
returns a float* to the spectral components of the light. | |
void | normalizeAlphaToOne () |
Weight all colours by their alpha values and set alpha to one. | |
void | fromMap (const vuMap &map) |
Create a transfer function from a given vuMap. | |
Protected Member Functions | |
virtual bool | init (dword ncomp, dword range) |
allocate memory for the LUT made virtual to allow extensions in the sub classes called during construction and in resize() | |
virtual void | cleanup () |
Free memory from the LUT. | |
virtual bool | init (dword ncomp, dword range) |
allocate memory for the LUT made virtual to allow extensions in the sub classes called during construction and in resize() | |
virtual void | cleanup () |
Free memory from the LUT. | |
Protected Attributes | |
dword | m_NComp |
number of components for colour model (RGBA -> 4) | |
dword | m_Range |
range for which the LUT should be defined (8-bit -> 256) | |
dword | m_TableLength |
results from m_NComp * m_Range | |
float * | m_Table |
The function table for the transfer function. | |
float * | m_Light |
The colour (or spectrum) of the illuminating light. | |
float * | m_Table |
The function table for the transfer function. | |
float * | m_Light |
The colour (or spectrum) of the illuminating light. |
This class defines the way that intensity transfer functions are used by rendering methods. In this case, it is with a simple look-up function.
The class also sets up the data architecture for storing the transfer function, since this is uniform over all the transfer functions. To implement a transfer function, you only need to add methods which set up the transfer function. The data is stored in a float array of length (255*4). For each possible intensity value, from 0 to 255, four float values are stored, corresponding to the rgba for the intensity. The values for the points are stored sequentially, so the architecture is (rgba[0]rgba[1]...)
Without changing the above explanation this class has been modified to handle different colour models and value ranges. TODO: change the above explanation.
Definition at line 24 of file General/vuTFunc/vuTFIntensity.h.
|
Default constructor initializing all colour components (+ alpha) to zero.
Definition at line 14 of file General/vuTFunc/vuTFIntensity.cpp. |
Here is the call graph for this function:
|
Definition at line 24 of file General/vuTFunc/vuTFIntensity.cpp. |
Here is the call graph for this function:
|
Copy constructor.
Definition at line 35 of file General/vuTFunc/vuTFIntensity.cpp. References dword, m_Light, m_NComp, m_Range, m_Table, and m_TableLength. |
|
Destructor. Frees the memory for the LUT Definition at line 48 of file General/vuTFunc/vuTFIntensity.cpp. References cleanup(). |
Here is the call graph for this function:
|
Default constructor initializing all colour components (+ alpha) to zero.
|
|
|
|
Copy constructor.
|
|
Destructor. Frees the memory for the LUT |
|
Free memory from the LUT. Made virtual to allow extensions in the sub classes. Called during construction and in resize(). Reimplemented in vuTFPreintegrated, and vuTFPreintegrated. |
|
Free memory from the LUT. Made virtual to allow extensions in the sub classes. Called during construction and in resize(). Reimplemented in vuTFPreintegrated, and vuTFPreintegrated. Definition at line 125 of file General/vuTFunc/vuTFIntensity.cpp. References m_Light, and m_Table. Referenced by vuTFPreintegrated::cleanup(), resize(), and ~vuTFIntensity(). |
|
Create a transfer function from a given vuMap. The alpha values will all be set to one. |
|
Create a transfer function from a given vuMap. The alpha values will all be set to one. Definition at line 192 of file General/vuTFunc/vuTFIntensity.cpp. References dword, and m_NComp. Referenced by vu1112118::doSpectral(). |
|
returns a float* to the spectral components of the light. getNComponents() tells how many components are used. Definition at line 70 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h. |
|
returns a float* to the spectral components of the light. getNComponents() tells how many components are used. Definition at line 70 of file General/vuTFunc/vuTFIntensity.h. Referenced by vuSpectral::glRender(), vuSpecFVR::glRender(), and vu1112115::render(). |
|
Returns number of components for colour model (RGBA -> 4).
Definition at line 56 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h. References dword. |
|
Returns number of components for colour model (RGBA -> 4).
Definition at line 56 of file General/vuTFunc/vuTFIntensity.h. References dword. Referenced by VolumeSet::buildColourVolumes(), vuSplat::glRender(), and vuTFPreintegrated::vuTFPreintegrated(). |
|
returns an interpolated opacity value according to the entry in the look-up table.
|
|
returns an interpolated opacity value according to the entry in the look-up table.
Definition at line 141 of file General/vuTFunc/vuTFIntensity.cpp. References m_NComp, and m_Table. Referenced by vu1112117::preprocess(), and vuTransferCanvas::render(). |
|
Returns range for which the LUT should be defined (8-bit -> 256).
Definition at line 58 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h. References dword. |
|
Returns range for which the LUT should be defined (8-bit -> 256).
Definition at line 58 of file General/vuTFunc/vuTFIntensity.h. References dword. Referenced by vuTFPreintegrated::vuTFPreintegrated(). |
|
returns an interpolated colour from the look-up table.
|
|
returns an interpolated colour from the look-up table.
Definition at line 147 of file General/vuTFunc/vuTFIntensity.cpp. References vuColour< S >::clampTo01(), vuColourRGBa::from(), m_Light, m_NComp, m_Table, and vuColour9a::to(). Referenced by vu1112119::convertVUD2VUF(), operator=(), and vuTransferCanvas::render(). |
Here is the call graph for this function:
|
allocate memory for the LUT made virtual to allow extensions in the sub classes called during construction and in resize()
Reimplemented in vuTFPreintegrated, and vuTFPreintegrated. |
|
allocate memory for the LUT made virtual to allow extensions in the sub classes called during construction and in resize()
Reimplemented in vuTFPreintegrated, and vuTFPreintegrated. Definition at line 95 of file General/vuTFunc/vuTFIntensity.cpp. References dword, m_Light, m_NComp, m_Range, m_Table, and m_TableLength. Referenced by vuTFPreintegrated::init(), vuTFDesign::readNComp(), resize(), and vuTFIntensity(). |
|
Weight all colours by their alpha values and set alpha to one. This can be used if you don't want to use alpha values but, still want to have weighted colours, eg. for coloured FVR. |
|
Weight all colours by their alpha values and set alpha to one. This can be used if you don't want to use alpha values but, still want to have weighted colours, eg. for coloured FVR. Definition at line 180 of file General/vuTFunc/vuTFIntensity.cpp. References dword, and m_NComp. Referenced by vu1112119::convertVUD2VUF(), and vu1112118::preprocess(). |
|
Assignment operator. If the transfer function specified in rhs has a different number of components, a conversion to RGBa is performed. By now this conversion is only implemented for 31 -> RGB. If the ranges (default 256) don't match, the function does nothing. Reimplemented in vuTFPreintegrated, and vuTFPreintegrated. |
|
Assignment operator. If the transfer function specified in rhs has a different number of components, a conversion to RGBa is performed. By now this conversion is only implemented for 31 -> RGB. If the ranges (default 256) don't match, the function does nothing. Reimplemented in vuTFPreintegrated, and vuTFPreintegrated. Definition at line 57 of file General/vuTFunc/vuTFIntensity.cpp. References dword, vuColour7a::from(), getRGBa(), m_Light, m_NComp, m_Range, and m_Table. Referenced by vuTFPreintegrated::operator=(). |
Here is the call graph for this function:
|
Access operator for converting intensity to an rgba value.
Definition at line 50 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h. |
|
Access operator for converting intensity to an rgba value.
Definition at line 50 of file General/vuTFunc/vuTFIntensity.h. |
|
changes the size of the lookup table
|
|
changes the size of the lookup table
Definition at line 134 of file General/vuTFunc/vuTFIntensity.cpp. References cleanup(), and init(). Referenced by vu1112118::doSpectral(), ns_vu1112112::vu1112112::vu1112112(), vu1112115::vu1112115(), and vu1112118::vu1112118(). |
Here is the call graph for this function:
|
The colour (or spectrum) of the illuminating light. For spectral to RGBa converted transfer functions the light is already contained in the colour of the LUT. Definition at line 102 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h. |
|
The colour (or spectrum) of the illuminating light. For spectral to RGBa converted transfer functions the light is already contained in the colour of the LUT. Definition at line 102 of file General/vuTFunc/vuTFIntensity.h. Referenced by cleanup(), getRGBa(), init(), operator=(), and vuTFIntensity(). |
|
number of components for colour model (RGBA -> 4)
Definition at line 93 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h. Referenced by fromMap(), getOpacityAtPos(), getRGBa(), init(), normalizeAlphaToOne(), operator=(), and vuTFIntensity(). |
|
range for which the LUT should be defined (8-bit -> 256)
Definition at line 94 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h. Referenced by init(), operator=(), and vuTFIntensity(). |
|
The function table for the transfer function.
Definition at line 98 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h. |
|
The function table for the transfer function.
Definition at line 98 of file General/vuTFunc/vuTFIntensity.h. Referenced by cleanup(), getOpacityAtPos(), getRGBa(), init(), operator=(), and vuTFIntensity(). |
|
results from m_NComp * m_Range
Definition at line 95 of file Volume/Regular/Unimodal/3d/1B/Intensity/vuTFIntensity.h. Referenced by init(), and vuTFIntensity(). |