STIR
6.2.0
|
Generates noise realisations according to Poisson statistics but allowing for scaling. More...
#include "stir/GeneralisedPoissonNoiseGenerator.h"
Public Member Functions | |
GeneralisedPoissonNoiseGenerator (const float scaling_factor=1.0F, const bool preserve_mean=false) | |
Constructor intialises the andom number generator with a fixed seed. | |
void | seed (unsigned int) |
The seed value for the random number generator. | |
float | generate_random (const float mu) |
generate a random number according to a distribution with mean mu | |
template<int num_dimensions, class elemTout , class elemTin > | |
void | generate_random (Array< num_dimensions, elemTout > &array_out, const Array< num_dimensions, elemTin > &array_in) |
void | generate_random (ProjData &output_projdata, const ProjData &input_projdata) |
Generates noise realisations according to Poisson statistics but allowing for scaling.
A scaling_factor
is used to multiply the input data before generating the Poisson random number. This means that a scaling_factor
larger than 1 will result in less noisy data.
If preserve_mean=
, the mean of the output data will be equal to false
,scaling_factor*mean_of_input
, otherwise it will be equal to mean_of_input, but then the output is no longer Poisson distributed.