Isis 3 Programmer Reference
Isis::CameraStatistics Class Reference

Calculates a series of statistics pertaining to a Camera. More...

#include <CameraStatistics.h>

Collaboration diagram for Isis::CameraStatistics:
Collaboration graph

Public Member Functions

 CameraStatistics (QString filename, int sinc, int linc)
 Constructs the Camera Statistics object from a Cube filename.
 
 CameraStatistics (Camera *cam, int sinc, int linc)
 Constructs the Camera Statistics object from an already-existent Camera pointer.
 
 CameraStatistics (Camera *cam, int sinc, int linc, QString filename)
 Constructs the Camera Statistics object from an already-existent Camera pointer.
 
virtual ~CameraStatistics ()
 Destroy this instance, deletes all the Statistics objects.
 
void addStats (Camera *cam, int &sample, int &line)
 Add statistics data to Statistics objects if the Camera position given by the provided line and sample is looking at the surface of the target.
 
PvlKeyword constructKeyword (QString keyname, double value, QString unit) const
 Takes a name, value, and optionally units and constructs a PVL Keyword.
 
Pvl toPvl () const
 Constructs a Pvl object from the values in the various statistics objects.
 
const StatisticsgetLatStat () const
 Accessor method for inspecting the statistics gathered on the Universal Latitudes of the input Camera.
 
const StatisticsgetLonStat () const
 Accessor method for inspecting the statistics gathered on the Universal Longitudes of the input Camera.
 
const StatisticsgetResStat () const
 Accessor method for inspecting the statistics gathered on the Pixel Resolutions of the input Camera.
 
const StatisticsgetObliqueResStat () const
 Accessor method for inspecting the statistics gathered on the oblique pixel resolutions of the input Camera.
 
const StatisticsgetObliqueSampleResStat () const
 Accessor method for inspecting the statistics gathered on the oblique sample resolutions of the input Camera.
 
const StatisticsgetObliqueLineResStat () const
 Accessor method for inspecting the statistics gathered on the oblique line resolution of the input Camera.
 
const StatisticsgetSampleResStat () const
 Accessor method for inspecting the statistics gathered on the Sample Resolutions of the input Camera.
 
const StatisticsgetLineResStat () const
 Accessor method for inspecting the statistics gathered on the Line Resolution of the input Camera.
 
const StatisticsgetAspectRatioStat () const
 Accessor method for inspecting the statistics gathered on the Aspect Ratios of the input Camera.
 
const StatisticsgetPhaseStat () const
 Accessor method for inspecting the statistics gathered on the Phase Angles of the input Camera.
 
const StatisticsgetEmissionStat () const
 Accessor method for inspecting the statistics gathered on the Emission Angles of the input Camera.
 
const StatisticsgetIncidenceStat () const
 Accessor method for inspecting the statistics gathered on the Incidence Angles of the input Camera.
 
const StatisticsgetLocalSolarTimeStat () const
 Accessor method for inspecting the statistics gathered on the Local Solar Times of the input Camera.
 
const StatisticsgetLocalRaduisStat () const
 Accessor method for inspecting the statistics gathered on the Local Radii (in meters) of the input Camera.
 
const StatisticsgetNorthAzimuthStat () const
 Accessor method for inspecting the statistics gathered on the North Azimuths of the input Camera.
 

Private Member Functions

void init (Camera *cam, int sinc, int linc, QString filename)
 Initializes this collection of statistics by incrementing over sample/line positions in the Camera and compiling various Camera values at those locations into all the Statistics objects maintained as the persistent state of the object.
 

Private Attributes

QString m_filename
 FileName of the Cube the Camera was derived from.
 
int m_sinc
 Sample increment for composing statistics.
 
int m_linc
 Line increment for composing statistics.
 
Statisticsm_latStat
 Universal latitude statistics.
 
Statisticsm_lonStat
 Universal longitude statistics.
 
Statisticsm_obliqueResStat
 Oblique pixel resolution statistics.
 
Statisticsm_obliqueSampleResStat
 Oblique sample resolution statistics.
 
Statisticsm_obliqueLineResStat
 Oblique line resolution statistics.
 
Statisticsm_resStat
 Pixel resolution statistics.
 
Statisticsm_sampleResStat
 Sample resolution statistics.
 
Statisticsm_lineResStat
 Line resolution statistics.
 
