16 #ifndef vtkOpenGLVolumeOpacityTable_h_
17 #define vtkOpenGLVolumeOpacityTable_h_
20 #include <vtkTextureObject.h>
79 double sampleDistance,
85 bool needUpdate =
false;
124 float* ptr = this->
Table;
125 double factor = sampleDistance/unitDistance;
131 *ptr =
static_cast<float>(1.0-pow(1.0-static_cast<double>(*ptr),
141 float* ptr = this->
Table;
142 double factor = sampleDistance/unitDistance;
148 *ptr =
static_cast<float>(
static_cast<double>(*ptr)*factor);
220 this->NumberOfTables = numberOfTables;
226 delete [] this->Tables;
233 if (i >= this->NumberOfTables)
237 return &this->Tables[i];
244 return this->NumberOfTables;
250 for (
unsigned int i = 0; i <this->NumberOfTables; ++i)
257 unsigned int NumberOfTables;
270 #endif // vtkOpenGLVolumeOpacityTable_h_
~vtkOpenGLVolumeOpacityTables()
vtkOpenGLVolumeOpacityTables(unsigned int numberOfTables)
void ReleaseGraphicsResources(vtkWindow *window)
void SetContext(vtkRenderWindow *)
Defines a 1D piecewise function.
record modification and/or execution time
vtkTextureObject * TextureObject
unsigned long int GetMTime()
void Deactivate(unsigned int texUnit)
vtkOpenGLVolumeOpacityTable * GetTable(unsigned int i)
void ReleaseGraphicsResources(vtkWindow *window)
unsigned int GetNumberOfTables()
void GetTable(double x1, double x2, int size, float *table, int stride=1)
window superclass for vtkRenderWindow
virtual unsigned long GetMTime()
~vtkOpenGLVolumeOpacityTable()
virtual void SetMinificationFilter(int)
void Update(vtkPiecewiseFunction *scalarOpacity, int blendMode, double sampleDistance, double range[2], double unitDistance, int filterValue, vtkOpenGLRenderWindow *renWin)
virtual unsigned int GetHandle()
void Activate(unsigned int texUnit)
abstracts an OpenGL texture object.
void ReleaseGraphicsResources(vtkWindow *win)
static vtkTextureObject * New()
virtual void SetWrapS(int)
vtkOpenGLVolumeOpacityTable(int width=1024)
bool CreateAlphaFromRaw(unsigned int width, int internalFormat, int rawType, void *raw)
double LastSampleDistance
virtual void SetMagnificationFilter(int)