23 class OverlapStatistics;
127 void addHolds(QString holdListName);
138 void write(QString outstatsFileName);
140 double evaluate(
double dn,
int imageIndex,
int bandIndex)
const;
156 gains.push_back(gain);
160 offsets.push_back(offset);
164 avgs.push_back(average);
172 return offsets[index];
180 double result =
Null;
182 double gain = gains[index];
184 double offset = offsets[index];
185 double avg = avgs[index];
186 result = (dn - avg) * gain + offset + avg;
196 vector<double> gains;
197 vector<double> offsets;
221 m_linc = (int) (100.0 / percent + 0.5);
246 m_adjustment = adjustment;
258 void setInput(
int index, QString value);
267 virtual void errorCheck(QString fromListName);
290 QVector<int> validateInputStatistics(QString instatsFileName);
293 bool m_recalculating;
298 double m_samplingPercent;
310 vector<ImageAdjustment *> m_adjustments;
311 vector<int> m_holdIndices;
312 vector<bool> m_doesOverlapList;
313 vector<bool> m_alreadyCalculated;
314 vector<OverlapNormalization *> m_overlapNorms;
315 vector<OverlapStatistics *> m_overlapStats;
Buffer for reading and writing cube data.
Definition Buffer.h:53
This class is used as a functor to apply adjustments (equalize) to an image.
Definition Equalization.h:243
ApplyFunctor(const ImageAdjustment *adjustment)
Definition Equalization.h:245
void operator()(Buffer &in, Buffer &out) const
Definition Equalization.cpp:1009
This class is used as a functor calculate image statistics.
Definition Equalization.h:210
void operator()(Buffer &in) const
Definition Equalization.cpp:995
virtual void addStats(Buffer &in) const
Definition Equalization.cpp:1003
CalculateFunctor(Statistics *stats, double percent)
Constructs a CalculateFunctor.
Definition Equalization.h:219
virtual ~CalculateFunctor()
Definition Equalization.h:224
Definition Equalization.h:150
ImageAdjustment(OverlapNormalization::SolutionType sType)
Definition Equalization.h:152
double getOffset(int index) const
Definition Equalization.h:171
double evaluate(double dn, int index) const
Definition Equalization.h:179
~ImageAdjustment()
Definition Equalization.h:153
double getGain(int index) const
Definition Equalization.h:167
void addAverage(double average)
Definition Equalization.h:163
double getAverage(int index) const
Definition Equalization.h:175
void addGain(double gain)
Definition Equalization.h:155
void addOffset(double offset)
Definition Equalization.h:159
This class can be used to calculate, read in, and/or apply equalization statistics for a list of file...
Definition Equalization.h:122
void calculateBandStatistics()
Calculates the image statistics on a band-by-band basis.
Definition Equalization.cpp:212
void importStatistics(QString instatsFileName)
Imports statistics for applying correction.
Definition Equalization.cpp:447
const FileList & getInputs() const
Definition Equalization.cpp:629
void generateOutputs(FileList &outList)
Generates the names of the equalized cubes if no output list is provided.
Definition Equalization.cpp:684
void clearAdjustments()
Frees image adjustments.
Definition Equalization.cpp:733
void loadOutputs(FileList &outList, QString toListName)
Checks that the output image list is correct.
Definition Equalization.cpp:702
virtual void errorCheck(QString fromListName)
Checks that the input images have the same mapping groups and same number of bands.
Definition Equalization.cpp:650
void setInput(int index, QString value)
Definition Equalization.cpp:624
void calculateStatistics(double samplingPercent, int mincnt, bool wtopt, LeastSquares::SolveMethod methodType)
Calculates the image and overlap statistics, and then determines corrective factors if possible.
Definition Equalization.cpp:136
void loadHolds(OverlapNormalization *oNorm)
Definition Equalization.cpp:724
PvlGroup getResults()
Returns general information about the equalization.
Definition Equalization.cpp:549
void addAdjustment(ImageAdjustment *adjustment)
Adds an image adjustment.
Definition Equalization.cpp:748
void fromPvl(const PvlObject &inStats)
Loads a previous Equalization state from an input pvl object.
Definition Equalization.cpp:803
void applyCorrection(QString toListName)
Equalizes the input images.
Definition Equalization.cpp:496
void setSolved(bool solved)
Sets solved state indicating if OverlapNormalizations (corrective factors) were solved.
Definition Equalization.cpp:899
void clearNormalizations()
Frees overlap normalizations.
Definition Equalization.cpp:756
void clearOverlapStatistics()
Frees overlap statistics.
Definition Equalization.cpp:767
double evaluate(double dn, int imageIndex, int bandIndex) const
Definition Equalization.cpp:588
void recalculateStatistics(QString inStatsFileName)
Recalculates statistics for any new input images.
Definition Equalization.cpp:428
void addInvalid(int count)
Increments the number of invalid overlaps by a given amount.
Definition Equalization.cpp:790
void write(QString outstatsFileName)
Write the equalization information (results) to a file.
Definition Equalization.cpp:582
virtual void fillOutList(FileList &outList, QString toListName)
Definition Equalization.cpp:634
void addHolds(QString holdListName)
Adds a list of images to be held in the equalization.
Definition Equalization.cpp:84
void loadInputs(QString fromListName)
Loads in the input images.
Definition Equalization.cpp:602
Equalization()
Default constructor.
Definition Equalization.cpp:40
void addValid(int count)
Increments the number of valid overlaps by a given amount.
Definition Equalization.cpp:780
bool isSolved() const
Indicates if the corrective factors were solved.
Definition Equalization.cpp:909
void calculateOverlapStatistics()
Calculates the overlap statistics for each pair of input images.
Definition Equalization.cpp:252
void setResults()
Creates the results pvl containing statistics and corrective factors.
Definition Equalization.cpp:324
virtual ~Equalization()
Destructor.
Definition Equalization.cpp:63
Internalizes a list of files.
Definition FileList.h:54
SolveMethod
Definition LeastSquares.h:112
Calculate the bases and multipliers for normalizing overlapping "data sets" (e.g.,...
Definition OverlapNormalization.h:61
SolutionType
Enumeration for whether user/programmer wants to calculate new gains, offsets, or both when solving.
Definition OverlapNormalization.h:111
@ GainsWithoutNormalization
The equation being solved for Gains, Offsets, and Both is output = (input - average) * gain + offset ...
Definition OverlapNormalization.h:135
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Container for cube-like labels.
Definition Pvl.h:119
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This class is used to accumulate statistics on double arrays.
Definition Statistics.h:94
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
const double Null
Value for an Isis Null pixel.
Definition SpecialPixel.h:95
Namespace for the standard library.