Statisticsm_aspectRatioStat
 Aspect ratio statistics.
 
Statisticsm_phaseStat
 Phase angle statistics.
 
Statisticsm_emissionStat
 Emission angle statistics.
 
Statisticsm_incidenceStat
 Incidence angle statistics.
 
Statisticsm_localSolarTimeStat
 Local solar time statistics.
 
Statisticsm_localRaduisStat
 Local radius statistics (in meters).
 
Statisticsm_northAzimuthStat
 North azimuth statistics.
 

Detailed Description

Calculates a series of statistics pertaining to a Camera.

Given a Camera pointer–or the filename of a Cube whose Camera is to be used–this class will calculate a series of statistics at initialization on the Camera. After construction, the user can retrieve statistics, compiled for every line/sample of the Camera, for the Camera's latitude, longitude, pixel resolution, sample resolution, line resolution, phase angle, emission angle, incidence angle, local solar time, meters, north azimuth, and aspect ratio.

Author
2011-06-14 Travis Addair
History

2011-06-14 Travis Addair - Extracted logic from "camstats" application to create this class.

2016-08-17 Tyler Wilson - Added Statistics objects for ObliquePixelResolution,ObliqueSampleResolution, and ObliqueLineResolution. References #476, #4100.

2017-08-30 Summer Stapleton - Updated documentation. References #4807.

Definition at line 42 of file CameraStatistics.h.

Constructor & Destructor Documentation

◆ CameraStatistics() [1/3]

Isis::CameraStatistics::CameraStatistics ( QString filename,
int sinc,
int linc )

Constructs the Camera Statistics object from a Cube filename.

This constructor will first open the cube corresponding to the "filename" parameter, then gather statistics with the Cube's Camera. Neither the Cube nor its Camera is retained after statistics gathering has completed, but the filename used to open the Cube will be output in the "User Parameters" group of the "toPvl" method. The invoker of this constructor must also specify the sample and line increments to be used during statistics gathering.

Parameters
filenameString filename of the Cube whose Camera will be used
sincSample increment for gathering statistics
lincLine increment for gathering statistics

Definition at line 32 of file CameraStatistics.cpp.

References Isis::Cube::camera(), init(), and Isis::Cube::open().

◆ CameraStatistics() [2/3]

Isis::CameraStatistics::CameraStatistics ( Camera * cam,
int sinc,
int linc )

Constructs the Camera Statistics object from an already-existent Camera pointer.

Specifying sample and line increments of 1 will gather statistics on the entire area encompassed by the Camera, but higher numbers can be used to improve performance. Using this constructor–lacking a Cube filename–the "toPvl" method will not output the Cube filename associated with the Camera. If the user desires this information, there is a constructor that will take the filename purely for this purpose.

Parameters
camCamera pointer upon which statistics will be gathered
sincSample increment for gathering statistics
lincLine increment for gathering statistics

Definition at line 54 of file CameraStatistics.cpp.

References init().

◆ CameraStatistics() [3/3]

Isis::CameraStatistics::CameraStatistics ( Camera * cam,
int sinc,
int linc,
QString filename )

Constructs the Camera Statistics object from an already-existent Camera pointer.

Specifying sample and line increments of 1 will gather statistics on the entire area encompassed by the Camera, but higher numbers can be used to improve performance. The filename provided does not serve a functional purpose during the statistics gathering process, but will report the filename used to create the Camera instance in the "User Parameters" section of the PVL output from the "toPvl" method.

Parameters
camCamera pointer upon which statistics will be gathered
sincSample increment for gathering statistics
lincLine increment for gathering statistics
filenameString filename of the Cube whose Camera is being used

Definition at line 73 of file CameraStatistics.cpp.

References init().

◆ ~CameraStatistics()

Isis::CameraStatistics::~CameraStatistics ( )
virtual

Member Function Documentation

◆ addStats()

void Isis::CameraStatistics::addStats ( Camera * cam,
int & sample,
int & line )

Add statistics data to Statistics objects if the Camera position given by the provided line and sample is looking at the surface of the target.

Parameters
camCamera pointer upon which statistics are being gathered
sampleSample of the image to gather Camera information on
lineLine of the image to gather Camera information on

Definition at line 238 of file CameraStatistics.cpp.

