Isis 3 Developer Reference
Isis::OverlapStatistics Class Reference

Calculates statistics in the area of overlap between two projected cubes. More...

#include <OverlapStatistics.h>

Collaboration diagram for Isis::OverlapStatistics:
Collaboration graph

Public Member Functions

 OverlapStatistics (Isis::Cube &x, Isis::Cube &y, QString progressMsg="Gathering Overlap Statistics", double sampPercent=100.0)
 Constructs an OverlapStatistics object. More...
 
 OverlapStatistics (const PvlObject &inStats)
 Constructs an OverlapStatistics from a PvlObject. More...
 
bool HasOverlap (int band) const
 Checks the specified band for an overlap. More...
 
bool HasOverlap () const
 Checks all bands of the cubes for an overlap, and will only return false if none of the bands overlap. More...
 
Isis::FileName FileNameX () const
 Returns the filename of the first cube. More...
 
Isis::FileName FileNameY () const
 Returns the filename of the second cube. More...
 
Isis::MultivariateStatistics GetMStats (int band) const
 Returns the MultivariateStatistics object containing all the data from both cubes in the overlapping area. More...
 
int Lines () const
 Returns the number of lines in the overlapping area. More...
 
int Samples () const
 Returns the number of samples in the overlapping area. More...
 
int Bands () const
 Returns the number of bands both cubes have. More...
 
double SampPercent () const
 Returns the percentage of cube lines sampled. More...
 
int StartSampleX () const
 Returns the starting sample position of the overlap in the first cube. More...
 
int EndSampleX () const
 Returns the ending sample position of the overlap in the first cube. More...
 
int StartLineX () const
 Returns the starting line position of the overlap in the first cube. More...
 
int EndLineX () const
 Returns the ending line position of the overlap in the first cube. More...
 
int StartSampleY () const
 Returns the starting sample position of the overlap in the second cube. More...
 
int EndSampleY () const
 Returns the ending sample position of the overlap in the second cube. More...
 
int StartLineY () const
 Returns the starting line position of the overlap in the second cube. More...
 
int EndLineY () const
 Returns the ending line position of the overlap in the second cube. More...
 
void SetMincount (unsigned int mincnt)
 Sets the minimum number of valid pixels for the overlap to be considered valid for PVL output. More...
 
int MinCount () const
 
bool IsValid (unsigned int band) const
 Returns whether the overlap meets the minimum valid pixel requirement. More...
 
PvlObject toPvl (QString name="OverlapStatistics") const
 Creates a Pvl containing the following Overlap Statistics information File1 File2 Width Height Bands SamplingPercent MinCount MutlivariateStatisticsN (N = current band) Covariance Correlation SumXY ValidPixels InvalidPixels TotalPixels LinearRegression ValidOverlap XStatistics #FileX Statistics information YStatistics #FileY Statistics information File1 StartSample EndSample StartLine EndLine Average StandardDeviation Variance File2 StartSample EndSample StartLine EndLine Average StandardDeviation Variance. More...
 

Detailed Description

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

Author
2005-07-18 Elizabeth Ribelin

Constructor & Destructor Documentation

◆ OverlapStatistics() [1/2]

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.

Parameters
xThe first input cube
yThe 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
Exceptions
Isis::IException::User- All images must have the same number of bands

