![]() |
|
Converts ODIM encoded data (with markers) to natural values and backwards. More...
#include <DataCoder.h>


Public Member Functions | |
| DataCoder (const ODIM &dataODIM) | |
| Without quality (with impicit quality) | |
| DataCoder (const ODIM &dataODIM, const ODIM &qualityODIM) | |
| DataCoder (const DataCoder &converter) | |
| virtual bool | isDataEncodingSet () const override |
| virtual bool | isQualityEncodingSet () const override |
| virtual double | getNoReadingMarker () const override |
| Returns a marker value which indicates that although data has been measured, it is not within required accuracy or is otherways unreliable. | |
| virtual double | getNoDataMarker () const override |
| NEW, untested... | |
| virtual double | getWeightNoDataMarker () const override |
| NEW, untested... | |
| virtual bool | decode (double &value) const override |
| Converts storage data containing marker codes etc to natural scale. | |
| virtual bool | decode (double &value, double &weight) const override |
| Converts storage data containing marker codes etc to natural scale. | |
| virtual void | encode (double &value, double &weight) const override |
| Converts natural-scale data to storage data containing marker codes etc. | |
| virtual void | encodeWeight (double &weight) const override |
| Converts natural-scale data to storage data, applying marker codes if needed. | |
| virtual void | encodeDiff (double &diff) const override |
| When using unsigned types, encoding typically requires adding a positive bias and scaling the data. | |
| void | init () |
| Creates a naive quality field: data=1.0, undetect/nodata=0.0. | |
Public Member Functions inherited from BeanLike | |
| BeanLike (const BeanLike &b) | |
| BeanLike (const std::string &name, const std::string &description="") | |
| virtual const std::string & | getName () const |
| Return the name of an instance. | |
| virtual const std::string & | getDescription () const |
| Return a brief description. | |
| bool | hasParameters () const |
| template<class F > | |
| F | getParameter (const std::string &p) const |
| Gets a single parameter. | |
| const map_t & | getParameters () const |
| map_t & | getParameters () |
| template<class F > | |
| void | setParametersFromEntries (const F &args) |
| void | setParameters (std::initializer_list< Variable::init_pair_t > args) |
| Grants access to (if above hidden) | |
| virtual void | setParameters (const std::string &p, char assignmentSymbol='=', char separatorSymbol=0) |
| Sets comma-separated parameters in a predetermined order "a,b,c" or by specifing them "b=2". | |
| template<class T > | |
| void | setParameters (const std::map< std::string, T > &args) |
| Set parameters. | |
| template<class T > | |
| void | setParameters (const SmartMap< T > &args) |
| Set parameters. | |
| void | setParameter (const std::string &p, const Castable &value) |
| Sets a single parameter. | |
| template<class T > | |
| void | setParameter (const std::string &p, const VariableT< T > &value) |
| template<class F > | |
| void | setParameter (const std::string &p, const F &value) |
| Sets a single parameter. | |
| template<class F > | |
| void | setParameter (const std::string &p, std::initializer_list< F > value) |
| Sets a single parameter. | |
| BeanLike & | operator= (const BeanLike &b) |
| virtual std::ostream & | toStream (std::ostream &ostr, bool compact=true) const |
Public Member Functions inherited from AccumulationConverter | |
| virtual void | encodeCount (double &weight) const |
| Converts natural-scale data to storage data, applying marker codes if needed. | |
| virtual void | encodeStdDev (double &stdDev) const |
| virtual std::ostream & | toOstr (std::ostream &ostr) const |
Public Attributes | |
| double | defaultQuality |
| If source data has no quality field, this value is applied for (detected) data. | |
| double | undetectValue |
Physical value applied in locations marked with undetect . This should be compatible with the quantity, say DBZH or RHOHV. | |
| bool | SKIP_UNDETECT |
| const ODIM & | dataODIM |
| const ODIM & | qualityODIM |
| ODIM | defaultDataODIM |
| ODIM | defaultQualityODIM |
Public Attributes inherited from AccumulationConverter | |
| std::string | type |
| Default output storage data type. | |
Static Public Attributes | |
| static double | undetectQualityCoeff |
Quality, relative to data quality, applied in locations marked with undetect . | |
Protected Attributes | |
| double | minCodeValue |
In extraction (encoding), values lower than this value will be marked undetect . | |
| double | detectionThreshold |
A physical value greater than undetectValue. In \i encoding, lower values will be marked undetect . See init(). | |
Protected Attributes inherited from BeanLike | |
| const std::string | name |
| const std::string | description |
| map_t | parameters |
Additional Inherited Members | |
Public Types inherited from BeanLike | |
| typedef ReferenceMap | map_t |
Protected Member Functions inherited from BeanLike | |
| virtual void | storeLastArguments (const std::string &p) |
| Called after setParameters() | |
| virtual void | updateBean () const |
| Called after setParameters() | |
Converts ODIM encoded data (with markers) to natural values and backwards.
Converts ODIM encoded data with nodata and undetect markers to natural values and backwards.
Note: typically one instance is used for either decoding or encoding, not both!
|
overridevirtual |
Converts storage data containing marker codes etc to natural scale.
Reimplemented from AccumulationConverter.
|
overridevirtual |
Converts storage data containing marker codes etc to natural scale.
Note: handling undetect is decided outside, ie. if count > 0 but weight = 0. (In that case this function is probably not called.)
Reimplemented from AccumulationConverter.
|
overridevirtual |
Converts natural-scale data to storage data containing marker codes etc.
Does not use weight...
Reimplemented from AccumulationConverter.
|
overridevirtual |
When using unsigned types, encoding typically requires adding a positive bias and scaling the data.
Reimplemented from AccumulationConverter.
|
overridevirtual |
Converts natural-scale data to storage data, applying marker codes if needed.
Reimplemented from AccumulationConverter.
|
inlineoverridevirtual |
NEW, untested...
Implements AccumulationConverter.
|
inlineoverridevirtual |
Returns a marker value which indicates that although data has been measured, it is not within required accuracy or is otherways unreliable.
Implements AccumulationConverter.
|
inlineoverridevirtual |
NEW, untested...
Implements AccumulationConverter.
| void init | ( | ) |
Creates a naive quality field: data=1.0, undetect/nodata=0.0.
Class-specific extension, ie not inherited from base class.
void encodeDataToWeight(double value, double & weight) const;
|
inlineoverridevirtual |
Implements AccumulationConverter.
|
inlineoverridevirtual |
Implements AccumulationConverter.
|
protected |
| double undetectValue |
Physical value applied in locations marked with undetect . This should be compatible with the quantity, say DBZH or RHOHV.
In decoding, if undetectWeight>0, data marked undetect will replaced with this value.
Remember to call init() if dataODIM has been changed.
1.9.8