VTK
Public Types | Public Member Functions | Static Public Member Functions | List of all members
vtkLICRandomNoise2D Class Reference

2D Noise Generator. More...

#include <vtkLICNoiseHelper.h>

Public Types

enum  { UNIFORM = 0, GAUSSIAN = 1, PERLIN = 2 }
 Generate a patch of random gray scale values along with an alpha channel (in vtk array format). More...
 

Public Member Functions

 vtkLICRandomNoise2D ()
 
floatGenerate (int type, int &sideLen, int &grainLize, float minNoiseVal, float maxNoiseVal, int nLevels, double impulseProb, float impulseBgNoiseVal, int seed)
 
void DeleteValues (unsigned char *vals)
 Delete the passed in array of values. More...
 

Static Public Member Functions

static vtkImageDataGetNoiseResource ()
 

Detailed Description

2D Noise Generator.

Generate arrays for use as noise texture in the LIC algorithm. Can generate noise with uniform or Gaussian distributions, with a desired number of noise levels, and a desired frequency (f < 1 is impulse noise).

Definition at line 81 of file vtkLICNoiseHelper.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Generate a patch of random gray scale values along with an alpha channel (in vtk array format).

The data should be deleted by later calling DeleteValues. Grain size and sideLen may be modified to match the noise generator requirements, returned arrays will be sized accordingly.

type - UNIFORM=0, GAUSSIAN=1, PERLIN=2 sideLen - side length of square patch in pixels (in/out) grainSize - grain size of noise values in pixels (in/out) nLevels - number of noise intensity levels minNoiseVal - set the min for noise pixels (position distribution) maxNoiseVal - set the max for noise pixels (position distribution) impulseProb - probability of impulse noise,1 touches every pixel impulseBgNoiseVal - set the background color for impulse noise seed - seed for random number generator

Enumerator
UNIFORM 
GAUSSIAN 
PERLIN 

Definition at line 104 of file vtkLICNoiseHelper.h.

Constructor & Destructor Documentation

◆ vtkLICRandomNoise2D()

vtkLICRandomNoise2D::vtkLICRandomNoise2D ( )
inline

Definition at line 84 of file vtkLICNoiseHelper.h.

Member Function Documentation

◆ Generate()

float* vtkLICRandomNoise2D::Generate ( int  type,
int sideLen,
int grainLize,
float  minNoiseVal,
float  maxNoiseVal,
int  nLevels,
double  impulseProb,
float  impulseBgNoiseVal,
int  seed 
)

◆ DeleteValues()

void vtkLICRandomNoise2D::DeleteValues ( unsigned char *  vals)
inline

Delete the passed in array of values.

Definition at line 124 of file vtkLICNoiseHelper.h.

◆ GetNoiseResource()

static vtkImageData* vtkLICRandomNoise2D::GetNoiseResource ( )
static

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