Isis 3 Developer Reference
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 "MultivariateStatistics.h"
28 #include "Projection.h"
29 
30 namespace Isis {
31  class PvlObject;
32 
78  public:
80  QString progressMsg = "Gathering Overlap Statistics",
81  double sampPercent = 100.0);
82  OverlapStatistics(const PvlObject &inStats);
83 
92  bool HasOverlap(int band) const {
93  return (p_stats[band-1].ValidPixels() > 0);
94  };
95 
96  bool HasOverlap() const;
97 
104  return p_xFile;
105  };
106 
113  return p_yFile;
114  };
115 
128  return p_stats[band-1];
129  };
130 
136  int Lines() const {
137  return p_lineRange;
138  };
139 
145  int Samples() const {
146  return p_sampRange;
147  };
148 
154  int Bands() const {
155  return p_bands;
156  };
157 
163  double SampPercent() const {
164  return p_sampPercent;
165  };
166 
172  int StartSampleX() const {
173  return p_minSampX;
174  };
175 
181  int EndSampleX() const {
182  return p_maxSampX;
183  };
184 
190  int StartLineX() const {
191  return p_minLineX;
192  };
193 
199  int EndLineX() const {
200  return p_maxLineX;
201  };
202 
208  int StartSampleY() const {
209  return p_minSampY;
210  };
211 
217  int EndSampleY() const {
218  return p_maxSampY;
219  };
220 
226  int StartLineY() const {
227  return p_minLineY;
228  };
229 
235  int EndLineY() const {
236  return p_maxLineY;
237  };
238 
245  void SetMincount(unsigned int mincnt) {
246  p_mincnt = mincnt;
247  };
248 
249  int MinCount() const {
250  return p_mincnt;
251  }
252 
260  bool IsValid(unsigned int band) const {
261  return GetMStats(band).ValidPixels() > p_mincnt;
262  };
263 
307  PvlObject toPvl(QString name = "OverlapStatistics") const;
308 
309 
310  private:
311 
312  void fromPvl(const PvlObject &inStats);
313  void init();
314 
315  int p_bands;
316  double p_sampPercent;
317  Isis::FileName p_xFile;
318  Isis::FileName p_yFile;
319  int p_sampRange;
320  int p_lineRange;
321  int p_minSampX;
322  int p_maxSampX;
323  int p_minSampY;
324  int p_maxSampY;
325  int p_minLineX;
326  int p_maxLineX;
327  int p_minLineY;
328  int p_maxLineY;
329  int p_mincnt;
330 
332  std::vector<Isis::MultivariateStatistics> p_stats;
333  };
334  std::ostream &operator<<(std::ostream &os, Isis::OverlapStatistics &stats);
335 };
336 
337 #endif
void SetMincount(unsigned int mincnt)
Sets the minimum number of valid pixels for the overlap to be considered valid for PVL output...
Definition: OverlapStatistics.h:245
Isis::FileName FileNameX() const
Returns the filename of the first cube.
Definition: OverlapStatistics.h:103
int EndSampleX() const
Returns the ending sample position of the overlap in the first cube.
Definition: OverlapStatistics.h:181
int EndLineX() const
Returns the ending line position of the overlap in the first cube.
Definition: OverlapStatistics.h:199
File name manipulation and expansion.
Definition: FileName.h:116
PvlObject toPvl(QString name="OverlapStatistics") const
Creates a Pvl containing the following Overlap Statistics information File1 File2 Width Height Bands ...
Definition: OverlapStatistics.cpp:208
int EndLineY() const
Returns the ending line position of the overlap in the second cube.
Definition: OverlapStatistics.h:235
BigInt ValidPixels() const
Returns the number of valid pixels processed.
Definition: MultivariateStatistics.cpp:217
int MinCount() const
Definition: OverlapStatistics.h:249
int Lines() const
Returns the number of lines in the overlapping area.
Definition: OverlapStatistics.h:136
int StartLineY() const
Returns the starting line position of the overlap in the second cube.
Definition: OverlapStatistics.h:226
int StartSampleY() const
Returns the starting sample position of the overlap in the second cube.
Definition: OverlapStatistics.h:208
Container of multivariate statistics.
Definition: MultivariateStatistics.h:71
Isis::MultivariateStatistics GetMStats(int band) const
Returns the MultivariateStatistics object containing all the data from both cubes in the overlapping ...
Definition: OverlapStatistics.h:127
double SampPercent() const
Returns the percentage of cube lines sampled.
Definition: OverlapStatistics.h:163
int StartLineX() const
Returns the starting line position of the overlap in the first cube.
Definition: OverlapStatistics.h:190
bool HasOverlap(int band) const
Checks the specified band for an overlap.
Definition: OverlapStatistics.h:92
Calculates statistics in the area of overlap between two projected cubes.
Definition: OverlapStatistics.h:77
int Samples() const
Returns the number of samples in the overlapping area.
Definition: OverlapStatistics.h:145
int Bands() const
Returns the number of bands both cubes have.
Definition: OverlapStatistics.h:154
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool IsValid(unsigned int band) const
Returns whether the overlap meets the minimum valid pixel requirement.
Definition: OverlapStatistics.h:260
int EndSampleY() const
Returns the ending sample position of the overlap in the second cube.
Definition: OverlapStatistics.h:217
int StartSampleX() const
Returns the starting sample position of the overlap in the first cube.
Definition: OverlapStatistics.h:172
bool HasOverlap() const
Checks all bands of the cubes for an overlap, and will only return false if none of the bands overlap...
Definition: OverlapStatistics.cpp:191
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
Definition: Hillshade.cpp:308
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
OverlapStatistics(Isis::Cube &x, Isis::Cube &y, QString progressMsg="Gathering Overlap Statistics", double sampPercent=100.0)
Constructs an OverlapStatistics object.
Definition: OverlapStatistics.cpp:67
Isis::FileName FileNameY() const
Returns the filename of the second cube.
Definition: OverlapStatistics.h:112
IO Handler for Isis Cubes.
Definition: Cube.h:170