CustusX  22.04-rc3
An IGT application
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 232 of file cxGPUImageBuffer.cpp.

Constructor & Destructor Documentation

cx::GPUImageLutBufferImpl::GPUImageLutBufferImpl ( )
inline

Definition at line 241 of file cxGPUImageBuffer.cpp.

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

Definition at line 248 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 272 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 328 of file cxGPUImageBuffer.cpp.

void cx::GPUImageLutBufferImpl::bindDataToGL ( )
inline

Definition at line 341 of file cxGPUImageBuffer.cpp.

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

Definition at line 359 of file cxGPUImageBuffer.cpp.

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

Size of lut. Used by fragment shader.

Implements cx::GPUImageLutBuffer.

Definition at line 346 of file cxGPUImageBuffer.cpp.

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

Definition at line 253 of file cxGPUImageBuffer.cpp.

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

Definition at line 351 of file cxGPUImageBuffer.cpp.

void cx::GPUImageLutBufferImpl::sendDataToGL ( )
inline

Definition at line 302 of file cxGPUImageBuffer.cpp.

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

Definition at line 262 of file cxGPUImageBuffer.cpp.

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

Definition at line 289 of file cxGPUImageBuffer.cpp.

Member Data Documentation

GLuint cx::GPUImageLutBufferImpl::lutBuffer

Definition at line 235 of file cxGPUImageBuffer.cpp.

bool cx::GPUImageLutBufferImpl::mAllocated

Definition at line 237 of file cxGPUImageBuffer.cpp.

uint64_t cx::GPUImageLutBufferImpl::mMTime

Definition at line 239 of file cxGPUImageBuffer.cpp.

vtkUnsignedCharArrayPtr cx::GPUImageLutBufferImpl::mTable

Definition at line 238 of file cxGPUImageBuffer.cpp.

GLuint cx::GPUImageLutBufferImpl::textureId

Definition at line 236 of file cxGPUImageBuffer.cpp.


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