OpenGL Volumizer 2.7 Reference Pages


NAME
vzParameterLookupTable - Parameter representing a lookup table.

INHERITS FROM
vzParameter

HEADER FILE
#include <Volumizer2/ParameterLookupTable.h>

PUBLIC METHOD SUMMARY
vzParameterLookupTable ( int width, void* data, vzTextureType type, vzExternalTextureFormat format);
int getWidth (  ) const;
void setDataFormat ( vzExternalTextureFormat format);
vzExternalTextureFormat getDataFormat (  ) const;
void setDataType ( vzTextureType type);
vzTextureType getDataType (  ) const;
void setDataPtr ( int width, void* data);
void* getDataPtr (  ) const;

PROTECTED METHOD SUMMARY
~vzParameterLookupTable (  );

CLASS DESCRIPTION
vzParameterLookupTable provides a simple abstraction for a lookup table. The lookup table can be used to apply transfer functions to map texel values to color values.

METHOD DESCRIPTIONS

   vzParameterLookupTable()
vzParameterLookupTable ( int width, void* data, vzTextureType type, vzExternalTextureFormat format);

Constructor for a lookup table parameter. Sets the width of the table to width and sets the data pointer to data. type defines the OpenGL data type of the table (FLOAT, UNSIGNED CHAR, etc.). format defines the OpenGL external format of the table (RGBA, LUMINANCE_ALPHA, etc.). See vzTextureType and vzExternalTextureFormat for a list of data types and data formats.

   ~vzParameterLookupTable()
~vzParameterLookupTable (  );

Destructor for texture tables.

   getDataFormat()
vzExternalTextureFormat getDataFormat (  ) const;

Retrieve the texture format of the lookup table

   getDataPtr()
void* getDataPtr (  ) const;

Retrieve the data pointer for the lookup table data.

   getDataType()
vzTextureType getDataType (  ) const;

Retrieve the data type of the lookup table

   getWidth()
int getWidth (  ) const;

Get the size of the table.

   setDataFormat()
void setDataFormat ( vzExternalTextureFormat format);

Set the texture format of the lookup table. See vzExternalTextureFormat for a list of supported data formats.

   setDataPtr()
void setDataPtr ( int width, void* data);

Set the data pointer for the lookup table data. Note: data is NOT copied, so all memory allocation must be done by the user.

width specifies the number of entries in the table, while data specifies the data itself. Data should be provided in interleaved format. In other words, for RGBA data, the data should be formatted as { {R1, G1, B1, A1}, {R2, G2, B2, A2}, ...}. Each RGBA four-tuple is treated as a single entry within the lookup table. If you modify the data pointer, you must call this method explicitly to let the API know of the change.

   setDataType()
void setDataType ( vzTextureType type);

Set the data type of the lookup table. See vzTextureType for a list of supported data types.

SEE ALSO
vzExternalTextureFormat, vzParameter, vzTextureType

Back to Index