Isis 3 Programmer Reference
Isis::ControlNetStatistics Class Reference

Control Network Stats. More...

#include <ControlNetStatistics.h>

Inheritance diagram for Isis::ControlNetStatistics:
Inheritance graph
Collaboration diagram for Isis::ControlNetStatistics:
Collaboration graph

Public Types

enum  ePointDetails {
  total , ignore , locked , fixed ,
  constrained , freed
}
 Enumeration for Point Statistics. More...
 
enum  ePointIntStats {
  totalPoints , validPoints , ignoredPoints , fixedPoints ,
  constrainedPoints , freePoints , editLockedPoints , totalMeasures ,
  validMeasures , ignoredMeasures , editLockedMeasures
}
 Enumeration for Point int stats for counts such as valid points, measures etc. More...
 
enum  ePointDoubleStats {
  avgResidual , minResidual , maxResidual , minLineResidual ,
  maxLineResidual , minSampleResidual , maxSampleResidual , avgPixelShift ,
  minPixelShift , maxPixelShift , minLineShift , maxLineShift ,
  minSampleShift , maxSampleShift , minGFit , maxGFit ,
  minEccentricity , maxEccentricity , minPixelZScore , maxPixelZScore
}
 Enumeration for Point stats like Tolerances, PixelShifts which have double data. More...
 
enum  ImageStats {
  imgSamples , imgLines , imgTotalPoints , imgIgnoredPoints ,
  imgFixedPoints , imgLockedPoints , imgLocked , imgConstrainedPoints ,
  imgFreePoints , imgConvexHullArea , imgConvexHullRatio
}
 Enumeration for image stats. More...
 

Public Member Functions

 ControlNetStatistics (ControlNet *pCNet, const QString &psSerialNumFile, Progress *pProgress=0)
 Constructor.
 
 ControlNetStatistics (ControlNet *pCNet, Progress *pProgress=0)
 Constructor.
 
 ~ControlNetStatistics ()
 Destructor.
 
void GenerateImageStats ()
 Generate stats like Total, Ignored, Fixed Points in an Image.
 
void PrintImageStats (const QString &psImageFile)
 Print the Image Stats into specified output file.
 
QVector< double > GetImageStatsBySerialNum (QString psSerialNum) const
 Returns the Image Stats by Serial Number.
 
void GeneratePointStats (const QString &psPointFile)
 Generate stats like Ignored, Fixed, Total Measures, Ignored by Control Point.
 
void GenerateControlNetStats (PvlGroup &pStatsGrp)
 Generate the Control Net Stats into the PvlGroup.
 
int NumValidPoints () const
 Returns the Number of Valid (Not Ignored) Points in the Control Net.
 
int NumFixedPoints () const
 Returns the Number of Fixed Points in the Control Net.
 
int NumConstrainedPoints () const
 Returns the number of Constrained Points in Control Net.
 
int NumFreePoints () const
 Returns the number of Constrained Points in Control Net.
 
int NumIgnoredPoints () const
 Returns the number of ignored points.
 
int NumEditLockedPoints () const
 Returns total number of edit locked points.
 
int NumMeasures () const
 Returns the total Number of Measures in the Control Net.
 
int NumValidMeasures () const
 Returns the total Number of valid Measures in the Control Net.
 
int NumIgnoredMeasures () const
 Returns the total Number of Ignored Measures in the Control Net.
 
int NumEditLockedMeasures () const
 Returns total number of edit locked measures in the network.
 
double GetAverageResidual () const
 Determine the average error of all points in the network.
 
double GetMinimumResidual () const
 Determine the minimum error of all points in the network.
 
double GetMaximumResidual () const
 Determine the maximum error of all points in the network.
 
double GetMinLineResidual () const
 Determine the minimum line error of all points in the network.
 
double GetMinSampleResidual () const
 Determine the minimum sample error of all points in the network.
 
