Isis Developer Reference
ControlNetValidMeasure.h
Go to the documentation of this file.
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
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
Definition Camera.h:236
a control measurement
Definition ControlMeasure.h:175
a control network
Definition ControlNet.h:258
ControlNetValidMeasure class.
Definition ControlNetValidMeasure.h:75
double GetPixelsFromEdge(void)
Get the option PixelsFromEdge.
Definition ControlNetValidMeasure.h:162
double GetMetersFromEdge(void)
Get the option MetersFromEdge.
Definition ControlNetValidMeasure.h:167
double mdMaxResolution
Standard Option MaxResolution.
Definition ControlNetValidMeasure.h:257
double m_lineShift
Store current Measure's Line Shift.
Definition ControlNetValidMeasure.h:281
double GetMinDN(void)
Get the option MinDN.
Definition ControlNetValidMeasure.h:132
void Parse(Pvl &pvlDef)
Parse the DefFile for Standard Options.
Definition ControlNetValidMeasure.cpp:150
PvlGroup & GetStatistics(void)
Get the Statistics Pvl Grp.
Definition ControlNetValidMeasure.h:127
bool mbCameraRequired
To improve speed, flag to indicate if Camera needs to be opened.
Definition ControlNetValidMeasure.h:292
bool ValidResidualTolerances(double pdSampleResidual, double pdLineResidual, double pdResidualMagnitude, MeasureValidationResults &pResults)
Validate whether the Residuals are within the set Tolerance.
Definition ControlNetValidMeasure.cpp:739
void ValidatePvlDN(void)
Validate PVL Min & Max DN Standard Options.
Definition ControlNetValidMeasure.cpp:464
double m_sampleShift
Store current Measure's Sample Shift.
Definition ControlNetValidMeasure.h:280
double mdSampleResTolerance
Standard Option Sample Residual.
Definition ControlNetValidMeasure.h:264
double mdMinIncidenceAngle
Standard Option MinIncidenceAngle.
Definition ControlNetValidMeasure.h:260
double GetMaxIncidenceAngle(void)
Get the option MaxIncidenceAngle.
Definition ControlNetValidMeasure.h:157
virtual Pvl & GetLogPvl(void)
Get the Pvl Log file.
Definition ControlNetValidMeasure.h:92
double GetMaxEmissionAngle(void)
Get the option MaxEmissionAngle.
Definition ControlNetValidMeasure.h:147
bool PixelsFromEdge(int piSample, int piLine, Cube *pCube)
Test for a point to be user defined number of pixels from the edge.
Definition ControlNetValidMeasure.cpp:824
double m_pixelShift
Store current Measure's Pixel Shift.
Definition ControlNetValidMeasure.h:282
double mdMetersFromEdge
Standard Option MeteresFromEdge.
Definition ControlNetValidMeasure.h:262
MeasureValidationResults ValidStandardOptions(const ControlMeasure *pMeasure, Cube *pCube, PvlGroup *pMeasureGrp=NULL)
Validate Standard options to pick a reference based on a particular criteria.
Definition ControlNetValidMeasure.cpp:365
double m_sampleShiftTolerance
Standard Option Sample Shift.
Definition ControlNetValidMeasure.h:268
double mdResidualMagnitude
Store current Measure's Residual Magnitude.
Definition ControlNetValidMeasure.h:278
bool MetersFromEdge(int piSample, int piLine, Cube *pCube)
Test for a point to be user defined number of meters from the edge.
Definition ControlNetValidMeasure.cpp:866
ControlNetValidMeasure(Pvl *pvl=0)
Constructor - Initializes the data members and parses the input Pvl .
Definition ControlNetValidMeasure.cpp:29
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.
Definition ControlNetValidMeasure.cpp:772
PvlGroup mStdOptionsGrp
Pvl Standard Options Group.
Definition ControlNetValidMeasure.h:285
bool ValidResolution(double pdResolution)
Validate whether the Resolution is in the set Range.
Definition ControlNetValidMeasure.cpp:718
double GetMinIncidenceAngle(void)
Get the option MinIncidenceAngle.
Definition ControlNetValidMeasure.h:152
void ValidatePvlResolution(void)
Validate PVL Min & Max Resolution Standard Options.
Definition ControlNetValidMeasure.cpp:426
void ValidatePvlEmissionAngle(void)
Validate PVL Min & Max EmissionAngle Standard Options.
Definition ControlNetValidMeasure.cpp:497
double mdLineResTolerance
Standard Option Line Residual.
Definition ControlNetValidMeasure.h:265
double mdMinDN
Standard Option MinDN.
Definition ControlNetValidMeasure.h:254
double mdSampleResidual
Store current Measure's Sample Residual.
Definition ControlNetValidMeasure.h:276
double mdLineResidual
Store current Measure's Line Residual.
Definition ControlNetValidMeasure.h:277
double mdMaxDN
Standard Option MaxDN.
Definition ControlNetValidMeasure.h:255
bool ValidIncidenceAngle(double pdIncidenceAngle)
Validate whether the Incidence Angle is in the set Range.
Definition ControlNetValidMeasure.cpp:684
bool IsCubeRequired()
Definition ControlNetValidMeasure.h:202
double mdMinEmissionAngle
Standard Option MinEmissionAngle.
Definition ControlNetValidMeasure.h:258
virtual void FindCnetRef(ControlNet &pNewNet)
Virtual Function to get better references for a Control Network based on Criteria.
Definition ControlNetValidMeasure.h:97
CubeManager mCubeMgr
CubeManager to open and read cubes.
Definition ControlNetValidMeasure.h:289
PvlGroup mStatisticsGrp
Pvl output Statistics Group.
Definition ControlNetValidMeasure.h:286
double mdEmissionAngle
Store current Measure's Emission Angle.
Definition ControlNetValidMeasure.h:272
double mdDnValue
Store current Measure's DN Value.
Definition ControlNetValidMeasure.h:275
double mdMaxIncidenceAngle
Standard Option MaxIncidenceAngle.
Definition ControlNetValidMeasure.h:261
QString LocationString(double pdSample, double pdLine) const
API to display location in the form "Sample,Line".
Definition ControlNetValidMeasure.h:172
void ValidatePvlResidualTolerances(void)
Validate Pvl Sample, Line, Residual Magnitude Tolerances.
Definition ControlNetValidMeasure.cpp:565
bool mbValidateFromEdge
Check if Pixels/Meters from edge needs to be Validated.
Definition ControlNetValidMeasure.h:295
SerialNumberList mSerialNumbers
Serial numbers list.
Definition ControlNetValidMeasure.h:290
double m_pixelShiftTolerance
Standard Option Pixel Shift.
Definition ControlNetValidMeasure.h:270
void InitStdOptionsGroup(void)
Initialize the Standard Options Pvl Group with no DefFile.
Definition ControlNetValidMeasure.cpp:95
bool ValidEmissionAngle(double pdEmissionAngle)
Validate whether the Emission Angle is in the set Range.
Definition ControlNetValidMeasure.cpp:666
void ValidatePvlShiftTolerances()
Validate Pvl Sample, Line, Pixel (Sample and Line) Magnitude Shift Tolerances.
Definition ControlNetValidMeasure.cpp:610
double mdResidualTolerance
Standard Option Residual Magnitude.
Definition ControlNetValidMeasure.h:266
Pvl mPvlLog
Pvl Log of all the processing.
Definition ControlNetValidMeasure.h:287
int miPixelsFromEdge
Standard Option PixelsFromEdge.
Definition ControlNetValidMeasure.h:263
double m_lineShiftTolerance
Standard Option Line Shift.
Definition ControlNetValidMeasure.h:269
double mdMinResolution
Standard Option MinResolution.
Definition ControlNetValidMeasure.h:256
double GetMinEmissionAngle(void)
Get the option MinEmissionAngle.
Definition ControlNetValidMeasure.h:142
PvlGroup & GetStdOptions(void)
Get the Standard Options Pvl Group.
Definition ControlNetValidMeasure.h:122
Progress mStatus
Monitor the status of the app.
Definition ControlNetValidMeasure.h:288
bool mbValidateDN
Check if DN needs to be Validated.
Definition ControlNetValidMeasure.h:294
bool IsCameraRequired()
API to get status of CameraRequired flag.
Definition ControlNetValidMeasure.h:213
bool ValidDnValue(double pdDnValue)
Validate whether the DN Value is in the set Range.
Definition ControlNetValidMeasure.cpp:701
double GetMaxDN(void)
Get the option MaxDN.
Definition ControlNetValidMeasure.h:137
void SetCameraRequiredFlag(bool pbFlag)
Set the CameraRequired Flag.
Definition ControlNetValidMeasure.h:250
virtual ~ControlNetValidMeasure()
Destructor: clean up stuff relevant for this class.
Definition ControlNetValidMeasure.cpp:124
double mdResolution
Store current Measure's Resolution.
Definition ControlNetValidMeasure.h:274
PvlGroup mPvlOpGrp
Pvl Operator Group.
Definition ControlNetValidMeasure.h:284
void InitStdOptions(void)
Initialize the Standard Options.
Definition ControlNetValidMeasure.cpp:66
void ReadSerialNumbers(QString psSerialNumfile)
Read the Serial Numbers from the file and open assocaited cubes.
Definition ControlNetValidMeasure.cpp:136
bool ValidLatLon(Isis::Camera *pCamera, int piSample, int piLine)
Validate the Lat/Lon.
Definition ControlNetValidMeasure.cpp:809
double mdIncidenceAngle
Store current Measure's Incidence Angle.
Definition ControlNetValidMeasure.h:273
void ValidatePvlIncidenceAngle(void)
Validate PVL Min & Max IncidenceAngle Standard Options.
Definition ControlNetValidMeasure.cpp:533
void ValidatePvlFromEdge(void)
Validate and read Pixels and Meters from Edge Standard Options.
Definition ControlNetValidMeasure.cpp:394
double mdMaxEmissionAngle
Standard Option MaxEmissionAngle.
Definition ControlNetValidMeasure.h:259
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.
Definition MeasureValidationResults.h:29
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.
Definition SerialNumberList.h:64
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