60 std::vector<double> p_input;
61 std::vector<double> p_output;
77 std::pair<double, double> NextPair(QString &pairs);
85 void AddPair(
const double input,
const double output);
149 void Load(
Pvl &pvl, QString &grpName);
150 void Save(
Pvl &pvl, QString &grpName);
151 void Load(QString &file, QString &grpName);
152 void Save(QString &file, QString &grpName);
154 double Map(
const double value)
const;
156 void Parse(
const QString &pairs);
159 QString
Text()
const;
166 double Input(
const int index)
const;
167 double Output(
const int index)
const;
Container of a cube histogram.
Definition Histogram.h:74
Container for cube-like labels.
Definition Pvl.h:119
Pixel value mapper.
Definition Stretch.h:58
void CopyPairs(const Stretch &other)
Copies the stretch pairs from another Stretch object, but maintains special pixel values.
Definition Stretch.cpp:392
void Parse(const QString &pairs)
Parses a string of the form "i1:o1 i2:o2...iN:oN" where each i:o represents an input:output pair.
Definition Stretch.cpp:181
void AddPair(const double input, const double output)
Adds a stretch pair to the list of pairs.
Definition Stretch.cpp:48
void SetNull(const double value)
Sets the mapping for NULL pixels.
Definition Stretch.h:94
void SetMaximum(const double value)
Definition Stretch.h:145
void Save(Pvl &pvl, QString &grpName)
Definition Stretch.cpp:373
Stretch()
Constructs a Stretch object with default mapping of special pixel values to themselves.
Definition Stretch.cpp:25
void SetHrs(const double value)
Sets the mapping for HRS pixels.
Definition Stretch.h:138
double Output(const int index) const
Returns the value of the output side of the stretch pair at the specified index.
Definition Stretch.cpp:302
void SetMinimum(const double value)
Definition Stretch.h:142
double Input(const int index) const
Returns the value of the input side of the stretch pair at the specified index.
Definition Stretch.cpp:287
void SetHis(const double value)
Sets the mapping for HIS pixels.
Definition Stretch.h:127
void SetLis(const double value)
Sets the mapping for LIS pixels.
Definition Stretch.h:105
~Stretch()
Destroys the Stretch object.
Definition Stretch.h:83
void ClearPairs()
Clears the stretch pairs.
Definition Stretch.h:170
double Map(const double value) const
Maps an input value to an output value based on the stretch pairs and/or special pixel mappings.
Definition Stretch.cpp:69
int Pairs() const
Returns the number of stretch pairs.
Definition Stretch.h:162
void Load(Pvl &pvl, QString &grpName)
Loads the stretch pairs from the pvl file into the Stretch object.
Definition Stretch.cpp:342
void SetLrs(const double value)
Sets the mapping for LRS pixels.
Definition Stretch.h:116
QString Text() const
Converts stretch pair to a string.
Definition Stretch.cpp:268
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16