Wavelet levels - choice complexity standard - advanced (#5869)

* Added in option edghi edglo limrad

* Hide choice edgesharpness slider curve

* First normal expert

* Second normal expert

* Changes in normal expert contrast chroma residual

* Change label complexity wavelet

* French + hide sigmafin standard

* Added tooltip complexty wavelet
This commit is contained in:
Desmis 2020-08-02 15:52:01 +02:00 committed by GitHub
parent 0933a48253
commit e0d3353d72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 231 additions and 20 deletions

View File

@ -2653,6 +2653,8 @@ TP_WAVELET_CHR_TOOLTIP;Ajuste le chroma en fonction des "niveaux de contraste" e
TP_WAVELET_CHSL;Curseurs
TP_WAVELET_CHTYPE;Méthode de chrominance
TP_WAVELET_COLORT;Opacité Rouge-Vert
TP_WAVELET_COMPLEX_TOOLTIP;Standard: lapplication dispose du nécessaire pour assurer les opérations courantes, linterface graphique est simplifiée.\nAvancé: toutes les fonctionnalités sont présentes, certaines nécessitent un apprentissage important
TP_WAVELET_COMPEXPERT;Avancé
TP_WAVELET_COMPCONT;Contraste
TP_WAVELET_COMPGAMMA;Compression gamma
TP_WAVELET_COMPGAMMA_TOOLTIP;Ajuster le gamma de l'image résiduelle vous permet d'équiilibrer les données de l'histogramme.

View File

@ -1215,6 +1215,7 @@ HISTORY_MSG_COLORTONING_LABREGION_POWER;CT - region power
HISTORY_MSG_COLORTONING_LABREGION_SATURATION;CT - Saturation
HISTORY_MSG_COLORTONING_LABREGION_SHOWMASK;CT - region show mask
HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope
HISTORY_MSG_COMPLEX;Wavelet complexity
HISTORY_MSG_DEHAZE_DEPTH;Dehaze - Depth
HISTORY_MSG_DEHAZE_ENABLED;Haze Removal
HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only
@ -3280,6 +3281,10 @@ TP_WAVELET_COLORT;Opacity Red-Green
TP_WAVELET_COMPCONT;Contrast
TP_WAVELET_COMPGAMMA;Compression gamma
TP_WAVELET_COMPGAMMA_TOOLTIP;Adjusting the gamma of the residual image allows you to equilibrate the data and histogram.
TP_WAVELET_COMPLEXLAB;Complexity
TP_WAVELET_COMPLEX_TOOLTIP;Standard: shows a reduced set of tools suitable for most processing operations.\nAdvanced: shows the complete set of tools for advanced processing operations
TP_WAVELET_COMPNORMAL;Standard
TP_WAVELET_COMPEXPERT;Advanced
TP_WAVELET_COMPTM;Tone mapping
TP_WAVELET_CONTEDIT;'After' contrast curve
TP_WAVELET_CONTFRAME;Contrast - Compression

View File

@ -323,14 +323,14 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
}
cp.CHSLmet = 1;
cp.EDmet = 1;
cp.EDmet = 2;
/*
if (params->wavelet.EDmethod == "SL") {
cp.EDmet = 1;
} else if (params->wavelet.EDmethod == "CU") {
cp.EDmet = 2;
}
*/
cp.cbena = params->wavelet.cbenab;
cp.blhigh = (float)params->wavelet.bluehigh;
cp.grhigh = (float)params->wavelet.greenhigh;
@ -2079,7 +2079,8 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
ContrastResid(WavCoeffs_L0, cp, W_L, H_L, maxp);
}
if ((cp.conres >= 0.f || cp.conresH >= 0.f) && cp.resena && !cp.oldsh) { // cp.conres = 0.f and cp.comresH = 0.f means that all will be multiplied by 1.f, so we can skip this step
// if ((cp.conres >= 0.f || cp.conresH >= 0.f) && cp.resena && !cp.oldsh) { // cp.conres = 0.f and cp.comresH = 0.f means that all will be multiplied by 1.f, so we can skip this step
if ((cp.conres >= 0.f || cp.conresH >= 0.f) && cp.resena) { // cp.conres = 0.f and cp.comresH = 0.f means that all will be multiplied by 1.f, so we can skip this step
const std::unique_ptr<LabImage> temp(new LabImage(W_L, H_L));
#ifdef _OPENMP
#pragma omp parallel for num_threads(wavNestedLevels) if (wavNestedLevels>1)
@ -2104,7 +2105,8 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
}
}
if ((cp.conres != 0.f || cp.conresH != 0.f) && cp.resena && cp.oldsh) { // cp.conres = 0.f and cp.comresH = 0.f means that all will be multiplied by 1.f, so we can skip this step
// if ((cp.conres != 0.f || cp.conresH != 0.f) && cp.resena && cp.oldsh) { // cp.conres = 0.f and cp.comresH = 0.f means that all will be multiplied by 1.f, so we can skip this step
if ((cp.conres < 0.f || cp.conresH < 0.f) && cp.resena) { // cp.conres = 0.f and cp.comresH = 0.f means that all will be multiplied by 1.f, so we can skip this step
#ifdef _OPENMP
#pragma omp parallel for
#endif
@ -3093,10 +3095,13 @@ void ImProcFunctions::ContAllL(float *koeLi[12], float maxkoeLi, bool lipschitz,
float atten01234 = 0.80f;
value *= (atten01234 * scaleskip[1]); //for zoom < 100% reduce strength...I choose level 1...but!!
}
float edghig = settings->edghi;//increase or reduce "reinforce"
float edglow = settings->edglo;//increase or reduce "reduce"
float limrad = settings->limrad;//threshold action in function radius (rad)
printf("edghi=%f edglo=%f limrad=%f\n", edghig, edglow, limrad);
// value *= beta;
float edge = 1.f;
float lim0 = 20.f; //arbitrary limit for low radius and level between 2 or 3 to 30 maxi
float lim0 = limrad; //arbitrary limit for low radius and level between 2 or 3 to 30 maxi
float lev = float (level);
float repart = (float)cp.til;
@ -3104,15 +3109,14 @@ void ImProcFunctions::ContAllL(float *koeLi[12], float maxkoeLi, bool lipschitz,
if (cp.reinforce != 2) {
const float brepart =
cp.reinforce == 1
? 3.f
: 0.5f;
? edghig
: edglow;
const float arepart = -(brepart - 1.f) / (lim0 / 60.f);
if (rad < lim0 / 60.f) {
if (rad < (lim0 / 60.f)) {
repart *= (arepart * rad + brepart); //linear repartition of repart
}
}
float al0 = 1.f + (repart) / 50.f;
float al10 = 1.0f; //arbitrary value ==> less = take into account high levels
// float ak =-(al0-al10)/10.f;//10 = maximum levels
@ -3120,15 +3124,16 @@ void ImProcFunctions::ContAllL(float *koeLi[12], float maxkoeLi, bool lipschitz,
float bk = al0;
float koef = ak * level + bk; //modulate for levels : more levels high, more koef low ==> concentrated action on low levels, without or near for high levels
float expkoef = -std::pow(std::fabs(rad - lev), koef); //reduce effect for high levels
printf("repart=%f\n", repart);
if (cp.reinforce == 3) {
if (rad < lim0 / 60.f && level == 0) {
if (rad < (lim0 / 60.f) && level == 0) {
expkoef *= abs(repart); //reduce effect for low values of rad and level=0==> quasi only level 1 is effective
}
}
if (cp.reinforce == 1) {
if (rad < lim0 / 60.f && level == 1) {
if (rad < (lim0 / 60.f) && level == 1) {
expkoef /= repart; //increase effect for low values of rad and level=1==> quasi only level 0 is effective
}
}

View File

@ -2395,6 +2395,7 @@ WaveletParams::WaveletParams() :
CLmethod("all"),
Backmethod("grey"),
Tilesmethod("full"),
complexmethod("normal"),
daubcoeffmethod("4_"),
CHmethod("without"),
Medgreinf("less"),
@ -2527,6 +2528,7 @@ bool WaveletParams::operator ==(const WaveletParams& other) const
&& CLmethod == other.CLmethod
&& Backmethod == other.Backmethod
&& Tilesmethod == other.Tilesmethod
&& complexmethod == other.complexmethod
&& daubcoeffmethod == other.daubcoeffmethod
&& CHmethod == other.CHmethod
&& Medgreinf == other.Medgreinf
@ -5988,6 +5990,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->wavelet.iter, "Wavelet", "Iter", wavelet.iter, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.thres, "Wavelet", "MaxLev", wavelet.thres, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.Tilesmethod, "Wavelet", "TilesMethod", wavelet.Tilesmethod, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.complexmethod, "Wavelet", "complexMethod", wavelet.complexmethod, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.daubcoeffmethod, "Wavelet", "DaubMethod", wavelet.daubcoeffmethod, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.CLmethod, "Wavelet", "ChoiceLevMethod", wavelet.CLmethod, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.Backmethod, "Wavelet", "BackMethod", wavelet.Backmethod, keyFile);
@ -7858,6 +7861,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Wavelet", "ChoiceLevMethod", pedited, wavelet.CLmethod, pedited->wavelet.CLmethod);
assignFromKeyfile(keyFile, "Wavelet", "BackMethod", pedited, wavelet.Backmethod, pedited->wavelet.Backmethod);
assignFromKeyfile(keyFile, "Wavelet", "TilesMethod", pedited, wavelet.Tilesmethod, pedited->wavelet.Tilesmethod);
assignFromKeyfile(keyFile, "Wavelet", "complexMethod", pedited, wavelet.complexmethod, pedited->wavelet.complexmethod);
assignFromKeyfile(keyFile, "Wavelet", "DaubMethod", pedited, wavelet.daubcoeffmethod, pedited->wavelet.daubcoeffmethod);
assignFromKeyfile(keyFile, "Wavelet", "CHromaMethod", pedited, wavelet.CHmethod, pedited->wavelet.CHmethod);
assignFromKeyfile(keyFile, "Wavelet", "Medgreinf", pedited, wavelet.Medgreinf, pedited->wavelet.Medgreinf);

View File

@ -1790,6 +1790,7 @@ struct WaveletParams {
Glib::ustring CLmethod;
Glib::ustring Backmethod;
Glib::ustring Tilesmethod;
Glib::ustring complexmethod;
Glib::ustring daubcoeffmethod;
Glib::ustring CHmethod;
Glib::ustring Medgreinf;

View File

@ -99,6 +99,10 @@ public:
int itcwb_delta;
bool itcwb_stdobserver10;
int itcwb_precis;
//wavelet levels
double edghi;
double edglo;
double limrad;
enum class ThumbnailInspectorMode {

View File

@ -617,6 +617,12 @@ void Options::setDefaults()
rtSettings.itcwb_precis = 5;//3 or 5 or 9
// end locallab
//wavelet
rtSettings.edghi = 3.0;//1.1 and 5.
rtSettings.edglo = 0.5;//0.1 and 0.95
rtSettings.limrad = 20.;//1 and 60
rtSettings.protectred = 60;
rtSettings.protectredh = 0.3;
rtSettings.CRI_color = 0;
@ -1704,6 +1710,22 @@ void Options::readFromFile(Glib::ustring fname)
}
if (keyFile.has_group("Wavelet")) {
if (keyFile.has_key("Wavelet", "Edghi")) {
rtSettings.edghi = keyFile.get_double("Wavelet", "Edghi");
}
if (keyFile.has_key("Wavelet", "Edglo")) {
rtSettings.edglo = keyFile.get_double("Wavelet", "Edglo");
}
if (keyFile.has_key("Wavelet", "Limrad")) {
rtSettings.limrad = keyFile.get_double("Wavelet", "Limrad");
}
}
if (keyFile.has_group("ICC Profile Creator")) {
if (keyFile.has_key("ICC Profile Creator", "PimariesPreset")) {
ICCPC_primariesPreset = keyFile.get_string("ICC Profile Creator", "PimariesPreset");
@ -2302,6 +2324,11 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_integer("Color Management", "Previewselection", rtSettings.previewselection);
keyFile.set_double("Color Management", "Cbdlsensi", rtSettings.cbdlsensi);
keyFile.set_double("Wavelet", "Edghi", rtSettings.edghi);
keyFile.set_double("Wavelet", "Edglo", rtSettings.edglo);
keyFile.set_double("Wavelet", "Limrad", rtSettings.limrad);
keyFile.set_string("ICC Profile Creator", "PimariesPreset", ICCPC_primariesPreset);
keyFile.set_double("ICC Profile Creator", "RedPrimaryX", ICCPC_redPrimaryX);
keyFile.set_double("ICC Profile Creator", "RedPrimaryY", ICCPC_redPrimaryY);

View File

@ -531,6 +531,7 @@ void ParamsEdited::set(bool v)
wavelet.CLmethod = v;
wavelet.Backmethod = v;
wavelet.Tilesmethod = v;
wavelet.complexmethod = v;
wavelet.daubcoeffmethod = v;
wavelet.CHmethod = v;
wavelet.CHSLmethod = v;
@ -1679,6 +1680,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
wavelet.CLmethod = wavelet.CLmethod && p.wavelet.CLmethod == other.wavelet.CLmethod;
wavelet.Backmethod = wavelet.Backmethod && p.wavelet.Backmethod == other.wavelet.Backmethod;
wavelet.Tilesmethod = wavelet.Tilesmethod && p.wavelet.Tilesmethod == other.wavelet.Tilesmethod;
wavelet.complexmethod = wavelet.complexmethod && p.wavelet.complexmethod == other.wavelet.complexmethod;
wavelet.daubcoeffmethod = wavelet.daubcoeffmethod && p.wavelet.daubcoeffmethod == other.wavelet.daubcoeffmethod;
wavelet.CHmethod = wavelet.CHmethod && p.wavelet.CHmethod == other.wavelet.CHmethod;
wavelet.CHSLmethod = wavelet.CHSLmethod && p.wavelet.CHSLmethod == other.wavelet.CHSLmethod;
@ -5574,6 +5576,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.wavelet.Tilesmethod = mods.wavelet.Tilesmethod;
}
if (wavelet.complexmethod) {
toEdit.wavelet.complexmethod = mods.wavelet.complexmethod;
}
if (wavelet.daubcoeffmethod) {
toEdit.wavelet.daubcoeffmethod = mods.wavelet.daubcoeffmethod;
}

View File

@ -1039,6 +1039,7 @@ struct WaveletParamsEdited {
bool CLmethod;
bool Backmethod;
bool Tilesmethod;
bool complexmethod;
bool daubcoeffmethod;
bool Dirmethod;
bool sigma;

View File

@ -158,6 +158,7 @@ Wavelet::Wavelet() :
HSmethod(Gtk::manage(new MyComboBoxText())),
CLmethod(Gtk::manage(new MyComboBoxText())),
Backmethod(Gtk::manage(new MyComboBoxText())),
complexmethod(Gtk::manage(new MyComboBoxText())),
Tilesmethod(Gtk::manage(new MyComboBoxText())),
daubcoeffmethod(Gtk::manage(new MyComboBoxText())),
Dirmethod(Gtk::manage(new MyComboBoxText())),
@ -190,7 +191,10 @@ Wavelet::Wavelet() :
expclari(Gtk::manage(new MyExpander(true, M("TP_WAVELET_CLARI")))),
expbl(Gtk::manage(new MyExpander(true, M("TP_WAVELET_BL")))),
neutrHBox(Gtk::manage(new Gtk::HBox())),
usharpHBox(Gtk::manage(new Gtk::HBox()))
usharpHBox(Gtk::manage(new Gtk::HBox())),
ctboxch(Gtk::manage(new Gtk::HBox())),
ctboxBA(Gtk::manage(new Gtk::VBox()))
{
CurveListener::setMulti(true);
auto m = ProcEventMapper::getInstance();
@ -227,6 +231,7 @@ Wavelet::Wavelet() :
EvWavrangeab = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_RANGEAB");
EvWavprotab = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_PROTAB");
EvWavlevelshc = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_LEVELSHC");
EvWavcomplexmet = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_COMPLEX");
labgrid = Gtk::manage(new LabGrid(EvWavLabGridValue, M("TP_WAVELET_LABGRID_VALUES")));
@ -269,6 +274,16 @@ Wavelet::Wavelet() :
thres->set_tooltip_text(M("TP_WAVELET_LEVELS_TOOLTIP"));
thres->setAdjusterListener(this);
complexmethod->append(M("TP_WAVELET_COMPNORMAL"));
complexmethod->append(M("TP_WAVELET_COMPEXPERT"));
complexmethodconn = complexmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::complexmethodChanged));
complexmethod->set_tooltip_text(M("TP_WAVELET_COMPLEX_TOOLTIP"));
Gtk::HBox* const complexHBox = Gtk::manage(new Gtk::HBox());
Gtk::Label* const complexLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_COMPLEXLAB") + ":"));
complexHBox->pack_start(*complexLabel, Gtk::PACK_SHRINK, 4);
complexHBox->pack_start(*complexmethod);
Tilesmethod->append(M("TP_WAVELET_TILESFULL"));
Tilesmethod->append(M("TP_WAVELET_TILESBIG"));
// Tilesmethod->append(M("TP_WAVELET_TILESLIT"));
@ -335,6 +350,7 @@ Wavelet::Wavelet() :
levdirSubHBox->pack_start(*Lmethod);
levdirSubHBox->pack_start(*Dirmethod, Gtk::PACK_EXPAND_WIDGET, 2); // same, but 2 not 4?
settingsBox->pack_start(*complexHBox);
settingsBox->pack_start(*strength);
settingsBox->pack_start(*thres);
settingsBox->pack_start(*tilesizeHBox);
@ -452,7 +468,7 @@ Wavelet::Wavelet() :
ToolParamBlock* const chBox = Gtk::manage(new ToolParamBlock());
Gtk::Label* const labmch = Gtk::manage(new Gtk::Label(M("TP_WAVELET_CHTYPE") + ":"));
Gtk::HBox* const ctboxch = Gtk::manage(new Gtk::HBox());
// Gtk::HBox* const ctboxch = Gtk::manage(new Gtk::HBox());
ctboxch->pack_start(*labmch, Gtk::PACK_SHRINK, 1);
CHmethod->append(M("TP_WAVELET_CH1"));
@ -674,7 +690,7 @@ Wavelet::Wavelet() :
EDmethod->append(M("TP_WAVELET_EDCU"));
EDmethodconn = EDmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::EDmethodChanged));
ctboxED->pack_start(*EDmethod);
edgBox->pack_start(*ctboxED);
// edgBox->pack_start(*ctboxED);
edgcont->setAdjusterListener(this);
edgcont->setBgGradient(milestones2);
@ -838,7 +854,7 @@ Wavelet::Wavelet() :
thrH->setAdjusterListener(this);
radius->setAdjusterListener(this);
radius->hide();
// radius->hide();
shFrame->set_label_align(0.025, 0.5);
ToolParamBlock* const shBox = Gtk::manage(new ToolParamBlock());
@ -1007,7 +1023,7 @@ Wavelet::Wavelet() :
resBox->pack_start(*neutrHBox);
// Final Touchup
Gtk::VBox* const ctboxBA = Gtk::manage(new Gtk::VBox());
// Gtk::VBox* const ctboxBA = Gtk::manage(new Gtk::VBox());
ctboxBA->set_spacing(2);
@ -1236,6 +1252,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
CLmethodconn.block(true);
Backmethodconn.block(true);
Tilesmethodconn.block(true);
complexmethodconn.block(true);
daubcoeffmethodconn.block(true);
Dirmethodconn.block(true);
CHmethodconn.block(true);
@ -1357,6 +1374,12 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
} else if (pp->wavelet.CLmethod == "all") {
CLmethod->set_active(3);
}
if (pp->wavelet.complexmethod == "normal") {
complexmethod->set_active(0);
} else if (pp->wavelet.complexmethod == "expert") {
complexmethod->set_active(1);
}
//Tilesmethod->set_active (2);
if (pp->wavelet.Tilesmethod == "full") {
@ -1558,6 +1581,11 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
Backmethod->set_active_text(M("GENERAL_UNCHANGED"));
}
if (!pedited->wavelet.complexmethod) {
complexmethod->set_active_text(M("GENERAL_UNCHANGED"));
}
if (!pedited->wavelet.Tilesmethod) {
Tilesmethod->set_active_text(M("GENERAL_UNCHANGED"));
}
@ -1774,6 +1802,15 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
} else {
sup->hide();
}
if (complexmethod->get_active_row_number() == 0) {
updateGUIToMode(0);
convertParamToNormal();
} else {
updateGUIToMode(1);
}
}
/*****************************************************************************************************
@ -1786,6 +1823,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
CLmethodconn.block(false);
Backmethodconn.block(false);
Tilesmethodconn.block(false);
complexmethodconn.block(false);
daubcoeffmethodconn.block(false);
CHmethodconn.block(false);
CHSLmethodconn.block(false);
@ -1965,6 +2003,7 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
pedited->wavelet.CLmethod = CLmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.Backmethod = Backmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.Tilesmethod = Tilesmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.complexmethod = complexmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.daubcoeffmethod = daubcoeffmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.CHmethod = CHmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.CHSLmethod = CHSLmethod->get_active_text() != M("GENERAL_UNCHANGED");
@ -2168,6 +2207,12 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
// pp->wavelet.Tilesmethod = "lit";
}
if (complexmethod->get_active_row_number() == 0) {
pp->wavelet.complexmethod = "normal";
} else if (complexmethod->get_active_row_number() == 1) {
pp->wavelet.complexmethod = "expert";
}
if (daubcoeffmethod->get_active_row_number() == 0) {
pp->wavelet.daubcoeffmethod = "2_";
} else if (daubcoeffmethod->get_active_row_number() == 1) {
@ -2835,6 +2880,110 @@ void Wavelet::ushamethodChanged()
}
void Wavelet::convertParamToNormal()
{
const WaveletParams def_params;
disableListener();
//contrast
offset->setValue(def_params.offset);
sigma->setValue(def_params.sigma);
lowthr->setValue(def_params.lowthr);
//chroma
expchroma->setEnabled(def_params.expchroma);
sigmacol->setValue(def_params.sigmacol);
CHmethod->set_active(2);
//denoise
chromfi->setValue(def_params.chromfi);
chromco->setValue(def_params.chromco);
//toning
exptoning->setEnabled(def_params.exptoning);
//gamut
median->set_active(def_params.median);
avoid->set_active(def_params.avoid);
hueskin->setValue(def_params.hueskin);
skinprotect->setValue(def_params.skinprotect);
//blur
expbl->setEnabled(def_params.expbl);
//edge sharpness
lipst->set_active(def_params.lipst);
lipstUpdateUI();
edgesensi->setValue(def_params.edgesensi);
edgeampli->setValue(def_params.edgeampli);
NPmethod->set_active(0);
//resid
// oldsh->set_active(true);
radius->setValue(def_params.radius);
resblur->setValue(def_params.resblur);
resblurc->setValue(def_params.resblurc);
cbenab->set_active(false);
//final touchup
BAmethod->set_active(0);
enableListener();
sigmafin->setValue(def_params.sigmafin);
// Update GUI based on converted widget parameters:
}
void Wavelet::updateGUIToMode(int mode)
{
if(mode ==0) {
offset->hide();
sigma->hide();
lowthr->hide();
ctboxch->hide();
sigmacol->hide();
expgamut->hide();
exptoning->hide();
chroFrame->hide();
expbl->hide();
lipst->hide();
dirFrame->hide();
oldsh->hide();
radius->hide();
blurFrame->hide();
cbenab->hide();
sigmafin->hide();
} else {
offset->show();
sigma->show();
lowthr->show();
ctboxch->show();
sigmacol->show();
expgamut->show();
exptoning->show();
chroFrame->show();
expbl->show();
lipst->show();
dirFrame->show();
oldsh->hide();
radius->show();
blurFrame->show();
cbenab->show();
sigmafin->show();
}
}
void Wavelet::complexmethodChanged()
{
if (complexmethod->get_active_row_number() == 0) {
updateGUIToMode(0);
convertParamToNormal();
} else {
updateGUIToMode(1);
}
if (listener && (multiImage || getEnabled())) {
listener->panelChanged(EvWavcomplexmet, complexmethod->get_active_text());
}
}
void Wavelet::TilesmethodChanged()
{
//TilesmethodUpdateUI();
@ -2916,6 +3065,7 @@ void Wavelet::setBatchMode(bool batchMode)
CLmethod->append(M("GENERAL_UNCHANGED"));
Backmethod->append(M("GENERAL_UNCHANGED"));
Tilesmethod->append(M("GENERAL_UNCHANGED"));
complexmethod->append(M("GENERAL_UNCHANGED"));
daubcoeffmethod->append(M("GENERAL_UNCHANGED"));
CHmethod->append(M("GENERAL_UNCHANGED"));
Medgreinf->append(M("GENERAL_UNCHANGED"));

View File

@ -47,7 +47,6 @@ class Wavelet final :
public:
Wavelet();
~Wavelet() override;
bool wavComputed_();
void adjusterChanged(Adjuster* a, double newval) override;
void autoOpenCurve() override;
@ -102,6 +101,7 @@ private:
rtengine::ProcEvent EvWavrangeab;
rtengine::ProcEvent EvWavprotab;
rtengine::ProcEvent EvWavlevelshc;
rtengine::ProcEvent EvWavcomplexmet;
LabGrid *labgrid;
@ -121,6 +121,7 @@ private:
void LmethodChanged();
void MedgreinfChanged();
void TMmethodChanged();
void complexmethodChanged();
void TilesmethodChanged();
void avoidToggled();
void showmaskToggled ();
@ -143,7 +144,8 @@ private:
void ushamethodChanged();
void updateGUI();
void updateGUImaxlev();
void convertParamToNormal();
void updateGUIToMode(int mode);
void HSmethodUpdateUI();
void CHmethodUpdateUI();
// void CHSLmethodChangedUI();
@ -297,6 +299,8 @@ private:
sigc::connection CLmethodconn;
MyComboBoxText* const Backmethod;
sigc::connection Backmethodconn;
MyComboBoxText* const complexmethod;
sigc::connection complexmethodconn;
MyComboBoxText* const Tilesmethod;
sigc::connection Tilesmethodconn;
MyComboBoxText* const daubcoeffmethod;
@ -338,6 +342,8 @@ private:
Gtk::HBox* const neutrHBox;
Gtk::HBox* const usharpHBox;
Gtk::HBox* const ctboxch;
Gtk::VBox* const ctboxBA;// = Gtk::manage(new Gtk::VBox());
sigc::connection enableChromaConn, enableContrastConn, enableEdgeConn, enabletmConn, enableFinalConn, enableclariConn;
sigc::connection enableNoiseConn, enableResidConn, enableToningConn;