/*
 * Filename: dip_noise.h
 *
 * (C) Copyright 1995-1997               Pattern Recognition Group
 *     All rights reserved               Faculty of Applied Physics
 *                                       Delft University of Technology
 *                                       Lorentzweg 1
 *                                       2628 CJ Delft
 *                                       The Netherlands
 *
 * Contact: Dr. ir. Lucas J. van Vliet
 * email : lucas@ph.tn.tudelft.nl
 *
 * author: Geert van Kempen
 *
 * Definition of the 3DPro noise generation functions
 *
 */

#ifndef DIP_NOISE_H
#define DIP_NOISE_H
#ifdef __cplusplus
extern "C" {
#endif

#define DIP_NOISE_POISSON_APPROXIMATE 32.0

#define LENGTH_RTABLE   97

typedef struct {
	dip_Boolean initialised;
	dip_uint32 rnew;
	dip_uint32 rold;
	dip_uint32 rtable[LENGTH_RTABLE];
} dip_Random;


DIP_ERROR dip_RandomVariable         ( dip_Random *, dip_float * );
DIP_ERROR dip_RandomSeed             ( dip_Random *, dip_uint32 );
DIP_ERROR dip_UniformRandomVariable  ( dip_Random *, dip_float, dip_float,
												 	dip_float * );
DIP_ERROR dip_GaussianRandomVariable ( dip_Random *, dip_float, dip_float,
													dip_float *, dip_float * );
DIP_ERROR dip_PoissonRandomVariable  ( dip_Random *, dip_float, dip_float *);
DIP_ERROR dip_BinaryRandomVariable   ( dip_Random *, dip_Boolean, dip_float,
													dip_float, dip_Boolean * );
DIP_ERROR dip_UniformNoise  ( dip_Image, dip_Image, dip_float, dip_float,
										dip_Random * );
DIP_ERROR dip_GaussianNoise ( dip_Image, dip_Image, dip_float, dip_Random * );
DIP_ERROR dip_PoissonNoise  ( dip_Image, dip_Image, dip_float, dip_Random * );
DIP_ERROR dip_BinaryNoise   ( dip_Image, dip_Image, dip_float, dip_float,
										dip_Random * );


#ifdef __cplusplus
}
#endif
/* endif of DIP_NOISE_H */
#endif


