VTK
9.1.0
|
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 vtkImageData * | GetNoiseResource () |
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... | |
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.
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.
|
default |
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
|
inline |
Delete the passed in array of values.
Definition at line 107 of file vtkLICNoiseHelper.h.
|
static |