VTK  9.3.20240420
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
vtkSurfaceLICHelper Class Reference

A small collection of noise routines for LIC. More...

#include <vtkSurfaceLICHelper.h>

Collaboration diagram for vtkSurfaceLICHelper:
[legend]

Public Member Functions

 vtkSurfaceLICHelper ()
 
 ~vtkSurfaceLICHelper ()
 
void ReleaseGraphicsResources (vtkWindow *win)
 Free textures and shader programs we're holding a reference to.
 
void ClearTextures ()
 Free textures we're holding a reference to.
 
void AllocateTextures (vtkOpenGLRenderWindow *context, int *viewsize)
 Allocate textures.
 
void AllocateTexture (vtkOpenGLRenderWindow *context, int *viewsize, vtkSmartPointer< vtkTextureObject > &tex, int filter=vtkTextureObject::Nearest)
 Allocate a size texture, store in the given smart pointer.
 
void AllocateDepthTexture (vtkOpenGLRenderWindow *context, int *viewsize, vtkSmartPointer< vtkTextureObject > &tex)
 Allocate a size texture, store in the given smart pointer.
 
void Updated ()
 After LIC has been computed reset/clean internal state.
 
void UpdateAll ()
 Force all stages to re-execute.
 
void ViewportQuadPoints (const vtkPixelExtent &viewportExt, GLfloat *quadpts)
 Convert a viewport to a bounding box and it's texture coordinates for a screen size texture.
 
void ViewportQuadTextureCoords (const vtkPixelExtent &viewExt, const vtkPixelExtent &viewportExt, GLfloat *tcoords)
 Convert a viewport to a bounding box and it's texture coordinates for a screen size texture.
 
void RenderQuad (const vtkPixelExtent &viewExt, const vtkPixelExtent &viewportExt, vtkOpenGLHelper *cbo)
 Render a quad (to trigger a shader to run)
 
int idx (int row, int col)
 Compute the index into the 4x4 OpenGL ordered matrix.
 
bool VisibilityTest (double ndcBBox[24])
 given a axes aligned bounding box in normalized device coordinates test for view frustum visibility.
 
bool ProjectBounds (double PMV[16], int viewsize[2], double bounds[6], vtkPixelExtent &screenExt)
 Given world space bounds, compute bounding boxes in clip and normalized device coordinates and perform view frustum visibility test.
 
int ProjectBounds (vtkRenderer *ren, vtkActor *actor, vtkDataObject *dobj, int viewsize[2], vtkPixelExtent &dataExt, std::deque< vtkPixelExtent > &blockExts)
 Compute screen space extents for each block in the input dataset and for the entire dataset.
 
void GetPixelBounds (float *rgba, int ni, vtkPixelExtent &ext)
 Shrink an extent to tightly bound non-zero values.
 
void GetPixelBounds (float *rgba, int ni, std::deque< vtkPixelExtent > &blockExts)
 Shrink a set of extents to tightly bound non-zero values cull extent if it's empty.
 
void ViewportQuadTextureCoords (GLfloat *tcoords)
 Convert viewport to texture coordinates.
 
void ViewQuadPoints (GLfloat *quadpts)
 Convert the entire view to a bounding box and it's texture coordinates for a screen size texture.
 
void ViewQuadTextureCoords (GLfloat *tcoords)
 Convert the entire view to a bounding box and it's texture coordinates for a screen size texture.
 

Static Public Member Functions

static bool IsSupported (vtkOpenGLRenderWindow *context)
 Check for OpenGL support.
 
static void StreamingFindMinMax (vtkOpenGLFramebufferObject *fbo, std::deque< vtkPixelExtent > &blockExts, float &min, float &max)
 

Public Attributes

vtkSmartPointer< vtkImageDataNoise
 
vtkSmartPointer< vtkTextureObjectNoiseImage
 
vtkSmartPointer< vtkTextureObjectDepthImage
 
vtkSmartPointer< vtkTextureObjectGeometryImage
 
vtkSmartPointer< vtkTextureObjectVectorImage
 
vtkSmartPointer< vtkTextureObjectCompositeVectorImage
 
vtkSmartPointer< vtkTextureObjectMaskVectorImage
 
vtkSmartPointer< vtkTextureObjectCompositeMaskVectorImage
 
vtkSmartPointer< vtkTextureObjectLICImage
 
vtkSmartPointer< vtkTextureObjectRGBColorImage
 
vtkSmartPointer< vtkTextureObjectHSLColorImage
 
bool HasVectors
 
std::deque< vtkPixelExtentBlockExts
 
vtkOpenGLHelperColorEnhancePass
 
vtkOpenGLHelperCopyPass
 
vtkOpenGLHelperColorPass
 
int Viewsize [2]
 
vtkSmartPointer< vtkSurfaceLICCompositeCompositor
 
vtkSmartPointer< vtkOpenGLFramebufferObjectFBO
 
vtkSmartPointer< vtkLineIntegralConvolution2DLICer
 
