File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
 |
Isis 3 Programmer Reference
|
9 #include "ControlNetValidMeasure.h"
12 #include "ControlMeasure.h"
13 #include "CubeManager.h"
14 #include "MeasureValidationResults.h"
15 #include "SerialNumberList.h"
16 #include "SpecialPixel.h"
17 #include "UniversalGroundMap.h"
32 if(pPvl != NULL && pPvl->
hasGroup(
"ValidMeasure")) {
184 Camera *measureCamera = NULL;
187 measureCamera = pCube->
camera();
190 QString msg =
"Cannot Create Camera for Image:" + pCube->
fileName();
196 pCube, measureCamera, pMeasureGrp);
215 if (measureCamera != NULL) {
216 bool success = measureCamera->
SetImage(pSample, pLine);
224 if (pMeasure != NULL) {
225 double temp = pMeasure->GetSampleResidual();
230 temp = pMeasure->GetLineResidual();
240 temp = pMeasure->GetSampleShift();
245 temp = pMeasure->GetLineShift();
250 temp = pMeasure->GetPixelShift();
258 inPortal.SetPosition(pSample, pLine, 1);
259 pCube->
read(inPortal);
263 if(pMeasureGrp != NULL) {
270 *pMeasureGrp +=
Isis::PvlKeyword(
"EmissionAngle",
"Invalid Emission Angle");
271 *pMeasureGrp +=
Isis::PvlKeyword(
"IncidenceAngle",
"Invalid Incidence Angle");
286 MeasureValidationResults results;
290 results.addFailure(MeasureValidationResults::EmissionAngle,
295 results.addFailure(MeasureValidationResults::IncidenceAngle,
300 results.addFailure(MeasureValidationResults::Resolution,
307 results.addFailure(MeasureValidationResults::DNValue,
314 results.addFailure(MeasureValidationResults::PixelsFromEdge,
miPixelsFromEdge);
318 results.addFailure(MeasureValidationResults::MetersFromEdge,
323 if(pMeasure != NULL) {
346 double pSample,
double pLine,
Cube *pCube,
PvlGroup *pMeasureGrp) {
368 double dSample, dLine;
369 dSample = pMeasure->GetSample();
370 dLine = pMeasure->GetLine();
380 double dSample, dLine;
381 dSample = pMeasure->GetSample();
382 dLine = pMeasure->GetLine();
385 pCube, camera, pMeasureGrp);
446 QString msg =
"Invalid Resolution value(s), Resolution must be greater than zero";
451 QString msg =
"MinResolution must be less than MaxResolution";
484 QString msg =
"MinDN must be less than MaxDN";
501 if(mdMinEmissionAngle < 0 || mdMinEmissionAngle > 135) {
502 QString msg =
"Invalid Min Emission Angle, Valid Range is [0-135]";
511 if(mdMaxEmissionAngle < 0 || mdMaxEmissionAngle > 135) {
512 QString msg =
"Invalid Max Emission Angle, Valid Range is [0-135]";
519 QString msg =
"Min EmissionAngle must be less than Max EmissionAngle";
537 if(mdMinIncidenceAngle < 0 || mdMinIncidenceAngle > 135) {
538 QString msg =
"Invalid Min Incidence Angle, Valid Range is [0-135]";
547 if(mdMaxIncidenceAngle < 0 || mdMaxIncidenceAngle > 135) {
548 QString msg =
"Invalid Max Incidence Angle, Valid Range is [0-135]";
555 QString msg =
"Min IncidenceAngle must be less than Max IncidenceAngle";
567 bool bResMag =
false;
571 QString msg =
"Invalid Sample Residual, must be greater than zero";
581 QString msg =
"Invalid Line Residual, must be greater than zero";
591 QString msg =
"Invalid Residual Magnitude Tolerance, must be greater than zero";
598 if(bRes && bResMag) {
599 QString msg =
"Cannot have both Sample/Line Residuals and Residual Magnitude.";
600 msg +=
"\nChoose either Sample/Line Residual or Residual Magnitude";
611 bool hasSampleLineShift =
false;
615 QString msg =
"Invalid Sample Shift tolerance:"
616 " must be greater than or equal to zero";
619 hasSampleLineShift =
true;
626 QString msg =
"Invalid Line Shift tolerance:"
627 " must be greater than or equal to zero";
630 hasSampleLineShift =
true;
634 bool hasPixelShift =
false;
638 QString msg =
"Invalid Pixel Shift tolerance:"
639 " must be greater than or equal to zero";
642 hasPixelShift =
true;
646 if (hasSampleLineShift && hasPixelShift) {
647 QString msg =
"Cannot have both Sample/Line Shift and Pixel Shift";
648 msg +=
" tolerances.\n";
649 msg +=
"Choose either Sample/Line Shift or Pixel Shift to validate on";
740 double pdLineResidual,
double pdResidualMagnitude,
750 pResults.addFailure(MeasureValidationResults::LineResidual,
mdLineResTolerance,
"greater");
754 pResults.addFailure(MeasureValidationResults::ResidualMagnitude,
mdResidualTolerance,
"greater");
773 double sampleShift,
double lineShift,
double pixelShift,
780 results.addFailure(MeasureValidationResults::SampleShift,
785 results.addFailure(MeasureValidationResults::LineShift,
790 results.addFailure(MeasureValidationResults::PixelShift,
877 double resMetersTotal = 0;
878 bool bMinDistance =
false;
881 for(
int line = piLine - 1; line > 0; line--) {
884 resMetersTotal += resolution;
895 bMinDistance =
false;
897 for(
int line = piLine + 1; line <= iNumLines; line++) {
900 resMetersTotal += resolution;
912 bMinDistance =
false;
913 for(
int sample = piSample - 1; sample > 0; sample--) {
916 resMetersTotal += resolution;
928 bMinDistance =
false;
929 for(
int sample = piSample + 1; sample <= iNumSamples; sample++) {
932 resMetersTotal += resolution;
940 QString msg =
"Cannot Create Camera for Image [" +
const double ValidMaximum
The maximum valid double value for Isis pixels.
double GetResidualMagnitude() const
Return Residual magnitude.
double m_sampleShiftTolerance
Standard Option Sample Shift.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
virtual QString fileName() const
Returns the opened cube's filename.
double m_pixelShiftTolerance
Standard Option Pixel Shift.
Buffer for containing a two dimensional section of an image.
A single keyword-value pair.
double mdEmissionAngle
Store current Measure's Emission Angle.
bool ValidShiftTolerances(double sampleShift, double lineShift, double pixelShift, MeasureValidationResults &results)
Validate whether the Sample and Line Shifts and Pixel Shift are within the set Tolerances.
bool ValidResolution(double pdResolution)
Validate whether the Resolution is in the set Range.
bool mbValidateDN
Check if DN needs to be Validated.
void InitStdOptions(void)
Initialize the Standard Options.
bool mbCameraRequired
To improve speed, flag to indicate if Camera needs to be opened.
void ValidatePvlEmissionAngle(void)
Validate PVL Min & Max EmissionAngle Standard Options.
virtual bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
void read(Blob &blob, const std::vector< PvlKeyword > keywords=std::vector< PvlKeyword >()) const
This method will read data from the specified Blob object.
PvlGroup mStdOptionsGrp
Pvl Standard Options Group.
double m_lineShiftTolerance
Standard Option Line Shift.
double mdMaxDN
Standard Option MaxDN.
bool ValidDnValue(double pdDnValue)
Validate whether the DN Value is in the set Range.
double mdMaxEmissionAngle
Standard Option MaxEmissionAngle.
double m_sampleShift
Store current Measure's Sample Shift.
Progress mStatus
Monitor the status of the app.
bool ValidLatLon(Isis::Camera *pCamera, int piSample, int piLine)
Validate the Lat/Lon.
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
bool mbValidateFromEdge
Check if Pixels/Meters from edge needs to be Validated.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Container for cube-like labels.
bool PixelsFromEdge(int piSample, int piLine, Cube *pCube)
Test for a point to be user defined number of pixels from the edge.
CubeManager mCubeMgr
CubeManager to open and read cubes.
double mdLineResTolerance
Standard Option Line Residual.
void ValidatePvlDN(void)
Validate PVL Min & Max DN Standard Options.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Serial Number list generator.
bool IsSpecial(const double d)
Returns if the input pixel is special.
MeasureValidationResults class.
double mdSampleResTolerance
Standard Option Sample Residual.
void ValidatePvlShiftTolerances()
Validate Pvl Sample, Line, Pixel (Sample and Line) Magnitude Shift Tolerances.
@ Traverse
Search child objects.
PvlGroup mStatisticsGrp
Pvl output Statistics Group.
double mdSampleResidual
Store current Measure's Sample Residual.
ControlNetValidMeasure(Pvl *pvl=0)
Constructor - Initializes the data members and parses the input Pvl .
virtual ~ControlNetValidMeasure()
Destructor: clean up stuff relevant for this class.
bool ValidResidualTolerances(double pdSampleResidual, double pdLineResidual, double pdResidualMagnitude, MeasureValidationResults &pResults)
Validate whether the Residuals are within the set Tolerance.
SerialNumberList mSerialNumbers
Serial numbers list.
Contains multiple PvlContainers.
double mdMetersFromEdge
Standard Option MeteresFromEdge.
void InitStdOptionsGroup(void)
Initialize the Standard Options Pvl Group with no DefFile.
int miPixelsFromEdge
Standard Option PixelsFromEdge.
double mdResidualMagnitude
Store current Measure's Residual Magnitude.
PvlGroup mPvlOpGrp
Pvl Operator Group.
bool ValidIncidenceAngle(double pdIncidenceAngle)
Validate whether the Incidence Angle is in the set Range.
void ValidatePvlResidualTolerances(void)
Validate Pvl Sample, Line, Residual Magnitude Tolerances.
void CleanCubes(const QString &cubeFileName)
This method removes a cube from memory, if it exists.
MeasureValidationResults ValidStandardOptions(const ControlMeasure *pMeasure, Cube *pCube, PvlGroup *pMeasureGrp=NULL)
Validate Standard options to pick a reference based on a particular criteria.
double mdMinIncidenceAngle
Standard Option MinIncidenceAngle.
IO Handler for Isis Cubes.
double mdIncidenceAngle
Store current Measure's Incidence Angle.
bool MetersFromEdge(int piSample, int piLine, Cube *pCube)
Test for a point to be user defined number of meters from the edge.
void ValidatePvlIncidenceAngle(void)
Validate PVL Min & Max IncidenceAngle Standard Options.
double m_lineShift
Store current Measure's Line Shift.
virtual double IncidenceAngle() const
Returns the incidence angle in degrees.
const double Null
Value for an Isis Null pixel.
double mdMinDN
Standard Option MinDN.
void ReadSerialNumbers(QString psSerialNumfile)
Read the Serial Numbers from the file and open assocaited cubes.
double mdMinEmissionAngle
Standard Option MinEmissionAngle.
double mdMaxResolution
Standard Option MaxResolution.
Camera * camera()
Return a camera associated with the cube.
const double ValidMinimum
The minimum valid double value for Isis pixels.
double mdResolution
Store current Measure's Resolution.
PixelType pixelType() const
double mdDnValue
Store current Measure's DN Value.
Pvl mPvlLog
Pvl Log of all the processing.
virtual double PixelResolution()
Returns the pixel resolution at the current position in meters/pixel.
double mdMaxIncidenceAngle
Standard Option MaxIncidenceAngle.
void ValidatePvlResolution(void)
Validate PVL Min & Max Resolution Standard Options.
void SetNumOpenCubes(unsigned int numCubes)
This sets the maximum number of opened cubes for this instance of CubeManager.
virtual double EmissionAngle() const
Returns the emission angle in degrees.
bool ValidEmissionAngle(double pdEmissionAngle)
Validate whether the Emission Angle is in the set Range.
double mdResidualTolerance
Standard Option Residual Magnitude.
void Parse(Pvl &pvlDef)
Parse the DefFile for Standard Options.
double mdMinResolution
Standard Option MinResolution.
double mdLineResidual
Store current Measure's Line Residual.
This is free and unencumbered software released into the public domain.
void ValidatePvlFromEdge(void)
Validate and read Pixels and Meters from Edge Standard Options.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
double m_pixelShift
Store current Measure's Pixel Shift.