Isis Developer Reference
ControlNetStatistics.h
Go to the documentation of this file.
1#ifndef _CONTROLNETSTATISTICS_H_
2#define _CONTROLNETSTATISTICS_H_
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QMap>
13#include <QVector>
14
15#include "Progress.h"
16#include "PvlGroup.h"
17#include "SerialNumberList.h"
18#include "Statistics.h"
19
20namespace Isis {
21 class ControlNet;
22 class Progress;
23 class PvlGroup;
24
64 public:
66 ControlNetStatistics(ControlNet *pCNet, const QString &psSerialNumFile, Progress *pProgress = 0);
67
69 ControlNetStatistics(ControlNet *pCNet, Progress *pProgress = 0);
70
73
76 static const int numPointDetails = 6;
77
81 static const int numPointIntStats = 11;
82
87 static const int numPointDblStats = 20;
88
92 static const int numImageStats = 11;
93
95 void GenerateImageStats();
96
98 void PrintImageStats(const QString &psImageFile);
99
101 QVector<double> GetImageStatsBySerialNum(QString psSerialNum) const;
102
104 void GeneratePointStats(const QString &psPointFile);
105
107 void GenerateControlNetStats(PvlGroup &pStatsGrp);
108
110 int NumValidPoints() const {
111 return (*mPointIntStats.find(validPoints));
112 }
113
115 int NumFixedPoints() const {
116 return (*mPointIntStats.find(fixedPoints));
117 }
118
121 return (*mPointIntStats.find(constrainedPoints));
122 }
123
125 int NumFreePoints() const {
126 return (*mPointIntStats.find(freePoints));
127 }
128
130 int NumIgnoredPoints() const {
131 return (*mPointIntStats.find(ignoredPoints));
132 }
133
136 return (*mPointIntStats.find(editLockedPoints));
137 }
138
140 int NumMeasures() const {
141 return (*mPointIntStats.find(totalMeasures));
142 }
143
145 int NumValidMeasures() const {
146 return (*mPointIntStats.find(validMeasures));
147 }
148
150 int NumIgnoredMeasures() const {
151 return (*mPointIntStats.find(ignoredMeasures));
152 }
153
156 return (*mPointIntStats.find(editLockedMeasures));
157 }
158
160 double GetAverageResidual() const {
161 return (*mPointDoubleStats.find(avgResidual));
162 }
163
165 double GetMinimumResidual() const {
166 return (*mPointDoubleStats.find(minResidual));
167 }
168
170 double GetMaximumResidual() const {
171 return (*mPointDoubleStats.find(maxResidual));
172 }
173
175 double GetMinLineResidual() const {
176 return (*mPointDoubleStats.find(minLineResidual));
177 }
178
180 double GetMinSampleResidual() const {
181 return (*mPointDoubleStats.find(minSampleResidual));
182 }
183
185 double GetMaxLineResidual() const {
186 return (*mPointDoubleStats.find(maxLineResidual));
187 }
188
190 double GetMaxSampleResidual() const {
191 return (*mPointDoubleStats.find(maxSampleResidual));
192 }
193
195 double GetMinLineShift() const {
196 return (*mPointDoubleStats.find(minLineShift));
197 }
198
200 double GetMaxLineShift() const {
201 return (*mPointDoubleStats.find(maxLineShift));
202 }
203
205 double GetMinSampleShift() const {
206 return (*mPointDoubleStats.find(minSampleShift));
207 }
208
210 double GetMaxSampleShift() const {
211 return (*mPointDoubleStats.find(maxSampleShift));
212 }
213
215 double GetMinPixelShift() const {
216 return (*mPointDoubleStats.find(minPixelShift));
217 }
218
220 double GetMaxPixelShift() const {
221 return (*mPointDoubleStats.find(maxPixelShift));
222 }
223
225 double GetAvgPixelShift() const {
226 return (*mPointDoubleStats.find(avgPixelShift));
227 }
228
229 protected:
233
234 private:
235 QMap<int, int> mPointIntStats;
236 QMap<int, double> mPointDoubleStats;
237 QMap<QString, QVector<double> > mImageMap;
238 QMap<QString, bool> mSerialNumMap;
239
241 void GetPointIntStats();
242
244 void GetPointDoubleStats();
245
246 void UpdateMinMaxStats(const Statistics & stats,
249
251 void InitPointDoubleStats();
252
254 void InitSerialNumMap();
255
256 int numCNetImages;
257
258 Statistics mConvexHullStats, mConvexHullRatioStats;
259 };
260}
261#endif
a control network
Definition ControlNet.h:258
Control Network Stats.
Definition ControlNetStatistics.h:63
ePointDoubleStats
Enumeration for Point stats like Tolerances, PixelShifts which have double data.
Definition ControlNetStatistics.h:84
@ maxPixelZScore
Definition ControlNetStatistics.h:86
@ minSampleShift
Definition ControlNetStatistics.h:85
@ maxEccentricity
Definition ControlNetStatistics.h:86
@ minLineResidual
Definition ControlNetStatistics.h:84
@ maxSampleResidual
Definition ControlNetStatistics.h:84
@ maxGFit
Definition ControlNetStatistics.h:86
@ minResidual
Definition ControlNetStatistics.h:84
@ maxLineResidual
Definition ControlNetStatistics.h:84
@ minPixelShift
Definition ControlNetStatistics.h:85
@ minSampleResidual
Definition ControlNetStatistics.h:84
@ maxSampleShift
Definition ControlNetStatistics.h:85
@ maxLineShift
Definition ControlNetStatistics.h:85
@ minLineShift
Definition ControlNetStatistics.h:85
@ maxPixelShift
Definition ControlNetStatistics.h:85
@ minEccentricity
Definition ControlNetStatistics.h:86
@ minPixelZScore
Definition ControlNetStatistics.h:86
@ avgResidual
Definition ControlNetStatistics.h:84
@ avgPixelShift
Definition ControlNetStatistics.h:85
@ maxResidual
Definition ControlNetStatistics.h:84
@ minGFit
Definition ControlNetStatistics.h:86
ControlNet * mCNet
Control Network.
Definition ControlNetStatistics.h:231
int NumFixedPoints() const
Returns the Number of Fixed Points in the Control Net.
Definition ControlNetStatistics.h:115
int NumValidPoints() const
Returns the Number of Valid (Not Ignored) Points in the Control Net.
Definition ControlNetStatistics.h:110
double GetMinLineShift() const
Get Min and Max LineShift.
Definition ControlNetStatistics.h:195
double GetMinimumResidual() const
Determine the minimum error of all points in the network.
Definition ControlNetStatistics.h:165
double GetMaximumResidual() const
Determine the maximum error of all points in the network.
Definition ControlNetStatistics.h:170
int NumFreePoints() const
Returns the number of Constrained Points in Control Net.
Definition ControlNetStatistics.h:125
int NumIgnoredPoints() const
Returns the number of ignored points.
Definition ControlNetStatistics.h:130
QVector< double > GetImageStatsBySerialNum(QString psSerialNum) const
Returns the Image Stats by Serial Number.
Definition ControlNetStatistics.cpp:374
ePointDetails
Enumeration for Point Statistics.
Definition ControlNetStatistics.h:75
@ constrained
Definition ControlNetStatistics.h:75
@ total
Definition ControlNetStatistics.h:75
@ freed
Definition ControlNetStatistics.h:75
@ locked
Definition ControlNetStatistics.h:75
@ fixed
Definition ControlNetStatistics.h:75
@ ignore
Definition ControlNetStatistics.h:75
static const int numPointIntStats
Definition ControlNetStatistics.h:81
int NumValidMeasures() const
Returns the total Number of valid Measures in the Control Net.
Definition ControlNetStatistics.h:145
int NumEditLockedMeasures() const
Returns total number of edit locked measures in the network.
Definition ControlNetStatistics.h:155
double GetAvgPixelShift() const
Get network Avg PixelShift.
Definition ControlNetStatistics.h:225
void PrintImageStats(const QString &psImageFile)
Print the Image Stats into specified output file.
Definition ControlNetStatistics.cpp:318
double GetMinSampleResidual() const
Determine the minimum sample error of all points in the network.
Definition ControlNetStatistics.h:180
int NumIgnoredMeasures() const
Returns the total Number of Ignored Measures in the Control Net.
Definition ControlNetStatistics.h:150
static const int numImageStats
Definition ControlNetStatistics.h:92
ImageStats
Enumeration for image stats.
Definition ControlNetStatistics.h:90
@ imgTotalPoints
Definition ControlNetStatistics.h:90
@ imgLockedPoints
Definition ControlNetStatistics.h:90
@ imgConstrainedPoints
Definition ControlNetStatistics.h:91
@ imgFreePoints
Definition ControlNetStatistics.h:91
@ imgLocked
Definition ControlNetStatistics.h:90
@ imgFixedPoints
Definition ControlNetStatistics.h:90
@ imgIgnoredPoints
Definition ControlNetStatistics.h:90
@ imgConvexHullRatio
Definition ControlNetStatistics.h:91
@ imgConvexHullArea
Definition ControlNetStatistics.h:91
@ imgLines
Definition ControlNetStatistics.h:90
@ imgSamples
Definition ControlNetStatistics.h:90
double GetMaxLineResidual() const
Determine the maximum line error of all points in the network.
Definition ControlNetStatistics.h:185
static const int numPointDblStats
Definition ControlNetStatistics.h:87
double GetMaxLineShift() const
Get network Max LineShift.
Definition ControlNetStatistics.h:200
double GetMaxSampleResidual() const
Determine the maximum sample error of all points in the network.
Definition ControlNetStatistics.h:190
void GenerateControlNetStats(PvlGroup &pStatsGrp)
Generate the Control Net Stats into the PvlGroup.
Definition ControlNetStatistics.cpp:115
double GetMinPixelShift() const
Get network Min PixelShift.
Definition ControlNetStatistics.h:215
double GetMaxSampleShift() const
Get network Max SampleShift.
Definition ControlNetStatistics.h:210
int NumConstrainedPoints() const
Returns the number of Constrained Points in Control Net.
Definition ControlNetStatistics.h:120
void GenerateImageStats()
Generate stats like Total, Ignored, Fixed Points in an Image.
Definition ControlNetStatistics.cpp:219
int NumEditLockedPoints() const
Returns total number of edit locked points.
Definition ControlNetStatistics.h:135
static const int numPointDetails
Definition ControlNetStatistics.h:76
SerialNumberList mSerialNumList
Serial Number List.
Definition ControlNetStatistics.h:230
void GeneratePointStats(const QString &psPointFile)
Generate stats like Ignored, Fixed, Total Measures, Ignored by Control Point.
Definition ControlNetStatistics.cpp:388
Progress * mProgress
Progress state.
Definition ControlNetStatistics.h:232
ePointIntStats
Enumeration for Point int stats for counts such as valid points, measures etc.
Definition ControlNetStatistics.h:79
@ constrainedPoints
Definition ControlNetStatistics.h:79
@ freePoints
Definition ControlNetStatistics.h:79
@ fixedPoints
Definition ControlNetStatistics.h:79
@ totalPoints
Definition ControlNetStatistics.h:79
@ editLockedMeasures
Definition ControlNetStatistics.h:80
@ validMeasures
Definition ControlNetStatistics.h:80
@ ignoredMeasures
Definition ControlNetStatistics.h:80
@ ignoredPoints
Definition ControlNetStatistics.h:79
@ editLockedPoints
Definition ControlNetStatistics.h:79
@ validPoints
Definition ControlNetStatistics.h:79
@ totalMeasures
Definition ControlNetStatistics.h:80
double GetAverageResidual() const
Determine the average error of all points in the network.
Definition ControlNetStatistics.h:160
int NumMeasures() const
Returns the total Number of Measures in the Control Net.
Definition ControlNetStatistics.h:140
double GetMaxPixelShift() const
Get network Max PixelShift.
Definition ControlNetStatistics.h:220
double GetMinSampleShift() const
Get network Min SampleShift.
Definition ControlNetStatistics.h:205
double GetMinLineResidual() const
Determine the minimum line error of all points in the network.
Definition ControlNetStatistics.h:175
~ControlNetStatistics()
Destructor.
Definition ControlNetStatistics.cpp:87
ControlNetStatistics(ControlNet *pCNet, const QString &psSerialNumFile, Progress *pProgress=0)
Constructor.
Definition ControlNetStatistics.cpp:51
Program progress reporter.
Definition Progress.h:42
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Serial Number list generator.
Definition SerialNumberList.h:64
This class is used to accumulate statistics on double arrays.
Definition Statistics.h:93
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16