double GetMaxLineResidual () const
 Determine the maximum line error of all points in the network.
 
double GetMaxSampleResidual () const
 Determine the maximum sample error of all points in the network.
 
double GetMinLineShift () const
 Get Min and Max LineShift.
 
double GetMaxLineShift () const
 Get network Max LineShift.
 
double GetMinSampleShift () const
 Get network Min SampleShift.
 
double GetMaxSampleShift () const
 Get network Max SampleShift.
 
double GetMinPixelShift () const
 Get network Min PixelShift.
 
double GetMaxPixelShift () const
 Get network Max PixelShift.
 
double GetAvgPixelShift () const
 Get network Avg PixelShift.
 

Static Public Attributes

static const int numPointDetails = 6
 
static const int numPointIntStats = 11
 
static const int numPointDblStats = 20
 
static const int numImageStats = 11
 

Protected Attributes

SerialNumberList mSerialNumList
 Serial Number List.
 
ControlNetmCNet
 Control Network.
 
ProgressmProgress
 Progress state.
 

Private Member Functions

void GetPointIntStats ()
 Get point count stats.
 
void GetPointDoubleStats ()
 Get Point stats for Residuals and Shifts.
 
void UpdateMinMaxStats (const Statistics &stats, ePointDoubleStats min, ePointDoubleStats max)
 
void InitPointDoubleStats ()
 Init Pointstats std::vector.
 
void InitSerialNumMap ()
 Init SerialNum std::map.
 

Private Attributes

QMap< int, int > mPointIntStats
 Contains QMap of different count stats.
 
QMap< int, double > mPointDoubleStats
 Contains QMap of different computed stats.
 
QMap< QString, QVector< double > > mImageMap
 Contains stats by Image/Serial Num.
 
QMap< QString, bool > mSerialNumMap
 Whether serial# is part of ControlNet.
 
int numCNetImages
 
Statistics mConvexHullStats
 
Statistics mConvexHullRatioStats
 min, max, average convex hull stats
 

Detailed Description

Control Network Stats.

This class is used to get statistics of Control Network by Image or by Point

Author
2010-08-24 Sharmila Prasad
See also
ControlNetwork ControlPoint ControlMeasure
History

2010-08-24 Sharmila Prasad Original version

2010-09-16 Sharmila Prasad Added individual image std::maps for each Point stats to correct segmentation faults.

2010-10-26 Tracie Sucharski Added missing includes to cpp after removing includes from ControlNet.h.

2011-05-03 Debbie A. Cook Added type "Constrained" to sPointType values

2011-06-07 Debbie A. Cook and Tracie Sucharski - Modified point types Ground ------> Fixed Tie----------> Free

2011-07-19 Sharmila Prasad - Modified for new keywords in binary control net

2011-11-03 Sharmila Prasad - Used ControlNet's CubeGraphNodes to get Image stats including Convex Hull Ratio

2011-12-21 Sharmila Prasad Fixed #634 to include stats of images not in the ControlNet

2011-12-29 Sharmila Prasad Fixed #652 to include stats of ControlMeasure Log data

2012-04-26 Jai Rideout, Steven Lambright and Stuart Sides - Fixed results of min, max, average computations. Verified results of convex hull computation. Minor refactoring but needs a lot more. References #619 because fixing the order of the cnet caused us to fix some cnet graph node bugs which caused the convex hull tests to fail.

2015-06-04 Kristin Berry - Now throws an error when unable to open an output file or finish writing to an output file. Fixes #996.

2017-12-12 Kristin Berry - Updated std::map to QMap and std::vector to QVector. Fixes #5259.

Definition at line 63 of file ControlNetStatistics.h.

Member Enumeration Documentation

◆ ePointDetails

Enumeration for Point Statistics.

Definition at line 75 of file ControlNetStatistics.h.

◆ ePointDoubleStats

Enumeration for Point stats like Tolerances, PixelShifts which have double data.