vtkPainterCommunicatorCommunicator
 
vtkPixelExtent DataSetExt
 
vtkWeakPointer< vtkOpenGLRenderWindowContext
 
bool ContextNeedsUpdate
 
bool CommunicatorNeedsUpdate
 

Detailed Description

A small collection of noise routines for LIC.

Definition at line 32 of file vtkSurfaceLICHelper.h.

Constructor & Destructor Documentation

◆ vtkSurfaceLICHelper()

vtkSurfaceLICHelper::vtkSurfaceLICHelper ( )

◆ ~vtkSurfaceLICHelper()

vtkSurfaceLICHelper::~vtkSurfaceLICHelper ( )

Member Function Documentation

◆ IsSupported()

static bool vtkSurfaceLICHelper::IsSupported ( vtkOpenGLRenderWindow context)
static

Check for OpenGL support.

◆ ReleaseGraphicsResources()

void vtkSurfaceLICHelper::ReleaseGraphicsResources ( vtkWindow win)

Free textures and shader programs we're holding a reference to.

◆ ClearTextures()

void vtkSurfaceLICHelper::ClearTextures ( )

Free textures we're holding a reference to.

◆ AllocateTextures()

void vtkSurfaceLICHelper::AllocateTextures ( vtkOpenGLRenderWindow context,
int *  viewsize 
)

Allocate textures.

◆ AllocateTexture()

void vtkSurfaceLICHelper::AllocateTexture ( vtkOpenGLRenderWindow context,
int *  viewsize,
vtkSmartPointer< vtkTextureObject > &  tex,
int  filter = vtkTextureObject::Nearest 
)

Allocate a size texture, store in the given smart pointer.

◆ AllocateDepthTexture()

void vtkSurfaceLICHelper::AllocateDepthTexture ( vtkOpenGLRenderWindow context,
int *  viewsize,
vtkSmartPointer< vtkTextureObject > &  tex 
)

Allocate a size texture, store in the given smart pointer.

◆ Updated()

void vtkSurfaceLICHelper::Updated ( )

After LIC has been computed reset/clean internal state.

◆ UpdateAll()

void vtkSurfaceLICHelper::UpdateAll ( )

Force all stages to re-execute.

Necessary if the context or communicator changes.

◆ ViewportQuadTextureCoords() [1/2]

void vtkSurfaceLICHelper::ViewportQuadTextureCoords ( GLfloat *  tcoords)
inline

Convert viewport to texture coordinates.

Definition at line 85 of file vtkSurfaceLICHelper.h.

◆ ViewportQuadPoints()

void vtkSurfaceLICHelper::ViewportQuadPoints ( const vtkPixelExtent viewportExt,
GLfloat *  quadpts 
)
inline

Convert a viewport to a bounding box and it's texture coordinates for a screen size texture.

Definition at line 96 of file vtkSurfaceLICHelper.h.

◆ ViewportQuadTextureCoords() [2/2]

void vtkSurfaceLICHelper::ViewportQuadTextureCoords ( const vtkPixelExtent viewExt,
const vtkPixelExtent viewportExt,
GLfloat *  tcoords 
)

Convert a viewport to a bounding box and it's texture coordinates for a screen size texture.

◆ ViewQuadPoints()

void vtkSurfaceLICHelper::ViewQuadPoints ( GLfloat *  quadpts)
inline

Convert the entire view to a bounding box and it's texture coordinates for a screen size texture.

Definition at line 113 of file vtkSurfaceLICHelper.h.

◆ ViewQuadTextureCoords()

void vtkSurfaceLICHelper::ViewQuadTextureCoords ( GLfloat *  tcoords)
inline

Convert the entire view to a bounding box and it's texture coordinates for a screen size texture.

Definition at line 125 of file vtkSurfaceLICHelper.h.

◆ RenderQuad()

void vtkSurfaceLICHelper::RenderQuad ( const vtkPixelExtent viewExt,
const vtkPixelExtent viewportExt,
vtkOpenGLHelper cbo 
)

Render a quad (to trigger a shader to run)

◆ idx()

int vtkSurfaceLICHelper::idx ( int  row,
int  col 
)
inline

Compute the index into the 4x4 OpenGL ordered matrix.

Definition at line 141 of file vtkSurfaceLICHelper.h.

◆ VisibilityTest()

bool vtkSurfaceLICHelper::VisibilityTest ( double  ndcBBox[24])

given a axes aligned bounding box in normalized device coordinates test for view frustum visibility.

if all points are outside one of the view frustum planes then this box is not visible. we might have false positive where more than one clip plane intersects the box.

◆ ProjectBounds() [1/2]

bool vtkSurfaceLICHelper::ProjectBounds ( double  PMV[16],
int  viewsize[2],
double  bounds[6],
vtkPixelExtent screenExt 
)

Given world space bounds, compute bounding boxes in clip and normalized device coordinates and perform view frustum visibility test.

return true if the bounds are visible. If so the passed in extent object is initialized with the corresponding screen space extents.

