merge with dev

This commit is contained in:
Desmis
2020-06-12 08:05:55 +02:00
8 changed files with 694 additions and 514 deletions

View File

@@ -131,19 +131,19 @@ Wavelet::Wavelet() :
level1noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))),
level2noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))),
level3noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))),
threshold(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD"), 1, 9, 1, 5))),
threshold(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD"), 1, 9, 1, 4))),
// threshold2(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD2"), 1, 9, 1, 4))),
threshold2(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD2"), 1, 9, 1, 5))),
threshold2(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD2"), 3, 9, 1, 5))),
edgedetect(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECT"), 0, 100, 1, 90))),
edgedetectthr(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECTTHR"), 0, 100, 1, 20))),
edgedetectthr2(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECTTHR2"), -10, 100, 1, 0))),
edgesensi(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGESENSI"), 0, 100, 1, 60))),
edgeampli(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEAMPLI"), 0, 100, 1, 10))),
ballum(Gtk::manage(new Adjuster(M("TP_WAVELET_BALLUM"), -2., 10., 0.5, 7., Gtk::manage(new RTImage("circle-white-small.png")), Gtk::manage(new RTImage("circle-black-small.png"))))),
balchrom(Gtk::manage(new Adjuster(M("TP_WAVELET_BALCHROM"), -100., 100., 1., 0., Gtk::manage(new RTImage("circle-blue-small.png")), Gtk::manage(new RTImage("circle-red-small.png"))))),
balchrom(Gtk::manage(new Adjuster(M("TP_WAVELET_BALCHROM"), -100., 100., 1., 0., Gtk::manage(new RTImage("circle-blue-yellow-small.png")), Gtk::manage(new RTImage("circle-red-green-small.png"))))),
chromfi(Gtk::manage(new Adjuster(M("TP_WAVELET_CHROMFI"), 0.0, 150., 0.01, 0.))),
chromco(Gtk::manage(new Adjuster(M("TP_WAVELET_CHROMCO"), 0, 100., 0.01, 0.))),
mergeL(Gtk::manage(new Adjuster(M("TP_WAVELET_MERGEL"), -50, 100, 1, 40))),
mergeL(Gtk::manage(new Adjuster(M("TP_WAVELET_MERGEL"), -50, 100, 1, 20))),
mergeC(Gtk::manage(new Adjuster(M("TP_WAVELET_MERGEC"), -50, 100, 1, 20))),
softrad(Gtk::manage(new Adjuster(M("TP_WAVELET_SOFTRAD"), 0.0, 100., 0.5, 0.))),
softradend(Gtk::manage(new Adjuster(M("TP_WAVELET_SOFTRAD"), 0.0, 100., 0.5, 0.))),
@@ -440,10 +440,10 @@ Wavelet::Wavelet() :
contrastSHVBox->pack_start(*HSmethod);
contrastSHVBox->pack_start(*hllev);
// contrastSHVBox->pack_start(*threshold);
contrastSHVBox->pack_start(*threshold);
contrastSHVBox->pack_start(*bllev);
// contrastSHVBox->pack_start(*threshold2);
contrastSHVBox->pack_start(*curveEditorC);
contrastSHVBox->pack_start(*threshold2);
// contrastSHVBox->pack_start(*curveEditorC);
Gtk::Frame* const contrastSHFrame = Gtk::manage(new Gtk::Frame(M("TP_WAVELET_APPLYTO")));
contrastSHFrame->add(*contrastSHVBox);
levBox->pack_start(*contrastSHFrame);
@@ -574,7 +574,7 @@ Wavelet::Wavelet() :
// Denoise and Refine
ToolParamBlock* const noiseBox = Gtk::manage(new ToolParamBlock());
linkedg->set_active(true);
linkedg->set_active(false);
linkedgConn = linkedg->signal_toggled().connect(sigc::mem_fun(*this, &Wavelet::linkedgToggled));
noiseBox->pack_start(*linkedg);
@@ -1161,6 +1161,24 @@ Wavelet::~Wavelet()
}
void Wavelet::updateGUI()
{
const int temp2 = threshold2->getValue();
const int temp = threshold->getValue();
const int maxlev = thres->getValue();
threshold2->setLimits(temp + 1, maxlev, 1, maxlev + 1);
threshold2 ->setValue(temp2);
}
void Wavelet::updateGUImaxlev()
{
const int temp4 = threshold->getValue();
const int temp3 = thres->getValue();
threshold->setLimits(1, temp3, 1, temp3);
threshold ->setValue(temp4);
}
void Wavelet::wavChanged(double nlevel)
{
if (!batchMode) {
@@ -1466,7 +1484,9 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
skinprotect->setValue(pp->wavelet.skinprotect);
hueskin->setValue<int>(pp->wavelet.hueskin);
hueskin2->setValue<int>(pp->wavelet.hueskin2);
updateGUImaxlev();
threshold->setValue(pp->wavelet.threshold);
updateGUI();
threshold2->setValue(pp->wavelet.threshold2);
edgedetect->setValue(pp->wavelet.edgedetect);
edgedetectthr->setValue(pp->wavelet.edgedetectthr);
@@ -3063,6 +3083,9 @@ void Wavelet::adjusterChanged(Adjuster* a, double newval)
listener->panelChanged(EvWavradius, radius->getTextValue());
} else if (a == threshold) {
listener->panelChanged(EvWavThreshold, threshold->getTextValue());
updateGUI();
updateGUImaxlev();
} else if (a == threshold2) {
listener->panelChanged(EvWavThreshold2, threshold2->getTextValue());
} else if (a == edgedetect) {
@@ -3108,6 +3131,8 @@ void Wavelet::adjusterChanged(Adjuster* a, double newval)
}
listener->panelChanged(EvWavthres, thres->getTextValue());
updateGUImaxlev();
updateGUI();
} else if (a == skinprotect) {
listener->panelChanged(EvWavSkin, skinprotect->getTextValue());
} else if (a == strength) {
@@ -3671,6 +3696,8 @@ void Wavelet::neutralPressed()
correction[i]->setValue(0);
adjusterChanged(correction[i], 0);
}
sup->setValue(0);
adjusterChanged(sup, 0);
}
void Wavelet::neutralchPressed()

View File

@@ -141,6 +141,8 @@ private:
void updatewavLabel ();
void wavChanged(double nlevel) override;
void ushamethodChanged();
void updateGUI();
void updateGUImaxlev();
void HSmethodUpdateUI();
void CHmethodUpdateUI();