|
Isis 3 Programmer Reference
|
8 #include "CameraStatistics.h"
14 #include "Statistics.h"
37 init(cam, sinc, linc, filename);
56 init(cam, sinc, linc,
"");
76 init(cam, sinc, linc, filename);
119 int eband = cam->
Bands();
124 int pTotal = eband * ((cam->
Lines() - 2) / linc + 2);
129 for (
int band = 1; band <= eband; band++) {
131 for (
int line = 1; line < (int)cam->
Lines(); line = line + linc) {
132 for (
int sample = 1; sample < cam->
Samples(); sample = sample + sinc) {
144 int line = cam->
Lines();
145 for (
int sample = 1; sample < cam->
Samples(); sample = sample + sinc) {
282 double value, QString unit=
"")
const {
387 PvlGroup pObliqueSampleRes(
"ObliqueSampleResolution");
394 pObliqueSampleRes +=
constructKeyword(
"ObliqueSampleResolutionStandardDeviation",
397 PvlGroup pObliqueLineRes(
"ObliqueLineResolution");
404 pObliqueLineRes +=
constructKeyword(
"ObliqueLineResolutionStandardDeviation",
407 PvlGroup pObliqueResolution(
"ObliqueResolution");
414 pObliqueResolution +=
constructKeyword(
"ObliqueResolutionStandardDeviation",
418 PvlGroup pSampleRes(
"SampleResolution");
428 PvlGroup pLineRes(
"LineResolution");
448 PvlGroup pAspectRatio(
"AspectRatio");
462 PvlGroup pEmission(
"EmissionAngle");
469 PvlGroup pIncidence(
"IncidenceAngle");
486 PvlGroup pLocalRadius(
"LocalRadius");
493 PvlGroup pNorthAzimuth(
"NorthAzimuth");
509 returnPvl.
addGroup(pObliqueSampleRes);
510 returnPvl.
addGroup(pObliqueLineRes);
511 returnPvl.
addGroup(pObliqueResolution);
virtual void SetBand(const int band)
Virtual method that sets the band number.
This class is used to accumulate statistics on double arrays.
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
void CheckStatus()
Checks and updates the status.
virtual double ObliquePixelResolution()
Returns the oblique pixel resolution at the current position in meters/pixel.
A single keyword-value pair.
int m_sinc
Sample increment for composing statistics.
bool HasSurfaceIntersection() const
Returns if the last call to either SetLookDirection or SetUniversalGround had a valid intersection wi...
virtual bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
Statistics * m_emissionStat
Emission angle statistics.
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
Statistics * m_resStat
Pixel resolution statistics.
double Maximum() const
Returns the absolute maximum double found in all data passed through the AddData method.
virtual double ObliqueSampleResolution()
Returns the oblique sample resolution at the current position in m.
Container for cube-like labels.
double LocalSolarTime()
Return the local solar time in hours.
Statistics * m_obliqueSampleResStat
Oblique sample resolution statistics.
Statistics * m_localRaduisStat
Local radius statistics (in meters).
Pvl toPvl() const
Constructs a Pvl object from the values in the various statistics objects.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
bool IsSpecial(const double d)
Returns if the input pixel is special.
void addStats(Camera *cam, int &sample, int &line)
Add statistics data to Statistics objects if the Camera position given by the provided line and sampl...
Statistics * m_obliqueResStat
Oblique pixel resolution statistics.
Statistics * m_phaseStat
Phase angle statistics.
Statistics * m_incidenceStat
Incidence angle statistics.
Contains multiple PvlContainers.
virtual double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
Statistics * m_aspectRatioStat
Aspect ratio statistics.
double StandardDeviation() const
Computes and returns the standard deviation.
double Minimum() const
Returns the absolute minimum double found in all data passed through the AddData method.
QString m_filename
FileName of the Cube the Camera was derived from.
virtual double LineResolution()
Returns the line resolution at the current position in meters.
virtual ~CameraStatistics()
Destroy this instance, deletes all the Statistics objects.
Statistics * m_lineResStat
Line resolution statistics.
int m_linc
Line increment for composing statistics.
double NorthAzimuth()
Returns the North Azimuth.
IO Handler for Isis Cubes.
virtual double IncidenceAngle() const
Returns the incidence angle in degrees.
CameraStatistics(QString filename, int sinc, int linc)
Constructs the Camera Statistics object from a Cube filename.
Program progress reporter.
int Bands() const
Returns the number of bands in the image.
Statistics * m_northAzimuthStat
North azimuth statistics.
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
virtual bool IsBandIndependent()
Virtual method that checks if the band is independent.
int Samples() const
Returns the number of samples in the image.
double Average() const
Computes and returns the average.
void init(Camera *cam, int sinc, int linc, QString filename)
Initializes this collection of statistics by incrementing over sample/line positions in the Camera an...
Camera * camera()
Return a camera associated with the cube.
Statistics * m_lonStat
Universal longitude statistics.
virtual double PixelResolution()
Returns the pixel resolution at the current position in meters/pixel.
PvlKeyword constructKeyword(QString keyname, double value, QString unit) const
Takes a name, value, and optionally units and constructs a PVL Keyword.
double meters() const
Get the distance in meters.
virtual double PhaseAngle() const
Returns the phase angle in degrees.
int Lines() const
Returns the number of lines in the image.
virtual double EmissionAngle() const
Returns the emission angle in degrees.
virtual double SampleResolution()
Returns the sample resolution at the current position in meters.
Statistics * m_localSolarTimeStat
Local solar time statistics.
void open(const QString &cfile, QString access="r")
This method will open an isis cube for reading or reading/writing.
virtual double ObliqueLineResolution()
Returns the oblique line resolution at the current position in meters.
Statistics * m_obliqueLineResStat
Oblique line resolution statistics.
This is free and unencumbered software released into the public domain.
void setTerminator(const QString &term)
Sets the terminator used to signify the end of the PVL informationDefaults to "END".
Distance LocalRadius() const
Returns the local radius at the intersection point.
Statistics * m_sampleResStat
Sample resolution statistics.
virtual double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
Statistics * m_latStat
Universal latitude statistics.