Loading [MathJax]/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
OverlapStatistics.h
1 #ifndef OverlapStatistics_h
2 #define OverlapStatistics_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include "Cube.h"
10 #include "FileName.h"
11 #include "MultivariateStatistics.h"
12 #include "Projection.h"
13 
14 namespace Isis {
15  class PvlObject;
16 
62  public:
64  QString progressMsg = "Gathering Overlap Statistics",
65  double sampPercent = 100.0);
66  OverlapStatistics(const PvlObject &inStats);
67 
76  bool HasOverlap(int band) const {
77  return (p_stats[band-1].ValidPixels() > 0);
78  };
79 
80  bool HasOverlap() const;
81 
88  return p_xFile;
89  };
90 
97  return p_yFile;
98  };
99 
112  return p_stats[band-1];
113  };
114 
120  int Lines() const {
121  return p_lineRange;
122  };
123 
129  int Samples() const {
130  return p_sampRange;
131  };
132 
138  int Bands() const {
139  return p_bands;
140  };
141 
147  double SampPercent() const {
148  return p_sampPercent;
149  };
150 
156  int StartSampleX() const {
157  return p_minSampX;
158  };
159 
165  int EndSampleX() const {
166  return p_maxSampX;
167  };
168 
174  int StartLineX() const {
175  return p_minLineX;
176  };
177 
183  int EndLineX() const {
184  return p_maxLineX;
185  };
186 
192  int StartSampleY() const {
193  return p_minSampY;
194  };
195 
201  int EndSampleY() const {
202  return p_maxSampY;
203  };
204 
210  int StartLineY() const {
211  return p_minLineY;
212  };
213 
219  int EndLineY() const {
220  return p_maxLineY;
221  };
222 
229  void SetMincount(unsigned int mincnt) {
230  p_mincnt = mincnt;
231  };
232 
233  int MinCount() const {
234  return p_mincnt;
235  }
236 
244  bool IsValid(unsigned int band) const {
245  return GetMStats(band).ValidPixels() > p_mincnt;
246  };
247 
291  PvlObject toPvl(QString name = "OverlapStatistics") const;
292 
293 
294  private:
295 
296  void fromPvl(const PvlObject &inStats);
297  void init();
298 
299  int p_bands;
300  double p_sampPercent;
313  int p_mincnt;
314 
316  std::vector<Isis::MultivariateStatistics> p_stats;
317  };
318  std::ostream &operator<<(std::ostream &os, Isis::OverlapStatistics &stats);
319 };
320 
321 #endif
Isis::OverlapStatistics::fromPvl
void fromPvl(const PvlObject &inStats)
Unserialize overlap statistics from a Pvl.
Definition: OverlapStatistics.cpp:295
Isis::OverlapStatistics::EndSampleY
int EndSampleY() const
Returns the ending sample position of the overlap in the second cube.
Definition: OverlapStatistics.h:201
Isis::OverlapStatistics::StartSampleX
int StartSampleX() const
Returns the starting sample position of the overlap in the first cube.
Definition: OverlapStatistics.h:156
Isis::OverlapStatistics::p_minLineY
int p_minLineY
Starting Line of overlap in Y cube.
Definition: OverlapStatistics.h:311
Isis::operator<<
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
Definition: Hillshade.cpp:314
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::OverlapStatistics::Samples
int Samples() const
Returns the number of samples in the overlapping area.
Definition: OverlapStatistics.h:129
Isis::OverlapStatistics::HasOverlap
bool HasOverlap(int band) const
Checks the specified band for an overlap.
Definition: OverlapStatistics.h:76
Isis::OverlapStatistics::SampPercent
double SampPercent() const
Returns the percentage of cube lines sampled.
Definition: OverlapStatistics.h:147
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::MultivariateStatistics::ValidPixels
BigInt ValidPixels() const
Returns the number of valid pixels processed.
Definition: MultivariateStatistics.cpp:201
Isis::OverlapStatistics::p_mincnt
int p_mincnt
Minimum valid pixels to be valid overlap.
Definition: OverlapStatistics.h:313
Isis::OverlapStatistics::p_xFile
Isis::FileName p_xFile
FileName of X cube.
Definition: OverlapStatistics.h:301
Isis::OverlapStatistics::p_sampRange
int p_sampRange
Sample range of overlap.
Definition: OverlapStatistics.h:303
Isis::OverlapStatistics::p_yFile
Isis::FileName p_yFile
FileName of Y cube.
Definition: OverlapStatistics.h:302
Isis::OverlapStatistics::Bands
int Bands() const
Returns the number of bands both cubes have.
Definition: OverlapStatistics.h:138
Isis::OverlapStatistics::p_bands
int p_bands
Number of bands.
Definition: OverlapStatistics.h:299
Isis::OverlapStatistics::HasOverlap
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:175
Isis::OverlapStatistics::StartLineX
int StartLineX() const
Returns the starting line position of the overlap in the first cube.
Definition: OverlapStatistics.h:174
Isis::OverlapStatistics::toPvl
PvlObject toPvl(QString name="OverlapStatistics") const
Creates a Pvl containing the following Overlap Statistics information File1 File2 Width Height Bands ...
Definition: OverlapStatistics.cpp:192
Isis::OverlapStatistics::EndSampleX
int EndSampleX() const
Returns the ending sample position of the overlap in the first cube.
Definition: OverlapStatistics.h:165
Isis::OverlapStatistics::p_stats
std::vector< Isis::MultivariateStatistics > p_stats
Multivariate Stats object for overlap data from both cubes.
Definition: OverlapStatistics.h:316
Isis::OverlapStatistics::EndLineY
int EndLineY() const
Returns the ending line position of the overlap in the second cube.
Definition: OverlapStatistics.h:219
Isis::OverlapStatistics::p_minLineX
int p_minLineX
Starting Line of overlap in X cube.
Definition: OverlapStatistics.h:309
Isis::OverlapStatistics::FileNameY
Isis::FileName FileNameY() const
Returns the filename of the second cube.
Definition: OverlapStatistics.h:96
Isis::MultivariateStatistics
Container of multivariate statistics.
Definition: MultivariateStatistics.h:54
Isis::OverlapStatistics::p_minSampY
int p_minSampY
Starting Sample of overlap in Y cube.
Definition: OverlapStatistics.h:307
Isis::OverlapStatistics::Lines
int Lines() const
Returns the number of lines in the overlapping area.
Definition: OverlapStatistics.h:120
Isis::OverlapStatistics::init
void init()
Reset member variables to default values.
Definition: OverlapStatistics.cpp:332
Isis::OverlapStatistics::StartLineY
int StartLineY() const
Returns the starting line position of the overlap in the second cube.
Definition: OverlapStatistics.h:210
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::OverlapStatistics::IsValid
bool IsValid(unsigned int band) const
Returns whether the overlap meets the minimum valid pixel requirement.
Definition: OverlapStatistics.h:244
Isis::OverlapStatistics::OverlapStatistics
OverlapStatistics(Isis::Cube &x, Isis::Cube &y, QString progressMsg="Gathering Overlap Statistics", double sampPercent=100.0)
Constructs an OverlapStatistics object.
Definition: OverlapStatistics.cpp:51
Isis::OverlapStatistics::p_maxLineX
int p_maxLineX
Ending Line of overlap in X cube.
Definition: OverlapStatistics.h:310
Isis::OverlapStatistics::p_lineRange
int p_lineRange
Line range of overlap.
Definition: OverlapStatistics.h:304
Isis::OverlapStatistics::p_maxSampY
int p_maxSampY
Ending Sample of overlap in Y cube.
Definition: OverlapStatistics.h:308
Isis::OverlapStatistics::SetMincount
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:229
Isis::OverlapStatistics
Calculates statistics in the area of overlap between two projected cubes.
Definition: OverlapStatistics.h:61
Isis::OverlapStatistics::p_minSampX
int p_minSampX
Starting Sample of overlap in X cube.
Definition: OverlapStatistics.h:305
Isis::OverlapStatistics::p_maxLineY
int p_maxLineY
Ending Line of overlap in Y cube.
Definition: OverlapStatistics.h:312
Isis::OverlapStatistics::EndLineX
int EndLineX() const
Returns the ending line position of the overlap in the first cube.
Definition: OverlapStatistics.h:183
Isis::OverlapStatistics::p_sampPercent
double p_sampPercent
Percentage of lines sampled.
Definition: OverlapStatistics.h:300
Isis::OverlapStatistics::StartSampleY
int StartSampleY() const
Returns the starting sample position of the overlap in the second cube.
Definition: OverlapStatistics.h:192
Isis::OverlapStatistics::FileNameX
Isis::FileName FileNameX() const
Returns the filename of the first cube.
Definition: OverlapStatistics.h:87
Isis::OverlapStatistics::p_maxSampX
int p_maxSampX
Ending Sample of overlap in X cube.
Definition: OverlapStatistics.h:306
Isis::OverlapStatistics::GetMStats
Isis::MultivariateStatistics GetMStats(int band) const
Returns the MultivariateStatistics object containing all the data from both cubes in the overlapping ...
Definition: OverlapStatistics.h:111
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:59