VTK  9.2.20230201
vtkLineIntegralConvolution2D Class Reference

GPU-based implementation of Line Integral Convolution (LIC) More...

#include <vtkLineIntegralConvolution2D.h>

Inheritance diagram for vtkLineIntegralConvolution2D:
[legend]
Collaboration diagram for vtkLineIntegralConvolution2D:
[legend]

## Public Types

typedef vtkObject Superclass

## Public Member Functions

virtual vtkTypeBool IsA (const char *type)
Return 1 if this class is the same type of (or a subclass of) the named class. More...

vtkLineIntegralConvolution2DNewInstance () const

void PrintSelf (ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses. More...

vtkTextureObjectExecute (vtkTextureObject *vectorTex, vtkTextureObject *noiseTex)
Compute the lic on the entire vector field texture. More...

vtkTextureObjectExecute (const int extent[4], vtkTextureObject *vectorTex, vtkTextureObject *noiseTex)
Compute the lic on the indicated subset of the vector field texture. More...

vtkTextureObjectExecute (const vtkPixelExtent &inputTexExtent, const std::deque< vtkPixelExtent > &vectorExtent, const std::deque< vtkPixelExtent > &licExtent, vtkTextureObject *vectorTex, vtkTextureObject *maskVectorTex, vtkTextureObject *noiseTex)
Compute LIC over the desired subset of the input texture. More...

virtual void SetCommunicator (vtkPainterCommunicator *)
Set the communicator to use during parallel operation The communicator will not be duplicated or reference counted for performance reasons thus caller should hold/manage reference to the communicator during use of the LIC object. More...

virtual vtkPainterCommunicatorGetCommunicator ()

virtual void GetGlobalMinMax (vtkPainterCommunicator *, float &, float &)
For parallel operation, find global min/max min/max are in/out. More...

virtual void WriteTimerLog (const char *)
Methods used for parallel benchmarks. More...

void SetContext (vtkOpenGLRenderWindow *context)
Set/Get the rendering context. More...

vtkOpenGLRenderWindowGetContext ()
Set/Get the rendering context. More...

virtual void SetEnhancedLIC (int)
EnhancedLIC mean compute the LIC twice with the second pass using the edge-enhanced result of the first pass as a noise texture. More...

virtual int GetEnhancedLIC ()
EnhancedLIC mean compute the LIC twice with the second pass using the edge-enhanced result of the first pass as a noise texture. More...

virtual void EnhancedLICOn ()
EnhancedLIC mean compute the LIC twice with the second pass using the edge-enhanced result of the first pass as a noise texture. More...

virtual void EnhancedLICOff ()
EnhancedLIC mean compute the LIC twice with the second pass using the edge-enhanced result of the first pass as a noise texture. More...

virtual void SetLowContrastEnhancementFactor (double)
This feature is used to fine tune the contrast enhancement. More...

virtual double GetLowContrastEnhancementFactor ()
This feature is used to fine tune the contrast enhancement. More...

virtual void SetHighContrastEnhancementFactor (double)
This feature is used to fine tune the contrast enhancement. More...

virtual double GetHighContrastEnhancementFactor ()
This feature is used to fine tune the contrast enhancement. More...

virtual void SetAntiAlias (int)
Enable/Disable the anti-aliasing pass. More...

virtual int GetAntiAlias ()
Enable/Disable the anti-aliasing pass. More...

virtual void AntiAliasOn ()
Enable/Disable the anti-aliasing pass. More...

virtual void AntiAliasOff ()
Enable/Disable the anti-aliasing pass. More...

virtual void SetNumberOfSteps (int)
Number of streamline integration steps (initial value is 1). More...

virtual int GetNumberOfSteps ()
Number of streamline integration steps (initial value is 1). More...

virtual void SetStepSize (double)
Get/Set the streamline integration step size (0.01 by default). More...

virtual double GetStepSize ()
Get/Set the streamline integration step size (0.01 by default). More...

void SetComponentIds (int c0, int c1)
If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field. More...

void SetComponentIds (int c[2])
If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field. More...

virtual int * GetComponentIds ()
If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field. More...

virtual void GetComponentIds (int &, int &)
If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field. More...

virtual void GetComponentIds (int[2])
If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field. More...

virtual void SetMaxNoiseValue (double)
Set the max noise value for use during LIC integration normalization. More...

virtual double GetMaxNoiseValue ()
Set the max noise value for use during LIC integration normalization. More...

void SetTransformVectors (int val)
This class performs LIC in the normalized image space. More...

virtual int GetTransformVectors ()
This class performs LIC in the normalized image space. More...

void SetNormalizeVectors (int val)
Set/Get the spacing in each dimension of the plane on which the vector field is defined. More...

virtual int GetNormalizeVectors ()
Set/Get the spacing in each dimension of the plane on which the vector field is defined. More...

The MaskThreshold controls blanking of the LIC texture. More...

The MaskThreshold controls blanking of the LIC texture. More...

Public Member Functions inherited from vtkObject
vtkBaseTypeMacro (vtkObject, vtkObjectBase)

virtual void DebugOn ()
Turn debugging output on. More...

virtual void DebugOff ()
Turn debugging output off. More...

bool GetDebug ()
Get the value of the debug flag. More...

void SetDebug (bool debugFlag)
Set the value of the debug flag. More...

virtual void Modified ()
Update the modification time for this object. More...

virtual vtkMTimeType GetMTime ()
Return this object's modified time. More...

void RemoveObserver (unsigned long tag)

void RemoveObservers (unsigned long event)

void RemoveObservers (const char *event)

void RemoveAllObservers ()

vtkTypeBool HasObserver (unsigned long event)

vtkTypeBool HasObserver (const char *event)

int InvokeEvent (unsigned long event)

int InvokeEvent (const char *event)

std::string GetObjectDescription () const override
The object description printed in messages and PrintSelf output. More...

unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...

unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...

vtkCommandGetCommand (unsigned long tag)
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...

void RemoveObserver (vtkCommand *)
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...

void RemoveObservers (unsigned long event, vtkCommand *)
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...

void RemoveObservers (const char *event, vtkCommand *)
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...

vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...

vtkTypeBool HasObserver (const char *event, vtkCommand *)
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...

template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)

