|
#include <Accumulator.h>
Public Member Functions | |
Accumulator () | |
Accumulator (const Accumulator &acc) | |
void | setMethod (const std::string &method) |
Set method to some of the predefined methods. | |
void | setMethod (const std::string &name, const std::string ¶ms) |
Set method to some of the predefined methods. | |
void | setMethod (const AccumulationMethod &method) |
Copies the method and its parameters. More... | |
bool | isMethodSet () const |
const AccumulationMethod & | getMethod () const |
AccumulationMethod & | getMethod () |
void | add (const size_t i, double value, double weight) |
Adds decoded data that applies natural scaling. | |
void | add (const size_t i, double value, double weight, unsigned int count) |
Adds decoded data that applies natural scaling. | |
void | addData (const Image &src, const AccumulationConverter &converter, double weight=1.0, int iOffset=0, int jOffset=0) |
Add (accumulate) data with given prior weight. More... | |
void | addData (const Image &src, const Image &srcQuality, const AccumulationConverter &converter, double weight=1.0, int iOffset=0, int jOffset=0) |
Add (accumulate) data weighted with input quality. More... | |
void | addData (const Image &src, const Image &srcQuality, const Image &srcCount, const AccumulationConverter &converter) |
Add (accumulate) data weighted with input quality and count; each data(i,j) contributes count(i,j) times. More... | |
void | extractField (char field, const AccumulationConverter &converter, Image &dst, const drain::Rectangle< int > &crop) const |
Extracts the accumulated quantity or secondary quantities like weight and standard deviation. More... | |
virtual std::ostream & | toStream (std::ostream &ostr) const |
Public Attributes | |
AccumulationArray | accArray |
Todo: export. | |
Protected Member Functions | |
void | initDst (const AccumulationConverter &coder, Image &dst, drain::Rectangle< int > &cropArea) const |
Protected Attributes | |
AccumulationMethod | undefinedMethod |
A Some predefined methods, that can be set with setMethod(const std::string & key). | |
AccumulationMethod * | methodPtr |
Accumulator contains five built-in accumulation methods (principles):
|
inline |
TODO: a static map?
void addData | ( | const Image & | src, |
const AccumulationConverter & | converter, | ||
double | weight = 1.0 , |
||
int | iOffset = 0 , |
||
int | jOffset = 0 |
||
) |
Add (accumulate) data with given prior weight.
src | - input data |
void addData | ( | const Image & | src, |
const Image & | srcQuality, | ||
const AccumulationConverter & | converter, | ||
double | weight = 1.0 , |
||
int | iOffset = 0 , |
||
int | jOffset = 0 |
||
) |
Add (accumulate) data weighted with input quality.
src | - input data |
srcQuality | - quality field of input data |
void addData | ( | const Image & | src, |
const Image & | srcQuality, | ||
const Image & | srcCount, | ||
const AccumulationConverter & | converter | ||
) |
Add (accumulate) data weighted with input quality and count; each data(i,j) contributes count(i,j) times.
src | - input data |
srcQuality | - quality field of input data |
srcCount | - counts of input data (makes difference in resulting weights) |
Count is bypassed when necessary; for example, when the accumulation method is MAXIMUM.
void extractField | ( | char | field, |
const AccumulationConverter & | converter, | ||
Image & | dst, | ||
const drain::Rectangle< int > & | crop | ||
) | const |
Extracts the accumulated quantity or secondary quantities like weight and standard deviation.
field | - data layer to be extracted
|
|
inline |
Copies the method and its parameters.
That is, does not copy the target (accumulator &). This limits to those already registered in AccMethodBank.