29 #include <QStringList> 39 class OverlapStatistics;
143 void addHolds(QString holdListName);
145 void calculateStatistics(
double samplingPercent,
149 void recalculateStatistics(QString inStatsFileName);
150 void importStatistics(QString instatsFileName);
151 void applyCorrection(QString toListName);
154 void write(QString outstatsFileName);
156 double evaluate(
double dn,
int imageIndex,
int bandIndex)
const;
171 void addGain(
double gain) {
172 gains.push_back(gain);
175 void addOffset(
double offset) {
176 offsets.push_back(offset);
179 void addAverage(
double average) {
180 avgs.push_back(average);
183 double getGain(
int index)
const {
187 double getOffset(
int index)
const {
188 return offsets[index];
191 double getAverage(
int index)
const {
195 double evaluate(
double dn,
int index)
const {
196 double result =
Null;
198 double gain = gains[index];
199 if (m_sType != OverlapNormalization::GainsWithoutNormalization) {
200 double offset = offsets[index];
201 double avg = avgs[index];
202 result = (dn - avg) * gain + offset + avg;
212 vector<double> gains;
213 vector<double> offsets;
237 m_linc = (int) (100.0 / percent + 0.5);
242 void operator()(
Buffer &in)
const;
245 virtual void addStats(
Buffer &in)
const;
262 m_adjustment = adjustment;
273 void loadInputs(QString fromListName);
274 void setInput(
int index, QString value);
279 void calculateBandStatistics();
280 void calculateOverlapStatistics();
282 virtual void fillOutList(
FileList &outList, QString toListName);
283 virtual void errorCheck(QString fromListName);
285 void generateOutputs(
FileList &outList);
286 void loadOutputs(
FileList &outList, QString toListName);
291 void clearAdjustments();
294 void clearNormalizations();
295 void clearOverlapStatistics();
297 void addValid(
int count);
298 void addInvalid(
int count);
301 void setSolved(
bool solved);
302 bool isSolved()
const;
306 QVector<int> validateInputStatistics(QString instatsFileName);
326 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.
Namespace for the standard library.
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.
Namespace for ISIS/Bullet specific routines.
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.