References Isis::Statistics::AddData(), m_aspectRatioStat, m_emissionStat, m_incidenceStat, m_latStat, m_lineResStat, m_localRaduisStat, m_localSolarTimeStat, m_lonStat, m_northAzimuthStat, m_obliqueLineResStat, m_obliqueResStat, m_obliqueSampleResStat, m_phaseStat, m_resStat, and m_sampleResStat.

Referenced by init().

◆ constructKeyword()

PvlKeyword Isis::CameraStatistics::constructKeyword ( QString keyname,
double value,
QString unit = "" ) const

Takes a name, value, and optionally units and constructs a PVL Keyword.

If the value is determined to be a "special pixel", then the string NULL will be used for the value.

Parameters
keynameName of keyword to generate
valueValue to write to keyword
unitOptional units for keywords
Returns
PvlKeyword Keyword constructed from input parameters

Definition at line 280 of file CameraStatistics.cpp.

References Isis::IsSpecial(), and Isis::toString().

Referenced by toPvl().

◆ getAspectRatioStat()

const Statistics * Isis::CameraStatistics::getAspectRatioStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Aspect Ratios of the input Camera.

Returns
Statistics * Constant pointer to Aspect Ratio Statistics

Definition at line 152 of file CameraStatistics.h.

References m_aspectRatioStat.

◆ getEmissionStat()

const Statistics * Isis::CameraStatistics::getEmissionStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Emission Angles of the input Camera.

Returns
Statistics * Constant pointer to Emission Angle Statistics

Definition at line 174 of file CameraStatistics.h.

References m_emissionStat.

◆ getIncidenceStat()

const Statistics * Isis::CameraStatistics::getIncidenceStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Incidence Angles of the input Camera.

Returns
Statistics * Constant pointer to Incidence Angle Statistics

Definition at line 185 of file CameraStatistics.h.

References m_incidenceStat.

◆ getLatStat()

const Statistics * Isis::CameraStatistics::getLatStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Universal Latitudes of the input Camera.

Returns
Statistics * Constant pointer to Latitude Statistics

Definition at line 61 of file CameraStatistics.h.

References m_latStat.

◆ getLineResStat()

const Statistics * Isis::CameraStatistics::getLineResStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Line Resolution of the input Camera.

Returns
Statistics * Constant pointer to Line Resolution Statistics

Definition at line 141 of file CameraStatistics.h.

References m_lineResStat.

◆ getLocalRaduisStat()

const Statistics * Isis::CameraStatistics::getLocalRaduisStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Local Radii (in meters) of the input Camera.

Returns
Statistics * Constant pointer to Local Radius Statistics

Definition at line 207 of file CameraStatistics.h.

References m_localRaduisStat.

◆ getLocalSolarTimeStat()

const Statistics * Isis::CameraStatistics::getLocalSolarTimeStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Local Solar Times of the input Camera.

Returns
Statistics * Constant pointer to Local Solar Time Statistics

Definition at line 196 of file CameraStatistics.h.

References m_localSolarTimeStat.

◆ getLonStat()

const Statistics * Isis::CameraStatistics::getLonStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Universal Longitudes of the input Camera.

Returns
Statistics * Constant pointer to Longitude Statistics

Definition at line 72 of file CameraStatistics.h.

References m_lonStat.

◆ getNorthAzimuthStat()

const Statistics * Isis::CameraStatistics::getNorthAzimuthStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the North Azimuths of the input Camera.

Returns
Statistics * Constant pointer to North Azimuth Statistics

Definition at line 218 of file CameraStatistics.h.

References m_northAzimuthStat.

◆ getObliqueLineResStat()

const Statistics * Isis::CameraStatistics::getObliqueLineResStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the oblique line resolution of the input Camera.

Returns
Statistics * Constant pointer to oblique line resolution statistics

Definition at line 118 of file CameraStatistics.h.

References m_obliqueLineResStat.

◆ getObliqueResStat()

const Statistics * Isis::CameraStatistics::getObliqueResStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the oblique pixel resolutions of the input Camera.

Returns
Statistics * Constant pointer to oblique pixel resolution statistics

Definition at line 96 of file CameraStatistics.h.

References m_obliqueResStat.

◆ getObliqueSampleResStat()

const Statistics * Isis::CameraStatistics::getObliqueSampleResStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the oblique sample resolutions of the input Camera.

Returns
Statistics * Constant pointer to oblique sample resolution statistics

Definition at line 106 of file CameraStatistics.h.

