USGS

Isis 3.0 Object Programmers' Reference

Home

OverlapStatistics.h
Go to the documentation of this file.
1 #ifndef OverlapStatistics_h
2 #define OverlapStatistics_h
3 
25 #include "Cube.h"
26 #include "FileName.h"
27 #include "Projection.h"
28 #include "MultivariateStatistics.h"
29 
30 namespace Isis {
31  class PvlObject;
71  public:
73  QString progressMsg = "Gathering Overlap Statistics",
74  double sampPercent = 100.0);
75 
84  bool HasOverlap(int band) const {
85  return (p_stats[band-1].ValidPixels() > 0);
86  };
87 
88  bool HasOverlap() const;
89 
96  return p_xFile;
97  };
98 
105  return p_yFile;
106  };
107 
120  return p_stats[band-1];
121  };
122 
128  int Lines() const {
129  return p_lineRange;
130  };
131 
137  int Samples() const {
138  return p_sampRange;
139  };
140 
146  int Bands() const {
147  return p_bands;
148  };
149 
155  double SampPercent() const {
156  return p_sampPercent;
157  };
158 
164  int StartSampleX() const {
165  return p_minSampX;
166  };
167 
173  int EndSampleX() const {
174  return p_maxSampX;
175  };
176 
182  int StartLineX() const {
183  return p_minLineX;
184  };
185 
191  int EndLineX() const {
192  return p_maxLineX;
193  };
194 
200  int StartSampleY() const {
201  return p_minSampY;
202  };
203 
209  int EndSampleY() const {
210  return p_maxSampY;
211  };
212 
218  int StartLineY() const {
219  return p_minLineY;
220  };
221 
227  int EndLineY() const {
228  return p_maxLineY;
229  };
230 
237  void SetMincount(unsigned int mincnt) {
238  p_mincnt = mincnt;
239  };
240 
248  bool IsValid(unsigned int band) const {
249  return GetMStats(band).ValidPixels() > p_mincnt;
250  };
251 
285  PvlObject toPvl() const;
286 
287 
288  private:
289  int p_bands;
290  double p_sampPercent;
303  int p_mincnt;
304 
306  std::vector<Isis::MultivariateStatistics> p_stats;
307  };
308  std::ostream &operator<<(std::ostream &os, Isis::OverlapStatistics &stats);
309 };
310 
311 #endif