Protected Attributes

DGVNoise< type, rank > Class Template Reference

Class designed to construct noise of different types and apply it an arbitrary array. More...

#include <DGVNoise.h>

List of all members.

Public Member Functions

Constructors

 DGVNoise ()
 Standard Constructor.
virtual ~DGVNoise ()
 Standard Destructor.
Initial Setup

void setMax (type maxVal)
 Sets the max value of the image to be used.
void setSignalToNoiseRatio (type SNR)
 Sets the SNR of the noise to be applied. That is, what fraction of noise is the signal. 1 - 0.02 is good start value.
void setData (Array< type, rank > &data)
 Sets the data of the noise directly. Replaces initial noise values with values from data.
void setOffset (coordinate offsetValue)
 Sets the offset of the noise to be constructed.
void toDeltaFunction ()
 Sets the noise form to a Delta function.
void toUniformRandom ()
 Sets the noise form to uniform (salt and pepper) random noise.
void toGaussianForm ()
 Sets the noise form to a Gaussian.
void toPoissonForm ()
 Sets the noise form to a Poisson.
Noise

void generateNoiseFor (Array< type, rank > &data)
 Generates the noise form initially instructed.
void apply (Array< type, rank > &data)
 Applies the noise form to the data array provided.
void applyAsIntegers (Array< type, rank > &data)
 Applies the noise form to the data array provided as integers. Values are rounded.
void remove (Array< type, rank > &data)
 Removes the noise form to the data array provided.
Array< type, rank > & data ()
 Returns the noise data constructed.
void meanErrors (Array< type, rank > &actual, Array< type, rank > &result, Array< type, rank > &errors, type &mse, type &rmse, type &psnr)
RNG's

type randomNumber_Normal (type mean, type stdev)
long randomNumber_Poisson (type mean)
 Generates a Poisson distributed random number with mean and stdev given.
long randomNumber_Uniform (long max)
 Generates a Uniformly distributed random number with mean and stdev given.
type randomNumber_Exponential (type mean)
 Generates a Exponential distributed random number with mean and stdev given.

Protected Attributes

Array< type, rank > noise
 Contains the noise generated.
type max
 Max value to be used for noise generated.
type snr
 Signal to Noise to be used for noise generated.
coordinate offset
 Offset for the noise form.
noiseType form
 The form of the noise to be used for noise generated.

Detailed Description

template<typename type, int rank>
class DGVNoise< type, rank >

Class designed to construct noise of different types and apply it an arbitrary array.

Author:
Shekhar S. Chandra, 2009

For example:

    noiseFunction->setMax();
    noiseFunction->setSignalToNoiseRatio(0.1);
    noiseFunction->setOffset( coordinate(mValues(N-1)+1,0) );
    noiseFunction->toDeltaFunction();
    noiseFunction->generateNoiseFor(frtSpaceMissing->data());
    noiseFunction->apply(frtSpaceMissing->data());

Definition at line 53 of file DGVNoise.h.


Constructor & Destructor Documentation

template<typename type , int rank>
DGVNoise< type, rank >::DGVNoise (  ) 

Standard Constructor.

Definition at line 193 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::~DGVNoise (  )  [virtual]

Standard Destructor.

Definition at line 202 of file DGVNoise.h.


Member Function Documentation

template<typename type , int rank>
void DGVNoise< type, rank >::apply ( Array< type, rank > &  data  ) 

Applies the noise form to the data array provided.

Definition at line 300 of file DGVNoise.h.

template<typename type , int rank>
void DGVNoise< type, rank >::applyAsIntegers ( Array< type, rank > &  data  ) 

Applies the noise form to the data array provided as integers. Values are rounded.

Definition at line 315 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::data (  )  [inline]

Returns the noise data constructed.

Definition at line 152 of file DGVNoise.h.

template<typename type , int rank>
void DGVNoise< type, rank >::generateNoiseFor ( Array< type, rank > &  data  ) 

Generates the noise form initially instructed.

Definition at line 208 of file DGVNoise.h.

template<typename type , int rank>
void DGVNoise< type, rank >::meanErrors ( Array< type, rank > &  actual,
Array< type, rank > &  result,
Array< type, rank > &  errors,
type &  mse,
type &  rmse,
type &  psnr 
)

Definition at line 330 of file DGVNoise.h.

template<typename type , int rank>
type DGVNoise< type, rank >::randomNumber_Exponential ( type  mean  ) 

Generates a Exponential distributed random number with mean and stdev given.

Definition at line 377 of file DGVNoise.h.

template<typename type , int rank>
type DGVNoise< type, rank >::randomNumber_Normal ( type  mean,
type  stdev 
)

Definition at line 345 of file DGVNoise.h.

template<typename type , int rank>
long DGVNoise< type, rank >::randomNumber_Poisson ( type  mean  ) 

Generates a Poisson distributed random number with mean and stdev given.

Definition at line 353 of file DGVNoise.h.

template<typename type , int rank>
long DGVNoise< type, rank >::randomNumber_Uniform ( long  max  ) 

Generates a Uniformly distributed random number with mean and stdev given.

Definition at line 369 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::remove ( Array< type, rank > &  data  )  [inline]

Removes the noise form to the data array provided.

Definition at line 145 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::setData ( Array< type, rank > &  data  )  [inline]

Sets the data of the noise directly. Replaces initial noise values with values from data.

Definition at line 87 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::setMax ( type  maxVal  )  [inline]

Sets the max value of the image to be used.

Definition at line 73 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::setOffset ( coordinate  offsetValue  )  [inline]

Sets the offset of the noise to be constructed.

Definition at line 94 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::setSignalToNoiseRatio ( type  SNR  )  [inline]

Sets the SNR of the noise to be applied. That is, what fraction of noise is the signal. 1 - 0.02 is good start value.

Definition at line 80 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::toDeltaFunction (  )  [inline]

Sets the noise form to a Delta function.

Definition at line 101 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::toGaussianForm (  )  [inline]

Sets the noise form to a Gaussian.

Definition at line 115 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::toPoissonForm (  )  [inline]

Sets the noise form to a Poisson.

Definition at line 122 of file DGVNoise.h.

template<typename type , int rank>
DGVNoise< type, rank >::toUniformRandom (  )  [inline]

Sets the noise form to uniform (salt and pepper) random noise.

Definition at line 108 of file DGVNoise.h.


Member Data Documentation

template<typename type , int rank>
noiseType DGVNoise< type, rank >::form [protected]

The form of the noise to be used for noise generated.

Definition at line 189 of file DGVNoise.h.

template<typename type , int rank>
type DGVNoise< type, rank >::max [protected]

Max value to be used for noise generated.

Definition at line 186 of file DGVNoise.h.

template<typename type , int rank>
Array<type,rank> DGVNoise< type, rank >::noise [protected]

Contains the noise generated.

Definition at line 185 of file DGVNoise.h.

template<typename type , int rank>
coordinate DGVNoise< type, rank >::offset [protected]

Offset for the noise form.

Definition at line 188 of file DGVNoise.h.

template<typename type , int rank>
type DGVNoise< type, rank >::snr [protected]

Signal to Noise to be used for noise generated.

Definition at line 187 of file DGVNoise.h.


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