16 #ifndef vtkOpenGLVolumeRGBTable_h 
   17 #define vtkOpenGLVolumeRGBTable_h 
   21 #include <vtkTextureObject.h> 
   62     bool needUpdate = 
false;
 
   89         delete [] this->
Table;
 
  122       vtkErrorMacro(
"vtkTextureObject not initialized!");
 
  131       vtkErrorMacro(
"Failed to query max texture size! using default 1024.");
 
  135     if (maxWidth >= idealWidth)
 
  141     vtkWarningMacro(
"This OpenGL implementation does not support the required " 
  142       "texture size of " << idealWidth << 
", falling back to maximum allowed, " 
  143       << maxWidth << 
"." << 
"This may cause an incorrect color table mapping.");
 
  192     delete[] this->
Table;
 
  223     this->Tables.reserve(static_cast<size_t>(numberOfTables));
 
  225     for (
unsigned int i = 0; i < numberOfTables; i++)
 
  228       this->Tables.push_back(table);
 
  235     size_t const size = this->Tables.size();
 
  236     for (
size_t i = 0; i < 
size; i++)
 
  238       this->Tables[i]->Delete();
 
  246     if (i >= this->Tables.size())
 
  250     return this->Tables[i];
 
  257     return this->Tables.size();
 
  263     size_t const size = this->Tables.size();
 
  264     for (
size_t i = 0; i < 
size; ++i)
 
  266       this->Tables[i]->ReleaseGraphicsResources(window);
 
  271   std::vector<vtkOpenGLVolumeRGBTable*> Tables;
 
  273   vtkOpenGLVolumeRGBTables() VTK_DELETE_FUNCTION;
 
  275   vtkOpenGLVolumeRGBTables(const vtkOpenGLVolumeRGBTables &other) VTK_DELETE_FUNCTION;
 
  277   vtkOpenGLVolumeRGBTables &operator=(const vtkOpenGLVolumeRGBTables &other) VTK_DELETE_FUNCTION;
 
  280 #endif // vtkOpenGLVolumeRGBTable_h 
vtkOpenGLVolumeRGBTable()
 
size_t GetNumberOfTables()
 
void GetTable(double x1, double x2, int n, double *table)
Fills in a table of n colors mapped from values mapped with even spacing between x1 and x2...
 
int GetMaximumSupportedTextureWidth(vtkOpenGLRenderWindow *renWin, int idealWidth)
 
abstract base class for most VTK objects 
 
void SetContext(vtkRenderWindow *)
Get/Set the context. 
 
vtkStandardNewMacro(vtkOpenGLVolumeRGBTable)
 
void ReleaseGraphicsResources(vtkWindow *window)
 
~vtkOpenGLVolumeRGBTable()
 
record modification and/or execution time 
 
void Modified()
Set this objects time to the current time. 
 
void Deactivate(unsigned int texUnit)
Set the active tex unit and bind (using our bind). 
 
void Update(vtkColorTransferFunction *scalarRGB, double range[2], int filterValue, vtkOpenGLRenderWindow *renWin)
 
bool Create2DFromRaw(unsigned int width, unsigned int height, int numComps, int dataType, void *data)
Create a 2D texture from client memory numComps must be in [1-4]. 
 
window superclass for vtkRenderWindow 
 
vtkTextureObject * TextureObject
 
static int NearestPowerOfTwo(int x)
Compute the nearest power of two that is not less than x. 
 
virtual void SetMinificationFilter(int)
Minification filter mode. 
 
virtual vtkMTimeType GetMTime()
Return this object's modified time. 
 
~vtkOpenGLVolumeRGBTables()
 
virtual unsigned int GetHandle()
Returns the OpenGL handle. 
 
void Activate(unsigned int texUnit)
Set the active tex unit and bind (using our bind). 
 
vtkOpenGLVolumeRGBTable * GetTable(unsigned int i)
 
int EstimateMinNumberOfSamples(double const &x1, double const &x2)
Estimates the minimum size of a table such that it would correctly sample this function. 
 
abstracts an OpenGL texture object. 
 
static int GetMaximumTextureSize(vtkOpenGLRenderWindow *context)
Query and return maximum texture size (dimension) supported by the OpenGL driver for a particular con...
 
Defines a transfer function for mapping a property to an RGB color value. 
 
void ReleaseGraphicsResources(vtkWindow *win)
Deactivate and UnBind the texture. 
 
static vtkTextureObject * New()
 
virtual void SetWrapS(int)
Wrap mode for the first texture coordinate "s" Valid values are: 
 
void ReleaseGraphicsResources(vtkWindow *window)
 
int NumberOfColorComponents
 
static vtkOpenGLVolumeRGBTable * New()
 
int GetTextureUnit()
Return the texture unit used for this texture. 
 
virtual void SetWrapT(int)
Wrap mode for the first texture coordinate "t" Valid values are: 
 
vtkOpenGLVolumeRGBTables(unsigned int numberOfTables)
 
static T Max(const T &a, const T &b)
Returns the maximum of the two arugments provided. 
 
virtual void Delete()
Delete a VTK object. 
 
virtual void SetMagnificationFilter(int)
Magnification filter mode.