Isis 3 Programmer 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;
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...
double p_sampPercent
Percentage of lines sampled.
int p_maxLineX
Ending Line of overlap in X cube.
Isis::FileName FileNameX() const
Returns the filename of the first cube.
Isis::FileName p_yFile
FileName of Y cube.
int EndSampleX() const
Returns the ending sample position of the overlap in the first cube.
int p_maxSampY
Ending Sample of overlap in Y cube.
int EndLineX() const
Returns the ending line position of the overlap in the first cube.
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 ...
void init()
Reset member variables to default values.
int EndLineY() const
Returns the ending line position of the overlap in the second cube.
BigInt ValidPixels() const
Returns the number of valid pixels processed.
int Lines() const
Returns the number of lines in the overlapping area.
int StartLineY() const
Returns the starting line position of the overlap in the second cube.
void fromPvl(const PvlObject &inStats)
Unserialize overlap statistics from a Pvl.
int p_minSampX
Starting Sample of overlap in X cube.
int StartSampleY() const
Returns the starting sample position of the overlap in the second cube.
int p_minLineY
Starting Line of overlap in Y cube.
int p_maxLineY
Ending Line of overlap in Y cube.
Container of multivariate statistics.
Isis::MultivariateStatistics GetMStats(int band) const
Returns the MultivariateStatistics object containing all the data from both cubes in the overlapping ...
int p_maxSampX
Ending Sample of overlap in X cube.
double SampPercent() const
Returns the percentage of cube lines sampled.
int StartLineX() const
Returns the starting line position of the overlap in the first cube.
bool HasOverlap(int band) const
Checks the specified band for an overlap.
Calculates statistics in the area of overlap between two projected cubes.
int p_bands
Number of bands.
int Samples() const
Returns the number of samples in the overlapping area.
int Bands() const
Returns the number of bands both cubes have.
int p_minSampY
Starting Sample of overlap in Y cube.
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.
int p_mincnt
Minimum valid pixels to be valid overlap.
int EndSampleY() const
Returns the ending sample position of the overlap in the second cube.
int p_sampRange
Sample range of overlap.
Isis::FileName p_xFile
FileName of X cube.
int StartSampleX() const
Returns the starting sample position of the overlap in the first cube.
bool HasOverlap() const
Checks all bands of the cubes for an overlap, and will only return false if none of the bands overlap...
int p_lineRange
Line range of overlap.
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
Definition: Hillshade.cpp:308
std::vector< Isis::MultivariateStatistics > p_stats
Multivariate Stats object for overlap data from both cubes.
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
int p_minLineX
Starting Line of overlap in X cube.
OverlapStatistics(Isis::Cube &x, Isis::Cube &y, QString progressMsg="Gathering Overlap Statistics", double sampPercent=100.0)
Constructs an OverlapStatistics object.
Isis::FileName FileNameY() const
Returns the filename of the second cube.
IO Handler for Isis Cubes.
Definition: Cube.h:170