diff --git a/rtdata/languages/default b/rtdata/languages/default index 3b7e026f0..06a920fc1 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1266,6 +1266,10 @@ HISTORY_MSG_1018;Local - lc threshold mask low HISTORY_MSG_1019;Local - lc threshold mask high HISTORY_MSG_1020;Local - lc decay HISTORY_MSG_1021;Local - Denoise chrominance gray +HISTORY_MSG_1022;Local - TM recovery threshold +HISTORY_MSG_1023;Local - TM threshold mask low +HISTORY_MSG_1024;Local - TM threshold mask high +HISTORY_MSG_1025;Local - TM decay HISTORY_MSG_BLSHAPE;Blur by level HISTORY_MSG_BLURCWAV;Blur chroma HISTORY_MSG_BLURWAV;Blur luminance @@ -2806,15 +2810,16 @@ TP_LOCALLAB_MASKGF_TOOLTIP;Used to direct the Guided Filter based on the image l TP_LOCALLAB_MASKRECOL_TOOLTIP;Used to modulate the effect of the Color and Light settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Color and Light settings \n In between these two areas, the full value of the Color and Light settings will be applied TP_LOCALLAB_MASKREEXP_TOOLTIP;Used to modulate the effect of the 'Dynamic range and Exposure' settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the 'Dynamic range and Exposure' settings \n In between these two areas, the full value of the 'Dynamic range and Exposure' settings will be applied TP_LOCALLAB_MASKRESH_TOOLTIP;Used to modulate the effect of the Shadows Highlights settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Shadows Highlights settings \n In between these two areas, the full value of the Shadows Highlights settings will be applied +TP_LOCALLAB_MASKRESTM_TOOLTIP;Used to modulate the effect of the Tone Mapping settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Tone Mapping settings \n In between these two areas, the full value of the Tone Mapping settings will be applied TP_LOCALLAB_MASKRESVIB_TOOLTIP;Used to modulate the effect of the Vibrance and Warm Cool settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Vibrance and Warm Cool settings \n In between these two areas, the full value of the Vibrance and Warm Cool settings will be applied TP_LOCALLAB_MASKRESWAV_TOOLTIP;Used to modulate the effect of the Local contrast and Wavelet settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Local contrast and Wavelet settings \n In between these two areas, the full value of the Local contrast and Wavelet settings will be applied TP_LOCALLAB_MASKRELOG_TOOLTIP;Used to modulate the effect of the Log encoding settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The ‘dark’ and ‘light’ areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Log encoding settings - can be used to restore highlights reconstructed by Color propagation \n In between these two areas, the full value of the Log encoding settings will be applied TP_LOCALLAB_MASKDEINV_TOOLTIP;Reverses the way the algorithm interprets the mask.\nIf checked black and very light areas will be decreased. TP_LOCALLAB_MASKHIGTHRESC_TOOLTIP;Light-tone limit above which Color and Light will be restored progressively to their original values prior to being modified by the Color and Light settings .\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘structure mask’, 'Blur mask', ‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’, ‘Local contrast wavelet’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 TP_LOCALLAB_MASKHIGTHRESS_TOOLTIP;Light-tone limit above which Shadows Highlights will be restored progressively to their original values prior to being modified by the Shadows Highlights settings .\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 +TP_LOCALLAB_MASKHIGTHRESTM_TOOLTIP;Light-tone limit above which Tone Mapping will be restored progressively to their original values prior to being modified by the Tone Mapping settings .\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 TP_LOCALLAB_MASKHIGTHRESVIB_TOOLTIP;Light-tone limit above which Vibrance and Warm Cool will be restored progressively to their original values prior to being modified by the Vibrance and Warm Cool settings .\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 TP_LOCALLAB_MASKHIGTHRESWAV_TOOLTIP;Light-tone limit above which Local contrast and Wavelet will be restored progressively to their original values prior to being modified by the Local contrast and Wavelet settings .\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 - TP_LOCALLAB_MASKHIGTHRESE_TOOLTIP;Light-tone limit above which 'Dynamic range and Exposure' will be restored progressively to their original values prior to being modified by the 'Dynamic range and Exposure' settings .\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 TP_LOCALLAB_MASKHIGTHRESL_TOOLTIP;Light-tone limit above which Log encoding will be restored progressively to their original values prior to being modified by the Log encoding settings .\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 TP_LOCALLAB_MASKHIGTHRESD_TOOLTIP;Light-tone limit above which denoise will be progressively applied.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘structure mask’, ‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’, ‘Local contrast wavelet’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 @@ -2828,12 +2833,11 @@ TP_LOCALLAB_MASKLOWTHRESC_TOOLTIP;Dark-tone limit below which Color and Light wi TP_LOCALLAB_MASKLOWTHRESL_TOOLTIP;Dark-tone limit below which Log encoding will be restored progressively to their original values prior to being modified by the Log encoding settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels:‘Smooth radius’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 TP_LOCALLAB_MASKLOWTHRESE_TOOLTIP;Dark-tone limit below which 'Dynamic range and Exposure' will be restored progressively to their original values prior to being modified by the 'Dynamic range and Exposure' settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 TP_LOCALLAB_MASKLOWTHRESS_TOOLTIP;Dark-tone limit below which Shadows Highligts will be restored progressively to their original values prior to being modified by the Shadows Highlights settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 +TP_LOCALLAB_MASKLOWTHRESTM_TOOLTIP;Dark-tone limit below which Tone Mapping will be restored progressively to their original values prior to being modified by the Tone Mapping settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 TP_LOCALLAB_MASKLOWTHRESVIB_TOOLTIP;Dark-tone limit below which Vibrance and Warm Cool will be restored progressively to their original values prior to being modified by the Vibrance and Warm Cool settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 TP_LOCALLAB_MASKLOWTHRESWAV_TOOLTIP;Dark-tone limit below which Local contrast and Wavelet will be restored progressively to their original values prior to being modified by the Local contrast and Wavelet settings.\n You can use certain tools in ‘Mask and modifications’ to change the gray levels: ‘Smooth radius’, ‘Gamma and slope’, ‘Contrast curve’.\n Use a ‘lockable color picker’ on the mask to see which areas will be affected. Be carefull in 'settings' to Background color mask = 0 - TP_LOCALLAB_MASKLCTHRMID;Gray area luminance denoise TP_LOCALLAB_MASKLCTHRMIDCH;Gray area chrominance denoise - TP_LOCALLAB_MASKUSABLE;Mask enabled (Mask & modifications) TP_LOCALLAB_MASKUNUSABLE;Mask disabled (Mask & modifications) TP_LOCALLAB_MASKRECOTHRES;Recovery threshold diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index e9032ae22..1e4609476 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -600,6 +600,10 @@ struct local_params { float lowthrv; float higthrv; float decayv; + float recothrt; + float lowthrt; + float higthrt; + float decayt; float recothrw; float lowthrw; float higthrw; @@ -1096,6 +1100,11 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float local_higthrv = (float)locallab.spots.at(sp).higthresv; float local_decayv = (float)locallab.spots.at(sp).decayv; + float local_recothrt = (float)locallab.spots.at(sp).recothrest; + float local_lowthrt = (float)locallab.spots.at(sp).lowthrest; + float local_higthrt = (float)locallab.spots.at(sp).higthrest; + float local_decayt = (float)locallab.spots.at(sp).decayt; + float local_recothrw = (float)locallab.spots.at(sp).recothresw; float local_lowthrw = (float)locallab.spots.at(sp).lowthresw; float local_higthrw = (float)locallab.spots.at(sp).higthresw; @@ -1486,6 +1495,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.lowthrw = local_lowthrw; lp.higthrw = local_higthrw; lp.decayw = local_decayw; + lp.recothrt = local_recothrt; + lp.lowthrt = local_lowthrt; + lp.higthrt = local_higthrt; + lp.decayt = local_decayt; lp.recothrl = local_recothrl; lp.lowthrl = local_lowthrl; @@ -12493,6 +12506,15 @@ void ImProcFunctions::Lab_Local( } } + if(lp.enatmMask && lp.recothrt != 1.f) { + float hig = lp.higthrt; + float low = lp.lowthrt; + float recoth = lp.recothrt; + float decay = lp.decayt; + bool invmask = false; + maskrecov(tmp1.get(), original, bufmaskorigtm.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } + // transit_shapedetect_retinex(call, 4, bufgb.get(),bufmaskorigtm.get(), originalmasktm.get(), buflight, bufchro, hueref, chromaref, lumaref, lp, original, transformed, cx, cy, sk); transit_shapedetect2(call, 8, bufgb.get(), tmp1.get(), originalmasktm.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 65a9d5b81..70787bef6 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -1044,6 +1044,10 @@ enum ProcEventCode { Evlocallabhigthresw = 1018, Evlocallabdecayw = 1019, Evlocallabmidthresdch = 1020, + Evlocallabrecothrest = 1021, + Evlocallablowthrest = 1022, + Evlocallabhigthrest = 1023, + Evlocallabdecayt = 1024, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 4dd2c1d85..c787755cd 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -3546,6 +3546,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : 1.0, 1.0 }, + recothrest(1.), + lowthrest(12.), + higthrest(85.), + decayt(2.), // Retinex visireti(false), expreti(false), @@ -4479,6 +4483,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && slomasktm == other.slomasktm && lapmasktm == other.lapmasktm && Lmasktmcurve == other.Lmasktmcurve + && recothrest == other.recothrest + && lowthrest == other.lowthrest + && higthrest == other.higthrest + && decayt == other.decayt // Retinex && visireti == other.visireti && expreti == other.expreti @@ -6101,6 +6109,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->slomasktm, "Locallab", "Slomasktm_" + index_str, spot.slomasktm, keyFile); saveToKeyfile(!pedited || spot_edited->lapmasktm, "Locallab", "Lapmasktm_" + index_str, spot.lapmasktm, keyFile); saveToKeyfile(!pedited || spot_edited->Lmasktmcurve, "Locallab", "LmasktmCurve_" + index_str, spot.Lmasktmcurve, keyFile); + saveToKeyfile(!pedited || spot_edited->recothrest, "Locallab", "Recothrest_" + index_str, spot.recothrest, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthrest, "Locallab", "Lowthrest_" + index_str, spot.lowthrest, keyFile); + saveToKeyfile(!pedited || spot_edited->higthrest, "Locallab", "Higthrest_" + index_str, spot.higthrest, keyFile); + saveToKeyfile(!pedited || spot_edited->decayt, "Locallab", "Decayt_" + index_str, spot.decayt, keyFile); } // Retinex if ((!pedited || spot_edited->visireti) && spot.visireti) { @@ -7950,6 +7962,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Slomasktm_" + index_str, pedited, spot.slomasktm, spotEdited.slomasktm); assignFromKeyfile(keyFile, "Locallab", "Lapmasktm_" + index_str, pedited, spot.lapmasktm, spotEdited.lapmasktm); assignFromKeyfile(keyFile, "Locallab", "LmasktmCurve_" + index_str, pedited, spot.Lmasktmcurve, spotEdited.Lmasktmcurve); + assignFromKeyfile(keyFile, "Locallab", "Recothrest_" + index_str, pedited, spot.recothrest, spotEdited.recothrest); + assignFromKeyfile(keyFile, "Locallab", "Lowthrest_" + index_str, pedited, spot.lowthrest, spotEdited.lowthrest); + assignFromKeyfile(keyFile, "Locallab", "Higthrest_" + index_str, pedited, spot.higthrest, spotEdited.higthrest); + assignFromKeyfile(keyFile, "Locallab", "Decayt_" + index_str, pedited, spot.decayt, spotEdited.decayt); // Retinex spot.visireti = assignFromKeyfile(keyFile, "Locallab", "Expreti_" + index_str, pedited, spot.expreti, spotEdited.expreti); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index bc9d212e9..0c9f35d17 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1307,6 +1307,10 @@ struct LocallabParams { double slomasktm; double lapmasktm; std::vector Lmasktmcurve; + double recothrest; + double lowthrest; + double higthrest; + double decayt; // Retinex bool visireti; bool expreti; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 9b3fd2365..6eff2f9d6 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -1047,7 +1047,11 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // Evlocallablowthresw LUMINANCECURVE, // Evlocallabhigthresw LUMINANCECURVE, // Evlocallabdecayw - LUMINANCECURVE // Evlocallabmidthresdch + LUMINANCECURVE, // Evlocallabmidthresdch + LUMINANCECURVE, // Evlocallabrecothret + LUMINANCECURVE, // Evlocallablowthrest + LUMINANCECURVE, // Evlocallabhigthrest + LUMINANCECURVE // Evlocallabdecayt }; diff --git a/rtgui/locallabtools.h b/rtgui/locallabtools.h index 9d17c2eec..03ff4d68e 100644 --- a/rtgui/locallabtools.h +++ b/rtgui/locallabtools.h @@ -834,6 +834,13 @@ private: Adjuster* const rewei; Adjuster* const softradiustm; Adjuster* const sensitm; + MyExpander* const exprecovt; + Gtk::Label* const maskusablet; + Gtk::Label* const maskunusablet; + Adjuster* const recothrest; + Adjuster* const lowthrest; + Adjuster* const higthrest; + Adjuster* const decayt; MyExpander* const expmasktm; MyComboBoxText* const showmasktmMethod; Gtk::CheckButton* const enatmMask; diff --git a/rtgui/locallabtools2.cc b/rtgui/locallabtools2.cc index 31015735d..5c22a6128 100644 --- a/rtgui/locallabtools2.cc +++ b/rtgui/locallabtools2.cc @@ -128,6 +128,13 @@ LocallabTone::LocallabTone(): rewei(Gtk::manage(new Adjuster(M("TP_LOCALLAB_REWEI"), 0, 3, 1, 0))), softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), sensitm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), + exprecovt(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusablet(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusablet(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothrest(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthrest(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthrest(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decayt(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), expmasktm(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWT")))), showmasktmMethod(Gtk::manage(new MyComboBoxText())), enatmMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), @@ -169,6 +176,12 @@ LocallabTone::LocallabTone(): sensitm->setAdjusterListener(this); + recothrest->setAdjusterListener(this); + lowthrest->setAdjusterListener(this); + higthrest->setAdjusterListener(this); + decayt->setAdjusterListener(this); + setExpandAlignProperties(exprecovt, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + setExpandAlignProperties(expmasktm, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); showmasktmMethod->append(M("TP_LOCALLAB_SHOWMNONE")); @@ -231,6 +244,17 @@ LocallabTone::LocallabTone(): pack_start(*rewei); // pack_start(*softradiustm); // Always bad with TM ?? pack_start(*sensitm); + ToolParamBlock* const tmBox3 = Gtk::manage(new ToolParamBlock()); + tmBox3->pack_start(*maskusablet, Gtk::PACK_SHRINK, 0); + tmBox3->pack_start(*maskunusablet, Gtk::PACK_SHRINK, 0); + tmBox3->pack_start(*recothrest); + tmBox3->pack_start(*lowthrest); + tmBox3->pack_start(*higthrest); + tmBox3->pack_start(*decayt); + // colBox3->pack_start(*invmaskc); + exprecovt->add(*tmBox3, false); + pack_start(*exprecovt, false, false); + ToolParamBlock* const masktmBox = Gtk::manage(new ToolParamBlock()); masktmBox->pack_start(*showmasktmMethod, Gtk::PACK_SHRINK, 4); masktmBox->pack_start(*enatmMask, Gtk::PACK_SHRINK, 0); @@ -274,6 +298,7 @@ void LocallabTone::updateAdviceTooltips(const bool showTooltips) { if (showTooltips) { exp->set_tooltip_text(M("TP_LOCALLAB_TONEMAP_TOOLTIP")); + exprecovt->set_tooltip_markup(M("TP_LOCALLAB_MASKRESTM_TOOLTIP")); equiltm->set_tooltip_text(M("TP_LOCALLAB_EQUILTM_TOOLTIP")); gamma->set_tooltip_text(M("TP_LOCALLAB_TONEMAPGAM_TOOLTIP")); estop->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP")); @@ -293,6 +318,9 @@ void LocallabTone::updateAdviceTooltips(const bool showTooltips) chromasktm->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP")); slomasktm->set_tooltip_text(M("TP_LOCALLAB_SLOMASK_TOOLTIP")); lapmasktm->set_tooltip_text(M("TP_LOCALLAB_LAPRAD1_TOOLTIP")); + decayt->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthrest->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESTM_TOOLTIP")); + higthrest->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESTM_TOOLTIP")); } else { exp->set_tooltip_text(""); @@ -317,11 +345,16 @@ void LocallabTone::updateAdviceTooltips(const bool showTooltips) chromasktm->set_tooltip_text(""); slomasktm->set_tooltip_text(""); lapmasktm->set_tooltip_text(""); + exprecovt->set_tooltip_markup(""); + decayt->set_tooltip_text(""); + lowthrest->set_tooltip_text(""); + higthrest->set_tooltip_text(""); } } void LocallabTone::setDefaultExpanderVisibility() { + exprecovt->set_expanded(false); expmasktm->set_expanded(false); } @@ -384,6 +417,10 @@ void LocallabTone::read(const rtengine::procparams::ProcParams* pp, const Params gammasktm->setValue(spot.gammasktm); slomasktm->setValue(spot.slomasktm); Lmasktmshape->setCurve(spot.Lmasktmcurve); + recothrest->setValue((double)spot.recothrest); + lowthrest->setValue((double)spot.lowthrest); + higthrest->setValue((double)spot.higthrest); + decayt->setValue((double)spot.decayt); } // Enable all listeners @@ -428,6 +465,10 @@ void LocallabTone::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped spot.gammasktm = gammasktm->getValue(); spot.slomasktm = slomasktm->getValue(); spot.Lmasktmcurve = Lmasktmshape->getCurve(); + spot.recothrest = recothrest->getValue(); + spot.lowthrest = lowthrest->getValue(); + spot.higthrest = higthrest->getValue(); + spot.decayt = decayt->getValue(); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -456,6 +497,10 @@ void LocallabTone::setDefaults(const rtengine::procparams::ProcParams* defParams chromasktm->setDefault(defSpot.chromasktm); gammasktm->setDefault(defSpot.gammasktm); slomasktm->setDefault(defSpot.slomasktm); + recothrest->setDefault((double)defSpot.recothrest); + lowthrest->setDefault((double)defSpot.lowthrest); + higthrest->setDefault((double)defSpot.higthrest); + decayt->setDefault((double)defSpot.decayt); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -496,6 +541,14 @@ void LocallabTone::adjusterChanged(Adjuster* a, double newval) listener->panelChanged(Evlocallabgammasktm, gammasktm->getTextValue() + spName); } else if (a == slomasktm) { listener->panelChanged(Evlocallabslomasktm, slomasktm->getTextValue() + spName); + } else if (a == recothrest) { + listener->panelChanged(Evlocallabrecothrest, recothrest->getTextValue() + spName); + } else if (a == lowthrest) { + listener->panelChanged(Evlocallablowthrest, lowthrest->getTextValue() + spName); + } else if (a == higthrest) { + listener->panelChanged(Evlocallabhigthrest, higthrest->getTextValue() + spName); + } else if (a == decayt) { + listener->panelChanged(Evlocallabdecayt, decayt->getTextValue() + spName); } } } @@ -562,6 +615,10 @@ void LocallabTone::convertParamToSimple() // radmasktm->setValue(defSpot.radmasktm); // chromasktm->setValue(defSpot.chromasktm); // Lmasktmshape->setCurve(defSpot.Lmasktmcurve); + recothrest->setValue(defSpot.recothrest); + lowthrest->setValue(defSpot.lowthrest); + higthrest->setValue(defSpot.higthrest); + decayt->setValue(defSpot.decayt); // Enable all listeners enableListener(); @@ -576,6 +633,10 @@ void LocallabTone::updateGUIToMode(const modeType new_type) satur->hide(); rewei->hide(); expmasktm->hide(); + exprecovt->hide(); + decayt->hide(); + maskusablet->hide(); + maskunusablet->hide(); break; @@ -589,6 +650,16 @@ void LocallabTone::updateGUIToMode(const modeType new_type) slomasktm->hide(); // Specific Simple mode widgets are shown in Normal mode expmasktm->show(); + exprecovt->show(); + decayt->hide(); + if (enatmMask->get_active()) { + maskusablet->show(); + maskunusablet->hide(); + + } else { + maskusablet->hide(); + maskunusablet->show(); + } break; @@ -601,6 +672,16 @@ void LocallabTone::updateGUIToMode(const modeType new_type) lapmasktm->show(); gammasktm->show(); slomasktm->show(); + exprecovt->show(); + decayt->show(); + if (enatmMask->get_active()) { + maskusablet->show(); + maskunusablet->hide(); + + } else { + maskusablet->hide(); + maskunusablet->show(); + } } } @@ -650,6 +731,14 @@ void LocallabTone::showmasktmMethodChanged() void LocallabTone::enatmMaskChanged() { + if (enatmMask->get_active()) { + maskusablet->show(); + maskunusablet->hide(); + } else { + maskusablet->hide(); + maskunusablet->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enatmMask->get_active()) { diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 102d6b499..0e7abb5d6 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1378,6 +1378,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).slomasktm = locallab.spots.at(j).slomasktm && pSpot.slomasktm == otherSpot.slomasktm; locallab.spots.at(j).lapmasktm = locallab.spots.at(j).lapmasktm && pSpot.lapmasktm == otherSpot.lapmasktm; locallab.spots.at(j).Lmasktmcurve = locallab.spots.at(j).Lmasktmcurve && pSpot.Lmasktmcurve == otherSpot.Lmasktmcurve; + locallab.spots.at(j).recothrest = locallab.spots.at(j).recothrest && pSpot.recothrest == otherSpot.recothrest; + locallab.spots.at(j).lowthrest = locallab.spots.at(j).lowthrest && pSpot.lowthrest == otherSpot.lowthrest; + locallab.spots.at(j).higthrest = locallab.spots.at(j).higthrest && pSpot.higthrest == otherSpot.higthrest; + locallab.spots.at(j).decayt = locallab.spots.at(j).decayt && pSpot.decayt == otherSpot.decayt; // Retinex locallab.spots.at(j).visireti = locallab.spots.at(j).visireti && pSpot.visireti == otherSpot.visireti; locallab.spots.at(j).expreti = locallab.spots.at(j).expreti && pSpot.expreti == otherSpot.expreti; @@ -4465,6 +4469,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).Lmasktmcurve = mods.locallab.spots.at(i).Lmasktmcurve; } + if (locallab.spots.at(i).recothrest) { + toEdit.locallab.spots.at(i).recothrest = mods.locallab.spots.at(i).recothrest; + } + + if (locallab.spots.at(i).lowthrest) { + toEdit.locallab.spots.at(i).lowthrest = mods.locallab.spots.at(i).lowthrest; + } + + if (locallab.spots.at(i).higthrest) { + toEdit.locallab.spots.at(i).higthrest = mods.locallab.spots.at(i).higthrest; + } + + if (locallab.spots.at(i).decayt) { + toEdit.locallab.spots.at(i).decayt = mods.locallab.spots.at(i).decayt; + } + // Retinex if (locallab.spots.at(i).visireti) { toEdit.locallab.spots.at(i).visireti = mods.locallab.spots.at(i).visireti; @@ -6857,6 +6877,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : slomasktm(v), lapmasktm(v), Lmasktmcurve(v), + recothrest(v), + lowthrest(v), + higthrest(v), + decayt(v), // Retinex visireti(v), expreti(v), @@ -7410,6 +7434,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) slomasktm = v; lapmasktm = v; Lmasktmcurve = v; + recothrest = v; + lowthrest = v; + higthrest = v; + decayt = v; // Retinex visireti = v; expreti = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index b56fea35b..0fea0406a 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -715,6 +715,10 @@ public: bool slomasktm; bool lapmasktm; bool Lmasktmcurve; + bool recothrest; + bool lowthrest; + bool higthrest; + bool decayt; // Retinex bool visireti; bool expreti;