USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::CameraStatistics Class Reference
[Spice, Instruments, and Cameras]

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

#include <CameraStatistics.h>

List of all members.

Public Member Functions

 CameraStatistics (std::string 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, std::string 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 (std::string keyname, double value, std::string 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 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.

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

Constructor & Destructor Documentation

Isis::CameraStatistics::CameraStatistics ( std::string  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:
filename String filename of the Cube whose Camera will be used
sinc Sample increment for gathering statistics
linc Line increment for gathering statistics
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:
cam Camera pointer upon which statistics will be gathered
sinc Sample increment for gathering statistics
linc Line increment for gathering statistics
Isis::CameraStatistics::CameraStatistics ( Camera cam,
int  sinc,
int  linc,
std::string  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:
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
Isis::CameraStatistics::~CameraStatistics (  )  [virtual]

Destroy this instance, deletes all the Statistics objects.


Member Function Documentation

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:
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
PvlKeyword Isis::CameraStatistics::constructKeyword ( std::string  keyname,
double  value,
std::string  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:
keyname Name of keyword to generate
value Value to write to keyword
unit Optional units for keywords
Returns:
PvlKeyword Keyword constructed from input parameters
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
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
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
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
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
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
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
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
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
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
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
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
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
Returns:
Pvl PVL collection of all values for all statistics gathered

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