Isis 3.0 Object Programmers' Reference |
Home |
00001 #ifndef InterestOperator_h 00002 #define InterestOperator_h 00003 00026 #include <string> 00027 #include <vector> 00028 #include "PvlGroup.h" 00029 #include "Camera.h" 00030 #include "UniversalGroundMap.h" 00031 #include "ControlNetValidMeasure.h" 00032 #include "ImageOverlapSet.h" 00033 00034 #include "geos/geom/Point.h" 00035 #include "geos/geom/Coordinate.h" 00036 #include "geos/geom/MultiPolygon.h" 00037 #include "geos/util/GEOSException.h" 00038 00039 namespace Isis { 00040 class Chip; 00041 class Pvl; 00042 class Cube; 00043 class PvlObject; 00044 class ControlNet; 00045 class ControlPoint; 00046 class ControlMeasure; 00047 00119 class InterestOperator : public ControlNetValidMeasure { 00120 public: 00121 InterestOperator(Pvl &pPvl); 00122 00123 virtual ~InterestOperator(); 00124 00125 void InitInterestOptions(); 00126 00127 void SetPatternValidPercent(const double percent); 00128 void SetPatternSampling(const double percent); 00129 void SetSearchSampling(const double percent); 00130 void SetTolerance(double tolerance); 00131 void SetPatternReduction(std::vector<int> samples, std::vector<int> lines); 00132 00134 inline QString operatorName() const { 00135 return mOperatorGrp["Name"]; 00136 }; 00137 00139 bool Operate(Cube &pCube, UniversalGroundMap &pUnivGrndMap, int piSample, int piLine); 00140 00142 void Operate(ControlNet &pNewNet, QString psSerialNumFile, QString psOverlapListFile = ""); 00143 00145 inline double InterestAmount() const { 00146 return p_interestAmount; 00147 }; 00148 00150 inline double WorstInterest() const { 00151 return p_worstInterest; 00152 } 00153 00155 inline double CubeSample() const { 00156 return p_cubeSample; 00157 }; 00158 00160 inline double CubeLine() const { 00161 return p_cubeLine; 00162 }; 00163 00165 virtual bool CompareInterests(double int1, double int2); 00166 void AddGroup(Isis::PvlObject &obj); //???? check if used 00167 00169 void SetClipPolygon(const geos::geom::MultiPolygon &clipPolygon); 00170 00172 Isis::PvlGroup Operator(); 00173 00174 protected: 00176 void Parse(Pvl &pPvl); 00177 00179 virtual double Interest(Chip &subCube) = 0; 00180 00182 const geos::geom::MultiPolygon *FindOverlap(Isis::ControlPoint &pCnetPoint); 00183 00185 const geos::geom::MultiPolygon *FindOverlapByImageFootPrint(Isis::ControlPoint &pCnetPoint); 00186 00189 void FindCnetRef(ControlNet &pNewNet); 00190 00192 void ProcessLocked_Point_Reference(ControlPoint &pCPoint, PvlObject &pPvlObj, int &piMeasuresModified); 00193 00195 int InterestByPoint(ControlPoint &pCnetPoint); 00196 00198 bool InterestByMeasure(int piMeasure, Isis::ControlMeasure &pCnetMeasure, Isis::Cube &pCube); 00199 00201 void InitInterestResults(int piIndex); 00202 00203 virtual int Padding(); 00204 00205 double p_worstInterest, p_interestAmount; 00206 00208 geos::geom::MultiPolygon *p_clipPolygon; 00209 00210 Isis::PvlGroup mOperatorGrp; 00211 00212 private: 00213 double p_cubeSample, p_cubeLine; 00214 double p_minimumInterest; 00215 Isis::ImageOverlapSet mOverlaps; 00216 bool mbOverlaps; 00217 00219 int p_deltaSamp, p_deltaLine, p_lines, p_samples; 00220 00222 typedef struct { 00223 QString msSerialNum; 00224 double mdInterest; 00225 double mdBestSample; 00226 double mdBestLine; 00227 double mdOrigSample; 00228 double mdOrigLine; 00229 double mdEmission; 00230 double mdIncidence; 00231 double mdDn; 00232 double mdResolution; 00233 bool mbValid; 00234 int miDeltaSample; 00235 int miDeltaLine; 00236 } InterestResults; 00237 InterestResults *mtInterestResults; 00238 }; 00239 }; 00240 00241 #endif