References m_obliqueSampleResStat.

◆ getPhaseStat()

const Statistics * Isis::CameraStatistics::getPhaseStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Phase Angles of the input Camera.

Returns
Statistics * Constant pointer to Phase Angle Statistics

Definition at line 163 of file CameraStatistics.h.

References m_phaseStat.

◆ getResStat()

const Statistics * Isis::CameraStatistics::getResStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Pixel Resolutions of the input Camera.

Returns
Statistics * Constant pointer to Pixel Resolution Statistics

Definition at line 84 of file CameraStatistics.h.

References m_resStat.

◆ getSampleResStat()

const Statistics * Isis::CameraStatistics::getSampleResStat ( ) const
inline

Accessor method for inspecting the statistics gathered on the Sample Resolutions of the input Camera.

Returns
Statistics * Constant pointer to Sample Resolution Statistics

Definition at line 130 of file CameraStatistics.h.

References m_sampleResStat.

◆ init()

void Isis::CameraStatistics::init ( Camera * cam,
int sinc,
int linc,
QString filename )
private

Initializes this collection of statistics by incrementing over sample/line positions in the Camera and compiling various Camera values at those locations into all the Statistics objects maintained as the persistent state of the object.

Statistics can be added to these objects later using the "addStats" method.

Parameters
camCamera pointer upon which statistics will be gathered
sincSample increment for gathering statistics
lincLine increment for gathering statistics
filenameString filename of the Cube whose Camera is being used

Definition at line 91 of file CameraStatistics.cpp.

References addStats(), Isis::Progress::CheckStatus(), m_aspectRatioStat, m_emissionStat, m_filename, m_incidenceStat, m_latStat, m_linc, m_lineResStat, m_localRaduisStat, m_localSolarTimeStat, m_lonStat, m_northAzimuthStat, m_obliqueLineResStat, m_obliqueResStat, m_obliqueSampleResStat, m_phaseStat, m_resStat, m_sampleResStat, m_sinc, and Isis::Progress::SetMaximumSteps().

Referenced by CameraStatistics(), CameraStatistics(), and CameraStatistics().

◆ toPvl()

Pvl Isis::CameraStatistics::toPvl ( ) const

Constructs a Pvl object from the values in the various statistics objects.

The general format will look as follows:

Group = User Parameters
Filename (not provided for constructor w/ Camera but not filename)
Linc
Sinc
End_Group
Group = Latitude
LatitudeMinimum
LatitudeMaximum
LatitudeStandardDeviation
End_Group
Group = Longitude
LongitudeMinimum
LongitudeMaximum
LongitudeStandardDeviation
End_Group
Group = SampleResolution
SampleResolutionMinimum
SampleResolutionMaximum
SampleResolutionStandardDeviation
End_Group
Group = LineResolution
LineResolutionMinimum
LineResolutionMaximum
LineResolutionStandardDeviation
End_Group
Group = Resolution
ResolutionMinimum
ResolutionMaximum
ResolutionStandardDeviation
End_Group
Group = AspectRatio
AspectRatioMinimum
AspectRatioMaximum
AspectRatioStandardDeviation
End_Group
Group = PhaseAngle
PhaseMinimum
PhaseMaximum
PhaseStandardDeviation
End_Group
Group = EmissionAngle
EmissionMinimum
EmissionMaximum
EmissionStandardDeviation
End_Group
Group = IncidenceAngle
IncidenceMinimum
IncidenceMaximum
IncidenceStandardDeviation
End_Group
Group = LocalSolarTime
LocalSolarTimeMinimum
LocalSolarTimeMaximum
LocalSolarTimeStandardDeviation
End_Group
Group = LocalRadius
LocalRadiusMinimum
LocalRadiusMaximum
LocalRadiusStandardDeviation
End_Group
Group = NorthAzimuth
NorthAzimuthMinimum
NorthAzimuthMaximum
NorthAzimuthStandardDeviation
End_Group
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
Returns
Pvl PVL collection of all values for all statistics gathered

Definition at line 366 of file CameraStatistics.cpp.

