CustusX  16.5.0-rc9
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::GPUImageLutBufferImpl Class Reference
Inheritance diagram for cx::GPUImageLutBufferImpl:
cx::GPUImageLutBuffer

Public Member Functions

 GPUImageLutBufferImpl ()
 
virtual ~GPUImageLutBufferImpl ()
 
virtual int getMemorySize ()
 
virtual void SetColorMap (vtkUnsignedCharArrayPtr table)
 
virtual void allocate ()
 
virtual void updateTexture ()
 
void sendDataToGL ()
 
virtual void bind (int textureUnitIndex)
 
void bindDataToGL ()
 
int getLutSize () const
 
virtual void release ()
 
int getGLTextureForLut (int textureUnitIndex)
 
- Public Member Functions inherited from cx::GPUImageLutBuffer
virtual ~GPUImageLutBuffer ()
 

Public Attributes

GLuint lutBuffer
 
GLuint textureId
 
bool mAllocated
 
vtkUnsignedCharArrayPtr mTable
 
uint64_t mMTime
 

Detailed Description

Helper class for sharing volume and lut buffers over several renderings

Definition at line 241 of file cxGPUImageBuffer.cpp.

Constructor & Destructor Documentation

cx::GPUImageLutBufferImpl::GPUImageLutBufferImpl ( )
inline

Definition at line 250 of file cxGPUImageBuffer.cpp.

virtual cx::GPUImageLutBufferImpl::~GPUImageLutBufferImpl ( )
inlinevirtual

Definition at line 257 of file cxGPUImageBuffer.cpp.

Member Function Documentation

virtual void cx::GPUImageLutBufferImpl::allocate ( )
inlinevirtual

Allocate resources for the lookup table and the volume on the GPU. Prerequisite: SetImage and SetcolorTable has been called.

Call this from inside a PrepareForRendering() methods in vtk.

Implements cx::GPUImageLutBuffer.

Definition at line 281 of file cxGPUImageBuffer.cpp.

virtual void cx::GPUImageLutBufferImpl::bind ( int  textureUnitIndex)
inlinevirtual

If data is changed, send data to GPU.Activate and bind the volume and lut buffers inside the texture units GL_TEXTURE<2X> and GL_TEXTURE<2X+1>. Use during RenderInternal()

Implements cx::GPUImageLutBuffer.

Definition at line 337 of file cxGPUImageBuffer.cpp.

void cx::GPUImageLutBufferImpl::bindDataToGL ( )
inline

Definition at line 350 of file cxGPUImageBuffer.cpp.

int cx::GPUImageLutBufferImpl::getGLTextureForLut ( int  textureUnitIndex)
inline

Definition at line 368 of file cxGPUImageBuffer.cpp.

int cx::GPUImageLutBufferImpl::getLutSize ( ) const
inlinevirtual

Size of lut. Used by fragment shader.

Implements cx::GPUImageLutBuffer.

Definition at line 355 of file cxGPUImageBuffer.cpp.

virtual int cx::GPUImageLutBufferImpl::getMemorySize ( )
inlinevirtual

Definition at line 262 of file cxGPUImageBuffer.cpp.

virtual void cx::GPUImageLutBufferImpl::release ( )
inlinevirtual

Definition at line 360 of file cxGPUImageBuffer.cpp.

void cx::GPUImageLutBufferImpl::sendDataToGL ( )
inline

Definition at line 311 of file cxGPUImageBuffer.cpp.

virtual void cx::GPUImageLutBufferImpl::SetColorMap ( vtkUnsignedCharArrayPtr  table)
inlinevirtual

Definition at line 271 of file cxGPUImageBuffer.cpp.

virtual void cx::GPUImageLutBufferImpl::updateTexture ( )
inlinevirtual

Definition at line 298 of file cxGPUImageBuffer.cpp.

Member Data Documentation

GLuint cx::GPUImageLutBufferImpl::lutBuffer

Definition at line 244 of file cxGPUImageBuffer.cpp.

bool cx::GPUImageLutBufferImpl::mAllocated

Definition at line 246 of file cxGPUImageBuffer.cpp.

uint64_t cx::GPUImageLutBufferImpl::mMTime

Definition at line 248 of file cxGPUImageBuffer.cpp.

vtkUnsignedCharArrayPtr cx::GPUImageLutBufferImpl::mTable

Definition at line 247 of file cxGPUImageBuffer.cpp.

GLuint cx::GPUImageLutBufferImpl::textureId

Definition at line 245 of file cxGPUImageBuffer.cpp.


The documentation for this class was generated from the following file: