Isis 3 Developer Reference
InterestOperator.h
Go to the documentation of this file.
1 #ifndef InterestOperator_h
2 #define InterestOperator_h
3 
26 #include <string>
27 #include <vector>
28 #include "PvlGroup.h"
29 #include "Camera.h"
30 #include "UniversalGroundMap.h"
31 #include "ControlNetValidMeasure.h"
32 #include "ImageOverlapSet.h"
33 
34 #include "geos/geom/Point.h"
35 #include "geos/geom/Coordinate.h"
36 #include "geos/geom/MultiPolygon.h"
37 #include "geos/util/GEOSException.h"
38 
39 namespace Isis {
40  class Chip;
41  class Pvl;
42  class Cube;
43  class PvlObject;
44  class ControlNet;
45  class ControlPoint;
46  class ControlMeasure;
47 
124  public:
125  InterestOperator(Pvl &pPvl);
126 
127  virtual ~InterestOperator();
128 
129  void InitInterestOptions();
130 
131  void SetPatternValidPercent(const double percent);
132  void SetPatternSampling(const double percent);
133  void SetSearchSampling(const double percent);
134  void SetTolerance(double tolerance);
135  void SetPatternReduction(std::vector<int> samples, std::vector<int> lines);
136 
138  inline QString operatorName() const {
139  return mOperatorGrp["Name"];
140  };
141 
143  bool Operate(Cube &pCube, UniversalGroundMap &pUnivGrndMap, int piSample, int piLine);
144 
146  void Operate(ControlNet &pNewNet, QString psSerialNumFile, QString psOverlapListFile = "");
147 
149  inline double InterestAmount() const {
150  return p_interestAmount;
151  };
152 
154  inline double WorstInterest() const {
155  return p_worstInterest;
156  }
157 
159  inline double CubeSample() const {
160  return p_cubeSample;
161  };
162 
164  inline double CubeLine() const {
165  return p_cubeLine;
166  };
167 
169  virtual bool CompareInterests(double int1, double int2);
170  void addGroup(Isis::PvlObject &obj); //???? check if used
171 
173  void SetClipPolygon(const geos::geom::MultiPolygon &clipPolygon);
174 
177 
178  protected:
180  void Parse(Pvl &pPvl);
181 
183  virtual double Interest(Chip &subCube) = 0;
184 
186  const geos::geom::MultiPolygon *FindOverlap(Isis::ControlPoint &pCnetPoint);
187 
189  const geos::geom::MultiPolygon *FindOverlapByImageFootPrint(Isis::ControlPoint &pCnetPoint);
190 
193  void FindCnetRef(ControlNet &pNewNet);
194 
196  void ProcessLocked_Point_Reference(ControlPoint &pCPoint, PvlObject &pPvlObj, int &piMeasuresModified);
197 
199  int InterestByPoint(ControlPoint &pCnetPoint);
200 
202  bool InterestByMeasure(int piMeasure, Isis::ControlMeasure &pCnetMeasure, Isis::Cube &pCube);
203 
205  void InitInterestResults(int piIndex);
206 
207  virtual int Padding();
208 
210 
212  geos::geom::MultiPolygon *p_clipPolygon;
213 
215 
216  private:
217  double p_cubeSample, p_cubeLine;
218  double p_minimumInterest;
219  Isis::ImageOverlapSet mOverlaps;
220  bool mbOverlaps;
221 
223  int p_deltaSamp, p_deltaLine, p_lines, p_samples;
224 
226  typedef struct {
227  QString msSerialNum;
228  double mdInterest;
229  double mdBestSample;
230  double mdBestLine;
231  double mdOrigSample;
232  double mdOrigLine;
233  double mdEmission;
234  double mdIncidence;
235  double mdDn;
236  double mdResolution;
237  bool mbValid;
238  int miDeltaSample;
239  int miDeltaLine;
240  } InterestResults;
241  InterestResults *mtInterestResults;
242  };
243 };
244 
245 #endif
InterestOperator(Pvl &pPvl)
Create InterestOperator object.
Definition: InterestOperator.cpp:28
const geos::geom::MultiPolygon * FindOverlapByImageFootPrint(Isis::ControlPoint &pCnetPoint)
Find imageoverlaps by finding the intersection of image footprints.
Definition: InterestOperator.cpp:888
void Parse(Pvl &pPvl)
Parse the Interest specific keywords.
Definition: InterestOperator.cpp:83
QString operatorName() const
Return name of the matching operator.
Definition: InterestOperator.h:138
Universal Ground Map.
Definition: UniversalGroundMap.h:85
geos::geom::MultiPolygon * p_clipPolygon
Clipping polygon set by SetClipPolygon (line,samp)
Definition: InterestOperator.h:212
bool InterestByMeasure(int piMeasure, Isis::ControlMeasure &pCnetMeasure, Isis::Cube &pCube)
Calculate interest for a measure by index.
Definition: InterestOperator.cpp:720
A small chip of data used for pattern matching.
Definition: Chip.h:102
Interest Operator class.
Definition: InterestOperator.h:123
int InterestByPoint(ControlPoint &pCnetPoint)
Calculate interest for a Control Point.
Definition: InterestOperator.cpp:649
void SetPatternValidPercent(const double percent)
void SetPatternSampling(const double percent)
Isis::PvlGroup mOperatorGrp
Operator group that created this projection.
Definition: InterestOperator.h:214
void addGroup(Isis::PvlObject &obj)
Definition: InterestOperator.cpp:932
double InterestAmount() const
Return the Interest Amount.
Definition: InterestOperator.h:149
This class is used to find the overlaps between all the images in a list of serial numbers...
Definition: ImageOverlapSet.h:102
virtual ~InterestOperator()
Destroy InterestOperator object.
Definition: InterestOperator.cpp:53
const geos::geom::MultiPolygon * FindOverlap(Isis::ControlPoint &pCnetPoint)
Find if a point is in the overlap.
Definition: InterestOperator.cpp:838
a control network
Definition: ControlNet.h:271
void FindCnetRef(ControlNet &pNewNet)
Find best ref for an entire control net by calculating the interest and moving point to a better inte...
Definition: InterestOperator.cpp:363
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
Isis::PvlGroup Operator()
Return the Operator name.
Definition: InterestOperator.cpp:967
virtual int Padding()
Sets an offset to pass in larger chips if operator requires it This is used to offset the subchip siz...
Definition: InterestOperator.cpp:956
A single control point.
Definition: ControlPoint.h:369
void InitInterestResults(int piIndex)
Init Interest Results structure.
Definition: InterestOperator.cpp:120
void SetSearchSampling(const double percent)
Container for cube-like labels.
Definition: Pvl.h:135
void SetTolerance(double tolerance)
void InitInterestOptions()
Initialise Interest Options to defaults.
Definition: InterestOperator.cpp:39
virtual double Interest(Chip &subCube)=0
Calculate the interest.
double WorstInterest() const
Return the Worst(least value) Interest.
Definition: InterestOperator.h:154
void SetPatternReduction(std::vector< int > samples, std::vector< int > lines)
double CubeLine() const
Return the search chip cube line that best matched.
Definition: InterestOperator.h:164
void SetClipPolygon(const geos::geom::MultiPolygon &clipPolygon)
Set the Clip Polygon for points to be contained in the overlaps.
Definition: InterestOperator.cpp:944
double p_worstInterest
Definition: InterestOperator.h:209
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
a control measurement
Definition: ControlMeasure.h:189
double CubeSample() const
Return the search chip cube sample that best matched.
Definition: InterestOperator.h:159
void ProcessLocked_Point_Reference(ControlPoint &pCPoint, PvlObject &pPvlObj, int &piMeasuresModified)
Process (Validate and Log) Point with Lock or with Referemce Measure Locked.
Definition: InterestOperator.cpp:270
bool Operate(Cube &pCube, UniversalGroundMap &pUnivGrndMap, int piSample, int piLine)
Operate used by the app interestcube- to calculate interest by sample,line.
Definition: InterestOperator.cpp:155
double mdResolution
Store current Measure&#39;s Resolution.
Definition: ControlNetValidMeasure.h:281
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
double p_interestAmount
Definition: InterestOperator.h:209
ControlNetValidMeasure class.
Definition: ControlNetValidMeasure.h:82
virtual bool CompareInterests(double int1, double int2)
Compare for int1 greater than / equal to int2.
Definition: InterestOperator.cpp:926
IO Handler for Isis Cubes.
Definition: Cube.h:170