1#ifndef ZeroBufferSmooth_h
2#define ZeroBufferSmooth_h
20#include "HiCalTypes.h"
24#include "SplineFill.h"
25#include "LowPassFilter.h"
26#include "Statistics.h"
27#include "SpecialPixel.h"
28#include "IException.h"
53 class ZeroBufferSmooth :
public Module {
57 ZeroBufferSmooth() : Module(
"ZeroBufferSmooth") { }
68 Module(
"ZeroBufferSmooth") {
102 int samp0 =
toInt(
ConfKey(prof,
"ZeroBufferSmoothFirstSample",QString(
"0")));
103 int sampN =
toInt(
ConfKey(prof,
"ZeroBufferSmoothLastSample",QString(
"11")));
109 toInt(
ConfKey(prof,
"ZeroBufferSmoothFilterWidth",QString(
"201"))),
110 toInt(
ConfKey(prof,
"ZeroBufferSmoothFilterIterations",QString(
"2"))));
118 for (
int i = 0 ; i <
_data.dim() ; i++ ) {
121 _stats.AddData(
_data[i] - _buffer[i]);
125 "],StdDev["+
ToString(_stats.StandardDeviation())+
"])");
137 o <<
"# History = " <<
_history << std::endl;
140 << std::setw(
_fmtWidth+1) <<
"Filtered\n";
142 for (
int i = 0 ; i <
_data.dim() ; i++) {
53 class ZeroBufferSmooth :
public Module {
…};
A DbProfile is a container for access parameters to a database.
QString Name() const
Returns the name of this property.
Container for HiRISE calibration data.
Compute a low pass filter from a Module class content.
HiVector _data
Data vector.
HiHistory _history
Hierarchial component history.
const HiVector & ref() const
Return data via a const reference.
int _fmtWidth
Default field with of double.
const HiHistory & History() const
Return recorded history of events.
QString formatDbl(const double &value) const
Properly format values that could be special pixels.
Compute a low pass filter from a Module class content.
This class is used to accumulate statistics on double arrays.
virtual ~ZeroBufferSmooth()
Destructor.
const Statistics & Stats() const
Return statistics for filtered - raw Buffer.
virtual void printOn(std::ostream &o) const
Virtualized parameter reporting method.
ZeroBufferSmooth(HiCalData &cal, const HiCalConf &conf)
Construct with data parameters.
void init(HiCalData &cal, const HiCalConf &conf)
Workhorse of the zero buffer computation.
This is free and unencumbered software released into the public domain.
int toInt(const QString &string)
Global function to convert from a string to an integer.
HiVector averageSamples(const HiMatrix &m, int ssamp=0, int esamp=-1)
Reduces by averaging specified samples from a buffer.
T ConfKey(const DbProfile &conf, const QString &keyname, const T &defval, int index=0)
Find a keyword in a profile using default for non-existant keywords.
bool IsSpecial(const double d)
Returns if the input pixel is special.
TNT::Array1D< double > HiVector
1-D Buffer
QString ToString(const T &value)
Helper function to convert values to strings.