Isis 3 Programmer Reference
|
Calculates a series of statistics pertaining to a Camera. More...
#include <CameraStatistics.h>
Public Member Functions | |
CameraStatistics (QString filename, int sinc, int linc) | |
Constructs the Camera Statistics object from a Cube filename. More... | |
CameraStatistics (Camera *cam, int sinc, int linc) | |
Constructs the Camera Statistics object from an already-existent Camera pointer. More... | |
CameraStatistics (Camera *cam, int sinc, int linc, QString filename) | |
Constructs the Camera Statistics object from an already-existent Camera pointer. More... | |
virtual | ~CameraStatistics () |
Destroy this instance, deletes all the Statistics objects. More... | |
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. More... | |
PvlKeyword | constructKeyword (QString keyname, double value, QString unit) const |
Takes a name, value, and optionally units and constructs a PVL Keyword. More... | |
Pvl | toPvl () const |
Constructs a Pvl object from the values in the various statistics objects. More... | |
const Statistics * | getLatStat () const |
Accessor method for inspecting the statistics gathered on the Universal Latitudes of the input Camera. More... | |
const Statistics * | getLonStat () const |
Accessor method for inspecting the statistics gathered on the Universal Longitudes of the input Camera. More... | |
const Statistics * | getResStat () const |
Accessor method for inspecting the statistics gathered on the Pixel Resolutions of the input Camera. More... | |
const Statistics * | getObliqueResStat () const |
Accessor method for inspecting the statistics gathered on the oblique pixel resolutions of the input Camera. More... | |
const Statistics * | getObliqueSampleResStat () const |
Accessor method for inspecting the statistics gathered on the oblique sample resolutions of the input Camera. More... | |
const Statistics * | getObliqueLineResStat () const |
Accessor method for inspecting the statistics gathered on the oblique line resolution of the input Camera. More... | |
const Statistics * | getSampleResStat () const |
Accessor method for inspecting the statistics gathered on the Sample Resolutions of the input Camera. More... | |
const Statistics * | getLineResStat () const |
Accessor method for inspecting the statistics gathered on the Line Resolution of the input Camera. More... | |
const Statistics * | getAspectRatioStat () const |
Accessor method for inspecting the statistics gathered on the Aspect Ratios of the input Camera. More... | |
const Statistics * | getPhaseStat () const |
Accessor method for inspecting the statistics gathered on the Phase Angles of the input Camera. More... | |
const Statistics * | getEmissionStat () const |
Accessor method for inspecting the statistics gathered on the Emission Angles of the input Camera. More... | |
const Statistics * | getIncidenceStat () const |
Accessor method for inspecting the statistics gathered on the Incidence Angles of the input Camera. More... | |
const Statistics * | getLocalSolarTimeStat () const |
Accessor method for inspecting the statistics gathered on the Local Solar Times of the input Camera. More... | |
const Statistics * | getLocalRaduisStat () const |
Accessor method for inspecting the statistics gathered on the Local Radii (in meters) of the input Camera. More... | |
const Statistics * | getNorthAzimuthStat () const |
Accessor method for inspecting the statistics gathered on the North Azimuths of the input Camera. More... | |
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. More... | |
Private Attributes | |
QString | m_filename |
FileName of the Cube the Camera was derived from. More... | |
int | m_sinc |
Sample increment for composing statistics. More... | |
int | m_linc |
Line increment for composing statistics. More... | |
Statistics * | m_latStat |
Universal latitude statistics. More... | |
Statistics * | m_lonStat |
Universal longitude statistics. More... | |
Statistics * | m_obliqueResStat |
Oblique pixel resolution statistics. More... | |
Statistics * | m_obliqueSampleResStat |
Oblique sample resolution statistics. More... | |
Statistics * | m_obliqueLineResStat |
Oblique line resolution statistics. More... | |
Statistics * | m_resStat |
Pixel resolution statistics. More... | |
Statistics * | m_sampleResStat |
Sample resolution statistics. More... | |
Statistics * | m_lineResStat |
Line resolution statistics. More... | |
Statistics * | m_aspectRatioStat |
Aspect ratio statistics. More... | |
Statistics * | m_phaseStat |
Phase angle statistics. More... | |
Statistics * | m_emissionStat |
Emission angle statistics. More... | |
Statistics * | m_incidenceStat |
Incidence angle statistics. More... | |
Statistics * | m_localSolarTimeStat |
Local solar time statistics. More... | |
Statistics * | m_localRaduisStat |
Local radius statistics (in meters). More... | |
Statistics * | m_northAzimuthStat |
North azimuth statistics. More... | |
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.
Definition at line 42 of file CameraStatistics.h.
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.
filename | String filename of the Cube whose Camera will be used |
sinc | Sample increment for gathering statistics |
linc | Line increment for gathering statistics |
Definition at line 33 of file CameraStatistics.cpp.
References Isis::Cube::camera(), init(), and Isis::Cube::open().
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.
cam | Camera pointer upon which statistics will be gathered |
sinc | Sample increment for gathering statistics |
linc | Line increment for gathering statistics |
Definition at line 55 of file CameraStatistics.cpp.
References init().
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.
cam | Camera pointer upon which statistics will be gathered |
sinc | Sample increment for gathering statistics |
linc | Line increment for gathering statistics |
filename | String filename of the Cube whose Camera is being used |
Definition at line 74 of file CameraStatistics.cpp.
References init().
|
virtual |
Destroy this instance, deletes all the Statistics objects.
Definition at line 160 of file CameraStatistics.cpp.
References 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.
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.
cam | Camera pointer upon which statistics are being gathered |
sample | Sample of the image to gather Camera information on |
line | Line of the image to gather Camera information on |
Definition at line 239 of file CameraStatistics.cpp.
References Isis::Statistics::AddData(), Isis::Sensor::EmissionAngle(), Isis::Sensor::HasSurfaceIntersection(), Isis::Sensor::IncidenceAngle(), Isis::Camera::LineResolution(), Isis::Sensor::LocalRadius(), Isis::Sensor::LocalSolarTime(), 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, m_sampleResStat, Isis::Distance::meters(), Isis::Camera::NorthAzimuth(), Isis::Camera::ObliqueLineResolution(), Isis::Camera::ObliquePixelResolution(), Isis::Camera::ObliqueSampleResolution(), Isis::Sensor::PhaseAngle(), Isis::Camera::PixelResolution(), Isis::Camera::SampleResolution(), Isis::Camera::SetImage(), Isis::Sensor::UniversalLatitude(), and Isis::Sensor::UniversalLongitude().
Referenced by init().
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.
keyname | Name of keyword to generate |
value | Value to write to keyword |
unit | Optional units for keywords |
Definition at line 281 of file CameraStatistics.cpp.
References Isis::IsSpecial(), and Isis::toString().
Referenced by toPvl().
|
inline |
Accessor method for inspecting the statistics gathered on the Aspect Ratios of the input Camera.
Definition at line 152 of file CameraStatistics.h.
References m_aspectRatioStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Emission Angles of the input Camera.
Definition at line 174 of file CameraStatistics.h.
References m_emissionStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Incidence Angles of the input Camera.
Definition at line 185 of file CameraStatistics.h.
References m_incidenceStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Universal Latitudes of the input Camera.
Definition at line 61 of file CameraStatistics.h.
References m_latStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Line Resolution of the input Camera.
Definition at line 141 of file CameraStatistics.h.
References m_lineResStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Local Radii (in meters) of the input Camera.
Definition at line 207 of file CameraStatistics.h.
References m_localRaduisStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Local Solar Times of the input Camera.
Definition at line 196 of file CameraStatistics.h.
References m_localSolarTimeStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Universal Longitudes of the input Camera.
Definition at line 72 of file CameraStatistics.h.
References m_lonStat.
|
inline |
Accessor method for inspecting the statistics gathered on the North Azimuths of the input Camera.
Definition at line 218 of file CameraStatistics.h.
References m_northAzimuthStat.
|
inline |
Accessor method for inspecting the statistics gathered on the oblique line resolution of the input Camera.
Definition at line 118 of file CameraStatistics.h.
References m_obliqueLineResStat.
|
inline |
Accessor method for inspecting the statistics gathered on the oblique pixel resolutions of the input Camera.
Definition at line 96 of file CameraStatistics.h.
References m_obliqueResStat.
|
inline |
Accessor method for inspecting the statistics gathered on the oblique sample resolutions of the input Camera.
Definition at line 106 of file CameraStatistics.h.
References m_obliqueSampleResStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Phase Angles of the input Camera.
Definition at line 163 of file CameraStatistics.h.
References m_phaseStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Pixel Resolutions of the input Camera.
Definition at line 84 of file CameraStatistics.h.
References m_resStat.
|
inline |
Accessor method for inspecting the statistics gathered on the Sample Resolutions of the input Camera.
Definition at line 130 of file CameraStatistics.h.
References m_sampleResStat.
|
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.
cam | Camera pointer upon which statistics will be gathered |
sinc | Sample increment for gathering statistics |
linc | Line increment for gathering statistics |
filename | String filename of the Cube whose Camera is being used |
Definition at line 92 of file CameraStatistics.cpp.
References addStats(), Isis::Camera::Bands(), Isis::Progress::CheckStatus(), Isis::Camera::IsBandIndependent(), Isis::Camera::Lines(), 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::Camera::Samples(), Isis::Camera::SetBand(), and Isis::Progress::SetMaximumSteps().
Referenced by CameraStatistics().
Pvl Isis::CameraStatistics::toPvl | ( | ) | const |
Constructs a Pvl object from the values in the various statistics objects.
The general format will look as follows:
Definition at line 367 of file CameraStatistics.cpp.
References Isis::PvlObject::addGroup(), 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().
|
private |
Aspect ratio statistics.
Definition at line 242 of file CameraStatistics.h.
Referenced by addStats(), getAspectRatioStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Emission angle statistics.
Definition at line 244 of file CameraStatistics.h.
Referenced by addStats(), getEmissionStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
|
private |
Incidence angle statistics.
Definition at line 245 of file CameraStatistics.h.
Referenced by addStats(), getIncidenceStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Universal latitude statistics.
Definition at line 230 of file CameraStatistics.h.
Referenced by addStats(), getLatStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Line increment for composing statistics.
Definition at line 228 of file CameraStatistics.h.
|
private |
Line resolution statistics.
Definition at line 241 of file CameraStatistics.h.
Referenced by addStats(), getLineResStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Local radius statistics (in meters).
Definition at line 247 of file CameraStatistics.h.
Referenced by addStats(), getLocalRaduisStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Local solar time statistics.
Definition at line 246 of file CameraStatistics.h.
Referenced by addStats(), getLocalSolarTimeStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Universal longitude statistics.
Definition at line 231 of file CameraStatistics.h.
Referenced by addStats(), getLonStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
North azimuth statistics.
Definition at line 248 of file CameraStatistics.h.
Referenced by addStats(), getNorthAzimuthStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Oblique line resolution statistics.
Definition at line 237 of file CameraStatistics.h.
Referenced by addStats(), getObliqueLineResStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Oblique pixel resolution statistics.
Definition at line 235 of file CameraStatistics.h.
Referenced by addStats(), getObliqueResStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Oblique sample resolution statistics.
Definition at line 236 of file CameraStatistics.h.
Referenced by addStats(), getObliqueSampleResStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Phase angle statistics.
Definition at line 243 of file CameraStatistics.h.
Referenced by addStats(), getPhaseStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Pixel resolution statistics.
Definition at line 239 of file CameraStatistics.h.
Referenced by addStats(), getResStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Sample resolution statistics.
Definition at line 240 of file CameraStatistics.h.
Referenced by addStats(), getSampleResStat(), init(), toPvl(), and ~CameraStatistics().
|
private |
Sample increment for composing statistics.
Definition at line 227 of file CameraStatistics.h.