31 #ifndef ACCUMULATOR_H_
32 #define ACCUMULATOR_H_
34 #include <drain/image/CoordinatePolicy.h>
40 #include "drain/util/Point.h"
41 #include "drain/util/Rectangle.h"
44 #include "AccumulationArray.h"
45 #include "AccumulationMethods.h"
46 #include "AccumulationConverter.h"
109 void setMethod(
const std::string & method);
112 void setMethod(
const std::string & name,
const std::string & params);
124 bool isMethodSet()
const {
134 AccumulationMethod & getMethod() {
147 void add(
const size_t i,
double value,
double weight) {
153 void add(
const size_t i,
double value,
double weight,
unsigned int count) {
198 std::ostream & toStream(std::ostream & ostr)
const;
235 std::ostream & operator<<(std::ostream &ostr,
const Accumulator & accumulator){
236 return accumulator.Accumulator::toStream(ostr);
virtual const std::string & getName() const
Return the name of an instance.
Definition: BeanLike.h:69
void getValues(std::ostream &ostr) const
Dumps the values.
Definition: SmartMap.h:353
General-purpose image compositing.
Definition: AccumulationArray.h:112
virtual void setGeometry(size_t width, size_t height)
Changes the geometry of all the layers.
Definition: AccumulationArray.cpp:47
Function for accumulating data: maximum, average, weighted average etc.
Definition: AccumulationMethods.h:64
virtual void add(AccumulationArray &accArray, const size_t i, double value, double weight) const
Adds a weighted value to the accumulation array.
Definition: AccumulationMethods.h:91
Definition: Accumulator.h:76
void setMethod(const AccumulationMethod &method)
Copies the method and its parameters.
Definition: Accumulator.h:119
void add(const size_t i, double value, double weight, unsigned int count)
Adds decoded data that applies natural scaling.
Definition: Accumulator.h:153
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.
Definition: Accumulator.cpp:209
void setMethod(const std::string &method)
Set method to some of the predefined methods.
Definition: Accumulator.cpp:104
Accumulator()
Definition: Accumulator.h:83
void add(const size_t i, double value, double weight)
Adds decoded data that applies natural scaling.
Definition: Accumulator.h:147
AccumulationArray accArray
Todo: export.
Definition: Accumulator.h:80
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.
Definition: Accumulator.cpp:122
AccumulationMethod undefinedMethod
A Some predefined methods, that can be set with setMethod(const std::string & key).
Definition: Accumulator.h:207
Class for multi-channel digital images. Supports dynamic typing with base types (char,...
Definition: Image.h:184
Definition: DataSelector.cpp:1277
Rectange defined through lower left and upper right coordinates.
Definition: Rectangle.h:65
Converts raw data to values appropriate for accumulation.
Definition: AccumulationConverter.h:50