16 #ifndef vtkOpenGLVolumeOpacityTable_h_
17 #define vtkOpenGLVolumeOpacityTable_h_
20 #include <vtkTextureObject.h>
72 double sampleDistance,
78 bool needUpdate =
false;
117 float* ptr = this->
Table;
118 double factor = sampleDistance/unitDistance;
124 *ptr =
static_cast<float>(1.0-pow(1.0-static_cast<double>(*ptr),
134 float* ptr = this->
Table;
135 double factor = sampleDistance/unitDistance;
141 *ptr =
static_cast<float>(
static_cast<double>(*ptr)*factor);
214 this->NumberOfTables = numberOfTables;
220 delete [] this->Tables;
227 if (i >= this->NumberOfTables)
231 return &this->Tables[i];
238 return this->NumberOfTables;
244 for (
unsigned int i = 0; i <this->NumberOfTables; ++i)
251 unsigned int NumberOfTables;
264 #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()
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)
GLint GLint GLsizei width
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)