template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)

template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
Allow user to set the AbortFlagOn() with the return value of the callback method. More...

int InvokeEvent (unsigned long event, void *callData)
This method invokes an event and return whether the event was aborted or not. More...

int InvokeEvent (const char *event, void *callData)
This method invokes an event and return whether the event was aborted or not. More...

virtual void SetObjectName (const std::string &objectName)
Set/get the name of this object for reporting purposes. More...

virtual std::string GetObjectName () const
Set/get the name of this object for reporting purposes. More...

Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
Return the class name as a string. More...

virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...

virtual void Delete ()
Delete a VTK object. More...

virtual void FastDelete ()
Delete a reference to this object. More...

void InitializeObjectBase ()

void Print (ostream &os)
Print an object to an ostream. More...

virtual void Register (vtkObjectBase *o)
Increase the reference count (mark as used by another object). More...

virtual void UnRegister (vtkObjectBase *o)
Decrease the reference count (release by another object). More...

int GetReferenceCount ()
Return the current reference count of this object. More...

void SetReferenceCount (int)
Sets the reference count. More...

bool GetIsInMemkind () const
A local state flag that remembers whether this object lives in the normal or extended memory space. More...

virtual void PrintHeader (ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses. More...

virtual void PrintTrailer (ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses. More...

virtual bool UsesGarbageCollector () const
Indicate whether the class uses vtkGarbageCollector or not. More...

## Static Public Member Functions

static vtkLineIntegralConvolution2DNew ()

static vtkTypeBool IsTypeOf (const char *type)

static vtkLineIntegralConvolution2DSafeDownCast (vtkObjectBase *o)

static bool IsSupported (vtkRenderWindow *renWin)
Returns if the context supports the required extensions. More...

static void SetVectorTexParameters (vtkTextureObject *vectors)
Convenience functions to ensure that the input textures are configured correctly. More...

static void SetNoiseTexParameters (vtkTextureObject *noise)

Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...

static void BreakOnError ()
This method is called when vtkErrorMacro executes. More...

static void SetGlobalWarningDisplay (int val)
This is a global flag that controls whether any debug, warning or error messages are displayed. More...

static void GlobalWarningDisplayOn ()
This is a global flag that controls whether any debug, warning or error messages are displayed. More...

static void GlobalWarningDisplayOff ()
This is a global flag that controls whether any debug, warning or error messages are displayed. More...

static int GetGlobalWarningDisplay ()
This is a global flag that controls whether any debug, warning or error messages are displayed. More...

Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
Return 1 if this class type is the same type of (or a subclass of) the named class. More...

static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...

static vtkObjectBaseNew ()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...

static void SetMemkindDirectory (const char *directoryname)
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More...

static bool GetUsingMemkind ()
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. More...

## Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const

vtkLineIntegralConvolution2D ()

~vtkLineIntegralConvolution2D () override

void RenderQuad (float computeBounds[4], vtkPixelExtent computeExtent)

vtkTextureObjectAllocateBuffer (unsigned int texSize[2])

void SetNoise2TexParameters (vtkTextureObject *noise)
Convenience functions to ensure that the input textures are configured correctly. More...

virtual void StartTimerEvent (const char *)
Methods used for parallel benchmarks. More...

virtual void EndTimerEvent (const char *)

Protected Member Functions inherited from vtkObject
vtkObject ()

~vtkObject () override

void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override

void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override

void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
These methods allow a command to exclusively grab all events. More...

void InternalReleaseFocus ()
These methods allow a command to exclusively grab all events. More...

Protected Member Functions inherited from vtkObjectBase
vtkObjectBase ()

virtual ~vtkObjectBase ()

virtual void ReportReferences (vtkGarbageCollector *)

vtkObjectBase (const vtkObjectBase &)

void operator= (const vtkObjectBase &)

## Protected Attributes

vtkPainterCommunicatorComm

vtkWeakPointer< vtkOpenGLRenderWindowContext

vtkOpenGLFramebufferObjectFBO

vtkOpenGLHelperFinalBlendProgram

vtkOpenGLHelperIntermediateBlendProgram

int NumberOfSteps

double StepSize

int EnhancedLIC

int EnhanceContrast

double LowContrastEnhancementFactor

double HighContrastEnhancementFactor

int AntiAlias

int NoiseTextureLookupCompatibilityMode

int TransformVectors

int NormalizeVectors

int ComponentIds [2]

double MaxNoiseValue

Protected Attributes inherited from vtkObject
bool Debug

vtkTimeStamp MTime

vtkSubjectHelper * SubjectHelper

std::string ObjectName

Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount

vtkWeakPointerBase ** WeakPointers

enum  { ENHANCE_CONTRAST_OFF = 0 , ENHANCE_CONTRAST_ON = 1 }
Enable/Disable contrast and dynamic range correction stages. More...

virtual void SetEnhanceContrast (int)
Enable/Disable contrast and dynamic range correction stages. More...

virtual int GetEnhanceContrast ()
Enable/Disable contrast and dynamic range correction stages. More...

virtual void EnhanceContrastOn ()
Enable/Disable contrast and dynamic range correction stages. More...

virtual void EnhanceContrastOff ()
Enable/Disable contrast and dynamic range correction stages. More...

Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()

static vtkReallocingFunction GetCurrentReallocFunction ()

static vtkFreeingFunction GetCurrentFreeFunction ()

static vtkFreeingFunction GetAlternateFreeFunction ()

## Detailed Description

GPU-based implementation of Line Integral Convolution (LIC)

This class resorts to GLSL to implement GPU-based Line Integral Convolution (LIC) for visualizing a 2D vector field that may be obtained by projecting an original 3D vector field onto a surface (such that the resulting 2D vector at each grid point on the surface is tangential to the local normal, as done in vtkSurfaceLICPainter).

As an image-based technique, 2D LIC works by (1) integrating a bidirectional streamline from the center of each pixel (of the LIC output image), (2) locating the pixels along / hit by this streamline as the correlated pixels of the starting pixel (seed point / pixel), (3) indexing a (usually white) noise texture (another input to LIC, in addition to the 2D vector field, usually with the same size as that of the 2D vector field) to determine the values (colors) of these pixels (the starting and the correlated pixels), typically through bi-linear interpolation, and (4) performing convolution (weighted averaging) on these values, by adopting a low-pass filter (such as box, ramp, and Hanning kernels), to obtain the result value (color) that is then assigned to the seed pixel.

The GLSL-based GPU implementation herein maps the aforementioned pipeline to fragment shaders and a box kernel is employed. Both the white noise and the vector field are provided to the GPU as texture objects (supported by the multi-texturing capability). In addition, there are four texture objects (color buffers) allocated to constitute two pairs that work in a ping-pong fashion, with one as the read buffers and the other as the write / render targets. Maintained by a frame buffer object (GL_EXT_framebuffer_object), each pair employs one buffer to store the current (dynamically updated) position (by means of the texture coordinate that keeps being warped by the underlying vector) of the (virtual) particle initially released from each fragment while using the bother buffer to store the current (dynamically updated too) accumulated texture value that each seed fragment (before the 'mesh' is warped) collects. Given NumberOfSteps integration steps in each direction, there are a total of (2 * NumberOfSteps + 1) fragments (including the seed fragment) are convolved and each contributes 1 / (2 * NumberOfSteps

• 1) of the associated texture value to fulfill the box filter.

One pass of LIC (basic LIC) tends to produce low-contrast / blurred images and vtkLineIntegralConvolution2D provides an option for creating enhanced LIC images. Enhanced LIC improves image quality by increasing inter-streamline contrast while suppressing artifacts. It performs two passes of LIC, with a 3x3 Laplacian high-pass filter in between that processes the output of pass #1 LIC and forwards the result as the input 'noise' to pass #2 LIC.

vtkLineIntegralConvolution2D applies masking to zero-vector fragments so that un-filtered white noise areas are made totally transparent by class vtkSurfaceLICPainter to show the underlying geometry surface.

The convolution process tends to decrease both contrast and dynamic range, sometimes leading to dull dark images. In order to counteract this, optional contrast ehnancement stages have been added. These increase the dynamic range and contrast and sharpen streaking patterns that emerge from the LIC process.

Under some circumstances, typically depending on the contrast and dynamic range and graininess of the noise texture, jagged or pixelated patterns emerge in the LIC. These can be reduced by enabling the optional anti-aliasing pass.

The internal pipeline is as follows, with optional stages denoted by () nested optional stages depend on their parent stage.

  noise texture
|
[ LIC ((CE) HPF LIC) (AA) (CE) ]
|                              |
vector field                       LIC'd image


where LIC is the LIC stage, HPF is the high-pass filter stage, CE is the contrast ehnacement stage, and AA is the antialias stage.

vtkImageDataLIC2D vtkStructuredGridLIC2D

Definition at line 110 of file vtkLineIntegralConvolution2D.h.

## ◆ Superclass

Definition at line 114 of file vtkLineIntegralConvolution2D.h.

## ◆ anonymous enum

 anonymous enum

Enable/Disable contrast and dynamic range correction stages.

Stage 1 is applied on the input to the high-pass filter when the high-pass filter is enabled and skipped otherwise. Stage 2, when enabled is the final stage in the internal pipeline. Both stages are implemented by a histogram stretching of the gray scale colors in the LIC'd image as follows:

c = (c-m)/(M-m)

where, c is the fragment color, m is the color value to map to 0, M is the color value to map to 1. The default values of m and M are the min and max over all fragments.

This increase the dynamic range and contrast in the LIC'd image, both of which are naturally attenuated by the LI convolution process.

ENHANCE_CONTRAST_OFF – don't enhance contrast ENHANCE_CONTRAST_ON – enhance high-pass input and final stage output

This feature is disabled by default.

Enumerator
ENHANCE_CONTRAST_OFF
ENHANCE_CONTRAST_ON

Definition at line 164 of file vtkLineIntegralConvolution2D.h.

## ◆ vtkLineIntegralConvolution2D()

 vtkLineIntegralConvolution2D::vtkLineIntegralConvolution2D ( )
protected

## ◆ ~vtkLineIntegralConvolution2D()

 vtkLineIntegralConvolution2D::~vtkLineIntegralConvolution2D ( )
overrideprotected

## ◆ New()

 static vtkLineIntegralConvolution2D* vtkLineIntegralConvolution2D::New ( )
static

## ◆ IsTypeOf()

 static vtkTypeBool vtkLineIntegralConvolution2D::IsTypeOf ( const char * type )
static

## ◆ IsA()

 virtual vtkTypeBool vtkLineIntegralConvolution2D::IsA ( const char * name )
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObjectBase.

Reimplemented in vtkPLineIntegralConvolution2D.

## ◆ SafeDownCast()

 static vtkLineIntegralConvolution2D* vtkLineIntegralConvolution2D::SafeDownCast ( vtkObjectBase * o )
static

## ◆ NewInstanceInternal()

 virtual vtkObjectBase* vtkLineIntegralConvolution2D::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented in vtkPLineIntegralConvolution2D.

## ◆ NewInstance()

 vtkLineIntegralConvolution2D* vtkLineIntegralConvolution2D::NewInstance ( ) const

## ◆ PrintSelf()

 void vtkLineIntegralConvolution2D::PrintSelf ( ostream & os, vtkIndent indent )
overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

Reimplemented in vtkPLineIntegralConvolution2D.

## ◆ IsSupported()

 static bool vtkLineIntegralConvolution2D::IsSupported ( vtkRenderWindow * renWin )
static

Returns if the context supports the required extensions.

## ◆ SetContext()

 void vtkLineIntegralConvolution2D::SetContext ( vtkOpenGLRenderWindow * context )

Set/Get the rendering context.

A reference is not explicitly held, thus reference to the context must be held externally.

## ◆ GetContext()

 vtkOpenGLRenderWindow* vtkLineIntegralConvolution2D::GetContext ( )

Set/Get the rendering context.

A reference is not explicitly held, thus reference to the context must be held externally.

## ◆ SetEnhancedLIC()

 virtual void vtkLineIntegralConvolution2D::SetEnhancedLIC ( int )
virtual

EnhancedLIC mean compute the LIC twice with the second pass using the edge-enhanced result of the first pass as a noise texture.

Edge enhancedment is made by a simple Laplace convolution.

## ◆ GetEnhancedLIC()

 virtual int vtkLineIntegralConvolution2D::GetEnhancedLIC ( )
virtual

EnhancedLIC mean compute the LIC twice with the second pass using the edge-enhanced result of the first pass as a noise texture.

Edge enhancedment is made by a simple Laplace convolution.

## ◆ EnhancedLICOn()

 virtual void vtkLineIntegralConvolution2D::EnhancedLICOn ( )
virtual

EnhancedLIC mean compute the LIC twice with the second pass using the edge-enhanced result of the first pass as a noise texture.

Edge enhancedment is made by a simple Laplace convolution.

## ◆ EnhancedLICOff()

 virtual void vtkLineIntegralConvolution2D::EnhancedLICOff ( )
virtual

EnhancedLIC mean compute the LIC twice with the second pass using the edge-enhanced result of the first pass as a noise texture.

Edge enhancedment is made by a simple Laplace convolution.

## ◆ SetEnhanceContrast()

 virtual void vtkLineIntegralConvolution2D::SetEnhanceContrast ( int )
virtual

Enable/Disable contrast and dynamic range correction stages.

Stage 1 is applied on the input to the high-pass filter when the high-pass filter is enabled and skipped otherwise. Stage 2, when enabled is the final stage in the internal pipeline. Both stages are implemented by a histogram stretching of the gray scale colors in the LIC'd image as follows:

c = (c-m)/(M-m)

where, c is the fragment color, m is the color value to map to 0, M is the color value to map to 1. The default values of m and M are the min and max over all fragments.

This increase the dynamic range and contrast in the LIC'd image, both of which are naturally attenuated by the LI convolution process.

ENHANCE_CONTRAST_OFF – don't enhance contrast ENHANCE_CONTRAST_ON – enhance high-pass input and final stage output

This feature is disabled by default.

## ◆ GetEnhanceContrast()

 virtual int vtkLineIntegralConvolution2D::GetEnhanceContrast ( )
virtual

Enable/Disable contrast and dynamic range correction stages.

Stage 1 is applied on the input to the high-pass filter when the high-pass filter is enabled and skipped otherwise. Stage 2, when enabled is the final stage in the internal pipeline. Both stages are implemented by a histogram stretching of the gray scale colors in the LIC'd image as follows:

c = (c-m)/(M-m)

where, c is the fragment color, m is the color value to map to 0, M is the color value to map to 1. The default values of m and M are the min and max over all fragments.

This increase the dynamic range and contrast in the LIC'd image, both of which are naturally attenuated by the LI convolution process.

ENHANCE_CONTRAST_OFF – don't enhance contrast ENHANCE_CONTRAST_ON – enhance high-pass input and final stage output

This feature is disabled by default.

## ◆ EnhanceContrastOn()

 virtual void vtkLineIntegralConvolution2D::EnhanceContrastOn ( )
virtual

Enable/Disable contrast and dynamic range correction stages.

Stage 1 is applied on the input to the high-pass filter when the high-pass filter is enabled and skipped otherwise. Stage 2, when enabled is the final stage in the internal pipeline. Both stages are implemented by a histogram stretching of the gray scale colors in the LIC'd image as follows:

c = (c-m)/(M-m)

where, c is the fragment color, m is the color value to map to 0, M is the color value to map to 1. The default values of m and M are the min and max over all fragments.

This increase the dynamic range and contrast in the LIC'd image, both of which are naturally attenuated by the LI convolution process.

ENHANCE_CONTRAST_OFF – don't enhance contrast ENHANCE_CONTRAST_ON – enhance high-pass input and final stage output

This feature is disabled by default.

## ◆ EnhanceContrastOff()

 virtual void vtkLineIntegralConvolution2D::EnhanceContrastOff ( )
virtual

Enable/Disable contrast and dynamic range correction stages.

Stage 1 is applied on the input to the high-pass filter when the high-pass filter is enabled and skipped otherwise. Stage 2, when enabled is the final stage in the internal pipeline. Both stages are implemented by a histogram stretching of the gray scale colors in the LIC'd image as follows:

c = (c-m)/(M-m)

where, c is the fragment color, m is the color value to map to 0, M is the color value to map to 1. The default values of m and M are the min and max over all fragments.

This increase the dynamic range and contrast in the LIC'd image, both of which are naturally attenuated by the LI convolution process.

ENHANCE_CONTRAST_OFF – don't enhance contrast ENHANCE_CONTRAST_ON – enhance high-pass input and final stage output

This feature is disabled by default.

## ◆ SetLowContrastEnhancementFactor()

 virtual void vtkLineIntegralConvolution2D::SetLowContrastEnhancementFactor ( double )
virtual

This feature is used to fine tune the contrast enhancement.

Values are provided indicating the fraction of the range to adjust m and M by during contrast enahncement histogram stretching. M and m are the intensity/lightness values that map to 1 and 0. (see EnhanceContrast for an explanation of the mapping procedure). m and M are computed using the factors as follows:

m = min(C) - mFactor * (max(C) - min(C)) M = max(C) - MFactor * (max(C) - min(C))

the default values for mFactor and MFactor are 0 which result in m = min(C), M = max(C), where C is all of the colors in the image. Adjusting mFactor and MFactor above zero provide a means to control the saturation of normalization. These settings only affect the final normalization, the normalization that occurs on the input to the high-pass filter always uses the min and max.

## ◆ GetLowContrastEnhancementFactor()

 virtual double vtkLineIntegralConvolution2D::GetLowContrastEnhancementFactor ( )
virtual

This feature is used to fine tune the contrast enhancement.

Values are provided indicating the fraction of the range to adjust m and M by during contrast enahncement histogram stretching. M and m are the intensity/lightness values that map to 1 and 0. (see EnhanceContrast for an explanation of the mapping procedure). m and M are computed using the factors as follows:

m = min(C) - mFactor * (max(C) - min(C)) M = max(C) - MFactor * (max(C) - min(C))

the default values for mFactor and MFactor are 0 which result in m = min(C), M = max(C), where C is all of the colors in the image. Adjusting mFactor and MFactor above zero provide a means to control the saturation of normalization. These settings only affect the final normalization, the normalization that occurs on the input to the high-pass filter always uses the min and max.

## ◆ SetHighContrastEnhancementFactor()

 virtual void vtkLineIntegralConvolution2D::SetHighContrastEnhancementFactor ( double )
virtual

This feature is used to fine tune the contrast enhancement.

Values are provided indicating the fraction of the range to adjust m and M by during contrast enahncement histogram stretching. M and m are the intensity/lightness values that map to 1 and 0. (see EnhanceContrast for an explanation of the mapping procedure). m and M are computed using the factors as follows:

m = min(C) - mFactor * (max(C) - min(C)) M = max(C) - MFactor * (max(C) - min(C))

the default values for mFactor and MFactor are 0 which result in m = min(C), M = max(C), where C is all of the colors in the image. Adjusting mFactor and MFactor above zero provide a means to control the saturation of normalization. These settings only affect the final normalization, the normalization that occurs on the input to the high-pass filter always uses the min and max.

## ◆ GetHighContrastEnhancementFactor()

 virtual double vtkLineIntegralConvolution2D::GetHighContrastEnhancementFactor ( )
virtual

This feature is used to fine tune the contrast enhancement.

Values are provided indicating the fraction of the range to adjust m and M by during contrast enahncement histogram stretching. M and m are the intensity/lightness values that map to 1 and 0. (see EnhanceContrast for an explanation of the mapping procedure). m and M are computed using the factors as follows:

m = min(C) - mFactor * (max(C) - min(C)) M = max(C) - MFactor * (max(C) - min(C))

the default values for mFactor and MFactor are 0 which result in m = min(C), M = max(C), where C is all of the colors in the image. Adjusting mFactor and MFactor above zero provide a means to control the saturation of normalization. These settings only affect the final normalization, the normalization that occurs on the input to the high-pass filter always uses the min and max.

## ◆ SetAntiAlias()

 virtual void vtkLineIntegralConvolution2D::SetAntiAlias ( int )
virtual

Enable/Disable the anti-aliasing pass.

This optional pass (disabled by default) can be enabled to reduce jagged patterns in the final LIC image. Values greater than 0 control the number of iterations, one is typically sufficient.

## ◆ GetAntiAlias()

 virtual int vtkLineIntegralConvolution2D::GetAntiAlias ( )
virtual

Enable/Disable the anti-aliasing pass.

This optional pass (disabled by default) can be enabled to reduce jagged patterns in the final LIC image. Values greater than 0 control the number of iterations, one is typically sufficient.

## ◆ AntiAliasOn()

 virtual void vtkLineIntegralConvolution2D::AntiAliasOn ( )
virtual

Enable/Disable the anti-aliasing pass.

This optional pass (disabled by default) can be enabled to reduce jagged patterns in the final LIC image. Values greater than 0 control the number of iterations, one is typically sufficient.

## ◆ AntiAliasOff()

 virtual void vtkLineIntegralConvolution2D::AntiAliasOff ( )
virtual

Enable/Disable the anti-aliasing pass.

This optional pass (disabled by default) can be enabled to reduce jagged patterns in the final LIC image. Values greater than 0 control the number of iterations, one is typically sufficient.

## ◆ SetNumberOfSteps()

 virtual void vtkLineIntegralConvolution2D::SetNumberOfSteps ( int )
virtual

Number of streamline integration steps (initial value is 1).

In term of visual quality, the greater (within some range) the better.

## ◆ GetNumberOfSteps()

 virtual int vtkLineIntegralConvolution2D::GetNumberOfSteps ( )
virtual

Number of streamline integration steps (initial value is 1).

In term of visual quality, the greater (within some range) the better.

## ◆ SetStepSize()

 virtual void vtkLineIntegralConvolution2D::SetStepSize ( double )
virtual

Get/Set the streamline integration step size (0.01 by default).

This is the length of each step in normalized image space i.e. in range [0, FLOAT_MAX]. In term of visual quality, the smaller the better. The type for the interface is double as VTK interface is, but GPU only supports float. Thus it will be converted to float in the execution of the algorithm.

## ◆ GetStepSize()

 virtual double vtkLineIntegralConvolution2D::GetStepSize ( )
virtual

Get/Set the streamline integration step size (0.01 by default).

This is the length of each step in normalized image space i.e. in range [0, FLOAT_MAX]. In term of visual quality, the smaller the better. The type for the interface is double as VTK interface is, but GPU only supports float. Thus it will be converted to float in the execution of the algorithm.

## ◆ SetComponentIds() [1/2]

 void vtkLineIntegralConvolution2D::SetComponentIds ( int c0, int c1 )

If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field.

Must be in the range [0, 3].

## ◆ SetComponentIds() [2/2]

 void vtkLineIntegralConvolution2D::SetComponentIds ( int c[2] )
inline

If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field.

Must be in the range [0, 3].

Definition at line 238 of file vtkLineIntegralConvolution2D.h.

## ◆ GetComponentIds() [1/3]

 virtual int* vtkLineIntegralConvolution2D::GetComponentIds ( )
virtual

If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field.

Must be in the range [0, 3].

## ◆ GetComponentIds() [2/3]

 virtual void vtkLineIntegralConvolution2D::GetComponentIds ( int & , int & )
virtual

If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field.

Must be in the range [0, 3].

## ◆ GetComponentIds() [3/3]

 virtual void vtkLineIntegralConvolution2D::GetComponentIds ( int [2] )
virtual

If VectorField has >= 3 components, we must choose which 2 components form the (X, Y) components for the vector field.

Must be in the range [0, 3].

## ◆ SetMaxNoiseValue()

 virtual void vtkLineIntegralConvolution2D::SetMaxNoiseValue ( double )
virtual

Set the max noise value for use during LIC integration normalization.

The integration normalization factor is the max noise value times the number of steps taken. The default value is 1.

## ◆ GetMaxNoiseValue()

 virtual double vtkLineIntegralConvolution2D::GetMaxNoiseValue ( )
virtual

Set the max noise value for use during LIC integration normalization.

The integration normalization factor is the max noise value times the number of steps taken. The default value is 1.

## ◆ SetTransformVectors()

 void vtkLineIntegralConvolution2D::SetTransformVectors ( int val )

This class performs LIC in the normalized image space.

Hence, by default it transforms the input vectors to the normalized image space (using the GridSpacings and input vector field dimensions). Set this to 0 to disable transformation if the vectors are already transformed.

## ◆ GetTransformVectors()

 virtual int vtkLineIntegralConvolution2D::GetTransformVectors ( )
virtual

This class performs LIC in the normalized image space.

Hence, by default it transforms the input vectors to the normalized image space (using the GridSpacings and input vector field dimensions). Set this to 0 to disable transformation if the vectors are already transformed.

## ◆ SetNormalizeVectors()

 void vtkLineIntegralConvolution2D::SetNormalizeVectors ( int val )

Set/Get the spacing in each dimension of the plane on which the vector field is defined.

This class performs LIC in the normalized image space and hence generally it needs to transform the input vector field (given in physical space) to the normalized image space. The Spacing is needed to determine the transform. Default is (1.0, 1.0). It is possible to disable vector transformation by setting TransformVectors to 0. vtkSetVector2Macro(GridSpacings, double); vtkGetVector2Macro(GridSpacings, double); Normalize vectors during integration. When set(the default) the input vector field is normalized during integration, and each integration occurs over the same arclength. When not set each integration occurs over an arc length proportional to the field magnitude as is customary in traditional numerical methods. See, "Imaging Vector Fields Using Line Integral Convolution" for an axample where normalization is used. See, "Image Space Based Visualization of Unsteady Flow on Surfaces" for an example of where no normalization is used.

## ◆ GetNormalizeVectors()

 virtual int vtkLineIntegralConvolution2D::GetNormalizeVectors ( )
virtual

Set/Get the spacing in each dimension of the plane on which the vector field is defined.

This class performs LIC in the normalized image space and hence generally it needs to transform the input vector field (given in physical space) to the normalized image space. The Spacing is needed to determine the transform. Default is (1.0, 1.0). It is possible to disable vector transformation by setting TransformVectors to 0. vtkSetVector2Macro(GridSpacings, double); vtkGetVector2Macro(GridSpacings, double); Normalize vectors during integration. When set(the default) the input vector field is normalized during integration, and each integration occurs over the same arclength. When not set each integration occurs over an arc length proportional to the field magnitude as is customary in traditional numerical methods. See, "Imaging Vector Fields Using Line Integral Convolution" for an axample where normalization is used. See, "Image Space Based Visualization of Unsteady Flow on Surfaces" for an example of where no normalization is used.

 virtual void vtkLineIntegralConvolution2D::SetMaskThreshold ( double )
virtual

The MaskThreshold controls blanking of the LIC texture.

For fragments with |V|<threshold the LIC fragment is not rendered. The default value is 0.0.

For surface LIC MaskThreshold units are in the original vector space. For image LIC be aware that while the vector field is transformed to image space while the mask threshold is not. Therefore the mask threshold must be specified in image space units.

virtual

The MaskThreshold controls blanking of the LIC texture.

For fragments with |V|<threshold the LIC fragment is not rendered. The default value is 0.0.

For surface LIC MaskThreshold units are in the original vector space. For image LIC be aware that while the vector field is transformed to image space while the mask threshold is not. Therefore the mask threshold must be specified in image space units.

## ◆ Execute() [1/3]

 vtkTextureObject* vtkLineIntegralConvolution2D::Execute ( vtkTextureObject * vectorTex, vtkTextureObject * noiseTex )

Compute the lic on the entire vector field texture.

## ◆ Execute() [2/3]

 vtkTextureObject* vtkLineIntegralConvolution2D::Execute ( const int extent[4], vtkTextureObject * vectorTex, vtkTextureObject * noiseTex )

Compute the lic on the indicated subset of the vector field texture.

## ◆ Execute() [3/3]

 vtkTextureObject* vtkLineIntegralConvolution2D::Execute ( const vtkPixelExtent & inputTexExtent, const std::deque< vtkPixelExtent > & vectorExtent, const std::deque< vtkPixelExtent > & licExtent, vtkTextureObject * vectorTex, vtkTextureObject * maskVectorTex, vtkTextureObject * noiseTex )

Compute LIC over the desired subset of the input texture.

The result is copied into the desired subset of the provided output texture.

inputTexExtent : screen space extent of the input texture vectorExtent : part of the inpute extent that has valid vectors licExtent : part of the inpute extent to compute on outputTexExtent : screen space extent of the output texture outputExtent : part of the output texture to store the result

## ◆ SetVectorTexParameters()

 static void vtkLineIntegralConvolution2D::SetVectorTexParameters ( vtkTextureObject * vectors )
static

Convenience functions to ensure that the input textures are configured correctly.

## ◆ SetNoiseTexParameters()

 static void vtkLineIntegralConvolution2D::SetNoiseTexParameters ( vtkTextureObject * noise )
static

## ◆ SetCommunicator()

 virtual void vtkLineIntegralConvolution2D::SetCommunicator ( vtkPainterCommunicator * )
inlinevirtual

Set the communicator to use during parallel operation The communicator will not be duplicated or reference counted for performance reasons thus caller should hold/manage reference to the communicator during use of the LIC object.

Reimplemented in vtkPLineIntegralConvolution2D.

Definition at line 344 of file vtkLineIntegralConvolution2D.h.

## ◆ GetCommunicator()

 virtual vtkPainterCommunicator* vtkLineIntegralConvolution2D::GetCommunicator ( )
virtual

Reimplemented in vtkPLineIntegralConvolution2D.

## ◆ GetGlobalMinMax()

 virtual void vtkLineIntegralConvolution2D::GetGlobalMinMax ( vtkPainterCommunicator * , float & , float & )
inlinevirtual

For parallel operation, find global min/max min/max are in/out.

Reimplemented in vtkPLineIntegralConvolution2D.

Definition at line 351 of file vtkLineIntegralConvolution2D.h.

## ◆ WriteTimerLog()

 virtual void vtkLineIntegralConvolution2D::WriteTimerLog ( const char * )
inlinevirtual

Methods used for parallel benchmarks.

Use cmake to define vtkLineIntegralConviolution2DTIME to enable benchmarks. During each update timing information is stored, it can be written to disk by calling WriteLog.

Definition at line 359 of file vtkLineIntegralConvolution2D.h.

protected

protected

protected

protected

protected

protected

protected

protected

protected

 void vtkLineIntegralConvolution2D::RenderQuad ( float computeBounds[4], vtkPixelExtent computeExtent )
protected

## ◆ AllocateBuffer()

 vtkTextureObject* vtkLineIntegralConvolution2D::AllocateBuffer ( unsigned int texSize[2] )
protected

## ◆ SetNoise2TexParameters()

 void vtkLineIntegralConvolution2D::SetNoise2TexParameters ( vtkTextureObject * noise )
protected

Convenience functions to ensure that the input textures are configured correctly.

## ◆ StartTimerEvent()

 virtual void vtkLineIntegralConvolution2D::StartTimerEvent ( const char * )
inlineprotectedvirtual

Methods used for parallel benchmarks.

Use cmake to define vtkSurfaceLICPainterTIME to enable benchmarks. During each update timing information is stored, it can be written to disk by calling WriteLog (defined in vtkSurfaceLICPainter).

Reimplemented in vtkPLineIntegralConvolution2D.

Definition at line 394 of file vtkLineIntegralConvolution2D.h.

## ◆ EndTimerEvent()

 virtual void vtkLineIntegralConvolution2D::EndTimerEvent ( const char * )
inlineprotectedvirtual

Reimplemented in vtkPLineIntegralConvolution2D.

Definition at line 395 of file vtkLineIntegralConvolution2D.h.

## ◆ Comm

 vtkPainterCommunicator* vtkLineIntegralConvolution2D::Comm
protected

Definition at line 365 of file vtkLineIntegralConvolution2D.h.

## ◆ Context

 vtkWeakPointer vtkLineIntegralConvolution2D::Context
protected

Definition at line 398 of file vtkLineIntegralConvolution2D.h.

## ◆ FBO

 vtkOpenGLFramebufferObject* vtkLineIntegralConvolution2D::FBO
protected

Definition at line 399 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 401 of file vtkLineIntegralConvolution2D.h.

## ◆ FinalBlendProgram

 vtkOpenGLHelper* vtkLineIntegralConvolution2D::FinalBlendProgram
protected

Definition at line 402 of file vtkLineIntegralConvolution2D.h.

## ◆ IntermediateBlendProgram

 vtkOpenGLHelper* vtkLineIntegralConvolution2D::IntermediateBlendProgram
protected

Definition at line 403 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 404 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 405 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 406 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 407 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 408 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 409 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 410 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 411 of file vtkLineIntegralConvolution2D.h.

## ◆ NumberOfSteps

 int vtkLineIntegralConvolution2D::NumberOfSteps
protected

Definition at line 413 of file vtkLineIntegralConvolution2D.h.

## ◆ StepSize

 double vtkLineIntegralConvolution2D::StepSize
protected

Definition at line 414 of file vtkLineIntegralConvolution2D.h.

## ◆ EnhancedLIC

 int vtkLineIntegralConvolution2D::EnhancedLIC
protected

Definition at line 415 of file vtkLineIntegralConvolution2D.h.

## ◆ EnhanceContrast

 int vtkLineIntegralConvolution2D::EnhanceContrast
protected

Definition at line 416 of file vtkLineIntegralConvolution2D.h.

## ◆ LowContrastEnhancementFactor

 double vtkLineIntegralConvolution2D::LowContrastEnhancementFactor
protected

Definition at line 417 of file vtkLineIntegralConvolution2D.h.

## ◆ HighContrastEnhancementFactor

 double vtkLineIntegralConvolution2D::HighContrastEnhancementFactor
protected

Definition at line 418 of file vtkLineIntegralConvolution2D.h.

## ◆ AntiAlias

 int vtkLineIntegralConvolution2D::AntiAlias
protected

Definition at line 419 of file vtkLineIntegralConvolution2D.h.

## ◆ NoiseTextureLookupCompatibilityMode

 int vtkLineIntegralConvolution2D::NoiseTextureLookupCompatibilityMode
protected

Definition at line 420 of file vtkLineIntegralConvolution2D.h.

protected

Definition at line 421 of file vtkLineIntegralConvolution2D.h.

## ◆ TransformVectors

 int vtkLineIntegralConvolution2D::TransformVectors
protected

Definition at line 422 of file vtkLineIntegralConvolution2D.h.

## ◆ NormalizeVectors

 int vtkLineIntegralConvolution2D::NormalizeVectors
protected

Definition at line 423 of file vtkLineIntegralConvolution2D.h.

## ◆ ComponentIds

 int vtkLineIntegralConvolution2D::ComponentIds[2]
protected

Definition at line 424 of file vtkLineIntegralConvolution2D.h.

## ◆ MaxNoiseValue

 double vtkLineIntegralConvolution2D::MaxNoiseValue
protected

Definition at line 425 of file vtkLineIntegralConvolution2D.h.

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