Improve finer and coarser levels with maxlevels
This commit is contained in:
parent
ad48610dfb
commit
371add936b
@ -469,7 +469,8 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
|||||||
cp.t_lsl = static_cast<float>(params->wavelet.bllev.getTopLeft());
|
cp.t_lsl = static_cast<float>(params->wavelet.bllev.getTopLeft());
|
||||||
cp.b_rsl = static_cast<float>(params->wavelet.bllev.getBottomRight());
|
cp.b_rsl = static_cast<float>(params->wavelet.bllev.getBottomRight());
|
||||||
cp.t_rsl = static_cast<float>(params->wavelet.bllev.getTopRight());
|
cp.t_rsl = static_cast<float>(params->wavelet.bllev.getTopRight());
|
||||||
cp.numlevS = 9 - params->wavelet.threshold2;
|
// cp.numlevS = 9 - params->wavelet.threshold2;
|
||||||
|
cp.numlevS = params->wavelet.thres - params->wavelet.threshold2;
|
||||||
int maxlevS = cp.numlevH;
|
int maxlevS = cp.numlevH;
|
||||||
cp.numlevS = rtengine::max(cp.numlevS, maxlevS);
|
cp.numlevS = rtengine::max(cp.numlevS, maxlevS);
|
||||||
//highlight
|
//highlight
|
||||||
|
@ -1165,11 +1165,20 @@ void Wavelet::updateGUI()
|
|||||||
{
|
{
|
||||||
const int temp2 = threshold2->getValue();
|
const int temp2 = threshold2->getValue();
|
||||||
const int temp = threshold->getValue();
|
const int temp = threshold->getValue();
|
||||||
const int tempmax = (temp + 1) > 9 ? 9 : temp + 1;
|
const int maxlev = thres->getValue();
|
||||||
threshold2->setLimits(temp, 9, 1, tempmax);
|
const int tempmax = (temp + 1) > maxlev ? maxlev : temp + 1;
|
||||||
|
threshold2->setLimits(temp, maxlev, 1, maxlev + 1);
|
||||||
threshold2 ->setValue(temp2);
|
threshold2 ->setValue(temp2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Wavelet::updateGUImaxlev()
|
||||||
|
{
|
||||||
|
const int temp4 = threshold->getValue();
|
||||||
|
const int temp3 = thres->getValue();
|
||||||
|
// const int tempmax = (temp3) > 9 ? 9 : temp + 1;
|
||||||
|
threshold->setLimits(1, temp3, 1, temp3);
|
||||||
|
threshold ->setValue(temp4);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Wavelet::wavChanged(double nlevel)
|
void Wavelet::wavChanged(double nlevel)
|
||||||
@ -1477,6 +1486,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
skinprotect->setValue(pp->wavelet.skinprotect);
|
skinprotect->setValue(pp->wavelet.skinprotect);
|
||||||
hueskin->setValue<int>(pp->wavelet.hueskin);
|
hueskin->setValue<int>(pp->wavelet.hueskin);
|
||||||
hueskin2->setValue<int>(pp->wavelet.hueskin2);
|
hueskin2->setValue<int>(pp->wavelet.hueskin2);
|
||||||
|
updateGUImaxlev();
|
||||||
threshold->setValue(pp->wavelet.threshold);
|
threshold->setValue(pp->wavelet.threshold);
|
||||||
updateGUI();
|
updateGUI();
|
||||||
threshold2->setValue(pp->wavelet.threshold2);
|
threshold2->setValue(pp->wavelet.threshold2);
|
||||||
@ -3076,6 +3086,7 @@ void Wavelet::adjusterChanged(Adjuster* a, double newval)
|
|||||||
} else if (a == threshold) {
|
} else if (a == threshold) {
|
||||||
listener->panelChanged(EvWavThreshold, threshold->getTextValue());
|
listener->panelChanged(EvWavThreshold, threshold->getTextValue());
|
||||||
updateGUI();
|
updateGUI();
|
||||||
|
updateGUImaxlev();
|
||||||
|
|
||||||
} else if (a == threshold2) {
|
} else if (a == threshold2) {
|
||||||
listener->panelChanged(EvWavThreshold2, threshold2->getTextValue());
|
listener->panelChanged(EvWavThreshold2, threshold2->getTextValue());
|
||||||
@ -3122,6 +3133,8 @@ void Wavelet::adjusterChanged(Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
|
|
||||||
listener->panelChanged(EvWavthres, thres->getTextValue());
|
listener->panelChanged(EvWavthres, thres->getTextValue());
|
||||||
|
updateGUImaxlev();
|
||||||
|
updateGUI();
|
||||||
} else if (a == skinprotect) {
|
} else if (a == skinprotect) {
|
||||||
listener->panelChanged(EvWavSkin, skinprotect->getTextValue());
|
listener->panelChanged(EvWavSkin, skinprotect->getTextValue());
|
||||||
} else if (a == strength) {
|
} else if (a == strength) {
|
||||||
|
@ -142,6 +142,7 @@ private:
|
|||||||
void wavChanged(double nlevel) override;
|
void wavChanged(double nlevel) override;
|
||||||
void ushamethodChanged();
|
void ushamethodChanged();
|
||||||
void updateGUI();
|
void updateGUI();
|
||||||
|
void updateGUImaxlev();
|
||||||
|
|
||||||
void HSmethodUpdateUI();
|
void HSmethodUpdateUI();
|
||||||
void CHmethodUpdateUI();
|
void CHmethodUpdateUI();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user