7#include "CameraStatistics.h"
13#include "Statistics.h"
36 init(cam, sinc, linc, filename);
55 init(cam, sinc, linc,
"");
75 init(cam, sinc, linc, filename);
118 int eband = cam->Bands();
121 if (cam->IsBandIndependent()) eband = 1;
123 int pTotal = eband * ((cam->Lines() - 2) / linc + 2);
128 for (
int band = 1; band <= eband; band++) {
130 for (
int line = 1; line < (int)cam->Lines(); line = line + linc) {
131 for (
int sample = 1; sample < cam->Samples(); sample = sample + sinc) {
136 int sample = cam->Samples();
143 int line = cam->Lines();
144 for (
int sample = 1; sample < cam->Samples(); sample = sample + sinc) {
149 int sample = cam->Samples();
239 cam->SetImage(sample, line);
240 if(cam->HasSurfaceIntersection()) {
263 double aspectRatio = cam->LineResolution() / cam->SampleResolution();
281 double value, QString unit=
"")
const {
386 PvlGroup pObliqueSampleRes(
"ObliqueSampleResolution");
393 pObliqueSampleRes +=
constructKeyword(
"ObliqueSampleResolutionStandardDeviation",
396 PvlGroup pObliqueLineRes(
"ObliqueLineResolution");
403 pObliqueLineRes +=
constructKeyword(
"ObliqueLineResolutionStandardDeviation",
406 PvlGroup pObliqueResolution(
"ObliqueResolution");
413 pObliqueResolution +=
constructKeyword(
"ObliqueResolutionStandardDeviation",
417 PvlGroup pSampleRes(
"SampleResolution");
427 PvlGroup pLineRes(
"LineResolution");
447 PvlGroup pAspectRatio(
"AspectRatio");
461 PvlGroup pEmission(
"EmissionAngle");
468 PvlGroup pIncidence(
"IncidenceAngle");
485 PvlGroup pLocalRadius(
"LocalRadius");
492 PvlGroup pNorthAzimuth(
"NorthAzimuth");
501 returnPvl.addGroup(pUser);
502 returnPvl.addGroup(pLat);
503 returnPvl.addGroup(pLon);
504 returnPvl.addGroup(pSampleRes);
505 returnPvl.addGroup(pLineRes);
506 returnPvl.addGroup(pResolution);
508 returnPvl.addGroup(pObliqueSampleRes);
509 returnPvl.addGroup(pObliqueLineRes);
510 returnPvl.addGroup(pObliqueResolution);
512 returnPvl.addGroup(pAspectRatio);
513 returnPvl.addGroup(pPhase);
514 returnPvl.addGroup(pEmission);
515 returnPvl.addGroup(pIncidence);
516 returnPvl.addGroup(pTime);
517 returnPvl.addGroup(pLocalRadius);
518 returnPvl.addGroup(pNorthAzimuth);
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...
Statistics * m_lonStat
Universal longitude statistics.
Statistics * m_lineResStat
Line resolution statistics.
Statistics * m_obliqueResStat
Oblique pixel resolution statistics.
Statistics * m_aspectRatioStat
Aspect ratio statistics.
Statistics * m_obliqueLineResStat
Oblique line resolution statistics.
Statistics * m_sampleResStat
Sample resolution statistics.
CameraStatistics(QString filename, int sinc, int linc)
Constructs the Camera Statistics object from a Cube filename.
Statistics * m_phaseStat
Phase angle statistics.
Pvl toPvl() const
Constructs a Pvl object from the values in the various statistics objects.
Statistics * m_obliqueSampleResStat
Oblique sample resolution statistics.
Statistics * m_localSolarTimeStat
Local solar time statistics.
Statistics * m_resStat
Pixel resolution statistics.
int m_sinc
Sample increment for composing statistics.
int m_linc
Line increment for composing statistics.
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 sampl...
PvlKeyword constructKeyword(QString keyname, double value, QString unit) const
Takes a name, value, and optionally units and constructs a PVL Keyword.
Statistics * m_northAzimuthStat
North azimuth statistics.
Statistics * m_localRaduisStat
Local radius statistics (in meters).
Statistics * m_emissionStat
Emission angle statistics.
Statistics * m_incidenceStat
Incidence angle statistics.
QString m_filename
FileName of the Cube the Camera was derived from.
Statistics * m_latStat
Universal latitude statistics.
IO Handler for Isis Cubes.
Camera * camera()
Return a camera associated with the cube.
void open(const QString &cfile, QString access="r")
This method will open an existing isis cube for reading or reading/writing.
Program progress reporter.
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
void CheckStatus()
Checks and updates the status.
Contains multiple PvlContainers.
Container for cube-like labels.
void setTerminator(const QString &term)
Sets the terminator used to signify the end of the PVL informationDefaults to "END".
A single keyword-value pair.
This class is used to accumulate statistics on double arrays.
double Average() const
Computes and returns the average.
double Minimum() const
Returns the absolute minimum double found in all data passed through the AddData method.
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
double Maximum() const
Returns the absolute maximum double found in all data passed through the AddData method.
double StandardDeviation() const
Computes and returns the standard deviation.
This is free and unencumbered software released into the public domain.
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.