◆ ProjectBounds() [2/2]

int vtkSurfaceLICHelper::ProjectBounds ( vtkRenderer ren,
vtkActor actor,
vtkDataObject dobj,
int  viewsize[2],
vtkPixelExtent dataExt,
std::deque< vtkPixelExtent > &  blockExts 
)

Compute screen space extents for each block in the input dataset and for the entire dataset.

Only visible blocks are used in the computations.

◆ GetPixelBounds() [1/2]

void vtkSurfaceLICHelper::GetPixelBounds ( float *  rgba,
int  ni,
vtkPixelExtent ext 
)

Shrink an extent to tightly bound non-zero values.

◆ GetPixelBounds() [2/2]

void vtkSurfaceLICHelper::GetPixelBounds ( float *  rgba,
int  ni,
std::deque< vtkPixelExtent > &  blockExts 
)

Shrink a set of extents to tightly bound non-zero values cull extent if it's empty.

◆ StreamingFindMinMax()

static void vtkSurfaceLICHelper::StreamingFindMinMax ( vtkOpenGLFramebufferObject fbo,
std::deque< vtkPixelExtent > &  blockExts,
float &  min,
float &  max 
)
static

Member Data Documentation

◆ Noise

vtkSmartPointer<vtkImageData> vtkSurfaceLICHelper::Noise

Definition at line 187 of file vtkSurfaceLICHelper.h.

◆ NoiseImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::NoiseImage

Definition at line 188 of file vtkSurfaceLICHelper.h.

◆ DepthImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::DepthImage

Definition at line 189 of file vtkSurfaceLICHelper.h.

◆ GeometryImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::GeometryImage

Definition at line 190 of file vtkSurfaceLICHelper.h.

◆ VectorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::VectorImage

Definition at line 191 of file vtkSurfaceLICHelper.h.

◆ CompositeVectorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeVectorImage

Definition at line 192 of file vtkSurfaceLICHelper.h.

◆ MaskVectorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::MaskVectorImage

Definition at line 193 of file vtkSurfaceLICHelper.h.

◆ CompositeMaskVectorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeMaskVectorImage

Definition at line 194 of file vtkSurfaceLICHelper.h.

◆ LICImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::LICImage

Definition at line 195 of file vtkSurfaceLICHelper.h.

◆ RGBColorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::RGBColorImage

Definition at line 196 of file vtkSurfaceLICHelper.h.

◆ HSLColorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::HSLColorImage

Definition at line 197 of file vtkSurfaceLICHelper.h.

◆ HasVectors

bool vtkSurfaceLICHelper::HasVectors

Definition at line 199 of file vtkSurfaceLICHelper.h.

◆ BlockExts

std::deque<vtkPixelExtent> vtkSurfaceLICHelper::BlockExts

Definition at line 200 of file vtkSurfaceLICHelper.h.

◆ ColorEnhancePass

vtkOpenGLHelper* vtkSurfaceLICHelper::ColorEnhancePass

Definition at line 202 of file vtkSurfaceLICHelper.h.

◆ CopyPass

vtkOpenGLHelper* vtkSurfaceLICHelper::CopyPass

Definition at line 203 of file vtkSurfaceLICHelper.h.

◆ ColorPass

vtkOpenGLHelper* vtkSurfaceLICHelper::ColorPass

Definition at line 204 of file vtkSurfaceLICHelper.h.

◆ Viewsize

int vtkSurfaceLICHelper::Viewsize[2]

Definition at line 206 of file vtkSurfaceLICHelper.h.

◆ Compositor

vtkSmartPointer<vtkSurfaceLICComposite> vtkSurfaceLICHelper::Compositor

Definition at line 207 of file vtkSurfaceLICHelper.h.

◆ FBO

vtkSmartPointer<vtkOpenGLFramebufferObject> vtkSurfaceLICHelper::FBO

Definition at line 208 of file vtkSurfaceLICHelper.h.

◆ LICer

vtkSmartPointer<vtkLineIntegralConvolution2D> vtkSurfaceLICHelper::LICer

Definition at line 210 of file vtkSurfaceLICHelper.h.

◆ Communicator

vtkPainterCommunicator* vtkSurfaceLICHelper::Communicator

Definition at line 211 of file vtkSurfaceLICHelper.h.

◆ DataSetExt

vtkPixelExtent vtkSurfaceLICHelper::DataSetExt

Definition at line 212 of file vtkSurfaceLICHelper.h.

◆ Context

vtkWeakPointer<vtkOpenGLRenderWindow> vtkSurfaceLICHelper::Context

Definition at line 214 of file vtkSurfaceLICHelper.h.

◆ ContextNeedsUpdate

bool vtkSurfaceLICHelper::ContextNeedsUpdate

Definition at line 216 of file vtkSurfaceLICHelper.h.

◆ CommunicatorNeedsUpdate

bool vtkSurfaceLICHelper::CommunicatorNeedsUpdate

Definition at line 217 of file vtkSurfaceLICHelper.h.


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