Isis 3 Programmer Reference
ControlNetStatistics.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "ControlNetStatistics.h"
10 
11 #include <QDebug>
12 
13 #include <geos_c.h>
14 #include <geos/algorithm/ConvexHull.h>
15 #include <geos/geom/CoordinateSequence.h>
16 #include <geos/geom/CoordinateArraySequence.h>
17 #include <geos/geom/Envelope.h>
18 #include <geos/geom/Geometry.h>
19 #include <geos/geom/GeometryFactory.h>
20 #include <geos/geom/Polygon.h>
21 
22 #include "ControlNet.h"
23 #include "ControlPoint.h"
24 #include "ControlMeasure.h"
25 #include "ControlMeasureLogData.h"
26 #include "Cube.h"
27 #include "CubeManager.h"
28 #include "FileName.h"
29 #include "IString.h"
30 #include "Progress.h"
31 #include "Pvl.h"
32 #include "SpecialPixel.h"
33 #include "Statistics.h"
34 
35 namespace Isis {
36 
38  QString sPointType [] = { "Fixed", "Constrained", "Free" };
39 
41  QString sBoolean[] = { "False", "True" };
42 
52  ControlNetStatistics::ControlNetStatistics(ControlNet *pCNet, const QString &psSerialNumFile,
53  Progress *pProgress) {
54  numCNetImages = 0;
55  mCNet = pCNet;
56 
57  mSerialNumList = SerialNumberList(psSerialNumFile);
59 
60  mProgress = pProgress;
61 
65  }
66 
76  mCNet = pCNet;
77  mProgress = pProgress;
78 
81  }
82 
89  mCNet = NULL;
90  }
91 
98  int numSn = mSerialNumList.size();
99  numCNetImages = 0;
100  for (int i=0; i<numSn; i++) {
101  QString sn = mSerialNumList.serialNumber(i);
102  mSerialNumMap[sn] = false;
103  }
104  }
105 
117  pStatsGrp = PvlGroup("ControlNetSummary");
118  int numSN = mSerialNumList.size();
119 
120  if (numSN) {
121  pStatsGrp += PvlKeyword("TotalImages", toString(numSN));
122  pStatsGrp += PvlKeyword("ImagesInControlNet", toString(numCNetImages));
123  }
124 
125  pStatsGrp += PvlKeyword("TotalPoints", toString(mCNet->GetNumPoints()));
126  pStatsGrp += PvlKeyword("ValidPoints", toString(NumValidPoints()));
127  pStatsGrp += PvlKeyword("IgnoredPoints", toString(mCNet->GetNumPoints() - NumValidPoints()));
128  pStatsGrp += PvlKeyword("FixedPoints", toString(NumFixedPoints()));
129  pStatsGrp += PvlKeyword("ConstrainedPoints", toString(NumConstrainedPoints()));
130  pStatsGrp += PvlKeyword("FreePoints", toString(NumFreePoints()));
131  pStatsGrp += PvlKeyword("EditLockPoints", toString(mCNet->GetNumEditLockPoints()));
132 
133  pStatsGrp += PvlKeyword("TotalMeasures", toString(NumMeasures()));
134  pStatsGrp += PvlKeyword("ValidMeasures", toString(NumValidMeasures()));
135  pStatsGrp += PvlKeyword("IgnoredMeasures", toString(NumIgnoredMeasures()));
136  pStatsGrp += PvlKeyword("EditLockMeasures", toString(mCNet->GetNumEditLockMeasures()));
137 
138  double dValue = GetAverageResidual();
139  pStatsGrp += PvlKeyword("AvgResidual", (dValue == Null ? "Null" : toString(dValue)));
140 
141  dValue = GetMinimumResidual();
142  pStatsGrp += PvlKeyword("MinResidual", (dValue == Null ? "Null" : toString(dValue)));
143 
144  dValue = GetMaximumResidual();
145  pStatsGrp += PvlKeyword("MaxResidual", (dValue == Null ? "Null" : toString(dValue)));
146 
147  dValue = GetMinLineResidual();
148  pStatsGrp += PvlKeyword("MinLineResidual", (dValue == Null ? "Null" : toString(dValue)));
149 
150  dValue = GetMaxLineResidual();
151  pStatsGrp += PvlKeyword("MaxLineResidual", (dValue == Null ? "Null" : toString(dValue)));
152 
153  dValue = GetMinSampleResidual();
154  pStatsGrp += PvlKeyword("MinSampleResidual", (dValue == Null ? "Null" : toString(dValue)));
155 
156  dValue = GetMaxSampleResidual();
157  pStatsGrp += PvlKeyword("MaxSampleResidual", (dValue == Null ? "Null" : toString(dValue)));
158 
159  // Shifts - Line, Sample, Pixel
160  dValue = GetMinLineShift();
161  pStatsGrp += PvlKeyword("MinLineShift", (dValue == Null ? "Null" : toString(dValue)));
162 
163  dValue = GetMaxLineShift();
164  pStatsGrp += PvlKeyword("MaxLineShift", (dValue == Null ? "Null" : toString(dValue)));
165 
166  dValue = GetMinSampleShift();
167  pStatsGrp += PvlKeyword("MinSampleShift", (dValue == Null ? "Null" : toString(dValue)));
168 
169  dValue = GetMaxSampleShift();
170  pStatsGrp += PvlKeyword("MaxSampleShift", (dValue == Null ? "Null" : toString(dValue)));
171 
172  dValue = GetAvgPixelShift();
173  pStatsGrp += PvlKeyword("AvgPixelShift", (dValue == Null ? "NA" : toString(dValue)));
174 
175  dValue = GetMinPixelShift();
176  pStatsGrp += PvlKeyword("MinPixelShift", (dValue == Null ? "NA" : toString(dValue)));
177 
178  dValue = GetMaxPixelShift();
179  pStatsGrp += PvlKeyword("MaxPixelShift", (dValue == Null ? "NA" : toString(dValue)));
180 
181  dValue = mPointDoubleStats[minGFit];
182  pStatsGrp += PvlKeyword("MinGoodnessOfFit", (dValue == Null ? "NA" : toString(dValue)));
183 
184  dValue = mPointDoubleStats[maxGFit];
185  pStatsGrp += PvlKeyword("MaxGoodnessOfFit", (dValue == Null ? "NA" : toString(dValue)));
186 
187  dValue = mPointDoubleStats[minEccentricity];
188  pStatsGrp += PvlKeyword("MinEccentricity", (dValue == Null ? "NA" : toString(dValue)));
189 
190  dValue = mPointDoubleStats[maxEccentricity];
191  pStatsGrp += PvlKeyword("MaxEccentricity", (dValue == Null ? "NA" : toString(dValue)));
192 
193  dValue = mPointDoubleStats[minPixelZScore];
194  pStatsGrp += PvlKeyword("MinPixelZScore", (dValue == Null ? "NA" : toString(dValue)));
195 
196  dValue = mPointDoubleStats[maxPixelZScore];
197  pStatsGrp += PvlKeyword("MaxPixelZScore", (dValue == Null ? "NA" : toString(dValue)));
198 
199  // Convex Hull
200  if (mSerialNumList.size()) {
201  dValue = mConvexHullRatioStats.Minimum();
202  pStatsGrp += PvlKeyword("MinConvexHullRatio", (dValue == Null ? "Null" : toString(dValue)));
203 
204  dValue = mConvexHullRatioStats.Maximum();
205  pStatsGrp += PvlKeyword("MaxConvexHullRatio", (dValue == Null ? "Null" : toString(dValue)));
206 
207  dValue = mConvexHullRatioStats.Average();
208  pStatsGrp += PvlKeyword("AvgConvexHullRatio", (dValue == Null ? "Null" : toString(dValue)));
209  }
210  }
211 
212 
221  geos::geom::GeometryFactory::Ptr geosFactory = geos::geom::GeometryFactory::create();
222 
223  CubeManager cubeMgr;
224  cubeMgr.SetNumOpenCubes(50);
225 
226  QList<QString> cnetSerials = mCNet->GetCubeSerials();
227 
228  if (mProgress != NULL) {
229  mProgress->SetText("Generating Image Stats.....");
230  mProgress->SetMaximumSteps(cnetSerials.size());
232  }
233 
234  foreach (QString sn, cnetSerials) {
235  geos::geom::CoordinateSequence * ptCoordinates =
236  new geos::geom::CoordinateArraySequence();
237 
238  // setup vector for number of image properties and init to 0
239  QVector<double> imgStats(numImageStats, 0);
240 
241  // Open the cube to get the dimensions
242  Cube *cube = cubeMgr.OpenCube(mSerialNumList.fileName(sn));
243 
244  mSerialNumMap[sn] = true;
245  numCNetImages++;
246 
247  imgStats[imgSamples] = cube->sampleCount();
248  imgStats[imgLines] = cube->lineCount();
249  double cubeArea = imgStats[imgSamples] * imgStats[imgLines];
250 
252 
253  // Populate pts with a list of control points
254  if (!measures.isEmpty()) {
255  foreach (ControlMeasure * measure, measures) {
256  ControlPoint *parentPoint = measure->Parent();
257  imgStats[imgTotalPoints]++;
258  if (parentPoint->IsIgnored()) {
259  imgStats[imgIgnoredPoints]++;
260  }
261  if (parentPoint->GetType() == ControlPoint::Fixed) {
262  imgStats[imgFixedPoints]++;
263  }
264  if (parentPoint->GetType() == ControlPoint::Constrained) {
265  imgStats[imgConstrainedPoints]++;
266  }
267  if (parentPoint->GetType() == ControlPoint::Free) {
268  imgStats[imgFreePoints]++;
269  }
270  if (parentPoint->IsEditLocked()) {
271  imgStats[imgLockedPoints]++;
272  }
273  if (measure->IsEditLocked()) {
274  imgStats[imgLocked]++;
275  }
276  ptCoordinates->add(geos::geom::Coordinate(measure->GetSample(),
277  measure->GetLine()));
278  }
279 
280  ptCoordinates->add(geos::geom::Coordinate(measures[0]->GetSample(),
281  measures[0]->GetLine()));
282  }
283 
284  if (ptCoordinates->size() >= 4) {
285  // Calculate the convex hull
286 
287  // Even though geos doesn't create valid linear rings/polygons from this set of coordinates,
288  // because it self-intersects many many times, it still correctly does a convex hull
289  // calculation on the points in the polygon.
290  geos::geom::Geometry * convexHull = geosFactory->createPolygon(
291  geosFactory->createLinearRing(ptCoordinates), 0)->convexHull();
292 
293  // Calculate the area of the convex hull
294  imgStats[imgConvexHullArea] = convexHull->getArea();
295  imgStats[imgConvexHullRatio] = imgStats[imgConvexHullArea] / cubeArea;
296  }
297 
298  // Add info to statistics to get min, max and avg convex hull
299  mConvexHullStats.AddData(imgStats[imgConvexHullArea]);
300  mConvexHullRatioStats.AddData(imgStats[imgConvexHullRatio]);
301 
302  mImageMap[sn] = imgStats;
303 
304  delete ptCoordinates;
305  ptCoordinates = NULL;
306 
307  // Update Progress
308  if (mProgress != NULL)
310  }
311  }
312 
313 
323  void ControlNetStatistics::PrintImageStats(const QString &psImageFile) {
324  // Check if the image list has been provided
325  if (!mSerialNumList.size()) {
326  QString msg = "Serial Number of Images has not been provided to get Image Stats";
327  throw IException(IException::User, msg, _FILEINFO_);
328  }
329 
330  FileName outFile(psImageFile);
331  ofstream ostm;
332  QString outName(outFile.expanded());
333  ostm.open(outName.toLatin1().data(), std::ios::out);
334 
335  if ( ostm.fail() ) {
336  QString msg = QObject::tr("Cannot open file [%1]").arg(psImageFile);
337  throw IException(IException::Io, msg, _FILEINFO_);
338  }
339 
340  //map< QString, vector<double> >::iterator it;
341  // imgSamples, imgLines, imgTotalPoints, imgIgnoredPoints, imgFixedPoints, imgLockedPoints, imgLocked, imgConstrainedPoints, imgFreePoints, imgConvexHullArea, imgConvexHullRatio
343  // Log into the output file
344  ostm << "Filename, SerialNumber, TotalPoints, PointsIgnored, PointsEditLocked, Fixed, Constrained, Free, ConvexHullRatio" << endl;
345  //for (it = mImageMap.begin(); it != mImageMap.end(); it++) {
346 
347  for (it = mSerialNumMap.begin(); it != mSerialNumMap.end(); it++) {
348  ostm << mSerialNumList.fileName(it.key()) << ", " << it.key() << ", ";
349  bool serialNumExists = it.value();
350  if (serialNumExists) {
351  QVector<double> imgStats = mImageMap[(it).key()] ;
352  ostm << imgStats[imgTotalPoints]<< ", " << imgStats[imgIgnoredPoints] << ", " ;
353  ostm << imgStats[imgLockedPoints] << ", " << imgStats[imgFixedPoints] << ", " ;
354  ostm << imgStats[imgConstrainedPoints] << ", " << imgStats[imgFreePoints] << ", ";
355  ostm << imgStats[imgConvexHullRatio] << endl;
356  }
357  else {
358  ostm << "0, 0, 0, 0, 0, 0, 0" << endl;
359  }
360  }
361 
362  if (!ostm) {
363  QString msg = QObject::tr("Error writing to file: [%1]").arg(psImageFile);
364  throw IException(IException::Io, msg, _FILEINFO_);
365  }
366  ostm.close();
367  }
368 
369 
380  return (mImageMap.find(psSerialNum)).value();
381  }
382 
383 
393  void ControlNetStatistics::GeneratePointStats(const QString &psPointFile) {
394  Isis::FileName outFile(psPointFile);
395 
396  ofstream ostm;
397  QString outName(outFile.expanded());
398  ostm.open(outName.toLatin1().data(), std::ios::out);
399 
400  if ( ostm.fail() ) {
401  QString msg = QObject::tr("Cannot open file [%1]").arg(psPointFile);
402  throw IException(IException::Io, msg, _FILEINFO_);
403  }
404 
405  ostm << " PointId, PointType, PointIgnore, PointEditLock, TotalMeasures, MeasuresValid, MeasuresIgnore, MeasuresEditLock" << endl;
406 
407  int iNumPoints = mCNet->GetNumPoints();
408 
409  // Initialise the Progress object
410  if (mProgress != NULL && iNumPoints > 0) {
411  mProgress->SetText("Point Stats: Loading Control Points...");
412  mProgress->SetMaximumSteps(iNumPoints);
414  }
415 
416  for (int i = 0; i < iNumPoints; i++) {
417  const ControlPoint *cPoint = mCNet->GetPoint(i);
418  int iNumMeasures = cPoint->GetNumMeasures();
419  int iValidMeasures = cPoint->GetNumValidMeasures();
420  int iIgnoredMeasures = iNumMeasures - iValidMeasures;
421 
422  // Log into the output file
423  ostm << cPoint->GetId() << ", " << sPointType[(int)cPoint->GetType()] << ", " << sBoolean[(int)cPoint->IsIgnored()] << ", " ;
424  ostm << sBoolean[(int)cPoint->IsEditLocked()] << ", " << iNumMeasures << ", " << iValidMeasures << ", ";
425  ostm << iIgnoredMeasures << ", " << cPoint->GetNumLockedMeasures() << endl;
426 
427  // Update Progress
428  if (mProgress != NULL)
430  }
431 
432  if (!ostm) {
433  QString msg = QObject::tr("Error writing to file: [%1]").arg(psPointFile);
434  throw IException(IException::Io, msg, _FILEINFO_);
435  }
436 
437  ostm.close();
438  }
439 
440 
447  // Init all the entries
448  // totalPoints, validPoints, ignoredPoints, fixedPoints, constrainedPoints, editLockedPoints,
449  // totalMeasures, validMeasures, ignoredMeasures, editLockedMeasures
450  for (int i=0; i<numPointIntStats; i++) {
451  mPointIntStats[i] = 0;
452  }
453 
454  int iNumPoints = mCNet->GetNumPoints();
455 
456  // totalPoints
457  mPointIntStats[totalPoints] = iNumPoints;
458 
459  for (int i = 0; i < iNumPoints; i++) {
460  if (!mCNet->GetPoint(i)->IsIgnored()) {
461  // validPoints
462  mPointIntStats[validPoints]++;
463  }
464  else {
465  // ignoredPoints
466  mPointIntStats[ignoredPoints]++;
467  }
468 
469  // fixedPoints
470  if (mCNet->GetPoint(i)->GetType() == ControlPoint::Fixed)
471  mPointIntStats[fixedPoints]++;
472 
473  // constrainedPoints
474  if (mCNet->GetPoint(i)->GetType() == ControlPoint::Constrained)
475  mPointIntStats[constrainedPoints]++;
476 
477  // free points
478  if (mCNet->GetPoint(i)->GetType() == ControlPoint::Free)
479  mPointIntStats[freePoints]++;
480 
481  // editLockedPoints
482  if (mCNet->GetPoint(i)->IsEditLocked()) {
483  mPointIntStats[editLockedPoints]++;
484  }
485 
486  // totalMeasures
487  mPointIntStats[totalMeasures] += mCNet->GetPoint(i)->GetNumMeasures();
488 
489  // validMeasures
490  mPointIntStats[validMeasures] += mCNet->GetPoint(i)->GetNumValidMeasures();
491 
492  // editLockedMeasures
493  mPointIntStats[editLockedMeasures] += mCNet->GetPoint(i)->GetNumLockedMeasures();
494  }
495  // ignoredMeasures
496  mPointIntStats[ignoredMeasures] = mPointIntStats[totalMeasures] - mPointIntStats[validMeasures];
497  }
498 
499 
506  for (int i = 0; i < numPointDblStats; i++) {
507  mPointDoubleStats[i] = Null;
508  }
509  }
510 
511 
520 
521  int iNumPoints = mCNet->GetNumPoints();
522  double dValue = 0;
523 
524  Statistics residualMagStats;
525  Statistics pixelShiftStats;
526 
527  for (int i = 0; i < iNumPoints; i++) {
528  ControlPoint * cp = mCNet->GetPoint(i);
529 
530  if (!cp->IsIgnored()) {
531  for (int cmIndex = 0; cmIndex < cp->GetNumMeasures(); cmIndex++) {
532  ControlMeasure *cm = cp->GetMeasure(cmIndex);
533 
534  if (!cm->IsIgnored()) {
535  residualMagStats.AddData(cm->GetResidualMagnitude());
536 
537  if (!IsSpecial(cm->GetPixelShift()))
538  pixelShiftStats.AddData(fabs(cm->GetPixelShift()));
539  }
540  }
541  }
542 
543  Statistics resMagStats = cp->GetStatistic(
545  UpdateMinMaxStats(resMagStats, minResidual, maxResidual);
546 
547  Statistics resLineStats = cp->GetStatistic(
548  &ControlMeasure::GetLineResidual);
549  UpdateMinMaxStats(resLineStats, minLineResidual, maxLineResidual);
550 
551  Statistics resSampStats = cp->GetStatistic(
552  &ControlMeasure::GetSampleResidual);
553  UpdateMinMaxStats(resSampStats, minSampleResidual, maxSampleResidual);
554 
555  Statistics pixShiftStats = cp->GetStatistic(
556  &ControlMeasure::GetPixelShift);
557  UpdateMinMaxStats(pixShiftStats, minPixelShift, maxPixelShift);
558 
559  Statistics lineShiftStats = cp->GetStatistic(
560  &ControlMeasure::GetLineShift);
561  UpdateMinMaxStats(lineShiftStats, minLineShift, maxLineShift);
562 
563  Statistics sampShiftStats = cp->GetStatistic(
564  &ControlMeasure::GetSampleShift);
565  UpdateMinMaxStats(sampShiftStats, minSampleShift, maxSampleShift);
566 
567  Statistics gFitStats = cp->GetStatistic(
569  UpdateMinMaxStats(gFitStats, minGFit, maxGFit);
570 
571  Statistics minPixelZScoreStats = cp->GetStatistic(
573 
574  if (minPixelZScoreStats.ValidPixels()) {
575  dValue = fabs(minPixelZScoreStats.Minimum());
576  if (mPointDoubleStats[minPixelZScore] > dValue)
577  mPointDoubleStats[minPixelZScore] = dValue;
578  }
579 
580  Statistics maxPixelZScoreStats = cp->GetStatistic(
582 
583  if (maxPixelZScoreStats.ValidPixels()) {
584  dValue = fabs(maxPixelZScoreStats.Maximum());
585  if (mPointDoubleStats[maxPixelZScore] > dValue)
586  mPointDoubleStats[maxPixelZScore] = dValue;
587  }
588  }
589 
590  // Average Residuals
591  mPointDoubleStats[avgResidual] = residualMagStats.Average();
592 
593  // Average Shift
594  mPointDoubleStats[avgPixelShift] = pixelShiftStats.Average();
595  }
596 
597 
598  void ControlNetStatistics::UpdateMinMaxStats(const Statistics & stats,
599  ePointDoubleStats min, ePointDoubleStats max) {
600  if (stats.ValidPixels()) {
601  if (mPointDoubleStats[min] != Null) {
602  mPointDoubleStats[min] = qMin(
603  mPointDoubleStats[min], fabs(stats.Minimum()));
604  }
605  else {
606  mPointDoubleStats[min] = fabs(stats.Minimum());
607  }
608 
609  if (mPointDoubleStats[max] != Null) {
610  mPointDoubleStats[max] = qMax(
611  mPointDoubleStats[max], fabs(stats.Maximum()));
612  }
613  else {
614  mPointDoubleStats[max] = fabs(stats.Maximum());
615  }
616  }
617  }
618 }
Isis::ControlMeasure::GetResidualMagnitude
double GetResidualMagnitude() const
Return Residual magnitude.
Definition: ControlMeasure.cpp:712
Isis::Statistics
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:94
Isis::IException::Io
@ Io
A type of error that occurred when performing an actual I/O operation.
Definition: IException.h:155
Isis::Statistics::AddData
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
Definition: Statistics.cpp:141
Isis::ControlNetStatistics::GenerateImageStats
void GenerateImageStats()
Generate stats like Total, Ignored, Fixed Points in an Image.
Definition: ControlNetStatistics.cpp:220
Isis::ControlNetStatistics::GetMaxPixelShift
double GetMaxPixelShift() const
Get network Max PixelShift.
Definition: ControlNetStatistics.h:220
Isis::Progress::CheckStatus
void CheckStatus()
Checks and updates the status.
Definition: Progress.cpp:105
Isis::ControlNetStatistics::GetMaxLineShift
double GetMaxLineShift() const
Get network Max LineShift.
Definition: ControlNetStatistics.h:200
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::ControlNetStatistics::GetPointIntStats
void GetPointIntStats()
Get point count stats.
Definition: ControlNetStatistics.cpp:446
Isis::ControlPoint::GetMeasure
const ControlMeasure * GetMeasure(QString serialNumber) const
Get a control measure based on its cube's serial number.
Definition: ControlPoint.cpp:416
QList< QString >
Isis::SerialNumberList::size
int size() const
How many serial number / filename combos are in the list.
Definition: SerialNumberList.cpp:384
Isis::ControlNetStatistics::GetMinLineResidual
double GetMinLineResidual() const
Determine the minimum line error of all points in the network.
Definition: ControlNetStatistics.h:175
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::Progress::SetMaximumSteps
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
Definition: Progress.cpp:85
Isis::ControlNetStatistics::NumValidPoints
int NumValidPoints() const
Returns the Number of Valid (Not Ignored) Points in the Control Net.
Definition: ControlNetStatistics.h:110
Isis::ControlNetStatistics::GetAvgPixelShift
double GetAvgPixelShift() const
Get network Avg PixelShift.
Definition: ControlNetStatistics.h:225
Isis::ControlNetStatistics::GetMaxSampleResidual
double GetMaxSampleResidual() const
Determine the maximum sample error of all points in the network.
Definition: ControlNetStatistics.h:190
Isis::ControlNetStatistics::mPointDoubleStats
QMap< int, double > mPointDoubleStats
Contains QMap of different computed stats.
Definition: ControlNetStatistics.h:236
Isis::ControlNetStatistics::mConvexHullRatioStats
Statistics mConvexHullRatioStats
min, max, average convex hull stats
Definition: ControlNetStatistics.h:258
Isis::ControlMeasureLogData::MaximumPixelZScore
@ MaximumPixelZScore
Definition: ControlMeasureLogData.h:81
Isis::ControlNetStatistics::mPointIntStats
QMap< int, int > mPointIntStats
Contains QMap of different count stats.
Definition: ControlNetStatistics.h:235
Isis::ControlPoint::GetStatistic
Statistics GetStatistic(double(ControlMeasure::*statFunc)() const) const
This function will call a given method on every control measure that this point has.
Definition: ControlPoint.cpp:1842
Isis::Statistics::Maximum
double Maximum() const
Returns the absolute maximum double found in all data passed through the AddData method.
Definition: Statistics.cpp:403
Isis::ControlNetStatistics::NumIgnoredMeasures
int NumIgnoredMeasures() const
Returns the total Number of Ignored Measures in the Control Net.
Definition: ControlNetStatistics.h:150
Isis::ControlNet::GetNumEditLockMeasures
int GetNumEditLockMeasures()
Return the total number of edit locked measures for all control points in the network.
Definition: ControlNet.cpp:1349
Isis::ControlNetStatistics::GetMaximumResidual
double GetMaximumResidual() const
Determine the maximum error of all points in the network.
Definition: ControlNetStatistics.h:170
Isis::ControlNet::GetMeasuresInCube
QList< ControlMeasure * > GetMeasuresInCube(QString serialNumber)
Get all the measures pertaining to a given cube serial number.
Definition: ControlNet.cpp:1065
Isis::ControlPoint::GetId
QString GetId() const
Return the Id of the control point.
Definition: ControlPoint.cpp:1306
Isis::Statistics::ValidPixels
BigInt ValidPixels() const
Returns the total number of valid pixels processed.
Definition: Statistics.cpp:433
Isis::ControlNetStatistics::GetImageStatsBySerialNum
QVector< double > GetImageStatsBySerialNum(QString psSerialNum) const
Returns the Image Stats by Serial Number.
Definition: ControlNetStatistics.cpp:379
Isis::ControlNetStatistics::GetMinSampleResidual
double GetMinSampleResidual() const
Determine the minimum sample error of all points in the network.
Definition: ControlNetStatistics.h:180
Isis::ControlNet::GetNumEditLockPoints
int GetNumEditLockPoints()
Returns the number of edit locked control points.
Definition: ControlNet.cpp:1364
Isis::ControlNetStatistics::ControlNetStatistics
ControlNetStatistics(ControlNet *pCNet, const QString &psSerialNumFile, Progress *pProgress=0)
Constructor.
Definition: ControlNetStatistics.cpp:52
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::SerialNumberList
Serial Number list generator.
Definition: SerialNumberList.h:64
Isis::ControlPoint::GetNumValidMeasures
int GetNumValidMeasures() const
Definition: ControlPoint.cpp:1711
Isis::IsSpecial
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
Isis::ControlNet::GetCubeSerials
QList< QString > GetCubeSerials() const
Use this method to get a complete list of all the cube serial numbers in the network.
Definition: ControlNet.cpp:1016
Isis::SerialNumberList::serialNumber
QString serialNumber(const QString &filename)
Return a serial number given a filename.
Definition: SerialNumberList.cpp:426
Isis::ControlNetStatistics::GetPointDoubleStats
void GetPointDoubleStats()
Get Point stats for Residuals and Shifts.
Definition: ControlNetStatistics.cpp:518
Isis::CubeManager::OpenCube
Cube * OpenCube(const QString &cubeFileName)
This method opens a cube.
Definition: CubeManager.cpp:95
Isis::ControlNetStatistics::~ControlNetStatistics
~ControlNetStatistics()
Destructor.
Definition: ControlNetStatistics.cpp:88
Isis::ControlNetStatistics::NumConstrainedPoints
int NumConstrainedPoints() const
Returns the number of Constrained Points in Control Net.
Definition: ControlNetStatistics.h:120
Isis::sBoolean
QString sBoolean[]
String values for Boolean.
Definition: ControlNetStatistics.cpp:41
Isis::CubeManager
Class for quick re-accessing of cubes based on file name.
Definition: CubeManager.h:70
Isis::ControlNetStatistics::NumFixedPoints
int NumFixedPoints() const
Returns the Number of Fixed Points in the Control Net.
Definition: ControlNetStatistics.h:115
Isis::ControlNetStatistics::mImageMap
QMap< QString, QVector< double > > mImageMap
Contains stats by Image/Serial Num.
Definition: ControlNetStatistics.h:237
Isis::ControlNetStatistics::GetMaxLineResidual
double GetMaxLineResidual() const
Determine the maximum line error of all points in the network.
Definition: ControlNetStatistics.h:185
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::ControlNetStatistics::GetMaxSampleShift
double GetMaxSampleShift() const
Get network Max SampleShift.
Definition: ControlNetStatistics.h:210
Isis::ControlPoint::Fixed
@ Fixed
A Fixed point is a Control Point whose lat/lon is well established and should not be changed.
Definition: ControlPoint.h:371
Isis::ControlNetStatistics::InitPointDoubleStats
void InitPointDoubleStats()
Init Pointstats std::vector.
Definition: ControlNetStatistics.cpp:505
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::ControlNetStatistics::GetMinPixelShift
double GetMinPixelShift() const
Get network Min PixelShift.
Definition: ControlNetStatistics.h:215
Isis::ControlNetStatistics::NumValidMeasures
int NumValidMeasures() const
Returns the total Number of valid Measures in the Control Net.
Definition: ControlNetStatistics.h:145
Isis::ControlNet::GetNumPoints
int GetNumPoints() const
Return the number of control points in the network.
Definition: ControlNet.cpp:1465
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::ControlNetStatistics::PrintImageStats
void PrintImageStats(const QString &psImageFile)
Print the Image Stats into specified output file.
Definition: ControlNetStatistics.cpp:323
Isis::Cube::lineCount
int lineCount() const
Definition: Cube.cpp:1734
Isis::ControlMeasureLogData::MinimumPixelZScore
@ MinimumPixelZScore
Control measures store z-scores in pairs.
Definition: ControlMeasureLogData.h:76
Isis::ControlNetStatistics::GetAverageResidual
double GetAverageResidual() const
Determine the average error of all points in the network.
Definition: ControlNetStatistics.h:160
Isis::Statistics::Minimum
double Minimum() const
Returns the absolute minimum double found in all data passed through the AddData method.
Definition: Statistics.cpp:382
Isis::ControlPoint::GetNumLockedMeasures
int GetNumLockedMeasures() const
Returns the number of locked control measures.
Definition: ControlPoint.cpp:1728
Isis::ControlPoint::Constrained
@ Constrained
A Constrained point is a Control Point whose lat/lon/radius is somewhat established and should not be...
Definition: ControlPoint.h:376
Isis::Progress::SetText
void SetText(const QString &text)
Changes the value of the text string reported just before 0% processed.
Definition: Progress.cpp:61
Isis::ControlMeasure::IsEditLocked
bool IsEditLocked() const
Return value for p_editLock or implicit lock on reference measure.
Definition: ControlMeasure.cpp:601
Isis::Cube::sampleCount
int sampleCount() const
Definition: Cube.cpp:1807
Isis::sPointType
QString sPointType[]
String names for Point Type.
Definition: ControlNetStatistics.cpp:38
Isis::ControlNetStatistics::mSerialNumMap
QMap< QString, bool > mSerialNumMap
Whether serial# is part of ControlNet.
Definition: ControlNetStatistics.h:238
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::ControlNetStatistics::GetMinSampleShift
double GetMinSampleShift() const
Get network Min SampleShift.
Definition: ControlNetStatistics.h:205
Isis::ControlNetStatistics::GenerateControlNetStats
void GenerateControlNetStats(PvlGroup &pStatsGrp)
Generate the Control Net Stats into the PvlGroup.
Definition: ControlNetStatistics.cpp:116
Isis::ControlNetStatistics::InitSerialNumMap
void InitSerialNumMap()
Init SerialNum std::map.
Definition: ControlNetStatistics.cpp:97
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::ControlNetStatistics::GetMinimumResidual
double GetMinimumResidual() const
Determine the minimum error of all points in the network.
Definition: ControlNetStatistics.h:165
Isis::Progress
Program progress reporter.
Definition: Progress.h:42
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::Statistics::Average
double Average() const
Computes and returns the average.
Definition: Statistics.cpp:300
Isis::ControlNetStatistics::GeneratePointStats
void GeneratePointStats(const QString &psPointFile)
Generate stats like Ignored, Fixed, Total Measures, Ignored by Control Point.
Definition: ControlNetStatistics.cpp:393
Isis::ControlNetStatistics::NumMeasures
int NumMeasures() const
Returns the total Number of Measures in the Control Net.
Definition: ControlNetStatistics.h:140
Isis::ControlPoint::Free
@ Free
A Free point is a Control Point that identifies common measurements between two or more cubes.
Definition: ControlPoint.h:384
QMap
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
Isis::ControlPoint::GetType
PointType GetType() const
Definition: ControlPoint.cpp:1401
Isis::ControlMeasureLogData::GoodnessOfFit
@ GoodnessOfFit
GoodnessOfFit is pointreg information for reference measures.
Definition: ControlMeasureLogData.h:67
Isis::CubeManager::SetNumOpenCubes
void SetNumOpenCubes(unsigned int numCubes)
This sets the maximum number of opened cubes for this instance of CubeManager.
Definition: CubeManager.h:102
Isis::SerialNumberList::fileName
QString fileName(const QString &sn)
Return a filename given a serial number.
Definition: SerialNumberList.cpp:399
QVector< double >
Isis::ControlNetStatistics::mSerialNumList
SerialNumberList mSerialNumList
Serial Number List.
Definition: ControlNetStatistics.h:230
Isis::ControlNetStatistics::GetMinLineShift
double GetMinLineShift() const
Get Min and Max LineShift.
Definition: ControlNetStatistics.h:195
Isis::ControlNetStatistics::NumFreePoints
int NumFreePoints() const
Returns the number of Constrained Points in Control Net.
Definition: ControlNetStatistics.h:125
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ControlNetStatistics::mProgress
Progress * mProgress
Progress state.
Definition: ControlNetStatistics.h:232
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::ControlNetStatistics::mCNet
ControlNet * mCNet
Control Network.
Definition: ControlNetStatistics.h:231
Isis::ControlMeasure
a control measurement
Definition: ControlMeasure.h:175