Isis 3 Programmer Reference
ControlNetValidMeasure.cpp
2 #include "Cube.h"
3 #include "Camera.h"
4 #include "ControlMeasure.h"
5 #include "CubeManager.h"
7 #include "SerialNumberList.h"
8 #include "SpecialPixel.h"
9 #include "UniversalGroundMap.h"
10 
11 namespace Isis {
12 
23 
24  if(pPvl != NULL && pPvl->hasGroup("ValidMeasure")) {
25  Parse(*pPvl);
26  }
27  else {
29  }
30  mStatisticsGrp = PvlGroup("Statistics");
31  }
32 
43 
44  if(pPvl.hasGroup("ValidMeasure")) {
45  Parse(pPvl);
46  }
47  else {
49  }
50  mStatisticsGrp = PvlGroup("Statistics");
51  }
52 
60  mdMaxEmissionAngle = 135;
62  mdMaxIncidenceAngle = 135;;
63  miPixelsFromEdge = 0;
64  mdMinResolution = 0;
65  mdMaxResolution = DBL_MAX;
68  miPixelsFromEdge = 0;
69  mdMetersFromEdge = 0;
70  mdSampleResTolerance = DBL_MAX;
71  mdLineResTolerance = DBL_MAX;
72  mdResidualTolerance = DBL_MAX;
73  m_sampleShiftTolerance = DBL_MAX;
74  m_lineShiftTolerance = DBL_MAX;
75  m_pixelShiftTolerance = DBL_MAX;
76 
77  mbCameraRequired = false;
78  mbValidateDN = false;
79  mbValidateFromEdge = false;
80  }
81 
88  mStdOptionsGrp = PvlGroup("StandardOptions");
89 
92 
98  mStdOptionsGrp += Isis::PvlKeyword("MaxResolution", (mdMaxResolution == DBL_MAX ? "NA" : toString(mdSampleResTolerance)));
101 
102  mStdOptionsGrp += Isis::PvlKeyword("SampleResidual", (mdSampleResTolerance == DBL_MAX ? "NA" : toString(mdSampleResTolerance)));
103  mStdOptionsGrp += Isis::PvlKeyword("LineResidual", (mdLineResTolerance == DBL_MAX ? "NA" : toString(mdLineResTolerance)));
104  mStdOptionsGrp += Isis::PvlKeyword("ResidualMagnitude", (mdResidualTolerance == DBL_MAX ? "NA" : toString(mdResidualTolerance)));
105 
107  mStdOptionsGrp += Isis::PvlKeyword("LineShift", (m_lineShiftTolerance == DBL_MAX ? "NA" : toString(m_lineShiftTolerance)));
109  }
110 
118  }
119 
128  void ControlNetValidMeasure::ReadSerialNumbers(QString psSerialNumfile) {
129  mSerialNumbers = SerialNumberList(psSerialNumfile, true, &mStatus);
130 
132  }
133 
143  mPvlOpGrp = pvlDef.findGroup("ValidMeasure", Pvl::Traverse);
144 
145  mStdOptionsGrp = PvlGroup("StandardOptions");
146 
147  ValidatePvlDN();
154 
156  }
157 
172  double pSample, double pLine, const ControlMeasure *pMeasure, Cube *pCube,
173  PvlGroup *pMeasureGrp) {
174 
175  // Get the Camera
176  Camera *measureCamera = NULL;
177  if(mbCameraRequired) {
178  try {
179  measureCamera = pCube->camera();
180  }
181  catch(IException &e) {
182  QString msg = "Cannot Create Camera for Image:" + pCube->fileName();
184  }
185  }
186 
187  return ValidStandardOptions(pSample, pLine, pMeasure,
188  pCube, measureCamera, pMeasureGrp);
189  }
190 
191 
193  double pSample, double pLine, const ControlMeasure *pMeasure, Cube *pCube,
194  Camera *measureCamera, PvlGroup *pMeasureGrp) {
195 
198  mdDnValue = 0;
199  mdResolution = Null;
200  mdSampleResidual = 0;
201  mdLineResidual = 0;
203  m_sampleShift = 0;
204  m_lineShift = 0;
205  m_pixelShift = 0;
206 
207  if (measureCamera != NULL) {
208  bool success = measureCamera->SetImage(pSample, pLine);
209  if (success) {
210  mdEmissionAngle = measureCamera->EmissionAngle();
211  mdIncidenceAngle = measureCamera->IncidenceAngle();
212  mdResolution = measureCamera->PixelResolution();
213  }
214  }
215 
216  if (pMeasure != NULL) {
217  double temp = pMeasure->GetSampleResidual();
218  if (temp != Null) {
219  mdSampleResidual = fabs(temp);
220  }
221 
222  temp = pMeasure->GetLineResidual();
223  if (temp != Null) {
224  mdLineResidual = fabs(temp);
225  }
226 
227  temp = pMeasure->GetResidualMagnitude();
228  if (temp != Null) {
229  mdResidualMagnitude = fabs(temp);
230  }
231 
232  temp = pMeasure->GetSampleShift();
233  if (temp != Null) {
234  m_sampleShift = fabs(temp);
235  }
236 
237  temp = pMeasure->GetLineShift();
238  if (temp != Null) {
239  m_lineShift = fabs(temp);
240  }
241 
242  temp = pMeasure->GetPixelShift();
243  if (temp != Null) {
244  m_pixelShift = fabs(temp);
245  }
246  }
247 
248  if(mbValidateDN) {
249  Isis::Portal inPortal(1, 1, pCube->pixelType());
250  inPortal.SetPosition(pSample, pLine, 1);
251  pCube->read(inPortal);
252  mdDnValue = inPortal[0];
253  }
254 
255  if(pMeasureGrp != NULL) {
257  *pMeasureGrp += Isis::PvlKeyword("EmissionAngle", toString(mdEmissionAngle));
258  *pMeasureGrp += Isis::PvlKeyword("IncidenceAngle", toString(mdIncidenceAngle));
259  *pMeasureGrp += Isis::PvlKeyword("Resolution", toString(mdResolution));
260  }
261  else {
262  *pMeasureGrp += Isis::PvlKeyword("EmissionAngle", "Invalid Emission Angle");
263  *pMeasureGrp += Isis::PvlKeyword("IncidenceAngle", "Invalid Incidence Angle");
264  *pMeasureGrp += Isis::PvlKeyword("Resolution", "Invalid Resolution");
265  }
266  if(mbValidateDN) {
267  *pMeasureGrp += Isis::PvlKeyword("DNValue", toString(mdDnValue));
268  }
269  *pMeasureGrp += Isis::PvlKeyword("SampleResidual", toString(mdSampleResidual));
270  *pMeasureGrp += Isis::PvlKeyword("LineResidual", toString(mdLineResidual));
271  *pMeasureGrp += Isis::PvlKeyword("ResidualMagnitude", toString(mdResidualMagnitude));
272 
273  *pMeasureGrp += Isis::PvlKeyword("SampleShift", toString(m_sampleShift));
274  *pMeasureGrp += Isis::PvlKeyword("LineShift", toString(m_lineShift));
275  *pMeasureGrp += Isis::PvlKeyword("PixelShift", toString(m_pixelShift));
276  }
277 
278  MeasureValidationResults results;
279 
280  if(mbCameraRequired) {
282  results.addFailure(MeasureValidationResults::EmissionAngle,
284  }
285 
287  results.addFailure(MeasureValidationResults::IncidenceAngle,
289  }
290 
292  results.addFailure(MeasureValidationResults::Resolution,
294  }
295  }
296 
297  if(mbValidateDN) {
298  if(!ValidDnValue(mdDnValue)) {
299  results.addFailure(MeasureValidationResults::DNValue,
301  }
302  }
303 
304  if(mbValidateFromEdge) {
305  if(!PixelsFromEdge((int)pSample, (int)pLine, pCube)) {
306  results.addFailure(MeasureValidationResults::PixelsFromEdge, miPixelsFromEdge);
307  }
308 
309  if(!MetersFromEdge((int)pSample, (int)pLine, pCube)) {
310  results.addFailure(MeasureValidationResults::MetersFromEdge,
312  }
313  }
314 
315  if(pMeasure != NULL) {
317  mdResidualMagnitude, results);
319  m_pixelShift, results);
320  }
321 
322  return results;
323  }
324 
338  double pSample, double pLine, Cube *pCube, PvlGroup *pMeasureGrp) {
339 
340  return ValidStandardOptions(pSample, pLine, NULL, pCube, pMeasureGrp);
341 
342  }
343 
344 
358  const ControlMeasure * pMeasure, Cube *pCube, PvlGroup *pMeasureGrp) {
359 
360  double dSample, dLine;
361  dSample = pMeasure->GetSample();
362  dLine = pMeasure->GetLine();
363 
364  return (ValidStandardOptions(dSample, dLine, pMeasure, pCube, pMeasureGrp));
365  }
366 
367 
369  const ControlMeasure * pMeasure, Cube *pCube, Camera *camera,
370  PvlGroup *pMeasureGrp) {
371 
372  double dSample, dLine;
373  dSample = pMeasure->GetSample();
374  dLine = pMeasure->GetLine();
375 
376  return ValidStandardOptions(dSample, dLine, pMeasure,
377  pCube, camera, pMeasureGrp);
378  }
379 
387  // Parse the Pixels from edge
388  if(mPvlOpGrp.hasKeyword("PixelsFromEdge")) {
389  miPixelsFromEdge = mPvlOpGrp["PixelsFromEdge"];
390  if(miPixelsFromEdge < 0) {
391  miPixelsFromEdge = 0;
392  }
393  else {
394  mbValidateFromEdge = true;
395  }
397  }
398  // Parse the Meters from edge
399  if(mPvlOpGrp.hasKeyword("MetersFromEdge")) {
400  mdMetersFromEdge = mPvlOpGrp["MetersFromEdge"];
401  if(mdMetersFromEdge < 0) {
402  mdMetersFromEdge = 0;
403  }
404  else {
405  mbValidateFromEdge = true;
406  }
408  }
409  }
410 
419  if(mPvlOpGrp.hasKeyword("MinResolution")){
420  mdMinResolution = mPvlOpGrp["MinResolution"];
421  mbCameraRequired = true;
422  }
423  else {
424  mdMinResolution = 0;
425  }
427 
428  if(mPvlOpGrp.hasKeyword("MaxResolution")){
429  mdMaxResolution = mPvlOpGrp["MaxResolution"];
430  mbCameraRequired = true;
431  }
432  else {
433  mdMaxResolution = DBL_MAX;
434  }
435  mStdOptionsGrp += Isis::PvlKeyword("MaxResolution", (mdMaxResolution == DBL_MAX ? "NA" : toString(mdMaxResolution)));
436 
437  if(mdMinResolution < 0 || mdMaxResolution < 0) {
438  QString msg = "Invalid Resolution value(s), Resolution must be greater than zero";
440  }
441 
443  QString msg = "MinResolution must be less than MaxResolution";
445  }
446  }
447 
457  if(mPvlOpGrp.hasKeyword("MinDN")) {
458  mdMinDN = mPvlOpGrp["MinDN"];
459  mbValidateDN = true;
460  }
461  else {
463  }
465 
466  if(mPvlOpGrp.hasKeyword("MaxDN")) {
467  mdMaxDN = mPvlOpGrp["MaxDN"];
468  mbValidateDN = true;
469  }
470  else {
472  }
474 
475  if(mdMaxDN < mdMinDN) {
476  QString msg = "MinDN must be less than MaxDN";
478  }
479  }
480 
490  if(mPvlOpGrp.hasKeyword("MinEmission")) {
491  mdMinEmissionAngle = mPvlOpGrp["MinEmission"];
492  mbCameraRequired = true;
493  if(mdMinEmissionAngle < 0 || mdMinEmissionAngle > 135) {
494  QString msg = "Invalid Min Emission Angle, Valid Range is [0-135]";
496  }
497  }
499 
500  if(mPvlOpGrp.hasKeyword("MaxEmission")) {
501  mdMaxEmissionAngle = mPvlOpGrp["MaxEmission"];
502  mbCameraRequired = true;
503  if(mdMaxEmissionAngle < 0 || mdMaxEmissionAngle > 135) {
504  QString msg = "Invalid Max Emission Angle, Valid Range is [0-135]";
506  }
507  }
509 
511  QString msg = "Min EmissionAngle must be less than Max EmissionAngle";
513  }
514 
515  }
516 
526  if(mPvlOpGrp.hasKeyword("MinIncidence")) {
527  mdMinIncidenceAngle = mPvlOpGrp["MinIncidence"];
528  mbCameraRequired = true;
529  if(mdMinIncidenceAngle < 0 || mdMinIncidenceAngle > 135) {
530  QString msg = "Invalid Min Incidence Angle, Valid Range is [0-135]";
532  }
533  }
535 
536  if(mPvlOpGrp.hasKeyword("MaxIncidence")) {
537  mdMaxIncidenceAngle = mPvlOpGrp["MaxIncidence"];
538  mbCameraRequired = true;
539  if(mdMaxIncidenceAngle < 0 || mdMaxIncidenceAngle > 135) {
540  QString msg = "Invalid Max Incidence Angle, Valid Range is [0-135]";
542  }
543  }
545 
547  QString msg = "Min IncidenceAngle must be less than Max IncidenceAngle";
549  }
550  }
551 
558  bool bRes=false;
559  bool bResMag = false;
560  if(mPvlOpGrp.hasKeyword("SampleResidual")) {
561  mdSampleResTolerance = mPvlOpGrp["SampleResidual"];
562  if(mdSampleResTolerance < 0) {
563  QString msg = "Invalid Sample Residual, must be greater than zero";
565  }
566  bRes = true;
567  }
568  mStdOptionsGrp += Isis::PvlKeyword("SampleResidual", (mdSampleResTolerance == DBL_MAX ? "NA" : toString(mdSampleResTolerance)));
569 
570  if(mPvlOpGrp.hasKeyword("LineResidual")) {
571  mdLineResTolerance = mPvlOpGrp["LineResidual"];
572  if(mdLineResTolerance < 0) {
573  QString msg = "Invalid Line Residual, must be greater than zero";
575  }
576  bRes = true;
577  }
578  mStdOptionsGrp += Isis::PvlKeyword("LineResidual", (mdLineResTolerance == DBL_MAX ? "NA" : toString(mdLineResTolerance)));
579 
580  if(mPvlOpGrp.hasKeyword("ResidualMagnitude")) {
581  mdResidualTolerance = mPvlOpGrp["ResidualMagnitude"];
582  if(mdResidualTolerance < 0) {
583  QString msg = "Invalid Residual Magnitude Tolerance, must be greater than zero";
585  }
586  bResMag = true;
587  }
588  mStdOptionsGrp += Isis::PvlKeyword("ResidualMagnitude", (mdResidualTolerance == DBL_MAX ? "NA" : toString(mdResidualTolerance)));
589 
590  if(bRes && bResMag) {
591  QString msg = "Cannot have both Sample/Line Residuals and Residual Magnitude.";
592  msg += "\nChoose either Sample/Line Residual or Residual Magnitude";
594  }
595  }
596 
597 
603  bool hasSampleLineShift = false;
604  if (mPvlOpGrp.hasKeyword("SampleShift")) {
605  m_sampleShiftTolerance = mPvlOpGrp["SampleShift"];
606  if (m_sampleShiftTolerance < 0) {
607  QString msg = "Invalid Sample Shift tolerance:"
608  " must be greater than or equal to zero";
610  }
611  hasSampleLineShift = true;
612  }
614 
615  if (mPvlOpGrp.hasKeyword("LineShift")) {
616  m_lineShiftTolerance = mPvlOpGrp["LineShift"];
617  if (m_lineShiftTolerance < 0) {
618  QString msg = "Invalid Line Shift tolerance:"
619  " must be greater than or equal to zero";
621  }
622  hasSampleLineShift = true;
623  }
624  mStdOptionsGrp += Isis::PvlKeyword("LineShift", (m_lineShiftTolerance == DBL_MAX ? "NA" : toString(m_lineShiftTolerance)));
625 
626  bool hasPixelShift = false;
627  if (mPvlOpGrp.hasKeyword("PixelShift")) {
628  m_pixelShiftTolerance = mPvlOpGrp["PixelShift"];
629  if (m_pixelShiftTolerance < 0) {
630  QString msg = "Invalid Pixel Shift tolerance:"
631  " must be greater than or equal to zero";
633  }
634  hasPixelShift = true;
635  }
637 
638  if (hasSampleLineShift && hasPixelShift) {
639  QString msg = "Cannot have both Sample/Line Shift and Pixel Shift";
640  msg += " tolerances.\n";
641  msg += "Choose either Sample/Line Shift or Pixel Shift to validate on";
643  }
644  }
645 
646 
658  bool ControlNetValidMeasure::ValidEmissionAngle(double pdEmissionAngle) {
659  if(pdEmissionAngle < mdMinEmissionAngle || pdEmissionAngle > mdMaxEmissionAngle) {
660  return false;
661  }
662  return true;
663  }
664 
676  bool ControlNetValidMeasure::ValidIncidenceAngle(double pdIncidenceAngle) {
677  if(pdIncidenceAngle < mdMinIncidenceAngle || pdIncidenceAngle > mdMaxIncidenceAngle) {
678  return false;
679  }
680  return true;
681  }
682 
693  bool ControlNetValidMeasure::ValidDnValue(double pdDnValue) {
694  if(Isis::IsSpecial(pdDnValue) || pdDnValue < mdMinDN || pdDnValue > mdMaxDN) {
695  return false;
696  }
697  return true;
698  }
699 
710  bool ControlNetValidMeasure::ValidResolution(double pdResolution) {
711  if(pdResolution < mdMinResolution || pdResolution > mdMaxResolution) {
712  return false;
713  }
714  return true;
715  }
716 
717 
732  double pdLineResidual, double pdResidualMagnitude,
733  MeasureValidationResults & pResults){
734  bool bFlag = true;
735 
736  if(pdSampleResidual > mdSampleResTolerance) {
737  bFlag = false;
738  pResults.addFailure(MeasureValidationResults::SampleResidual, mdSampleResTolerance, "greater");
739  }
740  if(pdLineResidual > mdLineResTolerance) {
741  bFlag = false;
742  pResults.addFailure(MeasureValidationResults::LineResidual, mdLineResTolerance, "greater");
743  }
744  if(pdResidualMagnitude > mdResidualTolerance) {
745  bFlag = false;
746  pResults.addFailure(MeasureValidationResults::ResidualMagnitude, mdResidualTolerance, "greater");
747  }
748 
749  return bFlag;
750  }
751 
752 
765  double sampleShift, double lineShift, double pixelShift,
766  MeasureValidationResults &results) {
767 
768  bool valid = true;
769 
770  if (sampleShift > m_sampleShiftTolerance) {
771  valid = false;
772  results.addFailure(MeasureValidationResults::SampleShift,
773  m_sampleShiftTolerance, "greater");
774  }
775  if (lineShift > m_lineShiftTolerance) {
776  valid = false;
777  results.addFailure(MeasureValidationResults::LineShift,
778  m_lineShiftTolerance, "greater");
779  }
780  if (pixelShift > m_pixelShiftTolerance) {
781  valid = false;
782  results.addFailure(MeasureValidationResults::PixelShift,
783  m_pixelShiftTolerance, "greater");
784  }
785 
786  return valid;
787  }
788 
789 
801  bool ControlNetValidMeasure::ValidLatLon(Camera *pCamera, int piSample, int piLine) {
802  return true;
803  }
804 
816  bool ControlNetValidMeasure::PixelsFromEdge(int piSample, int piLine, Cube *pCube) {
817  if(miPixelsFromEdge <= 0) {
818  return true;
819  }
820 
821  int iNumSamples = pCube->sampleCount();
822  int iNumLines = pCube->lineCount();
823 
824  // test right
825  if((iNumSamples - piSample) < miPixelsFromEdge) {
826  return false;
827  }
828 
829  // test left
830  if((piSample - miPixelsFromEdge) <= 0) {
831  return false;
832  }
833 
834  // test down
835  if((iNumLines - piLine) < miPixelsFromEdge) {
836  return false;
837  }
838 
839  // test up
840  if((piLine - miPixelsFromEdge) <= 0) {
841  return false;
842  }
843 
844  return true;
845  }
846 
858  bool ControlNetValidMeasure::MetersFromEdge(int piSample, int piLine, Cube *pCube) {
859  if(mdMetersFromEdge <= 0) {
860  return true;
861  }
862 
863  int iNumSamples = pCube->sampleCount();
864  int iNumLines = pCube->lineCount();
865 
866  try {
867  // Get the image's camera to get pixel resolution
868  Camera *camera = pCube->camera();
869  double resMetersTotal = 0;
870  bool bMinDistance = false;
871 
872  // test top
873  for(int line = piLine - 1; line > 0; line--) {
874  camera->SetImage(piSample, line);
875  double resolution = camera->PixelResolution();
876  resMetersTotal += resolution;
877  if(resMetersTotal >= mdMetersFromEdge) {
878  bMinDistance = true;
879  break;
880  }
881  }
882  if(!bMinDistance) {
883  return false;
884  }
885 
886  // test bottom
887  bMinDistance = false;
888  resMetersTotal = 0;
889  for(int line = piLine + 1; line <= iNumLines; line++) {
890  camera->SetImage(piSample, line);
891  double resolution = camera->PixelResolution();
892  resMetersTotal += resolution;
893  if(resMetersTotal >= mdMetersFromEdge) {
894  bMinDistance = true;
895  break;
896  }
897  }
898  if(!bMinDistance) {
899  return false;
900  }
901 
902  // test left
903  resMetersTotal = 0;
904  bMinDistance = false;
905  for(int sample = piSample - 1; sample > 0; sample--) {
906  camera->SetImage(sample, piLine);
907  double resolution = camera->PixelResolution();
908  resMetersTotal += resolution;
909  if(resMetersTotal >= mdMetersFromEdge) {
910  bMinDistance = true;
911  break;
912  }
913  }
914  if(!bMinDistance) {
915  return false;
916  }
917 
918  // test right
919  resMetersTotal = 0;
920  bMinDistance = false;
921  for(int sample = piSample + 1; sample <= iNumSamples; sample++) {
922  camera->SetImage(sample, piLine);
923  double resolution = camera->PixelResolution();
924  resMetersTotal += resolution;
925  if(resMetersTotal >= mdMetersFromEdge) {
926  return true;
927  }
928  }
929  return false;
930  }
931  catch(IException &e) {
932  QString msg = "Cannot Create Camera for Image [" +
933  pCube->fileName() + "]";
935  }
936  }
937 };
938 
void ValidatePvlEmissionAngle(void)
Validate PVL Min & Max EmissionAngle Standard Options.
double m_pixelShift
Store current Measure&#39;s Pixel Shift.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
double m_pixelShiftTolerance
Standard Option Pixel Shift.
double m_sampleShift
Store current Measure&#39;s Sample Shift.
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:110
double m_sampleShiftTolerance
Standard Option Sample Shift.
bool ValidResolution(double pdResolution)
Validate whether the Resolution is in the set Range.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:141
const double ValidMinimum
The minimum valid double value for Isis pixels.
Definition: SpecialPixel.h:102
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.
Camera * camera()
Return a camera associated with the cube.
Definition: Cube.cpp:1166
double mdMaxDN
Standard Option MaxDN.
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:52
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 mdLineResTolerance
Standard Option Line Residual.
void InitStdOptions(void)
Initialize the Standard Options.
int sampleCount() const
Definition: Cube.cpp:1452
bool mbValidateFromEdge
Check if Pixels/Meters from edge needs to be Validated.
double GetResidualMagnitude() const
Return Residual magnitude.
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&#39;s Emission Angle.
Progress mStatus
Monitor the status of the app.
Search child objects.
Definition: PvlObject.h:170
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
Definition: PvlObject.h:222
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.
bool ValidLatLon(Isis::Camera *pCamera, int piSample, int piLine)
Validate the Lat/Lon.
PvlGroup mStatisticsGrp
Pvl output Statistics Group.
double mdSampleResidual
Store current Measure&#39;s Sample Residual.
void SetNumOpenCubes(unsigned int numCubes)
This sets the maximum number of opened cubes for this instance of CubeManager.
Definition: CubeManager.h:96
void ValidatePvlDN(void)
Validate PVL Min & Max DN Standard Options.
virtual ~ControlNetValidMeasure()
Destructor: clean up stuff relevant for this class.
double EmissionAngle() const
Returns the emission angle in degrees.
Definition: Sensor.cpp:339
bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
Definition: Camera.cpp:170
double mdResidualMagnitude
Store current Measure&#39;s Residual Magnitude.
bool ValidIncidenceAngle(double pdIncidenceAngle)
Validate whether the Incidence Angle is in the set Range.
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.
void InitStdOptionsGroup(void)
Initialize the Standard Options Pvl Group with no DefFile.
double mdIncidenceAngle
Store current Measure&#39;s Incidence Angle.
void ValidatePvlIncidenceAngle(void)
Validate PVL Min & Max IncidenceAngle Standard Options.
double m_lineShift
Store current Measure&#39;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.
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
PvlGroup mPvlOpGrp
Pvl Operator Group.
A type of error that could only have occurred due to a mistake on the user&#39;s part (e...
Definition: IException.h:142
A single keyword-value pair.
Definition: PvlKeyword.h:98
double mdMaxResolution
Standard Option MaxResolution.
void read(Blob &blob) const
This method will read data from the specified Blob object.
Definition: Cube.cpp:724
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:212
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.
PixelType pixelType() const
Definition: Cube.cpp:1403
void SetPosition(const double sample, const double line, const int band)
Sets the line and sample position of the buffer.
Definition: Portal.h:109
double mdDnValue
Store current Measure&#39;s DN Value.
double mdResidualTolerance
Standard Option Residual Magnitude.
Pvl mPvlLog
Pvl Log of all the processing.
MeasureValidationResults class.
const double ValidMaximum
The maximum valid double value for Isis pixels.
Definition: SpecialPixel.h:137
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.
virtual QString fileName() const
Returns the opened cube&#39;s filename.
Definition: Cube.cpp:1208
void ValidatePvlResolution(void)
Validate PVL Min & Max Resolution Standard Options.
int lineCount() const
Definition: Cube.cpp:1379
double PixelResolution()
Returns the pixel resolution at the current position in meters/pixel.
Definition: Camera.cpp:689
Isis exception class.
Definition: IException.h:107
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
a control measurement
double IncidenceAngle() const
Returns the incidence angle in degrees.
Definition: Sensor.cpp:350
Serial Number list generator.
double mdResolution
Store current Measure&#39;s Resolution.
double mdLineResidual
Store current Measure&#39;s Line Residual.
bool ValidEmissionAngle(double pdEmissionAngle)
Validate whether the Emission Angle is in the set Range.
void Parse(Pvl &pvlDef)
Parse the DefFile for Standard Options.
double mdMaxIncidenceAngle
Standard Option MaxIncidenceAngle.
bool mbCameraRequired
To improve speed, flag to indicate if Camera needs to be opened.
void CleanCubes(const QString &cubeFileName)
This method removes a cube from memory, if it exists.
double mdMinResolution
Standard Option MinResolution.
IO Handler for Isis Cubes.
Definition: Cube.h:170