Definition at line 84 of file ControlNetStatistics.h.

◆ ePointIntStats

Enumeration for Point int stats for counts such as valid points, measures etc.

Definition at line 79 of file ControlNetStatistics.h.

◆ ImageStats

Enumeration for image stats.

Definition at line 90 of file ControlNetStatistics.h.

Constructor & Destructor Documentation

◆ ControlNetStatistics() [1/2]

Isis::ControlNetStatistics::ControlNetStatistics ( ControlNet * pCNet,
const QString & psSerialNumFile,
Progress * pProgress = 0 )

Constructor.

ControlNetStatistics Constructor has ctor to it's base Control Network.

Author
Sharmila Prasad (8/24/2010)
Parameters
pCNet- Input Control network
psSerialNumFile- Serial Number List file
pProgress- Check Progress if not Null

Definition at line 51 of file ControlNetStatistics.cpp.

References GenerateImageStats(), GetPointDoubleStats(), GetPointIntStats(), InitSerialNumMap(), mCNet, mProgress, and mSerialNumList.

◆ ControlNetStatistics() [2/2]

Isis::ControlNetStatistics::ControlNetStatistics ( ControlNet * pCNet,
Progress * pProgress = 0 )

Constructor.

Constructor with ControlNet.

Author
Sharmila Prasad (11/5/2010)
Parameters
pCNet
pProgress

Definition at line 74 of file ControlNetStatistics.cpp.

References GetPointDoubleStats(), GetPointIntStats(), mCNet, and mProgress.

◆ ~ControlNetStatistics()

Isis::ControlNetStatistics::~ControlNetStatistics ( )

Destructor.

Author
Sharmila Prasad (9/17/2010)

Definition at line 87 of file ControlNetStatistics.cpp.

References mCNet.

Member Function Documentation

◆ GenerateControlNetStats()

void Isis::ControlNetStatistics::GenerateControlNetStats ( PvlGroup & pStatsGrp)

◆ GenerateImageStats()

void Isis::ControlNetStatistics::GenerateImageStats ( )

Generate stats like Total, Ignored, Fixed Points in an Image.

Generate the Image stats - imgSamples, imgLines, imgTotalPoints, imgIgnoredPoints, imgFixedPoints, imgLockedPoints, imgLocked, imgConstrainedPoints, imgFreePoints, imgConvexHullArea, imgConvexHullRatio.

Author
Sharmila Prasad (11/1/2011)

Definition at line 219 of file ControlNetStatistics.cpp.

References Isis::Statistics::AddData(), Isis::Progress::CheckStatus(), Isis::ControlPoint::Constrained, Isis::SerialNumberList::fileName(), Isis::ControlPoint::Fixed, Isis::ControlPoint::Free, Isis::ControlNet::GetCubeSerials(), Isis::ControlNet::GetMeasuresInCube(), Isis::ControlPoint::GetType(), Isis::Cube::lineCount(), mCNet, mConvexHullRatioStats, mImageMap, mProgress, mSerialNumList, mSerialNumMap, Isis::Cube::sampleCount(), Isis::Progress::SetMaximumSteps(), Isis::CubeManager::SetNumOpenCubes(), and Isis::Progress::SetText().

