Isis 3 Programmer 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.
double m_pixelShift
Store current Measure's Pixel Shift.
double m_pixelShiftTolerance
Standard Option Pixel Shift.
double m_sampleShift
Store current Measure's Sample Shift.
double m_sampleShiftTolerance
Standard Option Sample Shift.
bool ValidResolution(double pdResolution)
Validate whether the Resolution is in the set Range.
bool PixelsFromEdge(int piSample, int piLine, Cube *pCube)
Test for a point to be user defined number of pixels from the edge.
void ValidatePvlFromEdge(void)
Validate and read Pixels and Meters from Edge Standard Options.
double mdMaxDN
Standard Option MaxDN.
PvlGroup & GetStdOptions(void)
Get the Standard Options Pvl Group.
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.
double GetMaxDN(void)
Get the option MaxDN.
double mdLineResTolerance
Standard Option Line Residual.
void InitStdOptions(void)
Initialize the Standard Options.
bool mbValidateFromEdge
Check if Pixels/Meters from edge needs to be Validated.
PvlGroup mStdOptionsGrp
Pvl Standard Options Group.
bool ValidDnValue(double pdDnValue)
Validate whether the DN Value is in the set Range.
double m_lineShiftTolerance
Standard Option Line Shift.
double mdEmissionAngle
Store current Measure's Emission Angle.
Progress mStatus
Monitor the status of the app.
bool mbValidateDN
Check if DN needs to be Validated.
ControlNetValidMeasure(Pvl *pvl=0)
Constructor - Initializes the data members and parses the input Pvl .
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:226
SerialNumberList mSerialNumbers
Serial numbers list.
CubeManager mCubeMgr
CubeManager to open and read cubes.
double mdMaxEmissionAngle
Standard Option MaxEmissionAngle.
double mdSampleResTolerance
Standard Option Sample Residual.
double GetMetersFromEdge(void)
Get the option MetersFromEdge.
bool ValidLatLon(Isis::Camera *pCamera, int piSample, int piLine)
Validate the Lat/Lon.
PvlGroup mStatisticsGrp
Pvl output Statistics Group.
double mdSampleResidual
Store current Measure's Sample Residual.
void ValidatePvlDN(void)
Validate PVL Min & Max DN Standard Options.
virtual ~ControlNetValidMeasure()
Destructor: clean up stuff relevant for this class.
double mdResidualMagnitude
Store current Measure's Residual Magnitude.
bool ValidIncidenceAngle(double pdIncidenceAngle)
Validate whether the Incidence Angle is in the set Range.
Program progress reporter.
Definition: Progress.h:58
double mdMetersFromEdge
Standard Option MeteresFromEdge.
void ValidatePvlResidualTolerances(void)
Validate Pvl Sample, Line, Residual Magnitude Tolerances.
void ValidatePvlShiftTolerances()
Validate Pvl Sample, Line, Pixel (Sample and Line) Magnitude Shift Tolerances.
a control network
Definition: ControlNet.h:271
void InitStdOptionsGroup(void)
Initialize the Standard Options Pvl Group with no DefFile.
double mdIncidenceAngle
Store current Measure's Incidence Angle.
void ValidatePvlIncidenceAngle(void)
Validate PVL Min & Max IncidenceAngle Standard Options.
virtual void FindCnetRef(ControlNet &pNewNet)
Virtual Function to get better references for a Control Network based on Criteria.
double m_lineShift
Store current Measure's Line Shift.
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
int miPixelsFromEdge
Standard Option PixelsFromEdge.
bool ValidResidualTolerances(double pdSampleResidual, double pdLineResidual, double pdResidualMagnitude, MeasureValidationResults &pResults)
Validate whether the Residuals are within the set Tolerance.
PvlGroup mPvlOpGrp
Pvl Operator Group.
virtual Pvl & GetLogPvl(void)
Get the Pvl Log file.
double mdMaxResolution
Standard Option MaxResolution.
PvlGroup & GetStatistics(void)
Get the Statistics Pvl Grp.
void ReadSerialNumbers(QString psSerialNumfile)
Read the Serial Numbers from the file and open assocaited cubes.
Container for cube-like labels.
Definition: Pvl.h:135
double mdMinDN
Standard Option MinDN.
double GetMinIncidenceAngle(void)
Get the option MinIncidenceAngle.
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".
double GetMinEmissionAngle(void)
Get the option MinEmissionAngle.
double mdDnValue
Store current Measure's DN Value.
double mdResidualTolerance
Standard Option Residual Magnitude.
Pvl mPvlLog
Pvl Log of all the processing.
bool IsCameraRequired()
API to get status of CameraRequired flag.
double GetMaxEmissionAngle(void)
Get the option MaxEmissionAngle.
MeasureValidationResults class.
double mdMinEmissionAngle
Standard Option MinEmissionAngle.
MeasureValidationResults ValidStandardOptions(const ControlMeasure *pMeasure, Cube *pCube, PvlGroup *pMeasureGrp=NULL)
Validate Standard options to pick a reference based on a particular criteria.
void ValidatePvlResolution(void)
Validate PVL Min & Max Resolution Standard Options.
double mdMinIncidenceAngle
Standard Option MinIncidenceAngle.
bool MetersFromEdge(int piSample, int piLine, Cube *pCube)
Test for a point to be user defined number of meters from the edge.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
double GetPixelsFromEdge(void)
Get the option PixelsFromEdge.
a control measurement
Serial Number list generator.
double mdResolution
Store current Measure's Resolution.
double mdLineResidual
Store current Measure's Line Residual.
void SetCameraRequiredFlag(bool pbFlag)
Set the CameraRequired Flag.
bool ValidEmissionAngle(double pdEmissionAngle)
Validate whether the Emission Angle is in the set Range.
double GetMaxIncidenceAngle(void)
Get the option MaxIncidenceAngle.
void Parse(Pvl &pvlDef)
Parse the DefFile for Standard Options.
ControlNetValidMeasure class.
double GetMinDN(void)
Get the option MinDN.
double mdMaxIncidenceAngle
Standard Option MaxIncidenceAngle.
bool mbCameraRequired
To improve speed, flag to indicate if Camera needs to be opened.
double mdMinResolution
Standard Option MinResolution.
IO Handler for Isis Cubes.
Definition: Cube.h:170