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

2D Noise Generator. More...

#include <vtkLICNoiseHelper.h>

Public Member Functions

 vtkLICRandomNoise2D ()=default
 
void DeleteValues (unsigned char *vals)
 Delete the passed in array of values. More...
 

Static Public Member Functions

static vtkImageDataGetNoiseResource ()
 
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...
 
float * Generate (int type, int &sideLen, int &grainLize, float minNoiseVal, float maxNoiseVal, int nLevels, double impulseProb, float impulseBgNoiseVal, int seed)
 Generate a patch of random gray scale values along with an alpha channel (in vtk array format). More...
 

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 71 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 94 of file vtkLICNoiseHelper.h.

Constructor & Destructor Documentation

◆ vtkLICRandomNoise2D()

vtkLICRandomNoise2D::vtkLICRandomNoise2D ( )
default

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 
)

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

◆ DeleteValues()

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

Delete the passed in array of values.

Definition at line 107 of file vtkLICNoiseHelper.h.

◆ GetNoiseResource()

static vtkImageData * vtkLICRandomNoise2D::GetNoiseResource ( )
static

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