Isis 3 Programmer 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 
209  double p_worstInterest, p_interestAmount;
210 
212  geos::geom::MultiPolygon *p_clipPolygon;
213 
215 
216  private:
217  double p_cubeSample, p_cubeLine;
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;
240  } InterestResults;
242  };
243 };
244 
245 #endif
InterestOperator(Pvl &pPvl)
Create InterestOperator object.
const geos::geom::MultiPolygon * FindOverlapByImageFootPrint(Isis::ControlPoint &pCnetPoint)
Find imageoverlaps by finding the intersection of image footprints.
void Parse(Pvl &pPvl)
Parse the Interest specific keywords.
int p_deltaSamp
Specified in the Pvl Operator group for the box car size.
QString operatorName() const
Return name of the matching operator.
Universal Ground Map.
geos::geom::MultiPolygon * p_clipPolygon
Clipping polygon set by SetClipPolygon (line,samp)
bool InterestByMeasure(int piMeasure, Isis::ControlMeasure &pCnetMeasure, Isis::Cube &pCube)
Calculate interest for a measure by index.
A small chip of data used for pattern matching.
Definition: Chip.h:102
Structure to hold Interest Results.
Interest Operator class.
bool mbOverlaps
If Overlaplist exists.
int InterestByPoint(ControlPoint &pCnetPoint)
Calculate interest for a Control Point.
Isis::PvlGroup mOperatorGrp
Operator group that created this projection.
int miDeltaSample
The number of Samples the point has been moved.
double InterestAmount() const
Return the Interest Amount.
This class is used to find the overlaps between all the images in a list of serial numbers...
virtual ~InterestOperator()
Destroy InterestOperator object.
QString msSerialNum
Serial Number of the Measure.
double mdResolution
Camera resolution at most interesting sample,line.
bool mbValid
Value of the interest operator result (success)
double mdIncidence
Incidence angle at most interesting sample,line.
const geos::geom::MultiPolygon * FindOverlap(Isis::ControlPoint &pCnetPoint)
Find if a point is in the overlap.
double mdBestLine
Most interesting line.
double mdInterest
Resulting interest amt from InterestOperator.
double mdDn
Cube DN value at most interesting sample,line.
Isis::ImageOverlapSet mOverlaps
Holds the overlaps from the Overlaplist.
int miDeltaLine
The number of Lines the point has been moved.
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...
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
Isis::PvlGroup Operator()
Return the Operator name.
virtual int Padding()
Sets an offset to pass in larger chips if operator requires it This is used to offset the subchip siz...
InterestResults * mtInterestResults
Holds the results of an interest computation.
A single control point.
Definition: ControlPoint.h:369
void InitInterestResults(int piIndex)
Init Interest Results structure.
Container for cube-like labels.
Definition: Pvl.h:135
void InitInterestOptions()
Initialise Interest Options to defaults.
virtual double Interest(Chip &subCube)=0
Calculate the interest.
double WorstInterest() const
Return the Worst(least value) Interest.
double p_cubeLine
Point in a cube from a chip perspective.
double CubeLine() const
Return the search chip cube line that best matched.
void SetClipPolygon(const geos::geom::MultiPolygon &clipPolygon)
Set the Clip Polygon for points to be contained in the overlaps.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
double p_minimumInterest
Specified in the Pvl Operator group.
a control measurement
double mdOrigLine
Control Measure&#39;s original line.
double mdEmission
Emission angle at most interesting sample,line.
double CubeSample() const
Return the search chip cube sample that best matched.
double mdBestSample
Most interesting sample.
void ProcessLocked_Point_Reference(ControlPoint &pCPoint, PvlObject &pPvlObj, int &piMeasuresModified)
Process (Validate and Log) Point with Lock or with Referemce Measure Locked.
bool Operate(Cube &pCube, UniversalGroundMap &pUnivGrndMap, int piSample, int piLine)
Operate used by the app interestcube- to calculate interest by sample,line.
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
double mdOrigSample
Control Measure&#39;s original sample.
ControlNetValidMeasure class.
virtual bool CompareInterests(double int1, double int2)
Compare for int1 greater than / equal to int2.
IO Handler for Isis Cubes.
Definition: Cube.h:170