File failed to load: https://isis.astrogeology.usgs.gov/3.9.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Developer Reference
OverlapNormalization.h
Go to the documentation of this file.
1 #ifndef OverlapNormalization_h
2 #define OverlapNormalization_h
3 
25 #include "Statistics.h"
26 #include "LeastSquares.h"
27 
28 namespace Isis {
29  class BasisFunction;
30 
78  public:
79 
80  OverlapNormalization(std::vector<Statistics *> statsList);
81 
82  virtual ~OverlapNormalization();
83 
91  enum AddStatus {
92 
97 
102 
107  };
108 
109  AddStatus AddOverlap(const Statistics &area1, const unsigned index1,
110  const Statistics &area2, const unsigned index2,
111  double weight = 1.0);
112 
119  inline void AddHold(unsigned holdIndex) {
120  m_idHoldList.push_back(holdIndex);
121  };
122 
128 
133 
138 
143 
152  };
153 
154  void Solve(SolutionType type = Both,
156 
157  double Average(const unsigned index) const;
158  double Gain(const unsigned index) const;
159  double Offset(const unsigned index) const;
160 
161  double Evaluate(double dn, unsigned index) const;
162 
163  private:
164 
168  std::vector<Statistics *> m_statsList;
169 
174  std::vector<int> m_idHoldList;
175 
185  class Overlap {
186  public:
187 
191  Statistics area1;
192 
196  Statistics area2;
197 
202  int index1;
203 
208  int index2;
209  };
210 
214  std::vector<Overlap> m_overlapList;
215 
220  std::vector<double> m_deltas;
221 
225  std::vector<double> m_weights;
226 
227 
231  bool m_solved;
232 
237  SolutionType m_solutionType;
238 
242  std::vector<double> m_gains;
243 
247  std::vector<double> m_offsets;
248 
249 
253  BasisFunction *m_gainFunction;
254 
258  BasisFunction *m_offsetFunction;
259 
263  LeastSquares *m_gainLsq;
264 
268  LeastSquares *m_offsetLsq;
269 
271  OverlapNormalization &operator=(const OverlapNormalization &);
272 
275  };
276 };
277 
278 #endif
AddStatus AddOverlap(const Statistics &area1, const unsigned index1, const Statistics &area2, const unsigned index2, double weight=1.0)
Attempts to add the given overlap data to a collection of valid overlaps, and returns the success or ...
Definition: OverlapNormalization.cpp:106
void Solve(SolutionType type=Both, LeastSquares::SolveMethod method=LeastSquares::QRD)
Attempts to solve the least squares equation for all data sets.
Definition: OverlapNormalization.cpp:163
QR Decomposition.
Definition: LeastSquares.h:129
double Average(const unsigned index) const
Returns the calculated average DN value for the given data set.
Definition: OverlapNormalization.cpp:309
double Evaluate(double dn, unsigned index) const
Returns a new DN from an old using the calculated gains and offsets of the data set the pixel belongs...
Definition: OverlapNormalization.cpp:374
Calculate only the offsets.
Definition: OverlapNormalization.h:137
SolutionType
Enumeration for whether user/programmer wants to calculate new gains, offsets, or both when solving...
Definition: OverlapNormalization.h:127
One or both areas contain no valid average.
Definition: OverlapNormalization.h:106
void AddHold(unsigned holdIndex)
Sets the list of files to be held during the solving process.
Definition: OverlapNormalization.h:119
SolveMethod
Definition: LeastSquares.h:128
OverlapNormalization(std::vector< Statistics *> statsList)
Constructs an OverlapNormalization object.
Definition: OverlapNormalization.cpp:45
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:107
Calculate the bases and multipliers for normalizing overlapping "data sets" (e.g., cubes).
Definition: OverlapNormalization.h:77
virtual ~OverlapNormalization()
Destroys the OverlapNormalization object, frees up pointers.
Definition: OverlapNormalization.cpp:72
Overlap is valid and was added successfully.
Definition: OverlapNormalization.h:96
AddStatus
The result of the attempt to add overlap data to the list of valid overlaps, where Success is a succe...
Definition: OverlapNormalization.h:91
The equation being solved for Gains, Offsets, and Both is output = (input - average) * gain + offset ...
Definition: OverlapNormalization.h:151
double Gain(const unsigned index) const
Returns the calculated gain (multiplier) for the given data set.
Definition: OverlapNormalization.cpp:330
Calculate both gains and offsets.
Definition: OverlapNormalization.h:142
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Data sets do not overlap one another.
Definition: OverlapNormalization.h:101
double Offset(const unsigned index) const
Returns the calculated offset (base) for the given data set.
Definition: OverlapNormalization.cpp:351
Calculate only the gains.
Definition: OverlapNormalization.h:132

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/12/2023 23:25:49