Referenced by ControlNetStatistics(), Isis::ControlNetFilter::CubeConvexHullFilter(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::CubeNameExpressionFilter(), Isis::ControlNetFilter::CubeNumPointsFilter(), Isis::ControlNetFilter::PointCubeNamesFilter(), Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointEditLockFilter(), Isis::ControlNetFilter::PointGoodnessOfFitFilter(), Isis::ControlNetFilter::PointIDFilter(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::ControlNetFilter::PointMeasurePropertiesFilter(), Isis::ControlNetFilter::PointMeasuresFilter(), Isis::ControlNetFilter::PointNumMeasuresEditLockFilter(), Isis::ControlNetFilter::PointPixelShiftFilter(), Isis::ControlNetFilter::PointPropertiesFilter(), and Isis::ControlNetFilter::PointResMagnitudeFilter().

◆ GeneratePointStats()

void Isis::ControlNetStatistics::GeneratePointStats ( const QString & psPointFile)

Generate stats like Ignored, Fixed, Total Measures, Ignored by Control Point.

Generate the statistics of a Control Network by Point Stats include ID, Type of each Control Point and Total, Ignored measures in each Control Point.

Author
Sharmila Prasad (8/24/2010)
Parameters
psPointFile- Output Point Statisitics File

Definition at line 388 of file ControlNetStatistics.cpp.

References Isis::Progress::CheckStatus(), Isis::ControlNet::GetNumPoints(), Isis::IException::Io, mCNet, mProgress, Isis::sBoolean, Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), and Isis::sPointType.

◆ GetAverageResidual()

double Isis::ControlNetStatistics::GetAverageResidual ( ) const
inline

Determine the average error of all points in the network.

Definition at line 160 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetAvgPixelShift()

double Isis::ControlNetStatistics::GetAvgPixelShift ( ) const
inline

Get network Avg PixelShift.

Definition at line 225 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetImageStatsBySerialNum()

QVector< double > Isis::ControlNetStatistics::GetImageStatsBySerialNum ( QString psSerialNum) const

◆ GetMaximumResidual()

double Isis::ControlNetStatistics::GetMaximumResidual ( ) const
inline

Determine the maximum error of all points in the network.

Definition at line 170 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMaxLineResidual()

double Isis::ControlNetStatistics::GetMaxLineResidual ( ) const
inline

Determine the maximum line error of all points in the network.

Definition at line 185 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMaxLineShift()

double Isis::ControlNetStatistics::GetMaxLineShift ( ) const
inline

Get network Max LineShift.

Definition at line 200 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMaxPixelShift()

double Isis::ControlNetStatistics::GetMaxPixelShift ( ) const
inline

Get network Max PixelShift.

Definition at line 220 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMaxSampleResidual()

double Isis::ControlNetStatistics::GetMaxSampleResidual ( ) const
inline

Determine the maximum sample error of all points in the network.

Definition at line 190 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMaxSampleShift()

double Isis::ControlNetStatistics::GetMaxSampleShift ( ) const
inline

Get network Max SampleShift.

Definition at line 210 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMinimumResidual()

double Isis::ControlNetStatistics::GetMinimumResidual ( ) const
inline

Determine the minimum error of all points in the network.

Definition at line 165 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMinLineResidual()

double Isis::ControlNetStatistics::GetMinLineResidual ( ) const
inline

Determine the minimum line error of all points in the network.

Definition at line 175 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMinLineShift()

double Isis::ControlNetStatistics::GetMinLineShift ( ) const
inline

Get Min and Max LineShift.

Definition at line 195 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMinPixelShift()

double Isis::ControlNetStatistics::GetMinPixelShift ( ) const
inline

Get network Min PixelShift.

Definition at line 215 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMinSampleResidual()

double Isis::ControlNetStatistics::GetMinSampleResidual ( ) const
inline

Determine the minimum sample error of all points in the network.

Definition at line 180 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetMinSampleShift()

double Isis::ControlNetStatistics::GetMinSampleShift ( ) const
inline

Get network Min SampleShift.

Definition at line 205 of file ControlNetStatistics.h.

References mPointDoubleStats.

Referenced by GenerateControlNetStats().

◆ GetPointDoubleStats()

void Isis::ControlNetStatistics::GetPointDoubleStats ( )
private

Get Point stats for Residuals and Shifts.

Get the Network Statistics for Residuals (line, sample, magnitude) and Shifts (line, sample, pixel)

Author
Sharmila Prasad (7/19/2011)

Definition at line 513 of file ControlNetStatistics.cpp.

References Isis::ControlNet::GetNumPoints(), Isis::ControlMeasure::GetResidualMagnitude(), Isis::ControlMeasureLogData::GoodnessOfFit, InitPointDoubleStats(), Isis::IsSpecial(), Isis::ControlMeasureLogData::MaximumPixelZScore, mCNet, Isis::ControlMeasureLogData::MinimumPixelZScore, and mPointDoubleStats.

Referenced by ControlNetStatistics(), and ControlNetStatistics().

◆ GetPointIntStats()

void Isis::ControlNetStatistics::GetPointIntStats ( )
private

Get point count stats.

Get network statistics for total, valid, ignored, locked points and measures.

Author
sprasad (7/19/2011)

Definition at line 441 of file ControlNetStatistics.cpp.

References Isis::ControlPoint::Constrained, Isis::ControlPoint::Fixed, Isis::ControlPoint::Free, Isis::ControlNet::GetNumPoints(), mCNet, and mPointIntStats.

Referenced by ControlNetStatistics(), and ControlNetStatistics().

◆ InitPointDoubleStats()

void Isis::ControlNetStatistics::InitPointDoubleStats ( )
private

Init Pointstats std::vector.

Initialize Point double stats vector.

Author
Sharmila Prasad (1/3/2012)

Definition at line 500 of file ControlNetStatistics.cpp.

References mPointDoubleStats, and Isis::Null.

Referenced by GetPointDoubleStats().

◆ InitSerialNumMap()

void Isis::ControlNetStatistics::InitSerialNumMap ( )
private

Init SerialNum std::map.

Init SerialNum map.

Author
Sharmila Prasad (12/20/2011)

Definition at line 96 of file ControlNetStatistics.cpp.

References mSerialNumList, mSerialNumMap, Isis::SerialNumberList::serialNumber(), and Isis::SerialNumberList::size().

Referenced by ControlNetStatistics().

◆ NumConstrainedPoints()

int Isis::ControlNetStatistics::NumConstrainedPoints ( ) const
inline

Returns the number of Constrained Points in Control Net.

Definition at line 120 of file ControlNetStatistics.h.

References mPointIntStats.

Referenced by GenerateControlNetStats().

◆ NumEditLockedMeasures()

int Isis::ControlNetStatistics::NumEditLockedMeasures ( ) const
inline

Returns total number of edit locked measures in the network.

Definition at line 155 of file ControlNetStatistics.h.

References mPointIntStats.

◆ NumEditLockedPoints()

int Isis::ControlNetStatistics::NumEditLockedPoints ( ) const
inline

Returns total number of edit locked points.

Definition at line 135 of file ControlNetStatistics.h.

References mPointIntStats.

◆ NumFixedPoints()

int Isis::ControlNetStatistics::NumFixedPoints ( ) const
inline

Returns the Number of Fixed Points in the Control Net.

Definition at line 115 of file ControlNetStatistics.h.

References mPointIntStats.

Referenced by GenerateControlNetStats().

◆ NumFreePoints()

int Isis::ControlNetStatistics::NumFreePoints ( ) const
inline

Returns the number of Constrained Points in Control Net.

Definition at line 125 of file ControlNetStatistics.h.

References mPointIntStats.

Referenced by GenerateControlNetStats().

◆ NumIgnoredMeasures()

int Isis::ControlNetStatistics::NumIgnoredMeasures ( ) const
inline

Returns the total Number of Ignored Measures in the Control Net.

Definition at line 150 of file ControlNetStatistics.h.

References mPointIntStats.

Referenced by GenerateControlNetStats().

◆ NumIgnoredPoints()

int Isis::ControlNetStatistics::NumIgnoredPoints ( ) const
inline

Returns the number of ignored points.

Definition at line 130 of file ControlNetStatistics.h.

References mPointIntStats.

◆ NumMeasures()

int Isis::ControlNetStatistics::NumMeasures ( ) const
inline

Returns the total Number of Measures in the Control Net.

Definition at line 140 of file ControlNetStatistics.h.

References mPointIntStats.

Referenced by GenerateControlNetStats().

◆ NumValidMeasures()

int Isis::ControlNetStatistics::NumValidMeasures ( ) const
inline

Returns the total Number of valid Measures in the Control Net.

Definition at line 145 of file ControlNetStatistics.h.

References mPointIntStats.

Referenced by GenerateControlNetStats().

◆ NumValidPoints()

int Isis::ControlNetStatistics::NumValidPoints ( ) const
inline

Returns the Number of Valid (Not Ignored) Points in the Control Net.

Definition at line 110 of file ControlNetStatistics.h.

References mPointIntStats.

Referenced by GenerateControlNetStats().

◆ PrintImageStats()

void Isis::ControlNetStatistics::PrintImageStats ( const QString & psImageFile)

Print the Image Stats into specified output file.

Author
Sharmila Prasad (9/1/2010)

Header: FileName, SerialNumber, TotalPoints, PointsIgnored, PointsLocked, Fixed, Constrained, Free

Parameters
psImageFile- Output Image Stats File

Definition at line 318 of file ControlNetStatistics.cpp.

References Isis::SerialNumberList::fileName(), Isis::IException::Io, mImageMap, mSerialNumList, mSerialNumMap, Isis::SerialNumberList::size(), and Isis::IException::User.

◆ UpdateMinMaxStats()

void Isis::ControlNetStatistics::UpdateMinMaxStats ( const Statistics & stats,
ePointDoubleStats min,
ePointDoubleStats max )
private

Definition at line 593 of file ControlNetStatistics.cpp.

Member Data Documentation

◆ mCNet

◆ mConvexHullRatioStats

Statistics Isis::ControlNetStatistics::mConvexHullRatioStats
private

min, max, average convex hull stats

Definition at line 258 of file ControlNetStatistics.h.

Referenced by GenerateControlNetStats(), and GenerateImageStats().

◆ mConvexHullStats

Statistics Isis::ControlNetStatistics::mConvexHullStats
private

Definition at line 258 of file ControlNetStatistics.h.

◆ mImageMap

QMap<QString, QVector<double> > Isis::ControlNetStatistics::mImageMap
private

Contains stats by Image/Serial Num.

Definition at line 237 of file ControlNetStatistics.h.

Referenced by GenerateImageStats(), GetImageStatsBySerialNum(), and PrintImageStats().

◆ mPointDoubleStats

◆ mPointIntStats

QMap<int, int> Isis::ControlNetStatistics::mPointIntStats
private

◆ mProgress

Progress* Isis::ControlNetStatistics::mProgress
protected

◆ mSerialNumList

◆ mSerialNumMap

QMap<QString, bool> Isis::ControlNetStatistics::mSerialNumMap
private

Whether serial# is part of ControlNet.

Definition at line 238 of file ControlNetStatistics.h.

Referenced by GenerateImageStats(), InitSerialNumMap(), and PrintImageStats().

◆ numCNetImages

int Isis::ControlNetStatistics::numCNetImages
private

Definition at line 256 of file ControlNetStatistics.h.

◆ numImageStats

const int Isis::ControlNetStatistics::numImageStats = 11
static

Definition at line 92 of file ControlNetStatistics.h.

◆ numPointDblStats

const int Isis::ControlNetStatistics::numPointDblStats = 20
static

Definition at line 87 of file ControlNetStatistics.h.

◆ numPointDetails

const int Isis::ControlNetStatistics::numPointDetails = 6
static

Definition at line 76 of file ControlNetStatistics.h.

◆ numPointIntStats

const int Isis::ControlNetStatistics::numPointIntStats = 11
static

Definition at line 81 of file ControlNetStatistics.h.


The documentation for this class was generated from the following files: