Isis 3 Developer Reference
ControlNetValidMeasure.h
Go to the documentation of this file.
1 #ifndef _ControlNetValidMeasure_h_
2 #define _ControlNetValidMeasure_h_
3 
4 #include "CubeManager.h"
5 #include "IString.h"
6 #include "Pvl.h"
7 #include "PvlGroup.h"
8 #include "Progress.h"
9 #include "SerialNumberList.h"
10 
34 namespace Isis {
35  class Camera;
36  class Cube;
37  class ControlNet;
38  class MeasureValidationResults;
39  class ControlMeasure;
40 
83  public:
84  ControlNetValidMeasure(Pvl *pvl = 0);
86 
88  void InitStdOptions(void);
89 
91  void InitStdOptionsGroup(void);
92 
93  virtual ~ControlNetValidMeasure();
94 
96  void Parse(Pvl &pvlDef);
97 
99  virtual Pvl &GetLogPvl(void) {
100  return mPvlLog;
101  };
102 
104  virtual void FindCnetRef(ControlNet &pNewNet) {};
105 
107  bool ValidEmissionAngle(double pdEmissionAngle);
108 
110  bool ValidIncidenceAngle(double pdIncidenceAngle);
111 
113  bool ValidDnValue(double pdDnValue);
114 
116  bool ValidResolution(double pdResolution);
117 
119  bool ValidResidualTolerances(double pdSampleResidual, double pdLineResidual,
120  double pdResidualMagnitude, MeasureValidationResults & pResults);
121 
122  bool ValidShiftTolerances(double sampleShift, double lineShift,
123  double pixelShift, MeasureValidationResults &results);
124 
126  bool ValidLatLon(Isis::Camera *pCamera, int piSample, int piLine);
127 
130  return mStdOptionsGrp;
131  };
132 
135  return mStatisticsGrp;
136  };
137 
139  double GetMinDN(void) {
140  return mdMinDN;
141  };
142 
144  double GetMaxDN(void) {
145  return mdMaxDN;
146  };
147 
149  double GetMinEmissionAngle(void) {
150  return mdMinEmissionAngle;
151  };
152 
154  double GetMaxEmissionAngle(void) {
155  return mdMaxEmissionAngle;
156  };
157 
159  double GetMinIncidenceAngle(void) {
160  return mdMinIncidenceAngle;
161  };
162 
164  double GetMaxIncidenceAngle(void) {
165  return mdMaxIncidenceAngle;
166  };
167 
169  double GetPixelsFromEdge(void) {
170  return miPixelsFromEdge;
171  };
172 
174  double GetMetersFromEdge(void) {
175  return mdMetersFromEdge;
176  };
177 
179  QString LocationString(double pdSample, double pdLine) const {
180  return toString((int)pdSample) + "," + toString((int)pdLine);
181  };
182 
184  bool PixelsFromEdge(int piSample, int piLine, Cube *pCube);
185 
187  bool MetersFromEdge(int piSample, int piLine, Cube *pCube);
188 
191  Cube *pCube, PvlGroup *pMeasureGrp = NULL);
192 
195  Cube *pCube, Camera *camera, PvlGroup *pMeasureGrp = NULL);
196 
198  MeasureValidationResults ValidStandardOptions(double pSample, double pLine,
199  const ControlMeasure *pMeasure, Cube *pCube, PvlGroup *pMeasureGrp = NULL);
200 
201  MeasureValidationResults ValidStandardOptions(double pSample, double pLine,
202  const ControlMeasure *pMeasure, Cube *pCube, Camera *measureCamera,
203  PvlGroup *pMeasureGrp = NULL);
204 
206  MeasureValidationResults ValidStandardOptions(double pSample, double pLine,
207  Cube *pCube, PvlGroup *pMeasureGrp = NULL);
208 
209  bool IsCubeRequired() {
211  }
212 
221  return mbCameraRequired;
222  }
223 
224  protected:
226  void ValidatePvlDN(void);
227 
229  void ValidatePvlEmissionAngle(void);
230 
232  void ValidatePvlIncidenceAngle(void);
233 
235  void ValidatePvlResolution(void);
236 
238  void ValidatePvlFromEdge(void);
239 
242 
244 
246  void ReadSerialNumbers(QString psSerialNumfile);
247 
257  void SetCameraRequiredFlag(bool pbFlag){
258  mbCameraRequired = pbFlag;
259  }
260 
261  double mdMinDN;
262  double mdMaxDN;
274 
278 
281  double mdResolution;
282  double mdDnValue;
284  double mdLineResidual;
286 
287  double m_sampleShift;
288  double m_lineShift;
289  double m_pixelShift;
290 
298 
300  bool mbValidateDN;
303  };
304 };
305 #endif
306 
void ValidatePvlEmissionAngle(void)
Validate PVL Min & Max EmissionAngle Standard Options.
Definition: ControlNetValidMeasure.cpp:489
double m_pixelShift
Store current Measure's Pixel Shift.
Definition: ControlNetValidMeasure.h:289
double m_pixelShiftTolerance
Standard Option Pixel Shift.
Definition: ControlNetValidMeasure.h:277
double m_sampleShift
Store current Measure's Sample Shift.
Definition: ControlNetValidMeasure.h:287
double m_sampleShiftTolerance
Standard Option Sample Shift.
Definition: ControlNetValidMeasure.h:275
bool ValidResolution(double pdResolution)
Validate whether the Resolution is in the set Range.
Definition: ControlNetValidMeasure.cpp:710
bool IsCubeRequired()
Definition: ControlNetValidMeasure.h:209
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:816
void ValidatePvlFromEdge(void)
Validate and read Pixels and Meters from Edge Standard Options.
Definition: ControlNetValidMeasure.cpp:386
double mdMaxDN
Standard Option MaxDN.
Definition: ControlNetValidMeasure.h:262
PvlGroup & GetStdOptions(void)
Get the Standard Options Pvl Group.
Definition: ControlNetValidMeasure.h:129
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:764
double GetMaxDN(void)
Get the option MaxDN.
Definition: ControlNetValidMeasure.h:144
double mdLineResTolerance
Standard Option Line Residual.
Definition: ControlNetValidMeasure.h:272
void InitStdOptions(void)
Initialize the Standard Options.
Definition: ControlNetValidMeasure.cpp:58
bool mbValidateFromEdge
Check if Pixels/Meters from edge needs to be Validated.
Definition: ControlNetValidMeasure.h:302
PvlGroup mStdOptionsGrp
Pvl Standard Options Group.
Definition: ControlNetValidMeasure.h:292
bool ValidDnValue(double pdDnValue)
Validate whether the DN Value is in the set Range.
Definition: ControlNetValidMeasure.cpp:693
double m_lineShiftTolerance
Standard Option Line Shift.
Definition: ControlNetValidMeasure.h:276
double mdEmissionAngle
Store current Measure's Emission Angle.
Definition: ControlNetValidMeasure.h:279
Progress mStatus
Monitor the status of the app.
Definition: ControlNetValidMeasure.h:295
bool mbValidateDN
Check if DN needs to be Validated.
Definition: ControlNetValidMeasure.h:301
ControlNetValidMeasure(Pvl *pvl=0)
Constructor - Initializes the data members and parses the input Pvl .
Definition: ControlNetValidMeasure.cpp:21
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:226
SerialNumberList mSerialNumbers
Serial numbers list.
Definition: ControlNetValidMeasure.h:297
CubeManager mCubeMgr
CubeManager to open and read cubes.
Definition: ControlNetValidMeasure.h:296
double mdMaxEmissionAngle
Standard Option MaxEmissionAngle.
Definition: ControlNetValidMeasure.h:266
double mdSampleResTolerance
Standard Option Sample Residual.
Definition: ControlNetValidMeasure.h:271
double GetMetersFromEdge(void)
Get the option MetersFromEdge.
Definition: ControlNetValidMeasure.h:174
bool ValidLatLon(Isis::Camera *pCamera, int piSample, int piLine)
Validate the Lat/Lon.
Definition: ControlNetValidMeasure.cpp:801
PvlGroup mStatisticsGrp
Pvl output Statistics Group.
Definition: ControlNetValidMeasure.h:293
double mdSampleResidual
Store current Measure's Sample Residual.
Definition: ControlNetValidMeasure.h:283
Definition: Camera.h:249
void ValidatePvlDN(void)
Validate PVL Min & Max DN Standard Options.
Definition: ControlNetValidMeasure.cpp:456
virtual ~ControlNetValidMeasure()
Destructor: clean up stuff relevant for this class.
Definition: ControlNetValidMeasure.cpp:116
double mdResidualMagnitude
Store current Measure's Residual Magnitude.
Definition: ControlNetValidMeasure.h:285
bool ValidIncidenceAngle(double pdIncidenceAngle)
Validate whether the Incidence Angle is in the set Range.
Definition: ControlNetValidMeasure.cpp:676
Program progress reporter.
Definition: Progress.h:58
double mdMetersFromEdge
Standard Option MeteresFromEdge.
Definition: ControlNetValidMeasure.h:269
void ValidatePvlResidualTolerances(void)
Validate Pvl Sample, Line, Residual Magnitude Tolerances.
Definition: ControlNetValidMeasure.cpp:557
void ValidatePvlShiftTolerances()
Validate Pvl Sample, Line, Pixel (Sample and Line) Magnitude Shift Tolerances.
Definition: ControlNetValidMeasure.cpp:602
a control network
Definition: ControlNet.h:271
void InitStdOptionsGroup(void)
Initialize the Standard Options Pvl Group with no DefFile.
Definition: ControlNetValidMeasure.cpp:87
double mdIncidenceAngle
Store current Measure's Incidence Angle.
Definition: ControlNetValidMeasure.h:280
void ValidatePvlIncidenceAngle(void)
Validate PVL Min & Max IncidenceAngle Standard Options.
Definition: ControlNetValidMeasure.cpp:525
virtual void FindCnetRef(ControlNet &pNewNet)
Virtual Function to get better references for a Control Network based on Criteria.
Definition: ControlNetValidMeasure.h:104
double m_lineShift
Store current Measure's Line Shift.
Definition: ControlNetValidMeasure.h:288
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
int miPixelsFromEdge
Standard Option PixelsFromEdge.
Definition: ControlNetValidMeasure.h:270
bool ValidResidualTolerances(double pdSampleResidual, double pdLineResidual, double pdResidualMagnitude, MeasureValidationResults &pResults)
Validate whether the Residuals are within the set Tolerance.
Definition: ControlNetValidMeasure.cpp:731
PvlGroup mPvlOpGrp
Pvl Operator Group.
Definition: ControlNetValidMeasure.h:291
virtual Pvl & GetLogPvl(void)
Get the Pvl Log file.
Definition: ControlNetValidMeasure.h:99
double mdMaxResolution
Standard Option MaxResolution.
Definition: ControlNetValidMeasure.h:264
PvlGroup & GetStatistics(void)
Get the Statistics Pvl Grp.
Definition: ControlNetValidMeasure.h:134
void ReadSerialNumbers(QString psSerialNumfile)
Read the Serial Numbers from the file and open assocaited cubes.
Definition: ControlNetValidMeasure.cpp:128
Container for cube-like labels.
Definition: Pvl.h:135
double mdMinDN
Standard Option MinDN.
Definition: ControlNetValidMeasure.h:261
double GetMinIncidenceAngle(void)
Get the option MinIncidenceAngle.
Definition: ControlNetValidMeasure.h:159
Class for quick re-accessing of cubes based on file name.
Definition: CubeManager.h:64
QString LocationString(double pdSample, double pdLine) const
API to display location in the form "Sample,Line".
Definition: ControlNetValidMeasure.h:179
double GetMinEmissionAngle(void)
Get the option MinEmissionAngle.
Definition: ControlNetValidMeasure.h:149
double mdDnValue
Store current Measure's DN Value.
Definition: ControlNetValidMeasure.h:282
double mdResidualTolerance
Standard Option Residual Magnitude.
Definition: ControlNetValidMeasure.h:273
Pvl mPvlLog
Pvl Log of all the processing.
Definition: ControlNetValidMeasure.h:294
bool IsCameraRequired()
API to get status of CameraRequired flag.
Definition: ControlNetValidMeasure.h:220
double GetMaxEmissionAngle(void)
Get the option MaxEmissionAngle.
Definition: ControlNetValidMeasure.h:154
MeasureValidationResults class.
Definition: MeasureValidationResults.h:43
double mdMinEmissionAngle
Standard Option MinEmissionAngle.
Definition: ControlNetValidMeasure.h:265
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:357
void ValidatePvlResolution(void)
Validate PVL Min & Max Resolution Standard Options.
Definition: ControlNetValidMeasure.cpp:418
double mdMinIncidenceAngle
Standard Option MinIncidenceAngle.
Definition: ControlNetValidMeasure.h:267
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:858
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
double GetPixelsFromEdge(void)
Get the option PixelsFromEdge.
Definition: ControlNetValidMeasure.h:169
a control measurement
Definition: ControlMeasure.h:189
Serial Number list generator.
Definition: SerialNumberList.h:80
double mdResolution
Store current Measure's Resolution.
Definition: ControlNetValidMeasure.h:281
double mdLineResidual
Store current Measure's Line Residual.
Definition: ControlNetValidMeasure.h:284
void SetCameraRequiredFlag(bool pbFlag)
Set the CameraRequired Flag.
Definition: ControlNetValidMeasure.h:257
bool ValidEmissionAngle(double pdEmissionAngle)
Validate whether the Emission Angle is in the set Range.
Definition: ControlNetValidMeasure.cpp:658
double GetMaxIncidenceAngle(void)
Get the option MaxIncidenceAngle.
Definition: ControlNetValidMeasure.h:164
void Parse(Pvl &pvlDef)
Parse the DefFile for Standard Options.
Definition: ControlNetValidMeasure.cpp:142
ControlNetValidMeasure class.
Definition: ControlNetValidMeasure.h:82
double GetMinDN(void)
Get the option MinDN.
Definition: ControlNetValidMeasure.h:139
double mdMaxIncidenceAngle
Standard Option MaxIncidenceAngle.
Definition: ControlNetValidMeasure.h:268
bool mbCameraRequired
To improve speed, flag to indicate if Camera needs to be opened.
Definition: ControlNetValidMeasure.h:299
double mdMinResolution
Standard Option MinResolution.
Definition: ControlNetValidMeasure.h:263
IO Handler for Isis Cubes.
Definition: Cube.h:170