Isis 3 Programmer Reference
ControlNetValidMeasure.h
1#ifndef _ControlNetValidMeasure_h_
2#define _ControlNetValidMeasure_h_
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include "CubeManager.h"
13#include "IString.h"
14#include "Pvl.h"
15#include "PvlGroup.h"
16#include "Progress.h"
17#include "SerialNumberList.h"
18
25/* SPDX-License-Identifier: CC0-1.0 */
26
27namespace Isis {
28 class Camera;
29 class Cube;
30 class ControlNet;
31 class MeasureValidationResults;
32 class ControlMeasure;
33
76 public:
79
81 void InitStdOptions(void);
82
84 void InitStdOptionsGroup(void);
85
87
89 void Parse(Pvl &pvlDef);
90
92 virtual Pvl &GetLogPvl(void) {
93 return mPvlLog;
94 };
95
97 virtual void FindCnetRef(ControlNet &pNewNet) {};
98
100 bool ValidEmissionAngle(double pdEmissionAngle);
101
103 bool ValidIncidenceAngle(double pdIncidenceAngle);
104
106 bool ValidDnValue(double pdDnValue);
107
109 bool ValidResolution(double pdResolution);
110
112 bool ValidResidualTolerances(double pdSampleResidual, double pdLineResidual,
113 double pdResidualMagnitude, MeasureValidationResults & pResults);
114
115 bool ValidShiftTolerances(double sampleShift, double lineShift,
116 double pixelShift, MeasureValidationResults &results);
117
119 bool ValidLatLon(Isis::Camera *pCamera, int piSample, int piLine);
120
123 return mStdOptionsGrp;
124 };
125
128 return mStatisticsGrp;
129 };
130
132 double GetMinDN(void) {
133 return mdMinDN;
134 };
135
137 double GetMaxDN(void) {
138 return mdMaxDN;
139 };
140
142 double GetMinEmissionAngle(void) {
143 return mdMinEmissionAngle;
144 };
145
147 double GetMaxEmissionAngle(void) {
148 return mdMaxEmissionAngle;
149 };
150
152 double GetMinIncidenceAngle(void) {
153 return mdMinIncidenceAngle;
154 };
155
157 double GetMaxIncidenceAngle(void) {
158 return mdMaxIncidenceAngle;
159 };
160
162 double GetPixelsFromEdge(void) {
163 return miPixelsFromEdge;
164 };
165
167 double GetMetersFromEdge(void) {
168 return mdMetersFromEdge;
169 };
170
172 QString LocationString(double pdSample, double pdLine) const {
173 return toString((int)pdSample) + "," + toString((int)pdLine);
174 };
175
177 bool PixelsFromEdge(int piSample, int piLine, Cube *pCube);
178
180 bool MetersFromEdge(int piSample, int piLine, Cube *pCube);
181
184 Cube *pCube, PvlGroup *pMeasureGrp = NULL);
185
188 Cube *pCube, Camera *camera, PvlGroup *pMeasureGrp = NULL);
189
191 MeasureValidationResults ValidStandardOptions(double pSample, double pLine,
192 const ControlMeasure *pMeasure, Cube *pCube, PvlGroup *pMeasureGrp = NULL);
193
194 MeasureValidationResults ValidStandardOptions(double pSample, double pLine,
195 const ControlMeasure *pMeasure, Cube *pCube, Camera *measureCamera,
196 PvlGroup *pMeasureGrp = NULL);
197
199 MeasureValidationResults ValidStandardOptions(double pSample, double pLine,
200 Cube *pCube, PvlGroup *pMeasureGrp = NULL);
201
202 bool IsCubeRequired() {
204 }
205
214 return mbCameraRequired;
215 }
216
217 protected:
219 void ValidatePvlDN(void);
220
222 void ValidatePvlEmissionAngle(void);
223
225 void ValidatePvlIncidenceAngle(void);
226
228 void ValidatePvlResolution(void);
229
231 void ValidatePvlFromEdge(void);
232
235
237
239 void ReadSerialNumbers(QString psSerialNumfile);
240
250 void SetCameraRequiredFlag(bool pbFlag){
251 mbCameraRequired = pbFlag;
252 }
253
254 double mdMinDN;
255 double mdMaxDN;
267
271
275 double mdDnValue;
279
281 double m_lineShift;
283
291
296 };
297};
298#endif
a control measurement
a control network
Definition ControlNet.h:258
ControlNetValidMeasure class.
double GetPixelsFromEdge(void)
Get the option PixelsFromEdge.
double GetMetersFromEdge(void)
Get the option MetersFromEdge.
double mdMaxResolution
Standard Option MaxResolution.
double m_lineShift
Store current Measure's Line Shift.
double GetMinDN(void)
Get the option MinDN.
void Parse(Pvl &pvlDef)
Parse the DefFile for Standard Options.
PvlGroup & GetStatistics(void)
Get the Statistics Pvl Grp.
bool mbCameraRequired
To improve speed, flag to indicate if Camera needs to be opened.
bool ValidResidualTolerances(double pdSampleResidual, double pdLineResidual, double pdResidualMagnitude, MeasureValidationResults &pResults)
Validate whether the Residuals are within the set Tolerance.
void ValidatePvlDN(void)
Validate PVL Min & Max DN Standard Options.
double m_sampleShift
Store current Measure's Sample Shift.
double mdSampleResTolerance
Standard Option Sample Residual.
double mdMinIncidenceAngle
Standard Option MinIncidenceAngle.
double GetMaxIncidenceAngle(void)
Get the option MaxIncidenceAngle.
virtual Pvl & GetLogPvl(void)
Get the Pvl Log file.
double GetMaxEmissionAngle(void)
Get the option MaxEmissionAngle.
bool PixelsFromEdge(int piSample, int piLine, Cube *pCube)
Test for a point to be user defined number of pixels from the edge.
double m_pixelShift
Store current Measure's Pixel Shift.
double mdMetersFromEdge
Standard Option MeteresFromEdge.
MeasureValidationResults ValidStandardOptions(const ControlMeasure *pMeasure, Cube *pCube, PvlGroup *pMeasureGrp=NULL)
Validate Standard options to pick a reference based on a particular criteria.
double m_sampleShiftTolerance
Standard Option Sample Shift.
double mdResidualMagnitude
Store current Measure's Residual Magnitude.
bool MetersFromEdge(int piSample, int piLine, Cube *pCube)
Test for a point to be user defined number of meters from the edge.
ControlNetValidMeasure(Pvl *pvl=0)
Constructor - Initializes the data members and parses the input Pvl .
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.
PvlGroup mStdOptionsGrp
Pvl Standard Options Group.
bool ValidResolution(double pdResolution)
Validate whether the Resolution is in the set Range.
double GetMinIncidenceAngle(void)
Get the option MinIncidenceAngle.
void ValidatePvlResolution(void)
Validate PVL Min & Max Resolution Standard Options.
void ValidatePvlEmissionAngle(void)
Validate PVL Min & Max EmissionAngle Standard Options.
double mdLineResTolerance
Standard Option Line Residual.
double mdMinDN
Standard Option MinDN.
double mdSampleResidual
Store current Measure's Sample Residual.
double mdLineResidual
Store current Measure's Line Residual.
double mdMaxDN
Standard Option MaxDN.
bool ValidIncidenceAngle(double pdIncidenceAngle)
Validate whether the Incidence Angle is in the set Range.
double mdMinEmissionAngle
Standard Option MinEmissionAngle.
virtual void FindCnetRef(ControlNet &pNewNet)
Virtual Function to get better references for a Control Network based on Criteria.
CubeManager mCubeMgr
CubeManager to open and read cubes.
PvlGroup mStatisticsGrp
Pvl output Statistics Group.
double mdEmissionAngle
Store current Measure's Emission Angle.
double mdDnValue
Store current Measure's DN Value.
double mdMaxIncidenceAngle
Standard Option MaxIncidenceAngle.
QString LocationString(double pdSample, double pdLine) const
API to display location in the form "Sample,Line".
void ValidatePvlResidualTolerances(void)
Validate Pvl Sample, Line, Residual Magnitude Tolerances.
bool mbValidateFromEdge
Check if Pixels/Meters from edge needs to be Validated.
SerialNumberList mSerialNumbers
Serial numbers list.
double m_pixelShiftTolerance
Standard Option Pixel Shift.
void InitStdOptionsGroup(void)
Initialize the Standard Options Pvl Group with no DefFile.
bool ValidEmissionAngle(double pdEmissionAngle)
Validate whether the Emission Angle is in the set Range.
void ValidatePvlShiftTolerances()
Validate Pvl Sample, Line, Pixel (Sample and Line) Magnitude Shift Tolerances.
double mdResidualTolerance
Standard Option Residual Magnitude.
Pvl mPvlLog
Pvl Log of all the processing.
int miPixelsFromEdge
Standard Option PixelsFromEdge.
double m_lineShiftTolerance
Standard Option Line Shift.
double mdMinResolution
Standard Option MinResolution.
double GetMinEmissionAngle(void)
Get the option MinEmissionAngle.
PvlGroup & GetStdOptions(void)
Get the Standard Options Pvl Group.
Progress mStatus
Monitor the status of the app.
bool mbValidateDN
Check if DN needs to be Validated.
bool IsCameraRequired()
API to get status of CameraRequired flag.
bool ValidDnValue(double pdDnValue)
Validate whether the DN Value is in the set Range.
double GetMaxDN(void)
Get the option MaxDN.
void SetCameraRequiredFlag(bool pbFlag)
Set the CameraRequired Flag.
virtual ~ControlNetValidMeasure()
Destructor: clean up stuff relevant for this class.
double mdResolution
Store current Measure's Resolution.
PvlGroup mPvlOpGrp
Pvl Operator Group.
void InitStdOptions(void)
Initialize the Standard Options.
void ReadSerialNumbers(QString psSerialNumfile)
Read the Serial Numbers from the file and open assocaited cubes.
bool ValidLatLon(Isis::Camera *pCamera, int piSample, int piLine)
Validate the Lat/Lon.
double mdIncidenceAngle
Store current Measure's Incidence Angle.
void ValidatePvlIncidenceAngle(void)
Validate PVL Min & Max IncidenceAngle Standard Options.
void ValidatePvlFromEdge(void)
Validate and read Pixels and Meters from Edge Standard Options.
double mdMaxEmissionAngle
Standard Option MaxEmissionAngle.
IO Handler for Isis Cubes.
Definition Cube.h:168
Class for quick re-accessing of cubes based on file name.
Definition CubeManager.h:70
MeasureValidationResults class.
Program progress reporter.
Definition Progress.h:42
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Container for cube-like labels.
Definition Pvl.h:119
Serial Number list generator.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition IString.cpp:211