last update 20 Sep 2009 |
#include <cvrNoise.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual const std::string & | name () const |
virtual parameters * | clone () const |
virtual parameters * | newInstance () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
bool | setNoiseGenerator (univariateContinuousDistribution &generator) |
univariateContinuousDistribution * | getNoiseGenerator () |
Public Attributes | |
float | coverage |
bool | crop |
uniformDiscreteDistribution::parameters | selectorParameters |
Protected Attributes | |
univariateContinuousDistribution * | generator_ |
cvr::noise::noise::parameters::parameters | ( | ) |
cvr::noise::noise::parameters::parameters | ( | const parameters & | other | ) |
Copy constructor.
other | the parameters object to be copied |
Reimplemented from cvr::functor::functor::parameters.
cvr::noise::noise::parameters::~parameters | ( | ) | [virtual] |
virtual parameters* cvr::noise::noise::parameters::clone | ( | ) | const [virtual] |
parameters& cvr::noise::noise::parameters::copy | ( | const parameters & | other | ) |
Copy the contents of a parameters object.
other | the parameters object to be copied |
univariateContinuousDistribution* cvr::noise::noise::parameters::getNoiseGenerator | ( | ) |
Get the random number generator to be used.
The default value is a normalDistribution with zero mean and a standard deviation of 0.25.
virtual const std::string& cvr::noise::noise::parameters::name | ( | ) | const [virtual] |
virtual parameters* cvr::noise::noise::parameters::newInstance | ( | ) | const [virtual] |
Returns a pointer to a new instance of the parameters.
Implements cvr::functor::functor::parameters.
parameters& cvr::noise::noise::parameters::operator= | ( | const parameters & | other | ) |
Copy the contents of a parameters object.
other | the parameters object to be copied |
virtual bool cvr::noise::noise::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
Read the parameters from the given ioHandler.
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from cvr::parametersManager::parametersManager::parameters.
bool cvr::noise::noise::parameters::setNoiseGenerator | ( | univariateContinuousDistribution & | generator | ) |
Set the random number generator to be used.
A copy of the given generator will be done.
The default value is a normalDistribution with zero mean and a standard deviation of 0.25.
virtual bool cvr::noise::noise::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
Write the parameters in the given ioHandler.
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from cvr::parametersManager::parametersManager::parameters.
float cvr::noise::noise::parameters::coverage |
Percentage of the container elements that are selected for modification.
The value has to be between 0.0f and 100.0f.
If the value is greater than or equal to 100.0f, then all container elements are subject to modification. If the value is less than, or equal to zero, then nothing is done to the container.
Default value: 100.0f
bool cvr::noise::noise::parameters::crop |
Crop values.
If crop is true, then the resulting values below zero are set to zero, and the values above 1.0 for float and double, or 255 for ubyte, or 65535 for int are set to those values.
Default value: true
univariateContinuousDistribution* cvr::noise::noise::parameters::generator_ [protected] |
Pointer to an instance of a continuous distribution instance.
This instance is initialized with a normalDistribution object.
uniformDiscreteDistribution::parameters cvr::noise::noise::parameters::selectorParameters |
Parameters for the container element selector.
If coverage
is less than 100%, then a uniform random number generator is employed to select the container elements to be modified. These are the parameters for the uniform discrete distribution class employed in the pixel selection.
The min
and max
members will be ignored, as they have to be set new in each apply method, due to the possible container size change.
Default value: default parameters.