29 #include <QStringList>
39 class OverlapStatistics;
139 void addHolds(QString holdListName);
141 void calculateStatistics(
double samplingPercent,
145 void recalculateStatistics(QString inStatsFileName);
146 void importStatistics(QString instatsFileName);
147 void applyCorrection(QString toListName);
150 void write(QString outstatsFileName);
152 double evaluate(
double dn,
int imageIndex,
int bandIndex)
const;
167 void addGain(
double gain) {
168 gains.push_back(gain);
171 void addOffset(
double offset) {
172 offsets.push_back(offset);
175 void addAverage(
double average) {
176 avgs.push_back(average);
179 double getGain(
int index)
const {
183 double getOffset(
int index)
const {
184 return offsets[index];
187 double getAverage(
int index)
const {
191 double evaluate(
double dn,
int index)
const {
192 double result =
Null;
194 double gain = gains[index];
195 if (m_sType != OverlapNormalization::GainsWithoutNormalization) {
196 double offset = offsets[index];
197 double avg = avgs[index];
198 result = (dn - avg) * gain + offset + avg;
208 vector<double> gains;
209 vector<double> offsets;
233 m_linc = (int) (100.0 / percent + 0.5);
238 void operator()(
Buffer &in)
const;
241 virtual void addStats(
Buffer &in)
const;
258 m_adjustment = adjustment;
269 void loadInputs(QString fromListName);
270 void setInput(
int index, QString value);
275 void calculateBandStatistics();
276 void calculateOverlapStatistics();
278 virtual void fillOutList(
FileList &outList, QString toListName);
279 virtual void errorCheck(QString fromListName);
281 void generateOutputs(
FileList &outList);
282 void loadOutputs(
FileList &outList, QString toListName);
287 void clearAdjustments();
290 void clearNormalizations();
291 void clearOverlapStatistics();
293 void addValid(
int count);
294 void addInvalid(
int count);
297 void setSolved(
bool solved);
298 bool isSolved()
const;
302 QVector<int> validateInputStatistics(QString instatsFileName);
322 vector<ImageAdjustment *> m_adjustments;
Buffer for reading and writing cube data.
LeastSquares::SolveMethod m_lsqMethod
Least squares method for solving normalization correcitve factors.
vector< int > m_holdIndices
Indices of images being held.
vector< bool > m_doesOverlapList
Which images have a valid overlap.
QStringList m_badFiles
List of image names that don't overlap.
const double Null
Value for an Isis Null pixel.
This class is used as a functor calculate image statistics.
int m_maxCube
Number of input images.
const ImageAdjustment * m_adjustment
ImageAdjustment to equalize image.
Internalizes a list of files.
OverlapNormalization::SolutionType m_sType
The normalization solution type for solving normalizations (offsets, gains, or both) ...
bool m_normsSolved
Indicates if corrective factors were solved.
SolutionType
Enumeration for whether user/programmer wants to calculate new gains, offsets, or both when solving...
This class is used as a functor to apply adjustments (equalize) to an image.
bool m_wtopt
Whether or not overlaps should be weighted.
This class is used to accumulate statistics on double arrays.
Pvl * m_results
Calculation results and normalization corrective factors (if solved)
CalculateFunctor(Statistics *stats, double percent)
Constructs a CalculateFunctor.
Calculate the bases and multipliers for normalizing overlapping "data sets" (e.g., cubes).
int m_mincnt
Minimum number of pixels for an overlap to be considered valid.
Statistics * m_stats
Calculated statistics.
This class can be used to calculate, read in, and/or apply equalization statistics for a list of file...
vector< OverlapStatistics * > m_overlapStats
Calculated overlap statistics.
int m_invalidCnt
Number of invalid overlaps.
Contains multiple PvlContainers.
vector< OverlapNormalization * > m_overlapNorms
Normalization data for input images.
int m_linc
Line increment value when calculating statistics.
Container for cube-like labels.
vector< bool > m_alreadyCalculated
Which images that have statistics already calculated.
int m_validCnt
Number of valid overlaps.
bool m_recalculating
Indicates if recalculating with loaded statistics.
double m_samplingPercent
Percentage of the lines to consider when gathering cube and overlap statistics (process-by-line) ...
int m_maxBand
Number of bands in each input image.
Contains Pvl Groups and Pvl Objects.