|
Isis 3.0 Object Programmers' Reference |
Home |
Calculates statistics in the area of overlap between two projected cubes. More...
#include <OverlapStatistics.h>

Public Member Functions | |
| OverlapStatistics (Isis::Cube &x, Isis::Cube &y, QString progressMsg="Gathering Overlap Statistics", double sampPercent=100.0) | |
| Constructs an OverlapStatistics object. | |
| bool | HasOverlap (int band) const |
| Checks the specified band for an overlap. | |
| bool | HasOverlap () const |
| Checks all bands of the cubes for an overlap, and will only return false if none of the bands overlap. | |
| Isis::FileName | FileNameX () const |
| Returns the filename of the first cube. | |
| Isis::FileName | FileNameY () const |
| Returns the filename of the second cube. | |
| Isis::MultivariateStatistics | GetMStats (int band) const |
| Returns the MultivariateStatistics object containing all the data from both cubes in the overlapping area. | |
| int | Lines () const |
| Returns the number of lines in the overlapping area. | |
| int | Samples () const |
| Returns the number of samples in the overlapping area. | |
| int | Bands () const |
| Returns the number of bands both cubes have. | |
| double | SampPercent () const |
| Returns the percentage of cube lines sampled. | |
| int | StartSampleX () const |
| Returns the starting sample position of the overlap in the first cube. | |
| int | EndSampleX () const |
| Returns the ending sample position of the overlap in the first cube. | |
| int | StartLineX () const |
| Returns the starting line position of the overlap in the first cube. | |
| int | EndLineX () const |
| Returns the ending line position of the overlap in the first cube. | |
| int | StartSampleY () const |
| Returns the starting sample position of the overlap in the second cube. | |
| int | EndSampleY () const |
| Returns the ending sample position of the overlap in the second cube. | |
| int | StartLineY () const |
| Returns the starting line position of the overlap in the second cube. | |
| int | EndLineY () const |
| Returns the ending line position of the overlap in the second cube. | |
| void | SetMincount (unsigned int mincnt) |
| Sets the minimum number of valid pixels for the overlap to be considered valid for PVL output. | |
| bool | IsValid (unsigned int band) const |
| Returns whether the overlap meets the minimum valid pixel requirement. | |
| PvlObject | toPvl () const |
| Creates a Pvl containing the following Overlap Statistics information. | |
Private Attributes | |
| int | p_bands |
| Number of bands. | |
| double | p_sampPercent |
| Percentage of lines sampled. | |
| Isis::FileName | p_xFile |
| FileName of X cube. | |
| Isis::FileName | p_yFile |
| FileName of Y cube. | |
| int | p_sampRange |
| Sample range of overlap. | |
| int | p_lineRange |
| Line range of overlap. | |
| int | p_minSampX |
| Starting Sample of overlap in X cube. | |
| int | p_maxSampX |
| Ending Sample of overlap in X cube. | |
| int | p_minSampY |
| Starting Sample of overlap in Y cube. | |
| int | p_maxSampY |
| Ending Sample of overlap in Y cube. | |
| int | p_minLineX |
| Starting Line of overlap in X cube. | |
| int | p_maxLineX |
| Ending Line of overlap in X cube. | |
| int | p_minLineY |
| Starting Line of overlap in Y cube. | |
| int | p_maxLineY |
| Ending Line of overlap in Y cube. | |
| int | p_mincnt |
| Minimum valid pixels to be valid overlap. | |
| std::vector < Isis::MultivariateStatistics > | p_stats |
| Multivariate Stats object for overlap data from both cubes. | |
Calculates statistics in the area of overlap between two projected cubes.
This class finds the overlap between two cubes. It allows the user to check whether or not two cubes overlap, and also creates a MultivariateStatistics object containing the data from each cube in the overlapping area. The cubes entered into the constructor for this class must both be projections, and must have the same projection parameters.
If you would like to see OverlapStatistics being used in implementation, see equalizer.cpp
For internal use only.
Definition at line 70 of file OverlapStatistics.h.
| Isis::OverlapStatistics::OverlapStatistics | ( | Isis::Cube & | x, | |
| Isis::Cube & | y, | |||
| QString | progressMsg = "Gathering Overlap Statistics", |
|||
| double | sampPercent = 100.0 | |||
| ) |
Constructs an OverlapStatistics object.
Compares the two input cubes and finds where they overlap.
| x | The first input cube | |
| y | The second input cube | |
| progressMsg | (Default value of "Gathering Overlap Statistics") Text for indicating progress during statistic gathering | |
| sampPercent | (Default value of 100.0) Sampling percent, or the percentage of lines to consider during the statistic gathering procedure |
| Isis::iException::User | - All images must have the same number of bands |
Definition at line 55 of file OverlapStatistics.cpp.
References _FILEINFO_, Isis::Progress::AddSteps(), band, Isis::Cube::bandCount(), Isis::Progress::CheckStatus(), Isis::Cube::fileName(), linc, Isis::Cube::lineCount(), p_bands, p_lineRange, p_maxLineX, p_maxLineY, p_maxSampX, p_maxSampY, p_minLineX, p_minLineY, p_minSampX, p_minSampY, p_sampPercent, p_sampRange, p_stats, p_xFile, p_yFile, Isis::Cube::pixelType(), Isis::IException::Programmer, Isis::Cube::projection(), Isis::Cube::read(), Isis::Cube::sampleCount(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::Projection::ToProjectionX(), Isis::Projection::ToProjectionY(), Isis::Projection::ToWorldX(), Isis::Projection::ToWorldY(), and Isis::IException::User.
| int Isis::OverlapStatistics::Bands | ( | ) | const [inline] |
Returns the number of bands both cubes have.
Definition at line 146 of file OverlapStatistics.h.
References p_bands.
Referenced by toPvl().
| int Isis::OverlapStatistics::EndLineX | ( | ) | const [inline] |
Returns the ending line position of the overlap in the first cube.
Definition at line 191 of file OverlapStatistics.h.
References p_maxLineX.
Referenced by toPvl().
| int Isis::OverlapStatistics::EndLineY | ( | ) | const [inline] |
Returns the ending line position of the overlap in the second cube.
Definition at line 227 of file OverlapStatistics.h.
References p_maxLineY.
Referenced by toPvl().
| int Isis::OverlapStatistics::EndSampleX | ( | ) | const [inline] |
Returns the ending sample position of the overlap in the first cube.
Definition at line 173 of file OverlapStatistics.h.
References p_maxSampX.
Referenced by toPvl().
| int Isis::OverlapStatistics::EndSampleY | ( | ) | const [inline] |
Returns the ending sample position of the overlap in the second cube.
Definition at line 209 of file OverlapStatistics.h.
References p_maxSampY.
Referenced by toPvl().
| Isis::FileName Isis::OverlapStatistics::FileNameX | ( | ) | const [inline] |
Returns the filename of the first cube.
Definition at line 95 of file OverlapStatistics.h.
References p_xFile.
Referenced by toPvl().
| Isis::FileName Isis::OverlapStatistics::FileNameY | ( | ) | const [inline] |
Returns the filename of the second cube.
Definition at line 104 of file OverlapStatistics.h.
References p_yFile.
Referenced by toPvl().
| Isis::MultivariateStatistics Isis::OverlapStatistics::GetMStats | ( | int | band | ) | const [inline] |
Returns the MultivariateStatistics object containing all the data from both cubes in the overlapping area.
| band | The band number the MultivariateStatistics object needs to contain data from |
Definition at line 119 of file OverlapStatistics.h.
References p_stats.
Referenced by Isis::Equalization::calculateStatistics(), IsValid(), and toPvl().
| bool Isis::OverlapStatistics::HasOverlap | ( | ) | const |
Checks all bands of the cubes for an overlap, and will only return false if none of the bands overlap.
Definition at line 175 of file OverlapStatistics.cpp.
References p_bands, and p_stats.
Referenced by toPvl().
| bool Isis::OverlapStatistics::HasOverlap | ( | int | band | ) | const [inline] |
Checks the specified band for an overlap.
| band | The band number of the cubes to be checked for an overlap |
Definition at line 84 of file OverlapStatistics.h.
References p_stats.
Referenced by Isis::Equalization::calculateStatistics().
| bool Isis::OverlapStatistics::IsValid | ( | unsigned int | band | ) | const [inline] |
Returns whether the overlap meets the minimum valid pixel requirement.
| band | The band to check |
Definition at line 248 of file OverlapStatistics.h.
References GetMStats(), p_mincnt, and Isis::MultivariateStatistics::ValidPixels().
Referenced by toPvl().
| int Isis::OverlapStatistics::Lines | ( | ) | const [inline] |
Returns the number of lines in the overlapping area.
Definition at line 128 of file OverlapStatistics.h.
References p_lineRange.
Referenced by toPvl().
| int Isis::OverlapStatistics::Samples | ( | ) | const [inline] |
Returns the number of samples in the overlapping area.
Definition at line 137 of file OverlapStatistics.h.
References p_sampRange.
Referenced by toPvl().
| double Isis::OverlapStatistics::SampPercent | ( | ) | const [inline] |
Returns the percentage of cube lines sampled.
Definition at line 155 of file OverlapStatistics.h.
References p_sampPercent.
Referenced by toPvl().
| void Isis::OverlapStatistics::SetMincount | ( | unsigned int | mincnt | ) | [inline] |
Sets the minimum number of valid pixels for the overlap to be considered valid for PVL output.
| mincnt | The minimum valid pixel value to set |
Definition at line 237 of file OverlapStatistics.h.
References p_mincnt.
Referenced by Isis::Equalization::calculateStatistics().
| int Isis::OverlapStatistics::StartLineX | ( | ) | const [inline] |
Returns the starting line position of the overlap in the first cube.
Definition at line 182 of file OverlapStatistics.h.
References p_minLineX.
Referenced by toPvl().
| int Isis::OverlapStatistics::StartLineY | ( | ) | const [inline] |
Returns the starting line position of the overlap in the second cube.
Definition at line 218 of file OverlapStatistics.h.
References p_minLineY.
Referenced by toPvl().
| int Isis::OverlapStatistics::StartSampleX | ( | ) | const [inline] |
Returns the starting sample position of the overlap in the first cube.
Definition at line 164 of file OverlapStatistics.h.
References p_minSampX.
Referenced by toPvl().
| int Isis::OverlapStatistics::StartSampleY | ( | ) | const [inline] |
Returns the starting sample position of the overlap in the second cube.
Definition at line 200 of file OverlapStatistics.h.
References p_minSampY.
Referenced by toPvl().
| PvlObject Isis::OverlapStatistics::toPvl | ( | ) | const |
Creates a Pvl containing the following Overlap Statistics information.
File1 StartSample EndSample StartLine EndLine Average StandardDeviation Variance File2 StartSample EndSample StartLine EndLine Average StandardDeviation Variance Width Height SamplingPercent Covariance Correlation ValidOverlap ValidPixels InvalidPixels TotalPixels
Definition at line 183 of file OverlapStatistics.cpp.
References _FILEINFO_, a, Isis::PvlObject::AddGroup(), band, Bands(), EndLineX(), EndLineY(), EndSampleX(), EndSampleY(), FileNameX(), FileNameY(), GetMStats(), HasOverlap(), IsValid(), Isis::MultivariateStatistics::LinearRegression(), Lines(), Samples(), SampPercent(), StartLineX(), StartLineY(), StartSampleX(), StartSampleY(), Isis::toString(), and Isis::IException::User.
int Isis::OverlapStatistics::p_bands [private] |
Number of bands.
Definition at line 289 of file OverlapStatistics.h.
Referenced by Bands(), HasOverlap(), and OverlapStatistics().
int Isis::OverlapStatistics::p_lineRange [private] |
Line range of overlap.
Definition at line 294 of file OverlapStatistics.h.
Referenced by Lines(), and OverlapStatistics().
int Isis::OverlapStatistics::p_maxLineX [private] |
Ending Line of overlap in X cube.
Definition at line 300 of file OverlapStatistics.h.
Referenced by EndLineX(), and OverlapStatistics().
int Isis::OverlapStatistics::p_maxLineY [private] |
Ending Line of overlap in Y cube.
Definition at line 302 of file OverlapStatistics.h.
Referenced by EndLineY(), and OverlapStatistics().
int Isis::OverlapStatistics::p_maxSampX [private] |
Ending Sample of overlap in X cube.
Definition at line 296 of file OverlapStatistics.h.
Referenced by EndSampleX(), and OverlapStatistics().
int Isis::OverlapStatistics::p_maxSampY [private] |
Ending Sample of overlap in Y cube.
Definition at line 298 of file OverlapStatistics.h.
Referenced by EndSampleY(), and OverlapStatistics().
int Isis::OverlapStatistics::p_mincnt [private] |
Minimum valid pixels to be valid overlap.
Definition at line 303 of file OverlapStatistics.h.
Referenced by IsValid(), and SetMincount().
int Isis::OverlapStatistics::p_minLineX [private] |
Starting Line of overlap in X cube.
Definition at line 299 of file OverlapStatistics.h.
Referenced by OverlapStatistics(), and StartLineX().
int Isis::OverlapStatistics::p_minLineY [private] |
Starting Line of overlap in Y cube.
Definition at line 301 of file OverlapStatistics.h.
Referenced by OverlapStatistics(), and StartLineY().
int Isis::OverlapStatistics::p_minSampX [private] |
Starting Sample of overlap in X cube.
Definition at line 295 of file OverlapStatistics.h.
Referenced by OverlapStatistics(), and StartSampleX().
int Isis::OverlapStatistics::p_minSampY [private] |
Starting Sample of overlap in Y cube.
Definition at line 297 of file OverlapStatistics.h.
Referenced by OverlapStatistics(), and StartSampleY().
double Isis::OverlapStatistics::p_sampPercent [private] |
Percentage of lines sampled.
Definition at line 290 of file OverlapStatistics.h.
Referenced by OverlapStatistics(), and SampPercent().
int Isis::OverlapStatistics::p_sampRange [private] |
Sample range of overlap.
Definition at line 293 of file OverlapStatistics.h.
Referenced by OverlapStatistics(), and Samples().
std::vector<Isis::MultivariateStatistics> Isis::OverlapStatistics::p_stats [private] |
Multivariate Stats object for overlap data from both cubes.
Definition at line 306 of file OverlapStatistics.h.
Referenced by GetMStats(), HasOverlap(), and OverlapStatistics().
FileName of X cube.
Definition at line 291 of file OverlapStatistics.h.
Referenced by FileNameX(), and OverlapStatistics().
FileName of Y cube.
Definition at line 292 of file OverlapStatistics.h.
Referenced by FileNameY(), and OverlapStatistics().