USGS

Isis 3.0 Application Source Code Reference

Home

CnetRefByResolution.h

Go to the documentation of this file.
00001 #ifndef _CnetRefByResolution_H_
00002 #define _CnetRefByResolution_H_
00003 
00004 #include "ControlNetValidMeasure.h"
00005 
00006 /**
00007  * @file
00008  * $Revision: 1.5 $
00009  * $Date:
00010  *
00011  *   Unless noted otherwise, the portions of Isis written by the USGS are
00012  *   public domain. See individual third-party library and package descriptions
00013  *   for intellectual property information, user agreements, and related
00014  *   information.
00015  *
00016  *   Although Isis has been used by the USGS, no warranty, expressed or
00017  *   implied, is made by the USGS as to the accuracy and functioning of such
00018  *   software and related material nor shall the fact of distribution
00019  *   constitute any such warranty, and no responsibility is assumed by the
00020  *   USGS in connection therewith.
00021  *
00022  *   For additional information, launch
00023  *   $ISISROOT/doc//documents/Disclaimers/Disclaimers.html
00024  *   in a browser or see the Privacy & Disclaimers page on the Isis website,
00025  *   http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on
00026  *   http://www.usgs.gov/privacy.html.
00027  */
00028 
00029 namespace Isis {
00030   /**
00031    * Enumeration containing different Resolution Types
00032    */
00033   enum ResolutionType {Low, High, Mean, Nearest, Range};
00034 
00035   class Pvl;
00036   class ControlNet;
00037   class ControlPoint;
00038 
00039   /**
00040    * @brief Find a Reference in Control Point based on Resolution
00041    *
00042    * This class is used find a Reference in Control Point based on Resolution
00043    * after it has passed all the validity test for Dn, Emission & Incidence Angles
00044    * and Resolution. Processes the entire points in the Control Network
00045    *
00046    * Resolution choices could be based on highest, lowest Resolutions or Measure
00047    * whose resolution is closest to mean of all the resolutions, Measure whose
00048    * resolution is closest to user defined value or Measure whose resolution
00049    * is in a given range
00050    *
00051    * @ingroup ControlNetwork
00052    *
00053    * @author 2010-06-10 Sharmila Prasad
00054    *
00055    * @see ControlNetValidMeasure, CnetRefByEmission, CnetRefByIncidence
00056    *
00057    * @internal
00058    *   @history 2010-06-10 Sharmila Prasad - Original version
00059    *   @history 2010-06-21 Sharmila Prasad - Remove references to UniversalGroundMap and Cubes
00060    *                                         use CubeManager instead
00061    *   @history 2010-06-23 Sharmila Prasad - Use ControlNetValidMeasure's Validate Standard Options &
00062    *                                         Std Options Pixels/Meters from Edge
00063    *   @history 2010-09-16 Sharmila Prasad - Renamed CnetValidMeasure to ControlNetValidMeasure
00064    *   @history 2010-10-06 Sharmila Prasad - Modified to incorporate Binary Control Network
00065    *   @history 2010-10-15 Sharmila Prasad - Use single copy of Control Net in FindCnetRef()
00066    *   @history 2010-10-22 Sharmila Prasad - Reset apriori for source==Reference
00067    *   @history 2010-12-29 Sharmila Prasad - Modified for new ControlNet API's
00068    *                                         (UpdatePoint, UpdateMeasure)
00069    *   @history 2011-01-19 Christopher Austin - Altered to compile with the new
00070    *                                             Control redesign.
00071    *   @history 2011-02-24 Sharmila Prasad - Fixed segmentation fault
00072    *   @history 2011-06-07 Debbie A. Cook and Tracie Sucharski - Modified point types
00073    *                                             Ground ------> Fixed
00074    *                                             Tie----------> Free
00075    */
00076   class CnetRefByResolution : public ControlNetValidMeasure {
00077     public:
00078       //! Constructor
00079       CnetRefByResolution(Pvl *pPvlDef, std::string psSerialNumfile, ResolutionType peType = Low,
00080           double pdResValue = 0, double pdMinRes = 0, double pdMaxRes = 0);
00081       virtual ~CnetRefByResolution() {};
00082 
00083       //! Get the Log updated by this object
00084       virtual Pvl &GetLogPvl(void) {
00085         return mPvlLog;
00086       };
00087 
00088       //! Get the Mean of all the Resolution in a Point
00089       double GetMeanResolution(void);
00090 
00091       //! Given Control Net, find the reference based on Resolution
00092       virtual void FindCnetRef(ControlNet &pNewNet);
00093 
00094     private:
00095       //! Get the Reference based on Resolution type
00096       int GetReferenceByResolution(ControlPoint *pNewPoint);
00097 
00098       std::vector<double> mdResVector; //!< Store the Resolutions of all Measures in a Point
00099       ResolutionType meType;           //!< Resolution Type - Low, Mean, High, Value, Range
00100       double mdResValue;               //!< Resolution value for Type=Value
00101       double mdMinRes;                 //!< Min Resolution for Type=Range
00102       double mdMaxRes;                 //!< Max Resolution for Type=Range
00103   };
00104 };
00105 #endif
00106