References _FILEINFO_, Isis::Progress::AddSteps(), Isis::Cube::bandCount(), Isis::Progress::CheckStatus(), Isis::Cube::fileName(), Isis::Cube::lineCount(), Isis::Cube::pixelType(), Isis::Cube::projection(), Isis::Cube::read(), Isis::Cube::sampleCount(), Isis::Brick::SetBasePosition(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::Projection::ToProjectionX(), Isis::Projection::ToProjectionY(), Isis::Projection::ToWorldX(), and Isis::Projection::ToWorldY().

◆ OverlapStatistics() [2/2]

Isis::OverlapStatistics::OverlapStatistics ( const PvlObject inStats)

Constructs an OverlapStatistics from a PvlObject.

Parameters
inStatsThe serialized OverlapStatistics PvlObject

Member Function Documentation

◆ Bands()

int Isis::OverlapStatistics::Bands ( ) const
inline

Returns the number of bands both cubes have.

Returns
int The number of bands both cubes have

Referenced by Isis::Equalization::fromPvl().

◆ EndLineX()

int Isis::OverlapStatistics::EndLineX ( ) const
inline

Returns the ending line position of the overlap in the first cube.

Returns
int The ending line of the overlap in the first cube

◆ EndLineY()

int Isis::OverlapStatistics::EndLineY ( ) const
inline

Returns the ending line position of the overlap in the second cube.

Returns
int The ending line of the overlap in the second cube

◆ EndSampleX()

int Isis::OverlapStatistics::EndSampleX ( ) const
inline

Returns the ending sample position of the overlap in the first cube.

Returns
int The ending sample of the overlap in the first cube

◆ EndSampleY()

int Isis::OverlapStatistics::EndSampleY ( ) const
inline

Returns the ending sample position of the overlap in the second cube.

Returns
int The ending sample of the overlap in the second cube

◆ FileNameX()

Isis::FileName Isis::OverlapStatistics::FileNameX ( ) const
inline

Returns the filename of the first cube.

Returns
QString The name of the first cube

Referenced by Isis::Equalization::fromPvl().

◆ FileNameY()

Isis::FileName Isis::OverlapStatistics::FileNameY ( ) const
inline

Returns the filename of the second cube.

Returns
QString The name of the second cube

Referenced by Isis::Equalization::fromPvl().

◆ GetMStats()

Isis::MultivariateStatistics Isis::OverlapStatistics::GetMStats ( int  band) const
inline

Returns the MultivariateStatistics object containing all the data from both cubes in the overlapping area.

Parameters
bandThe band number the MultivariateStatistics object needs to contain data from
Returns
MultivariateStatistics The MultivariateStatistics object containing all data from both cubes in the overlapping area from the specified band

Referenced by Isis::Equalization::calculateOverlapStatistics(), Isis::Equalization::fromPvl(), and IsValid().

◆ HasOverlap() [1/2]

bool Isis::OverlapStatistics::HasOverlap ( int  band) const
inline

Checks the specified band for an overlap.

Parameters
bandThe band number of the cubes to be checked for an overlap
Returns
bool Returns true if the cubes overlap in the specified band, and false if they do not overlap

Referenced by Isis::Equalization::calculateOverlapStatistics().

◆ HasOverlap() [2/2]

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.

Returns
bool Returns true if any of the bands overlap, and false if none of the bands overlap

◆ IsValid()

bool Isis::OverlapStatistics::IsValid ( unsigned int  band) const
inline

Returns whether the overlap meets the minimum valid pixel requirement.

Parameters
bandThe band to check
Returns
bool Is minimum requirement met

References GetMStats(), and Isis::MultivariateStatistics::ValidPixels().

◆ Lines()

int Isis::OverlapStatistics::Lines ( ) const
inline

Returns the number of lines in the overlapping area.

Returns
int The number of lines in the overlapping area

◆ MinCount()

int Isis::OverlapStatistics::MinCount ( ) const
inline

◆ Samples()

int Isis::OverlapStatistics::Samples ( ) const
inline

Returns the number of samples in the overlapping area.

Returns
int The number of samples in the overlapping area

◆ SampPercent()

double Isis::OverlapStatistics::SampPercent ( ) const
inline

Returns the percentage of cube lines sampled.

Returns
int The percentage of lines sampled

◆ SetMincount()

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.

Parameters
mincntThe minimum valid pixel value to set

Referenced by Isis::Equalization::calculateOverlapStatistics().

◆ StartLineX()

int Isis::OverlapStatistics::StartLineX ( ) const
inline

Returns the starting line position of the overlap in the first cube.

Returns
int The starting line of the overlap in the first cube

◆ StartLineY()

int Isis::OverlapStatistics::StartLineY ( ) const
inline

Returns the starting line position of the overlap in the second cube.

Returns
int The starting line of the overlap in the second cube

◆ StartSampleX()

int Isis::OverlapStatistics::StartSampleX ( ) const
inline

Returns the starting sample position of the overlap in the first cube.

Returns
int The starting sample of the overlap in the first cube

◆ StartSampleY()

int Isis::OverlapStatistics::StartSampleY ( ) const
inline

Returns the starting sample position of the overlap in the second cube.

Returns
int The starting sample of the overlap in the second cube

◆ toPvl()

PvlObject Isis::OverlapStatistics::toPvl ( QString  name = "OverlapStatistics") const

Creates a Pvl containing the following Overlap Statistics information File1 File2 Width Height Bands SamplingPercent MinCount MutlivariateStatisticsN (N = current band) Covariance Correlation SumXY ValidPixels InvalidPixels TotalPixels LinearRegression ValidOverlap XStatistics #FileX Statistics information YStatistics #FileY Statistics information File1 StartSample EndSample StartLine EndLine Average StandardDeviation Variance File2 StartSample EndSample StartLine EndLine Average StandardDeviation Variance.

Serialize overlap statistics as a PvlObject.

Returns
PvlObject PvlObject containing the information for the Overlap Statistics.
Parameters
QStringname (Default value of "OverlapStatistics") Name of the PvlObject created
Returns
PvlObject A pvl object representing the OverlapStatistics and its data
Exceptions
Isis::IException::User- Trivial overlap between [File1] and [File2]

References _FILEINFO_, Isis::PvlObject::addGroup(), Isis::PvlObject::addObject(), Isis::PvlContainer::name(), Isis::PvlKeyword::setValue(), and Isis::toString().

Referenced by Isis::operator<<().


The documentation for this class was generated from the following files: