1 #include "LinearStretchType.h"
7 #include <QTableWidget>
10 #include "HistogramWidget.h"
25 const QString &name,
const QColor &color)
35 QGridLayout *sliderLayout =
new QGridLayout();
36 sliderLayout->setColumnStretch(1, 10);
38 QLabel *minHistLabel =
new QLabel(
"Min DN");
48 connect(
p_startEdit, SIGNAL(textChanged(
const QString &)),
50 sliderLayout->addWidget(minHistLabel, 0, 0);
54 QLabel *maxHistLabel =
new QLabel(
"Max DN");
65 connect(
p_endEdit, SIGNAL(textChanged(
const QString &)),
67 sliderLayout->addWidget(maxHistLabel, 1, 0);
71 sliderWidget->setLayout(sliderLayout);
101 if(newStretch.
Pairs() >= 2) {
102 double inMin = newStretch.
Input(0);
103 double inMax = newStretch.
Input(1);
111 interpretted.
AddPair(inMin, 0);
112 interpretted.
AddPair(inMax, 255);
123 interpretted.
AddPair(inMin, 0);
124 interpretted.
AddPair(inMax, 255);
175 if(value >=
p_endEdit->text().toDouble()) {
181 int valuePos = (int)(percentage * 1000.0);
216 p_endEdit->setText(QString::number(value));
225 double value =
p_endEdit->text().toDouble();
227 if(value <= p_startEdit->text().
toDouble()) {
233 int valuePos = (int)(percentage * 1000.0);
243 newStretch.
AddPair(value, 255);