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 
27 namespace Isis {
28  class Camera;
29  class Cube;
30  class ControlNet;
31  class MeasureValidationResults;
32  class ControlMeasure;
33 
76  public:
77  ControlNetValidMeasure(Pvl *pvl = 0);
79 
81  void InitStdOptions(void);
82 
84  void InitStdOptionsGroup(void);
85 
86  virtual ~ControlNetValidMeasure();
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 
274  double mdResolution;
275  double mdDnValue;
277  double mdLineResidual;
279 
280  double m_sampleShift;
281  double m_lineShift;
282  double m_pixelShift;
283 
291 
293  bool mbValidateDN;
296  };
297 };
298 #endif
Isis::ControlNetValidMeasure
ControlNetValidMeasure class.
Definition: ControlNetValidMeasure.h:75
Isis::ControlNetValidMeasure::m_sampleShiftTolerance
double m_sampleShiftTolerance
Standard Option Sample Shift.
Definition: ControlNetValidMeasure.h:268
Isis::ControlNetValidMeasure::GetMinDN
double GetMinDN(void)
Get the option MinDN.
Definition: ControlNetValidMeasure.h:132
Isis::ControlNetValidMeasure::GetMaxIncidenceAngle
double GetMaxIncidenceAngle(void)
Get the option MaxIncidenceAngle.
Definition: ControlNetValidMeasure.h:157
Isis::ControlNetValidMeasure::m_pixelShiftTolerance
double m_pixelShiftTolerance
Standard Option Pixel Shift.
Definition: ControlNetValidMeasure.h:270
Isis::ControlNetValidMeasure::mdEmissionAngle
double mdEmissionAngle
Store current Measure's Emission Angle.
Definition: ControlNetValidMeasure.h:272
Isis::ControlNetValidMeasure::ValidShiftTolerances
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
Isis::ControlNetValidMeasure::GetStdOptions
PvlGroup & GetStdOptions(void)
Get the Standard Options Pvl Group.
Definition: ControlNetValidMeasure.h:122
Isis::ControlNetValidMeasure::ValidResolution
bool ValidResolution(double pdResolution)
Validate whether the Resolution is in the set Range.
Definition: ControlNetValidMeasure.cpp:718
Isis::ControlNetValidMeasure::mbValidateDN
bool mbValidateDN
Check if DN needs to be Validated.
Definition: ControlNetValidMeasure.h:294
Isis::ControlNetValidMeasure::InitStdOptions
void InitStdOptions(void)
Initialize the Standard Options.
Definition: ControlNetValidMeasure.cpp:66
Isis::ControlNetValidMeasure::mbCameraRequired
bool mbCameraRequired
To improve speed, flag to indicate if Camera needs to be opened.
Definition: ControlNetValidMeasure.h:292
Isis::ControlNetValidMeasure::ValidatePvlEmissionAngle
void ValidatePvlEmissionAngle(void)
Validate PVL Min & Max EmissionAngle Standard Options.
Definition: ControlNetValidMeasure.cpp:497
Isis::ControlNetValidMeasure::mStdOptionsGrp
PvlGroup mStdOptionsGrp
Pvl Standard Options Group.
Definition: ControlNetValidMeasure.h:285
Isis::ControlNetValidMeasure::m_lineShiftTolerance
double m_lineShiftTolerance
Standard Option Line Shift.
Definition: ControlNetValidMeasure.h:269
Isis::ControlNetValidMeasure::mdMaxDN
double mdMaxDN
Standard Option MaxDN.
Definition: ControlNetValidMeasure.h:255
Isis::ControlNetValidMeasure::ValidDnValue
bool ValidDnValue(double pdDnValue)
Validate whether the DN Value is in the set Range.
Definition: ControlNetValidMeasure.cpp:701
Isis::ControlNetValidMeasure::mdMaxEmissionAngle
double mdMaxEmissionAngle
Standard Option MaxEmissionAngle.
Definition: ControlNetValidMeasure.h:259
Isis::ControlNetValidMeasure::m_sampleShift
double m_sampleShift
Store current Measure's Sample Shift.
Definition: ControlNetValidMeasure.h:280
Isis::ControlNetValidMeasure::GetMetersFromEdge
double GetMetersFromEdge(void)
Get the option MetersFromEdge.
Definition: ControlNetValidMeasure.h:167
Isis::ControlNetValidMeasure::mStatus
Progress mStatus
Monitor the status of the app.
Definition: ControlNetValidMeasure.h:288
Isis::ControlNetValidMeasure::GetMaxDN
double GetMaxDN(void)
Get the option MaxDN.
Definition: ControlNetValidMeasure.h:137
Isis::ControlNetValidMeasure::ValidLatLon
bool ValidLatLon(Isis::Camera *pCamera, int piSample, int piLine)
Validate the Lat/Lon.
Definition: ControlNetValidMeasure.cpp:809
Isis::ControlNetValidMeasure::mbValidateFromEdge
bool mbValidateFromEdge
Check if Pixels/Meters from edge needs to be Validated.
Definition: ControlNetValidMeasure.h:295
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::ControlNetValidMeasure::PixelsFromEdge
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
Isis::ControlNetValidMeasure::mCubeMgr
CubeManager mCubeMgr
CubeManager to open and read cubes.
Definition: ControlNetValidMeasure.h:289
Isis::ControlNetValidMeasure::mdLineResTolerance
double mdLineResTolerance
Standard Option Line Residual.
Definition: ControlNetValidMeasure.h:265
Isis::Camera
Definition: Camera.h:236
Isis::ControlNetValidMeasure::ValidatePvlDN
void ValidatePvlDN(void)
Validate PVL Min & Max DN Standard Options.
Definition: ControlNetValidMeasure.cpp:464
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::SerialNumberList
Serial Number list generator.
Definition: SerialNumberList.h:64
Isis::MeasureValidationResults
MeasureValidationResults class.
Definition: MeasureValidationResults.h:29
Isis::ControlNetValidMeasure::mdSampleResTolerance
double mdSampleResTolerance
Standard Option Sample Residual.
Definition: ControlNetValidMeasure.h:264
Isis::CubeManager
Class for quick re-accessing of cubes based on file name.
Definition: CubeManager.h:70
Isis::ControlNetValidMeasure::ValidatePvlShiftTolerances
void ValidatePvlShiftTolerances()
Validate Pvl Sample, Line, Pixel (Sample and Line) Magnitude Shift Tolerances.
Definition: ControlNetValidMeasure.cpp:610
Isis::ControlNetValidMeasure::mStatisticsGrp
PvlGroup mStatisticsGrp
Pvl output Statistics Group.
Definition: ControlNetValidMeasure.h:286
Isis::ControlNetValidMeasure::mdSampleResidual
double mdSampleResidual
Store current Measure's Sample Residual.
Definition: ControlNetValidMeasure.h:276
Isis::ControlNetValidMeasure::ControlNetValidMeasure
ControlNetValidMeasure(Pvl *pvl=0)
Constructor - Initializes the data members and parses the input Pvl .
Definition: ControlNetValidMeasure.cpp:29
Isis::ControlNetValidMeasure::~ControlNetValidMeasure
virtual ~ControlNetValidMeasure()
Destructor: clean up stuff relevant for this class.
Definition: ControlNetValidMeasure.cpp:124
Isis::ControlNetValidMeasure::ValidResidualTolerances
bool ValidResidualTolerances(double pdSampleResidual, double pdLineResidual, double pdResidualMagnitude, MeasureValidationResults &pResults)
Validate whether the Residuals are within the set Tolerance.
Definition: ControlNetValidMeasure.cpp:739
Isis::ControlNetValidMeasure::mSerialNumbers
SerialNumberList mSerialNumbers
Serial numbers list.
Definition: ControlNetValidMeasure.h:290
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::ControlNetValidMeasure::GetMinIncidenceAngle
double GetMinIncidenceAngle(void)
Get the option MinIncidenceAngle.
Definition: ControlNetValidMeasure.h:152
Isis::ControlNetValidMeasure::mdMetersFromEdge
double mdMetersFromEdge
Standard Option MeteresFromEdge.
Definition: ControlNetValidMeasure.h:262
Isis::ControlNetValidMeasure::LocationString
QString LocationString(double pdSample, double pdLine) const
API to display location in the form "Sample,Line".
Definition: ControlNetValidMeasure.h:172
Isis::ControlNetValidMeasure::InitStdOptionsGroup
void InitStdOptionsGroup(void)
Initialize the Standard Options Pvl Group with no DefFile.
Definition: ControlNetValidMeasure.cpp:95
Isis::ControlNetValidMeasure::FindCnetRef
virtual void FindCnetRef(ControlNet &pNewNet)
Virtual Function to get better references for a Control Network based on Criteria.
Definition: ControlNetValidMeasure.h:97
Isis::ControlNetValidMeasure::IsCameraRequired
bool IsCameraRequired()
API to get status of CameraRequired flag.
Definition: ControlNetValidMeasure.h:213
Isis::ControlNetValidMeasure::miPixelsFromEdge
int miPixelsFromEdge
Standard Option PixelsFromEdge.
Definition: ControlNetValidMeasure.h:263
Isis::ControlNetValidMeasure::GetStatistics
PvlGroup & GetStatistics(void)
Get the Statistics Pvl Grp.
Definition: ControlNetValidMeasure.h:127
Isis::ControlNetValidMeasure::mdResidualMagnitude
double mdResidualMagnitude
Store current Measure's Residual Magnitude.
Definition: ControlNetValidMeasure.h:278
Isis::ControlNetValidMeasure::mPvlOpGrp
PvlGroup mPvlOpGrp
Pvl Operator Group.
Definition: ControlNetValidMeasure.h:284
Isis::ControlNetValidMeasure::ValidIncidenceAngle
bool ValidIncidenceAngle(double pdIncidenceAngle)
Validate whether the Incidence Angle is in the set Range.
Definition: ControlNetValidMeasure.cpp:684
Isis::ControlNetValidMeasure::ValidatePvlResidualTolerances
void ValidatePvlResidualTolerances(void)
Validate Pvl Sample, Line, Residual Magnitude Tolerances.
Definition: ControlNetValidMeasure.cpp:565
Isis::ControlNetValidMeasure::ValidStandardOptions
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
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::ControlNetValidMeasure::mdMinIncidenceAngle
double mdMinIncidenceAngle
Standard Option MinIncidenceAngle.
Definition: ControlNetValidMeasure.h:260
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::ControlNetValidMeasure::mdIncidenceAngle
double mdIncidenceAngle
Store current Measure's Incidence Angle.
Definition: ControlNetValidMeasure.h:273
Isis::ControlNetValidMeasure::MetersFromEdge
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
Isis::ControlNetValidMeasure::ValidatePvlIncidenceAngle
void ValidatePvlIncidenceAngle(void)
Validate PVL Min & Max IncidenceAngle Standard Options.
Definition: ControlNetValidMeasure.cpp:533
Isis::ControlNetValidMeasure::m_lineShift
double m_lineShift
Store current Measure's Line Shift.
Definition: ControlNetValidMeasure.h:281
Isis::Progress
Program progress reporter.
Definition: Progress.h:42
Isis::ControlNetValidMeasure::mdMinDN
double mdMinDN
Standard Option MinDN.
Definition: ControlNetValidMeasure.h:254
Isis::ControlNetValidMeasure::ReadSerialNumbers
void ReadSerialNumbers(QString psSerialNumfile)
Read the Serial Numbers from the file and open assocaited cubes.
Definition: ControlNetValidMeasure.cpp:136
Isis::ControlNetValidMeasure::GetLogPvl
virtual Pvl & GetLogPvl(void)
Get the Pvl Log file.
Definition: ControlNetValidMeasure.h:92
Isis::ControlNetValidMeasure::mdMinEmissionAngle
double mdMinEmissionAngle
Standard Option MinEmissionAngle.
Definition: ControlNetValidMeasure.h:258
Isis::ControlNetValidMeasure::mdMaxResolution
double mdMaxResolution
Standard Option MaxResolution.
Definition: ControlNetValidMeasure.h:257
Isis::ControlNetValidMeasure::GetMinEmissionAngle
double GetMinEmissionAngle(void)
Get the option MinEmissionAngle.
Definition: ControlNetValidMeasure.h:142
Isis::ControlNetValidMeasure::mdResolution
double mdResolution
Store current Measure's Resolution.
Definition: ControlNetValidMeasure.h:274
Isis::ControlNetValidMeasure::mdDnValue
double mdDnValue
Store current Measure's DN Value.
Definition: ControlNetValidMeasure.h:275
Isis::ControlNetValidMeasure::mPvlLog
Pvl mPvlLog
Pvl Log of all the processing.
Definition: ControlNetValidMeasure.h:287
Isis::ControlNetValidMeasure::GetMaxEmissionAngle
double GetMaxEmissionAngle(void)
Get the option MaxEmissionAngle.
Definition: ControlNetValidMeasure.h:147
Isis::ControlNetValidMeasure::mdMaxIncidenceAngle
double mdMaxIncidenceAngle
Standard Option MaxIncidenceAngle.
Definition: ControlNetValidMeasure.h:261
Isis::ControlNetValidMeasure::ValidatePvlResolution
void ValidatePvlResolution(void)
Validate PVL Min & Max Resolution Standard Options.
Definition: ControlNetValidMeasure.cpp:426
Isis::ControlNetValidMeasure::ValidEmissionAngle
bool ValidEmissionAngle(double pdEmissionAngle)
Validate whether the Emission Angle is in the set Range.
Definition: ControlNetValidMeasure.cpp:666
Isis::ControlNetValidMeasure::GetPixelsFromEdge
double GetPixelsFromEdge(void)
Get the option PixelsFromEdge.
Definition: ControlNetValidMeasure.h:162
Isis::ControlNetValidMeasure::mdResidualTolerance
double mdResidualTolerance
Standard Option Residual Magnitude.
Definition: ControlNetValidMeasure.h:266
Isis::ControlNetValidMeasure::Parse
void Parse(Pvl &pvlDef)
Parse the DefFile for Standard Options.
Definition: ControlNetValidMeasure.cpp:150
Isis::ControlNetValidMeasure::mdMinResolution
double mdMinResolution
Standard Option MinResolution.
Definition: ControlNetValidMeasure.h:256
Isis::ControlNetValidMeasure::mdLineResidual
double mdLineResidual
Store current Measure's Line Residual.
Definition: ControlNetValidMeasure.h:277
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ControlNetValidMeasure::SetCameraRequiredFlag
void SetCameraRequiredFlag(bool pbFlag)
Set the CameraRequired Flag.
Definition: ControlNetValidMeasure.h:250
Isis::ControlNetValidMeasure::ValidatePvlFromEdge
void ValidatePvlFromEdge(void)
Validate and read Pixels and Meters from Edge Standard Options.
Definition: ControlNetValidMeasure.cpp:394
Isis::ControlNetValidMeasure::m_pixelShift
double m_pixelShift
Store current Measure's Pixel Shift.
Definition: ControlNetValidMeasure.h:282
Isis::ControlMeasure
a control measurement
Definition: ControlMeasure.h:175