VTK  9.1.0
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
vtkVolumeInputHelper Class Reference

Convenience container for internal structures specific to a volume input. More...

#include <vtkVolumeInputHelper.h>

Collaboration diagram for vtkVolumeInputHelper:
[legend]

Public Types

enum  ComponentMode { INVALID = 0 , INDEPENDENT = 1 , LA = 2 , RGBA = 4 }
 Defines the various component modes supported by vtkGPUVolumeRayCastMapper. More...
 

Public Member Functions

 vtkVolumeInputHelper ()=default
 
 vtkVolumeInputHelper (vtkSmartPointer< vtkVolumeTexture > tex, vtkVolume *vol)
 
void RefreshTransferFunction (vtkRenderer *ren, const int uniformIndex, const int blendMode, const float samplingDist)
 
void ForceTransferInit ()
 
void ActivateTransferFunction (vtkShaderProgram *prog, const int blendMode)
 
void DeactivateTransferFunction (const int blendMode)
 
void ReleaseGraphicsResources (vtkWindow *window)
 

Public Attributes

vtkSmartPointer< vtkVolumeTextureTexture
 
vtkVolumeVolume = nullptr
 
int ComponentMode = INDEPENDENT
 
vtkSmartPointer< vtkOpenGLVolumeLookupTables< vtkOpenGLVolumeGradientOpacityTable > > GradientOpacityTables
 Transfer function internal structures and helpers. More...
 
vtkSmartPointer< vtkOpenGLVolumeLookupTables< vtkOpenGLVolumeOpacityTable > > OpacityTables
 
vtkSmartPointer< vtkOpenGLVolumeLookupTables< vtkOpenGLVolumeRGBTable > > RGBTables
 
vtkSmartPointer< vtkOpenGLVolumeLookupTables< vtkOpenGLVolumeTransferFunction2D > > TransferFunctions2D
 
std::map< int, std::string > RGBTablesMap
 Maps uniform texture variable names to its corresponding texture unit. More...
 
std::map< int, std::string > OpacityTablesMap
 
std::map< int, std::string > GradientOpacityTablesMap
 
std::map< int, std::string > TransferFunctions2DMap
 
int ColorRangeType = 0
 These values currently stored in vtkGPUVolumeRCMapper but should be moved into vtkVolumeProperty in order to store them closer to the relevant transfer functions and separately for each input. More...
 
int ScalarOpacityRangeType = 0
 
int GradientOpacityRangeType = 0
 
std::string GradientCacheName
 Stores the uniform variable name where the gradient will be stored for this input in the fragment shader. More...
 

Protected Member Functions

void InitializeTransferFunction (vtkRenderer *ren, const int index)
 
void CreateTransferFunction1D (vtkRenderer *ren, const int index)
 
void CreateTransferFunction2D (vtkRenderer *ren, const int index)
 
void UpdateTransferFunctions (vtkRenderer *ren, const int blendMode, const float samplingDist)
 
int UpdateOpacityTransferFunction (vtkRenderer *ren, vtkVolume *vol, unsigned int component, const int blendMode, const float samplingDist)
 
int UpdateColorTransferFunction (vtkRenderer *ren, vtkVolume *vol, unsigned int component)
 
int UpdateGradientOpacityTransferFunction (vtkRenderer *ren, vtkVolume *vol, unsigned int component, const float samplingDist)
 
void UpdateTransferFunction2D (vtkRenderer *ren, unsigned int component)
 
void ReleaseGraphicsTransfer1D (vtkWindow *window)
 
void ReleaseGraphicsTransfer2D (vtkWindow *window)
 

Protected Attributes

vtkTimeStamp LutInit
 
bool InitializeTransfer = true
 

Detailed Description

Convenience container for internal structures specific to a volume input.

This class stores together vtkVolumeTexture, Lookup tables internal and other input specific parameters. It also provides convenience methods to manage the lookup tables.

Warning
This is an internal class of vtkOpenGLGPUVolumeRayCastMapper. It assumes there is an active OpenGL context in methods involving GL calls (MakeCurrent() is expected to be called in the mapper beforehand).
See also
vtkOpenGLGPUVolumeRayCastMapper

Definition at line 50 of file vtkVolumeInputHelper.h.

Member Enumeration Documentation

◆ ComponentMode

Defines the various component modes supported by vtkGPUVolumeRayCastMapper.

Enumerator
INVALID 
INDEPENDENT 
LA 
RGBA 

Definition at line 72 of file vtkVolumeInputHelper.h.

Constructor & Destructor Documentation

◆ vtkVolumeInputHelper() [1/2]

vtkVolumeInputHelper::vtkVolumeInputHelper ( )
default

◆ vtkVolumeInputHelper() [2/2]

vtkVolumeInputHelper::vtkVolumeInputHelper ( vtkSmartPointer< vtkVolumeTexture tex,
vtkVolume vol 
)

Member Function Documentation

◆ RefreshTransferFunction()

void vtkVolumeInputHelper::RefreshTransferFunction ( vtkRenderer ren,
const int  uniformIndex,
const int  blendMode,
const float  samplingDist 
)

◆ ForceTransferInit()

void vtkVolumeInputHelper::ForceTransferInit ( )

