USGS

Isis 3.0 Developer's Reference (API)

Home

ControlNetStatistics.h
Go to the documentation of this file.
1 #ifndef _CONTROLNETSTATISTICS_H_
2 #define _CONTROLNETSTATISTICS_H_
3 
4 #include <map>
5 #include <iostream>
6 #include <vector>
7 #include "Progress.h"
8 #include "PvlGroup.h"
9 #include "SerialNumberList.h"
10 #include "Statistics.h"
11 
35 namespace Isis {
36  class ControlNet;
37  class ControlCubeGraphNode;
38  class Progress;
39  class PvlGroup;
40 
75  public:
77  ControlNetStatistics(ControlNet *pCNet, const QString &psSerialNumFile, Progress *pProgress = 0);
78 
80  ControlNetStatistics(ControlNet *pCNet, Progress *pProgress = 0);
81 
84 
87  static const int numPointDetails = 6;
88 
92  static const int numPointIntStats = 11;
93 
98  static const int numPointDblStats = 20;
99 
103  static const int numImageStats = 11;
104 
106  void GenerateImageStats();
107 
109  void PrintImageStats(const QString &psImageFile);
110 
112  std::vector<double> GetImageStatsBySerialNum(QString psSerialNum) const;
113 
115  void GeneratePointStats(const QString &psPointFile);
116 
118  void GenerateControlNetStats(PvlGroup &pStatsGrp);
119 
121  int NumValidPoints() const {
122  return (*mPointIntStats.find(validPoints)).second;
123  }
124 
126  int NumFixedPoints() const {
127  return (*mPointIntStats.find(fixedPoints)).second;
128  }
129 
131  int NumConstrainedPoints() const {
132  return (*mPointIntStats.find(constrainedPoints)).second;
133  }
134 
136  int NumFreePoints() const {
137  return (*mPointIntStats.find(freePoints)).second;
138  }
139 
141  int NumIgnoredPoints() const {
142  return (*mPointIntStats.find(ignoredPoints)).second;
143  }
144 
146  int NumEditLockedPoints() const {
147  return (*mPointIntStats.find(editLockedPoints)).second;
148  }
149 
151  int NumMeasures() const {
152  return (*mPointIntStats.find(totalMeasures)).second;
153  }
154 
156  int NumValidMeasures() const {
157  return (*mPointIntStats.find(validMeasures)).second;
158  }
159 
161  int NumIgnoredMeasures() const {
162  return (*mPointIntStats.find(ignoredMeasures)).second;
163  }
164 
166  int NumEditLockedMeasures() const {
167  return (*mPointIntStats.find(editLockedMeasures)).second;
168  }
169 
171  double GetAverageResidual() const {
172  return (*mPointDoubleStats.find(avgResidual)).second;
173  }
174 
176  double GetMinimumResidual() const {
177  return (*mPointDoubleStats.find(minResidual)).second;
178  }
179 
181  double GetMaximumResidual() const {
182  return (*mPointDoubleStats.find(maxResidual)).second;
183  }
184 
186  double GetMinLineResidual() const {
187  return (*mPointDoubleStats.find(minLineResidual)).second;
188  }
189 
191  double GetMinSampleResidual() const {
192  return (*mPointDoubleStats.find(minSampleResidual)).second;
193  }
194 
196  double GetMaxLineResidual() const {
197  return (*mPointDoubleStats.find(maxLineResidual)).second;
198  }
199 
201  double GetMaxSampleResidual() const {
202  return (*mPointDoubleStats.find(maxSampleResidual)).second;
203  }
204 
206  double GetMinLineShift() const {
207  return (*mPointDoubleStats.find(minLineShift)).second;
208  }
209 
211  double GetMaxLineShift() const {
212  return (*mPointDoubleStats.find(maxLineShift)).second;
213  }
214 
216  double GetMinSampleShift() const {
217  return (*mPointDoubleStats.find(minSampleShift)).second;
218  }
219 
221  double GetMaxSampleShift() const {
222  return (*mPointDoubleStats.find(maxSampleShift)).second;
223  }
224 
226  double GetMinPixelShift() const {
227  return (*mPointDoubleStats.find(minPixelShift)).second;
228  }
229 
231  double GetMaxPixelShift() const {
232  return (*mPointDoubleStats.find(maxPixelShift)).second;
233  }
234 
236  double GetAvgPixelShift() const {
237  return (*mPointDoubleStats.find(avgPixelShift)).second;
238  }
239 
240  protected:
245 
246  private:
247  std::map<int, int> mPointIntStats;
248  std::map<int, double> mPointDoubleStats;
249  std::map<QString, std::vector<double> > mImageMap;
250  std::map<QString, bool> mSerialNumMap;
251 
253  void GetPointIntStats();
254 
256  void GetPointDoubleStats();
257 
258  void UpdateMinMaxStats(const Statistics & stats,
259  ePointDoubleStats min,
260  ePointDoubleStats max);
261 
263  void InitPointDoubleStats();
264 
266  void InitSerialNumMap();
267 
268  int numCNetImages;
269 
270  Statistics mConvexHullStats, mConvexHullRatioStats;
271  };
272 }
273 #endif