References Isis::Statistics::Average(), constructKeyword(), m_aspectRatioStat, m_emissionStat, m_filename, m_incidenceStat, m_latStat, m_linc, m_lineResStat, m_localRaduisStat, m_localSolarTimeStat, m_lonStat, m_northAzimuthStat, m_obliqueLineResStat, m_obliqueResStat, m_obliqueSampleResStat, m_phaseStat, m_resStat, m_sampleResStat, m_sinc, Isis::Statistics::Maximum(), Isis::Statistics::Minimum(), Isis::Pvl::setTerminator(), Isis::Statistics::StandardDeviation(), and Isis::toString().

Member Data Documentation

◆ m_aspectRatioStat

Statistics* Isis::CameraStatistics::m_aspectRatioStat
private

Aspect ratio statistics.

Definition at line 242 of file CameraStatistics.h.

Referenced by addStats(), getAspectRatioStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_emissionStat

Statistics* Isis::CameraStatistics::m_emissionStat
private

Emission angle statistics.

Definition at line 244 of file CameraStatistics.h.

Referenced by addStats(), getEmissionStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_filename

QString Isis::CameraStatistics::m_filename
private

FileName of the Cube the Camera was derived from.

Definition at line 226 of file CameraStatistics.h.

Referenced by init(), and toPvl().

◆ m_incidenceStat

Statistics* Isis::CameraStatistics::m_incidenceStat
private

Incidence angle statistics.

Definition at line 245 of file CameraStatistics.h.

Referenced by addStats(), getIncidenceStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_latStat

Statistics* Isis::CameraStatistics::m_latStat
private

Universal latitude statistics.

Definition at line 230 of file CameraStatistics.h.

Referenced by addStats(), getLatStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_linc

int Isis::CameraStatistics::m_linc
private

Line increment for composing statistics.

Definition at line 228 of file CameraStatistics.h.

Referenced by init(), and toPvl().

◆ m_lineResStat

Statistics* Isis::CameraStatistics::m_lineResStat
private

Line resolution statistics.

Definition at line 241 of file CameraStatistics.h.

Referenced by addStats(), getLineResStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_localRaduisStat

Statistics* Isis::CameraStatistics::m_localRaduisStat
private

Local radius statistics (in meters).

Definition at line 247 of file CameraStatistics.h.

Referenced by addStats(), getLocalRaduisStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_localSolarTimeStat

Statistics* Isis::CameraStatistics::m_localSolarTimeStat
private

Local solar time statistics.

Definition at line 246 of file CameraStatistics.h.

Referenced by addStats(), getLocalSolarTimeStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_lonStat

Statistics* Isis::CameraStatistics::m_lonStat
private

Universal longitude statistics.

Definition at line 231 of file CameraStatistics.h.

Referenced by addStats(), getLonStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_northAzimuthStat

Statistics* Isis::CameraStatistics::m_northAzimuthStat
private

North azimuth statistics.

Definition at line 248 of file CameraStatistics.h.

Referenced by addStats(), getNorthAzimuthStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_obliqueLineResStat

Statistics* Isis::CameraStatistics::m_obliqueLineResStat
private

Oblique line resolution statistics.

Definition at line 237 of file CameraStatistics.h.

Referenced by addStats(), getObliqueLineResStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_obliqueResStat

Statistics* Isis::CameraStatistics::m_obliqueResStat
private

Oblique pixel resolution statistics.

Definition at line 235 of file CameraStatistics.h.

Referenced by addStats(), getObliqueResStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_obliqueSampleResStat

Statistics* Isis::CameraStatistics::m_obliqueSampleResStat
private

Oblique sample resolution statistics.

Definition at line 236 of file CameraStatistics.h.

Referenced by addStats(), getObliqueSampleResStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_phaseStat

Statistics* Isis::CameraStatistics::m_phaseStat
private

Phase angle statistics.

Definition at line 243 of file CameraStatistics.h.

Referenced by addStats(), getPhaseStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_resStat

Statistics* Isis::CameraStatistics::m_resStat
private

Pixel resolution statistics.

Definition at line 239 of file CameraStatistics.h.

Referenced by addStats(), getResStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_sampleResStat

Statistics* Isis::CameraStatistics::m_sampleResStat
private

Sample resolution statistics.

Definition at line 240 of file CameraStatistics.h.

Referenced by addStats(), getSampleResStat(), init(), toPvl(), and ~CameraStatistics().

◆ m_sinc

int Isis::CameraStatistics::m_sinc
private

Sample increment for composing statistics.

Definition at line 227 of file CameraStatistics.h.

Referenced by init(), and toPvl().


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