◆ ActivateTransferFunction()

void vtkVolumeInputHelper::ActivateTransferFunction ( vtkShaderProgram prog,
const int  blendMode 
)

◆ DeactivateTransferFunction()

void vtkVolumeInputHelper::DeactivateTransferFunction ( const int  blendMode)

◆ ReleaseGraphicsResources()

void vtkVolumeInputHelper::ReleaseGraphicsResources ( vtkWindow window)

◆ InitializeTransferFunction()

void vtkVolumeInputHelper::InitializeTransferFunction ( vtkRenderer ren,
const int  index 
)
protected

◆ CreateTransferFunction1D()

void vtkVolumeInputHelper::CreateTransferFunction1D ( vtkRenderer ren,
const int  index 
)
protected

◆ CreateTransferFunction2D()

void vtkVolumeInputHelper::CreateTransferFunction2D ( vtkRenderer ren,
const int  index 
)
protected

◆ UpdateTransferFunctions()

void vtkVolumeInputHelper::UpdateTransferFunctions ( vtkRenderer ren,
const int  blendMode,
const float  samplingDist 
)
protected

◆ UpdateOpacityTransferFunction()

int vtkVolumeInputHelper::UpdateOpacityTransferFunction ( vtkRenderer ren,
vtkVolume vol,
unsigned int  component,
const int  blendMode,
const float  samplingDist 
)
protected

◆ UpdateColorTransferFunction()

int vtkVolumeInputHelper::UpdateColorTransferFunction ( vtkRenderer ren,
vtkVolume vol,
unsigned int  component 
)
protected

◆ UpdateGradientOpacityTransferFunction()

int vtkVolumeInputHelper::UpdateGradientOpacityTransferFunction ( vtkRenderer ren,
vtkVolume vol,
unsigned int  component,
const float  samplingDist 
)
protected

◆ UpdateTransferFunction2D()

void vtkVolumeInputHelper::UpdateTransferFunction2D ( vtkRenderer ren,
unsigned int  component 
)
protected

◆ ReleaseGraphicsTransfer1D()

void vtkVolumeInputHelper::ReleaseGraphicsTransfer1D ( vtkWindow window)
protected

◆ ReleaseGraphicsTransfer2D()

void vtkVolumeInputHelper::ReleaseGraphicsTransfer2D ( vtkWindow window)
protected

Member Data Documentation

◆ Texture

vtkSmartPointer<vtkVolumeTexture> vtkVolumeInputHelper::Texture

Definition at line 65 of file vtkVolumeInputHelper.h.

◆ Volume

vtkVolume* vtkVolumeInputHelper::Volume = nullptr

Definition at line 66 of file vtkVolumeInputHelper.h.

◆ ComponentMode

Definition at line 79 of file vtkVolumeInputHelper.h.

◆ GradientOpacityTables

Transfer function internal structures and helpers.

Definition at line 85 of file vtkVolumeInputHelper.h.

◆ OpacityTables

Definition at line 86 of file vtkVolumeInputHelper.h.

◆ RGBTables

Definition at line 87 of file vtkVolumeInputHelper.h.

◆ TransferFunctions2D

Definition at line 89 of file vtkVolumeInputHelper.h.

◆ RGBTablesMap

std::map<int, std::string> vtkVolumeInputHelper::RGBTablesMap

Maps uniform texture variable names to its corresponding texture unit.

Definition at line 94 of file vtkVolumeInputHelper.h.

◆ OpacityTablesMap

std::map<int, std::string> vtkVolumeInputHelper::OpacityTablesMap

Definition at line 95 of file vtkVolumeInputHelper.h.

◆ GradientOpacityTablesMap

std::map<int, std::string> vtkVolumeInputHelper::GradientOpacityTablesMap

Definition at line 96 of file vtkVolumeInputHelper.h.

◆ TransferFunctions2DMap

std::map<int, std::string> vtkVolumeInputHelper::TransferFunctions2DMap

Definition at line 97 of file vtkVolumeInputHelper.h.

◆ ColorRangeType

int vtkVolumeInputHelper::ColorRangeType = 0

These values currently stored in vtkGPUVolumeRCMapper but should be moved into vtkVolumeProperty in order to store them closer to the relevant transfer functions and separately for each input.

Definition at line 104 of file vtkVolumeInputHelper.h.

◆ ScalarOpacityRangeType

int vtkVolumeInputHelper::ScalarOpacityRangeType = 0

Definition at line 105 of file vtkVolumeInputHelper.h.

◆ GradientOpacityRangeType

int vtkVolumeInputHelper::GradientOpacityRangeType = 0

Definition at line 106 of file vtkVolumeInputHelper.h.

◆ GradientCacheName

std::string vtkVolumeInputHelper::GradientCacheName

Stores the uniform variable name where the gradient will be stored for this input in the fragment shader.

Definition at line 112 of file vtkVolumeInputHelper.h.

◆ LutInit

vtkTimeStamp vtkVolumeInputHelper::LutInit
protected

Definition at line 131 of file vtkVolumeInputHelper.h.

◆ InitializeTransfer

bool vtkVolumeInputHelper::InitializeTransfer = true
protected

Definition at line 132 of file vtkVolumeInputHelper.h.


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