VTK
|
2D Noise Generator. More...
#include <vtkLICNoiseHelper.h>
Public Member Functions | |
vtkLICRandomNoise2D () | |
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 81 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 104 of file vtkLICNoiseHelper.h.
|
inline |
Definition at line 84 of file vtkLICNoiseHelper.h.
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 124 of file vtkLICNoiseHelper.h.
|
static |