diff --git a/rtdata/languages/default b/rtdata/languages/default index 06a920fc1..d4e268a38 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1270,6 +1270,10 @@ 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_1026;Local - cbdl recovery threshold +HISTORY_MSG_1027;Local - cbdl threshold mask low +HISTORY_MSG_1028;Local - cbdl threshold mask high +HISTORY_MSG_1029;Local - cbdl decay HISTORY_MSG_BLSHAPE;Blur by level HISTORY_MSG_BLURCWAV;Blur chroma HISTORY_MSG_BLURWAV;Blur luminance @@ -2810,6 +2814,7 @@ 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_MASKRESCB_TOOLTIP;Used to modulate the effect of the CBDL (Luminance only) 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 CBDL settings \n In between these two areas, the full value of the CBDL 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 @@ -2817,6 +2822,7 @@ TP_LOCALLAB_MASKRELOG_TOOLTIP;Used to modulate the effect of the Log encoding se 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_MASKHIGTHRESCB_TOOLTIP;Light-tone limit above which CBDL (Luminance only) will be restored progressively to their original values prior to being modified by the CBDL 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 @@ -2833,6 +2839,7 @@ 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_MASKLOWTHRESCB_TOOLTIP;Dark-tone limit below which CBDL (Luminance only) will be restored progressively to their original values prior to being modified by the CBDL 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 diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 1e4609476..79c84f648 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -600,6 +600,10 @@ struct local_params { float lowthrv; float higthrv; float decayv; + float recothrcb; + float lowthrcb; + float higthrcb; + float decaycb; float recothrt; float lowthrt; float higthrt; @@ -1100,6 +1104,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_recothrcb = (float)locallab.spots.at(sp).recothrescb; + float local_lowthrcb = (float)locallab.spots.at(sp).lowthrescb; + float local_higthrcb = (float)locallab.spots.at(sp).higthresv; + float local_decaycb = (float)locallab.spots.at(sp).decaycb; + 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; @@ -1499,6 +1508,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.lowthrt = local_lowthrt; lp.higthrt = local_higthrt; lp.decayt = local_decayt; + lp.recothrcb = local_recothrcb; + lp.lowthrcb = local_lowthrcb; + lp.higthrcb = local_higthrcb; + lp.decaycb = local_decaycb; lp.recothrl = local_recothrl; lp.lowthrl = local_lowthrl; @@ -11989,6 +12002,16 @@ void ImProcFunctions::Lab_Local( if (lp.softradiuscb > 0.f) { softproc(origcbdl.get(), loctemp.get(), lp.softradiuscb, bfh, bfw, 0.001, 0.00001, 0.5f, sk, multiThread, 1); } + + if(lp.enacbMask && lp.recothrcb != 1.f) { + float hig = lp.higthrcb; + float low = lp.lowthrcb; + float recoth = lp.recothrcb; + float decay = lp.decaycb; + bool invmask = false; + maskrecov(loctemp.get(), original, bufmaskorigcb.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread); + } + } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 70787bef6..a324d7fe0 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -1048,6 +1048,10 @@ enum ProcEventCode { Evlocallablowthrest = 1022, Evlocallabhigthrest = 1023, Evlocallabdecayt = 1024, + Evlocallabrecothrescb = 1025, + Evlocallablowthrescb = 1026, + Evlocallabhigthrescb = 1027, + Evlocallabdecaycb = 1028, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index c787755cd..50a2f5c6c 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -3947,6 +3947,10 @@ LocallabParams::LocallabSpot::LocallabSpot() : 1.0, 1.0 }, + recothrescb(1.), + lowthrescb(12.), + higthrescb(85.), + decaycb(2.), // Log encoding visilog(false), explog(false), @@ -4644,6 +4648,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && slomaskcb == other.slomaskcb && lapmaskcb == other.lapmaskcb && Lmaskcbcurve == other.Lmaskcbcurve + && recothrescb == other.recothrescb + && lowthrescb == other.lowthrescb + && higthrescb == other.higthrescb + && decaycb == other.decaycb // Log encoding && visilog == other.visilog && explog == other.explog @@ -6270,6 +6278,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->slomaskcb, "Locallab", "Slomaskcb_" + index_str, spot.slomaskcb, keyFile); saveToKeyfile(!pedited || spot_edited->lapmaskcb, "Locallab", "Lapmaskcb_" + index_str, spot.lapmaskcb, keyFile); saveToKeyfile(!pedited || spot_edited->Lmaskcbcurve, "Locallab", "LmaskcbCurve_" + index_str, spot.Lmaskcbcurve, keyFile); + saveToKeyfile(!pedited || spot_edited->recothrescb, "Locallab", "Recothrescb_" + index_str, spot.recothrescb, keyFile); + saveToKeyfile(!pedited || spot_edited->lowthrescb, "Locallab", "Lowthrescb_" + index_str, spot.lowthrescb, keyFile); + saveToKeyfile(!pedited || spot_edited->higthrescb, "Locallab", "Higthrescb_" + index_str, spot.higthrescb, keyFile); + saveToKeyfile(!pedited || spot_edited->decaycb, "Locallab", "Decaycb_" + index_str, spot.decaycb, keyFile); } // Log encoding if ((!pedited || spot_edited->visilog) && spot.visilog) { @@ -8146,6 +8158,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Slomaskcb_" + index_str, pedited, spot.slomaskcb, spotEdited.slomaskcb); assignFromKeyfile(keyFile, "Locallab", "Lapmaskcb_" + index_str, pedited, spot.lapmaskcb, spotEdited.lapmaskcb); assignFromKeyfile(keyFile, "Locallab", "LmaskcbCurve_" + index_str, pedited, spot.Lmaskcbcurve, spotEdited.Lmaskcbcurve); + assignFromKeyfile(keyFile, "Locallab", "Recothrescb_" + index_str, pedited, spot.recothrescb, spotEdited.recothrescb); + assignFromKeyfile(keyFile, "Locallab", "Lowthrescb_" + index_str, pedited, spot.lowthrescb, spotEdited.lowthrescb); + assignFromKeyfile(keyFile, "Locallab", "Higthrescb_" + index_str, pedited, spot.higthrescb, spotEdited.higthrescb); + assignFromKeyfile(keyFile, "Locallab", "Decaycb_" + index_str, pedited, spot.decaycb, spotEdited.decaycb); // Log encoding spot.visilog = assignFromKeyfile(keyFile, "Locallab", "Explog_" + index_str, pedited, spot.explog, spotEdited.explog); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 0c9f35d17..c0ddfc0f0 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1460,6 +1460,10 @@ struct LocallabParams { double slomaskcb; double lapmaskcb; std::vector Lmaskcbcurve; + double recothrescb; + double lowthrescb; + double higthrescb; + double decaycb; // Log encoding bool visilog; bool explog; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 6eff2f9d6..0d08b253a 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -1051,7 +1051,11 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // Evlocallabrecothret LUMINANCECURVE, // Evlocallablowthrest LUMINANCECURVE, // Evlocallabhigthrest - LUMINANCECURVE // Evlocallabdecayt + LUMINANCECURVE, // Evlocallabdecayt + LUMINANCECURVE, // Evlocallabrecothrecb + LUMINANCECURVE, // Evlocallablowthrescb + LUMINANCECURVE, // Evlocallabhigthrescb + LUMINANCECURVE // Evlocallabdecaycb }; diff --git a/rtgui/locallabtools.h b/rtgui/locallabtools.h index 03ff4d68e..68fb80071 100644 --- a/rtgui/locallabtools.h +++ b/rtgui/locallabtools.h @@ -1209,6 +1209,13 @@ private: Adjuster* const contresid; Adjuster* const softradiuscb; Adjuster* const sensicb; + MyExpander* const exprecovcb; + Gtk::Label* const maskusablecb; + Gtk::Label* const maskunusablecb; + Adjuster* const recothrescb; + Adjuster* const lowthrescb; + Adjuster* const higthrescb; + Adjuster* const decaycb; MyExpander* const expmaskcb; MyComboBoxText* const showmaskcbMethod; Gtk::CheckButton* const enacbMask; diff --git a/rtgui/locallabtools2.cc b/rtgui/locallabtools2.cc index 5c22a6128..e4c0e6bad 100644 --- a/rtgui/locallabtools2.cc +++ b/rtgui/locallabtools2.cc @@ -4177,6 +4177,13 @@ LocallabCBDL::LocallabCBDL(): contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))), + exprecovcb(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))), + maskusablecb(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))), + maskunusablecb(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))), + recothrescb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))), + lowthrescb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))), + higthrescb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))), + decaycb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))), expmaskcb(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWCB")))), showmaskcbMethod(Gtk::manage(new MyComboBoxText())), enacbMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), @@ -4217,6 +4224,12 @@ LocallabCBDL::LocallabCBDL(): sensicb->setAdjusterListener(this); + recothrescb->setAdjusterListener(this); + lowthrescb->setAdjusterListener(this); + higthrescb->setAdjusterListener(this); + decaycb->setAdjusterListener(this); + setExpandAlignProperties(exprecovcb, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); @@ -4298,6 +4311,17 @@ LocallabCBDL::LocallabCBDL(): pack_start(*residFrame); pack_start(*softradiuscb); pack_start(*sensicb); + ToolParamBlock* const cbBox3 = Gtk::manage(new ToolParamBlock()); + cbBox3->pack_start(*maskusablecb, Gtk::PACK_SHRINK, 0); + cbBox3->pack_start(*maskunusablecb, Gtk::PACK_SHRINK, 0); + cbBox3->pack_start(*recothrescb); + cbBox3->pack_start(*lowthrescb); + cbBox3->pack_start(*higthrescb); + cbBox3->pack_start(*decaycb); + // colBox3->pack_start(*invmaskc); + exprecovcb->add(*cbBox3, false); + pack_start(*exprecovcb, false, false); + ToolParamBlock* const maskcbBox = Gtk::manage(new ToolParamBlock()); maskcbBox->pack_start(*showmaskcbMethod, Gtk::PACK_SHRINK, 4); maskcbBox->pack_start(*enacbMask, Gtk::PACK_SHRINK, 0); @@ -4346,6 +4370,7 @@ void LocallabCBDL::updateAdviceTooltips(const bool showTooltips) adj->set_tooltip_text(M("TP_LOCALLAB_CBDL_ADJ_TOOLTIP")); } + exprecovcb->set_tooltip_markup(M("TP_LOCALLAB_MASKRESCB_TOOLTIP")); chromacbdl->set_tooltip_text(M("TP_LOCALLAB_CHROMACB_TOOLTIP")); threshold->set_tooltip_text(M("TP_LOCALLAB_CBDL_THRES_TOOLTIP")); clarityml->set_tooltip_text(M("TP_LOCALLAB_CBDLCLARI_TOOLTIP")); @@ -4363,6 +4388,9 @@ void LocallabCBDL::updateAdviceTooltips(const bool showTooltips) chromaskcb->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP")); slomaskcb->set_tooltip_text(M("TP_LOCALLAB_SLOMASK_TOOLTIP")); lapmaskcb->set_tooltip_text(M("TP_LOCALLAB_LAPRAD1_TOOLTIP")); + decaycb->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP")); + lowthrescb->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESCB_TOOLTIP")); + higthrescb->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESCB_TOOLTIP")); } else { levFrame->set_tooltip_text(""); @@ -4387,11 +4415,16 @@ void LocallabCBDL::updateAdviceTooltips(const bool showTooltips) chromaskcb->set_tooltip_text(""); slomaskcb->set_tooltip_text(""); lapmaskcb->set_tooltip_text(""); + exprecovcb->set_tooltip_markup(""); + decaycb->set_tooltip_text(""); + lowthrescb->set_tooltip_text(""); + higthrescb->set_tooltip_text(""); } } void LocallabCBDL::setDefaultExpanderVisibility() { + exprecovcb->set_expanded(false); expmaskcb->set_expanded(false); } @@ -4457,6 +4490,10 @@ void LocallabCBDL::read(const rtengine::procparams::ProcParams* pp, const Params gammaskcb->setValue(spot.gammaskcb); slomaskcb->setValue(spot.slomaskcb); Lmaskcbshape->setCurve(spot.Lmaskcbcurve); + recothrescb->setValue((double)spot.recothrescb); + lowthrescb->setValue((double)spot.lowthrescb); + higthrescb->setValue((double)spot.higthrescb); + decaycb->setValue((double)spot.decaycb); } // Enable all listeners @@ -4500,6 +4537,10 @@ void LocallabCBDL::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped spot.gammaskcb = gammaskcb->getValue(); spot.slomaskcb = slomaskcb->getValue(); spot.Lmaskcbcurve = Lmaskcbshape->getCurve(); + spot.recothrescb = recothrescb->getValue(); + spot.lowthrescb = lowthrescb->getValue(); + spot.higthrescb = higthrescb->getValue(); + spot.decaycb = decaycb->getValue(); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -4529,6 +4570,10 @@ void LocallabCBDL::setDefaults(const rtengine::procparams::ProcParams* defParams chromaskcb->setDefault(defSpot.chromaskcb); gammaskcb->setDefault(defSpot.gammaskcb); slomaskcb->setDefault(defSpot.slomaskcb); + recothrescb->setDefault((double)defSpot.recothrescb); + lowthrescb->setDefault((double)defSpot.lowthrescb); + higthrescb->setDefault((double)defSpot.higthrescb); + decaycb->setDefault((double)defSpot.decaycb); } // Note: No need to manage pedited as batch mode is deactivated for Locallab @@ -4593,6 +4638,35 @@ void LocallabCBDL::adjusterChanged(Adjuster* a, double newval) } } + if (a == recothrescb) { + + if (listener) { + listener->panelChanged(Evlocallabrecothrescb, + recothrescb->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == lowthrescb) { + if (listener) { + listener->panelChanged(Evlocallablowthrescb, + lowthrescb->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == higthrescb) { + if (listener) { + listener->panelChanged(Evlocallabhigthrescb, + higthrescb->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + + if (a == decaycb) { + if (listener) { + listener->panelChanged(Evlocallabdecaycb, + decaycb->getTextValue() + " (" + escapeHtmlChars(spotName) + ")"); + } + } + if (a == blendmaskcb) { if (listener) { listener->panelChanged(Evlocallabblendmaskcb, @@ -4694,6 +4768,7 @@ void LocallabCBDL::convertParamToNormal() // Set hidden GUI widgets in Normal mode to default spot values lapmaskcb->setValue(defSpot.lapmaskcb); + decaycb->setValue(defSpot.decaycb); // Enable all listeners enableListener(); @@ -4719,6 +4794,10 @@ void LocallabCBDL::convertParamToSimple() // gammaskcb->setValue(defSpot.gammaskcb); // slomaskcb->setValue(defSpot.slomaskcb); // Lmaskcbshape->setCurve(defSpot.Lmaskcbcurve); + recothrescb->setValue(defSpot.recothrescb); + lowthrescb->setValue(defSpot.lowthrescb); + higthrescb->setValue(defSpot.higthrescb); + decaycb->setValue(defSpot.decaycb); // Enable all listers enableListener(); @@ -4731,6 +4810,10 @@ void LocallabCBDL::updateGUIToMode(const modeType new_type) // Expert and Normal mode widgets are hidden in Simple mode softradiuscb->hide(); expmaskcb->hide(); + exprecovcb->hide(); + decaycb->hide(); + maskusablecb->hide(); + maskunusablecb->hide(); break; @@ -4740,6 +4823,16 @@ void LocallabCBDL::updateGUIToMode(const modeType new_type) // Specific Simple mode widgets are shown in Normal mode softradiuscb->show(); expmaskcb->show(); + exprecovcb->show(); + decaycb->hide(); + if (enacbMask->get_active()) { + maskusablecb->show(); + maskunusablecb->hide(); + + } else { + maskusablecb->hide(); + maskunusablecb->show(); + } break; @@ -4748,6 +4841,16 @@ void LocallabCBDL::updateGUIToMode(const modeType new_type) softradiuscb->show(); expmaskcb->show(); lapmaskcb->show(); + exprecovcb->show(); + decaycb->show(); + if (enacbMask->get_active()) { + maskusablecb->show(); + maskunusablecb->hide(); + + } else { + maskusablecb->hide(); + maskunusablecb->show(); + } } } @@ -4782,6 +4885,14 @@ void LocallabCBDL::showmaskcbMethodChanged() void LocallabCBDL::enacbMaskChanged() { + if (enacbMask->get_active()) { + maskusablecb->show(); + maskunusablecb->hide(); + } else { + maskusablecb->hide(); + maskunusablecb->show(); + } + if (isLocActivated && exp->getEnabled()) { if (listener) { if (enacbMask->get_active()) { diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 0e7abb5d6..18a66453e 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1535,6 +1535,10 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).slomaskcb = locallab.spots.at(j).slomaskcb && pSpot.slomaskcb == otherSpot.slomaskcb; locallab.spots.at(j).lapmaskcb = locallab.spots.at(j).lapmaskcb && pSpot.lapmaskcb == otherSpot.lapmaskcb; locallab.spots.at(j).Lmaskcbcurve = locallab.spots.at(j).Lmaskcbcurve && pSpot.Lmaskcbcurve == otherSpot.Lmaskcbcurve; + locallab.spots.at(j).recothrescb = locallab.spots.at(j).recothrescb && pSpot.recothrescb == otherSpot.recothrescb; + locallab.spots.at(j).lowthrescb = locallab.spots.at(j).lowthrescb && pSpot.lowthrescb == otherSpot.lowthrescb; + locallab.spots.at(j).higthrescb = locallab.spots.at(j).higthrescb && pSpot.higthrescb == otherSpot.higthrescb; + locallab.spots.at(j).decaycb = locallab.spots.at(j).decaycb && pSpot.decaycb == otherSpot.decaycb; // Log encoding locallab.spots.at(j).visilog = locallab.spots.at(j).visilog && pSpot.visilog == otherSpot.visilog; locallab.spots.at(j).explog = locallab.spots.at(j).explog && pSpot.explog == otherSpot.explog; @@ -5072,6 +5076,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).Lmaskcbcurve = mods.locallab.spots.at(i).Lmaskcbcurve; } + if (locallab.spots.at(i).recothrescb) { + toEdit.locallab.spots.at(i).recothrescb = mods.locallab.spots.at(i).recothrescb; + } + + if (locallab.spots.at(i).lowthrescb) { + toEdit.locallab.spots.at(i).lowthrescb = mods.locallab.spots.at(i).lowthrescb; + } + + if (locallab.spots.at(i).higthrescb) { + toEdit.locallab.spots.at(i).higthrescb = mods.locallab.spots.at(i).higthrescb; + } + + if (locallab.spots.at(i).decaycb) { + toEdit.locallab.spots.at(i).decaycb = mods.locallab.spots.at(i).decaycb; + } + // Log encoding if (locallab.spots.at(i).visilog) { toEdit.locallab.spots.at(i).visilog = mods.locallab.spots.at(i).visilog; @@ -7030,6 +7050,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : slomaskcb(v), lapmaskcb(v), Lmaskcbcurve(v), + recothrescb(v), + lowthrescb(v), + higthrescb(v), + decaycb(v), // Log encoding visilog(v), explog(v), @@ -7591,6 +7615,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) slomaskcb = v; lapmaskcb = v; Lmaskcbcurve = v; + recothrescb = v; + lowthrescb = v; + higthrescb = v; + decaycb = v; // Log encoding visilog = v; explog = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 0fea0406a..d684db7be 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -868,6 +868,10 @@ public: bool slomaskcb; bool lapmaskcb; bool Lmaskcbcurve; + bool recothrescb; + bool lowthrescb; + bool higthrescb; + bool decaycb; // Log encoding bool visilog; bool explog;