Isis 3.0 Object Programmers' Reference |
Home |
This class can be used to calculate, read in, and/or apply equalization statistics for a list of files. More...
#include <Equalization.h>
Classes | |
class | ApplyFunctor |
class | CalculateFunctor |
class | ImageAdjustment |
Public Member Functions | |
Equalization (OverlapNormalization::SolutionType sType, QString fromListName) | |
void | addHolds (QString holdListName) |
void | calculateStatistics (double sampPercent, int mincnt, bool wtopt, LeastSquares::SolveMethod methodType) |
void | importStatistics (QString instatsFileName) |
void | applyCorrection (QString toListName) |
PvlGroup | getResults () |
void | write (QString outstatsFileName) |
double | evaluate (double dn, int imageIndex, int bandIndex) const |
Protected Member Functions | |
void | loadInputs (QString fromListName) |
void | setInput (int index, QString value) |
const FileList & | getInputs () const |
virtual void | fillOutList (FileList &outList, QString toListName) |
virtual void | errorCheck (QString fromListName) |
void | generateOutputs (FileList &outList) |
void | loadOutputs (FileList &outList, QString toListName) |
void | loadHolds (OverlapNormalization *oNorm) |
void | setResults (std::vector< OverlapStatistics > &overlapStats) |
void | setResults () |
void | clearAdjustments () |
void | addAdjustment (ImageAdjustment *adjustment) |
void | addValid (int count) |
void | addInvalid (int count) |
Private Member Functions | |
void | init () |
std::vector< int > | validateInputStatistics (QString instatsFileName) |
Private Attributes | |
FileList | m_imageList |
std::vector< ImageAdjustment * > | m_adjustments |
std::vector< int > | m_holdIndices |
int | m_validCnt |
int | m_invalidCnt |
int | m_mincnt |
bool | m_wtopt |
int | m_maxCube |
int | m_maxBand |
OverlapNormalization::SolutionType | m_sType |
Pvl * | m_results |
This class can be used to calculate, read in, and/or apply equalization statistics for a list of files.
Code example for calculating statistics, writing results to a Pvl, writing results to a file, and applying results: Equalization eq(inputCubeListFileName); // calculate eq.addHolds(holdListFileName); eq.calculateStatistics(sampPercent, mincnt, wtopt, sType, methodType); // write to PvlGroup PvlGroup resultsGroup = eq.getResults(); // write to file eq.write(outputStatisticsFileName); // apply corrections to cubes in input list eq.applyCorrection();
Code example for importing statistics and applying them. Equalization eq(listFileName); eq.importStatistics(inputStatisticsFileName); // create new output cubes from equalized cube list and apply corrections eq.applyCorrection(equalizedCubeListFileName);
This class contains the classes ImageAdjustment, CalculateFunctor, and ApplyFunctor.
2012-04-26 Jeannie Backer - Added includes to Filelist, Pvl, PvlGroup, and Statistics classes to the implementation file.
2013-01-29 Jeannie Backer - Added input parameter to calculateStatistics() method. Added error catch to improve thrown message. Fixes #962.
2013-01-29 Jeannie Backer - Fixed bugs from previous checkin. Improved test coverage by more than 23% for each coverage type.
2013-02-06 Steven Lambright - Made the OverlapNormalization::SolutionType into a member required upon instantiation in order to support gain adjustments without normalization, which uses a separate formula in evaluate() instead of just modifying how statistics are computed. Implemented the GainsWithoutNormalization solution type. References #911.
Definition at line 124 of file Equalization.h.
Isis::Equalization::Equalization | ( | OverlapNormalization::SolutionType | sType, |
QString | fromListName | ||
) |
sType | An integer value corresponding to the enumerated value of the OverlapNormalization::SolutionType to be used. |
Definition at line 34 of file Equalization.cpp.
void Isis::Equalization::calculateStatistics | ( | double | percent, |
int | mincnt, | ||
bool | wtopt, | ||
LeastSquares::SolveMethod | methodType | ||
) |
percent | Percentage of the lines to consider when gathering overall cube statistics and overlap statistics |
mincnt | Minimum number of points in overlapping area required to be used in the solution |
wtopt | Indicates whether overlaps should be weighted |
methodType | An integer value corresponding to the enumerated value of the desired LeastSquares::SolveMethod to be used. |
Definition at line 91 of file Equalization.cpp.
References _FILEINFO_, Isis::ProcessByBrick::EndProcess(), Isis::OverlapStatistics::GetMStats(), Isis::OverlapStatistics::HasOverlap(), Isis::Cube::open(), Isis::ProcessByLine::ProcessCubeInPlace(), Isis::Process::Progress(), Isis::ProcessByLine::SetInputCube(), Isis::OverlapStatistics::SetMincount(), Isis::Progress::SetText(), Isis::toString(), Isis::MultivariateStatistics::ValidPixels(), Isis::MultivariateStatistics::X(), and Isis::MultivariateStatistics::Y().