Isis 3 Developer Reference
ControlNetStatistics.h
Go to the documentation of this file.
1 #ifndef _CONTROLNETSTATISTICS_H_
2 #define _CONTROLNETSTATISTICS_H_
3 
4 #include <QMap>
5 #include <QVector>
6 
7 #include "Progress.h"
8 #include "PvlGroup.h"
9 #include "SerialNumberList.h"
10 #include "Statistics.h"
11 
12 
36 namespace Isis {
37  class ControlNet;
38  class Progress;
39  class PvlGroup;
40 
80  public:
82  ControlNetStatistics(ControlNet *pCNet, const QString &psSerialNumFile, Progress *pProgress = 0);
83 
85  ControlNetStatistics(ControlNet *pCNet, Progress *pProgress = 0);
86 
89 
92  static const int numPointDetails = 6;
93 
97  static const int numPointIntStats = 11;
98 
103  static const int numPointDblStats = 20;
104 
108  static const int numImageStats = 11;
109 
111  void GenerateImageStats();
112 
114  void PrintImageStats(const QString &psImageFile);
115 
117  QVector<double> GetImageStatsBySerialNum(QString psSerialNum) const;
118 
120  void GeneratePointStats(const QString &psPointFile);
121 
123  void GenerateControlNetStats(PvlGroup &pStatsGrp);
124 
126  int NumValidPoints() const {
127  return (*mPointIntStats.find(validPoints));
128  }
129 
131  int NumFixedPoints() const {
132  return (*mPointIntStats.find(fixedPoints));
133  }
134 
136  int NumConstrainedPoints() const {
137  return (*mPointIntStats.find(constrainedPoints));
138  }
139 
141  int NumFreePoints() const {
142  return (*mPointIntStats.find(freePoints));
143  }
144 
146  int NumIgnoredPoints() const {
147  return (*mPointIntStats.find(ignoredPoints));
148  }
149 
151  int NumEditLockedPoints() const {
152  return (*mPointIntStats.find(editLockedPoints));
153  }
154 
156  int NumMeasures() const {
157  return (*mPointIntStats.find(totalMeasures));
158  }
159 
161  int NumValidMeasures() const {
162  return (*mPointIntStats.find(validMeasures));
163  }
164 
166  int NumIgnoredMeasures() const {
167  return (*mPointIntStats.find(ignoredMeasures));
168  }
169 
171  int NumEditLockedMeasures() const {
172  return (*mPointIntStats.find(editLockedMeasures));
173  }
174 
176  double GetAverageResidual() const {
177  return (*mPointDoubleStats.find(avgResidual));
178  }
179 
181  double GetMinimumResidual() const {
182  return (*mPointDoubleStats.find(minResidual));
183  }
184 
186  double GetMaximumResidual() const {
187  return (*mPointDoubleStats.find(maxResidual));
188  }
189 
191  double GetMinLineResidual() const {
192  return (*mPointDoubleStats.find(minLineResidual));
193  }
194 
196  double GetMinSampleResidual() const {
197  return (*mPointDoubleStats.find(minSampleResidual));
198  }
199 
201  double GetMaxLineResidual() const {
202  return (*mPointDoubleStats.find(maxLineResidual));
203  }
204 
206  double GetMaxSampleResidual() const {
207  return (*mPointDoubleStats.find(maxSampleResidual));
208  }
209 
211  double GetMinLineShift() const {
212  return (*mPointDoubleStats.find(minLineShift));
213  }
214 
216  double GetMaxLineShift() const {
217  return (*mPointDoubleStats.find(maxLineShift));
218  }
219 
221  double GetMinSampleShift() const {
222  return (*mPointDoubleStats.find(minSampleShift));
223  }
224 
226  double GetMaxSampleShift() const {
227  return (*mPointDoubleStats.find(maxSampleShift));
228  }
229 
231  double GetMinPixelShift() const {
232  return (*mPointDoubleStats.find(minPixelShift));
233  }
234 
236  double GetMaxPixelShift() const {
237  return (*mPointDoubleStats.find(maxPixelShift));
238  }
239 
241  double GetAvgPixelShift() const {
242  return (*mPointDoubleStats.find(avgPixelShift));
243  }
244 
245  protected:
249 
250  private:
251  QMap<int, int> mPointIntStats;
252  QMap<int, double> mPointDoubleStats;
253  QMap<QString, QVector<double> > mImageMap;
254  QMap<QString, bool> mSerialNumMap;
255 
257  void GetPointIntStats();
258 
260  void GetPointDoubleStats();
261 
262  void UpdateMinMaxStats(const Statistics & stats,
263  ePointDoubleStats min,
264  ePointDoubleStats max);
265 
267  void InitPointDoubleStats();
268 
270  void InitSerialNumMap();
271 
272  int numCNetImages;
273 
274  Statistics mConvexHullStats, mConvexHullRatioStats;
275  };
276 }
277 #endif
Definition: ControlNetStatistics.h:101
int NumValidPoints() const
Returns the Number of Valid (Not Ignored) Points in the Control Net.
Definition: ControlNetStatistics.h:126
Definition: ControlNetStatistics.h:95
ePointDoubleStats
Enumeration for Point stats like Tolerances, PixelShifts which have double data.
Definition: ControlNetStatistics.h:100
Definition: ControlNetStatistics.h:96
void GenerateImageStats()
Generate stats like Total, Ignored, Fixed Points in an Image.
Definition: ControlNetStatistics.cpp:212
int NumMeasures() const
Returns the total Number of Measures in the Control Net.
Definition: ControlNetStatistics.h:156
Definition: ControlNetStatistics.h:101
double GetMinLineShift() const
Get Min and Max LineShift.
Definition: ControlNetStatistics.h:211
int NumFreePoints() const
Returns the number of Constrained Points in Control Net.
Definition: ControlNetStatistics.h:141
void GeneratePointStats(const QString &psPointFile)
Generate stats like Ignored, Fixed, Total Measures, Ignored by Control Point.
Definition: ControlNetStatistics.cpp:385
Definition: ControlNetStatistics.h:101
double GetMinSampleResidual() const
Determine the minimum sample error of all points in the network.
Definition: ControlNetStatistics.h:196
Definition: ControlNetStatistics.h:102
double GetMaxLineResidual() const
Determine the maximum line error of all points in the network.
Definition: ControlNetStatistics.h:201
Definition: ControlNetStatistics.h:95
int NumIgnoredPoints() const
Returns the number of ignored points.
Definition: ControlNetStatistics.h:146
ControlNet * mCNet
Control Network.
Definition: ControlNetStatistics.h:247
Definition: ControlNetStatistics.h:101
double GetMaxSampleResidual() const
Determine the maximum sample error of all points in the network.
Definition: ControlNetStatistics.h:206
Definition: ControlNetStatistics.h:95
ePointDetails
Enumeration for Point Statistics.
Definition: ControlNetStatistics.h:91
Definition: ControlNetStatistics.h:106
double GetMaximumResidual() const
Determine the maximum error of all points in the network.
Definition: ControlNetStatistics.h:186
double GetMinimumResidual() const
Determine the minimum error of all points in the network.
Definition: ControlNetStatistics.h:181
Definition: ControlNetStatistics.h:91
Definition: ControlNetStatistics.h:96
ImageStats
Enumeration for image stats.
Definition: ControlNetStatistics.h:106
Definition: ControlNetStatistics.h:106
Definition: ControlNetStatistics.h:102
Definition: ControlNetStatistics.h:101
QVector< double > GetImageStatsBySerialNum(QString psSerialNum) const
Returns the Image Stats by Serial Number.
Definition: ControlNetStatistics.cpp:371
Definition: ControlNetStatistics.h:91
int NumEditLockedPoints() const
Returns total number of edit locked points.
Definition: ControlNetStatistics.h:151
ePointIntStats
Enumeration for Point int stats for counts such as valid points, measures etc.
Definition: ControlNetStatistics.h:95
Definition: ControlNetStatistics.h:102
Definition: ControlNetStatistics.h:102
int NumValidMeasures() const
Returns the total Number of valid Measures in the Control Net.
Definition: ControlNetStatistics.h:161
double GetMaxPixelShift() const
Get network Max PixelShift.
Definition: ControlNetStatistics.h:236
Definition: ControlNetStatistics.h:91
Definition: ControlNetStatistics.h:96
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:107
Definition: ControlNetStatistics.h:102
Definition: ControlNetStatistics.h:91
Program progress reporter.
Definition: Progress.h:58
static const int numPointDblStats
Definition: ControlNetStatistics.h:103
ControlNetStatistics(ControlNet *pCNet, const QString &psSerialNumFile, Progress *pProgress=0)
Constructor.
Definition: ControlNetStatistics.cpp:44
a control network
Definition: ControlNet.h:271
~ControlNetStatistics()
Destructor.
Definition: ControlNetStatistics.cpp:80
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
int NumIgnoredMeasures() const
Returns the total Number of Ignored Measures in the Control Net.
Definition: ControlNetStatistics.h:166
Definition: ControlNetStatistics.h:100
double GetAverageResidual() const
Determine the average error of all points in the network.
Definition: ControlNetStatistics.h:176
Definition: ControlNetStatistics.h:106
Definition: ControlNetStatistics.h:100
Definition: ControlNetStatistics.h:106
Definition: ControlNetStatistics.h:100
Definition: ControlNetStatistics.h:96
Definition: ControlNetStatistics.h:100
double GetMinPixelShift() const
Get network Min PixelShift.
Definition: ControlNetStatistics.h:231
SerialNumberList mSerialNumList
Serial Number List.
Definition: ControlNetStatistics.h:246
void PrintImageStats(const QString &psImageFile)
Print the Image Stats into specified output file.
Definition: ControlNetStatistics.cpp:315
int NumFixedPoints() const
Returns the Number of Fixed Points in the Control Net.
Definition: ControlNetStatistics.h:131
static const int numPointDetails
Definition: ControlNetStatistics.h:92
Definition: ControlNetStatistics.h:106
Definition: ControlNetStatistics.h:102
Definition: ControlNetStatistics.h:106
Definition: ControlNetStatistics.h:100
int NumConstrainedPoints() const
Returns the number of Constrained Points in Control Net.
Definition: ControlNetStatistics.h:136
double GetMaxSampleShift() const
Get network Max SampleShift.
Definition: ControlNetStatistics.h:226
double GetMinSampleShift() const
Get network Min SampleShift.
Definition: ControlNetStatistics.h:221
Definition: ControlNetStatistics.h:91
Definition: ControlNetStatistics.h:95
Progress * mProgress
Progress state.
Definition: ControlNetStatistics.h:248
double GetMaxLineShift() const
Get network Max LineShift.
Definition: ControlNetStatistics.h:216
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
static const int numImageStats
Definition: ControlNetStatistics.h:108
Definition: ControlNetStatistics.h:95
Definition: ControlNetStatistics.h:107
double GetMinLineResidual() const
Determine the minimum line error of all points in the network.
Definition: ControlNetStatistics.h:191
Definition: ControlNetStatistics.h:101
int NumEditLockedMeasures() const
Returns total number of edit locked measures in the network.
Definition: ControlNetStatistics.h:171
Definition: ControlNetStatistics.h:100
Definition: ControlNetStatistics.h:107
Definition: ControlNetStatistics.h:107
Definition: ControlNetStatistics.h:101
Definition: ControlNetStatistics.h:91
Serial Number list generator.
Definition: SerialNumberList.h:80
double GetAvgPixelShift() const
Get network Avg PixelShift.
Definition: ControlNetStatistics.h:241
Definition: ControlNetStatistics.h:107
Definition: ControlNetStatistics.h:95
void GenerateControlNetStats(PvlGroup &pStatsGrp)
Generate the Control Net Stats into the PvlGroup.
Definition: ControlNetStatistics.cpp:108
Control Network Stats.
Definition: ControlNetStatistics.h:79
Definition: ControlNetStatistics.h:106
Definition: ControlNetStatistics.h:100
static const int numPointIntStats
Definition: ControlNetStatistics.h:97
Definition: ControlNetStatistics.h:95