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);
219 this->NumberOfTables = numberOfTables;
225 delete [] this->Tables;
232 if (i >= this->NumberOfTables)
236 return &this->Tables[i];
243 return this->NumberOfTables;
249 for (
unsigned int i = 0; i <this->NumberOfTables; ++i)
256 unsigned int NumberOfTables;
269 #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)
bool Create2DFromRaw(unsigned int width, unsigned int height, int numComps, int dataType, void *data)
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)
double LastSampleDistance
virtual void SetMagnificationFilter(int)