Local adjustment - local contrast - wavelet - Recovery based on luminance mask (#6057)

* LA GUI Lc and Wavelet - recovery based on luminance mask

* Enable LA Lc wavelet Recovery based on luminance mask
This commit is contained in:
Desmis 2021-01-12 15:14:56 +01:00 committed by GitHub
parent 0ba18ab687
commit 8037457a8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 214 additions and 2 deletions

View File

@ -1261,6 +1261,10 @@ HISTORY_MSG_1013;Local - vib recovery threshold
HISTORY_MSG_1014;Local - vib threshold mask low
HISTORY_MSG_1015;Local - vib threshold mask high
HISTORY_MSG_1016;Local - vib decay
HISTORY_MSG_1017;Local - lc recovery threshold
HISTORY_MSG_1018;Local - lc threshold mask low
HISTORY_MSG_1019;Local - lc threshold mask high
HISTORY_MSG_1020;Local - lc decay
HISTORY_MSG_BLSHAPE;Blur by level
HISTORY_MSG_BLURCWAV;Blur chroma
HISTORY_MSG_BLURWAV;Blur luminance
@ -2802,11 +2806,14 @@ TP_LOCALLAB_MASKRECOL_TOOLTIP;Used to modulate the effect of the Color and Light
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_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_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
@ -2820,7 +2827,8 @@ 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_MASKLOWTHRESVIB_TOOLTIP;Dark-tone limit below which Vibrance and Wram 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_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 denoise
TP_LOCALLAB_MASKUSABLE;Mask enabled (Mask & modifications)

View File

@ -599,6 +599,10 @@ struct local_params {
float lowthrv;
float higthrv;
float decayv;
float recothrw;
float lowthrw;
float higthrw;
float decayw;
float recothrs;
float lowthrs;
float higthrs;
@ -1090,6 +1094,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_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;
float local_decayw = (float)locallab.spots.at(sp).decayw;
float local_recothrs = (float)locallab.spots.at(sp).recothress;
float local_lowthrs = (float)locallab.spots.at(sp).lowthress;
float local_higthrs = (float)locallab.spots.at(sp).higthress;
@ -1470,6 +1479,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.lowthrv = local_lowthrv;
lp.higthrv = local_higthrv;
lp.decayv = local_decayv;
lp.recothrw = local_recothrw;
lp.lowthrw = local_lowthrw;
lp.higthrw = local_higthrw;
lp.decayw = local_decayw;
lp.recothrl = local_recothrl;
lp.lowthrl = local_lowthrl;
@ -13289,6 +13302,14 @@ void ImProcFunctions::Lab_Local(
}
}
if(lp.enalcMask && lp.recothrw != 1.f) {
float hig = lp.higthrw;
float low = lp.lowthrw;
float recoth = lp.recothrw;
float decay = lp.decayw;
bool invmask = false;
maskrecov(tmp1.get(), original, bufmaskoriglc.get(), bfh, bfw, ystart, xstart, hig, low, recoth, decay, invmask, sk, multiThread);
}
transit_shapedetect2(call, 10, bufgb.get(), tmp1.get(), originalmasklc.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk);
tmp1.reset();

View File

@ -1039,6 +1039,10 @@ enum ProcEventCode {
Evlocallablowthresv = 1013,
Evlocallabhigthresv = 1014,
Evlocallabdecayv = 1015,
Evlocallabrecothresw = 1016,
Evlocallablowthresw = 1017,
Evlocallabhigthresw = 1018,
Evlocallabdecayw = 1019,
NUMOFEVENTS
};

View File

@ -3868,6 +3868,10 @@ LocallabParams::LocallabSpot::LocallabSpot() :
1.0,
1.0
},
recothresw(1.),
lowthresw(12.),
higthresw(85.),
decayw(2.),
// Contrast by detail levels
visicbdl(false),
expcbdl(false),
@ -4596,6 +4600,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& radmasklc == other.radmasklc
&& chromasklc == other.chromasklc
&& Lmasklccurve == other.Lmasklccurve
&& recothresw == other.recothresw
&& lowthresw == other.lowthresw
&& higthresw == other.higthresw
&& decayw == other.decayw
// Contrast by detail levels
&& visicbdl == other.visicbdl
&& expcbdl == other.expcbdl
@ -6216,6 +6224,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->radmasklc, "Locallab", "Radmasklc_" + index_str, spot.radmasklc, keyFile);
saveToKeyfile(!pedited || spot_edited->chromasklc, "Locallab", "Chromasklc_" + index_str, spot.chromasklc, keyFile);
saveToKeyfile(!pedited || spot_edited->Lmasklccurve, "Locallab", "LmasklcCurve_" + index_str, spot.Lmasklccurve, keyFile);
saveToKeyfile(!pedited || spot_edited->recothresw, "Locallab", "Recothresw_" + index_str, spot.recothresw, keyFile);
saveToKeyfile(!pedited || spot_edited->lowthresw, "Locallab", "Lowthresw_" + index_str, spot.lowthresw, keyFile);
saveToKeyfile(!pedited || spot_edited->higthresw, "Locallab", "Higthresw_" + index_str, spot.higthresw, keyFile);
saveToKeyfile(!pedited || spot_edited->decayw, "Locallab", "Decayw_" + index_str, spot.decayw, keyFile);
}
// Contrast by detail levels
if ((!pedited || spot_edited->visicbdl) && spot.visicbdl) {
@ -8080,6 +8092,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Radmasklc_" + index_str, pedited, spot.radmasklc, spotEdited.radmasklc);
assignFromKeyfile(keyFile, "Locallab", "Chromasklc_" + index_str, pedited, spot.chromasklc, spotEdited.chromasklc);
assignFromKeyfile(keyFile, "Locallab", "LmasklcCurve_" + index_str, pedited, spot.Lmasklccurve, spotEdited.Lmasklccurve);
assignFromKeyfile(keyFile, "Locallab", "Recothresw_" + index_str, pedited, spot.recothresw, spotEdited.recothresw);
assignFromKeyfile(keyFile, "Locallab", "Lowthresw_" + index_str, pedited, spot.lowthresw, spotEdited.lowthresw);
assignFromKeyfile(keyFile, "Locallab", "Higthresw_" + index_str, pedited, spot.higthresw, spotEdited.higthresw);
assignFromKeyfile(keyFile, "Locallab", "Decayw_" + index_str, pedited, spot.decayw, spotEdited.decayw);
// Contrast by detail levels
spot.visicbdl = assignFromKeyfile(keyFile, "Locallab", "Expcbdl_" + index_str, pedited, spot.expcbdl, spotEdited.expcbdl);

View File

@ -1429,6 +1429,10 @@ struct LocallabParams {
double radmasklc;
double chromasklc;
std::vector<double> Lmasklccurve;
double recothresw;
double lowthresw;
double higthresw;
double decayw;
// Contrast by detail levels
bool visicbdl;
bool expcbdl;

View File

@ -1042,7 +1042,11 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, // Evlocallabrecothrev
LUMINANCECURVE, // Evlocallablowthresv
LUMINANCECURVE, // Evlocallabhigthresv
LUMINANCECURVE // Evlocallabdecayv
LUMINANCECURVE, // Evlocallabdecayv
LUMINANCECURVE, // Evlocallabrecothrew
LUMINANCECURVE, // Evlocallablowthresw
LUMINANCECURVE, // Evlocallabhigthresw
LUMINANCECURVE // Evlocallabdecayw
};

View File

@ -1111,6 +1111,13 @@ private:
FlatCurveEditor* const wavshapecomp;
Adjuster* const fatres;
Gtk::CheckButton* const fftwlc;
MyExpander* const exprecovw;
Gtk::Label* const maskusablew;
Gtk::Label* const maskunusablew;
Adjuster* const recothresw;
Adjuster* const lowthresw;
Adjuster* const higthresw;
Adjuster* const decayw;
MyExpander* const expmasklc;
MyComboBoxText* const showmasklcMethod;
Gtk::CheckButton* const enalcMask;

View File

@ -2169,6 +2169,14 @@ LocallabContrast::LocallabContrast():
wavshapecomp(static_cast<FlatCurveEditor*>(LocalcurveEditorwavcomp->addCurve(CT_Flat, "", nullptr, false, false))),
fatres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATRES"), 0., 100., 1., 0.))),
fftwlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW")))),
exprecovw(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))),
maskusablew(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))),
maskunusablew(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))),
recothresw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKRECOTHRES"), 1., 2., 0.01, 1.))),
lowthresw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 80., 0.5, 12.))),
higthresw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 20., 99., 0.5, 85.))),
decayw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))),
expmasklc(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWLC")))),
showmasklcMethod(Gtk::manage(new MyComboBoxText())),
enalcMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))),
@ -2381,6 +2389,13 @@ LocallabContrast::LocallabContrast():
fftwlcConn = fftwlc->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::fftwlcChanged));
recothresw->setAdjusterListener(this);
lowthresw->setAdjusterListener(this);
higthresw->setAdjusterListener(this);
decayw->setAdjusterListener(this);
setExpandAlignProperties(exprecovw, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
setExpandAlignProperties(expmasklc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
showmasklcMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
@ -2561,6 +2576,17 @@ LocallabContrast::LocallabContrast():
expcontrastpyr2->add(*blurcontBox2, false);
pack_start(*expcontrastpyr2);
pack_start(*fftwlc);
ToolParamBlock* const wwBox3 = Gtk::manage(new ToolParamBlock());
wwBox3->pack_start(*maskusablew, Gtk::PACK_SHRINK, 0);
wwBox3->pack_start(*maskunusablew, Gtk::PACK_SHRINK, 0);
wwBox3->pack_start(*recothresw);
wwBox3->pack_start(*lowthresw);
wwBox3->pack_start(*higthresw);
wwBox3->pack_start(*decayw);
// colBox3->pack_start(*invmaskc);
exprecovw->add(*wwBox3, false);
pack_start(*exprecovw, false, false);
ToolParamBlock* const masklcBox = Gtk::manage(new ToolParamBlock());
masklcBox->pack_start(*showmasklcMethod, Gtk::PACK_SHRINK, 4);
masklcBox->pack_start(*enalcMask, Gtk::PACK_SHRINK, 0);
@ -2611,6 +2637,7 @@ void LocallabContrast::updateAdviceTooltips(const bool showTooltips)
levelwav->set_tooltip_markup(M("TP_LOCALLAB_LEVELWAV_TOOLTIP"));
clariFrame->set_tooltip_markup(M("TP_LOCALLAB_CLARI_TOOLTIP"));
clarisoft->set_tooltip_markup(M("TP_LOCALLAB_CLARISOFT_TOOLTIP"));
exprecovw->set_tooltip_markup(M("TP_LOCALLAB_MASKRESWAV_TOOLTIP"));
wavshape->setTooltip(M("TP_LOCALLAB_WAT_WAVSHAPE_TOOLTIP"));
clarilres->set_tooltip_text(M("TP_LOCALLAB_WAT_CLARIL_TOOLTIP"));
@ -2670,6 +2697,9 @@ void LocallabContrast::updateAdviceTooltips(const bool showTooltips)
masklcCurveEditorG->set_tooltip_markup(M("TP_LOCALLAB_MASKCURVE_TOOLTIP"));
chromasklc->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP"));
sensilc->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP"));
decayw->set_tooltip_text(M("TP_LOCALLAB_MASKDECAY_TOOLTIP"));
lowthresw->set_tooltip_text(M("TP_LOCALLAB_MASKLOWTHRESWAV_TOOLTIP"));
higthresw->set_tooltip_text(M("TP_LOCALLAB_MASKHIGTHRESWAV_TOOLTIP"));
} else {
contFrame->set_tooltip_text("");
LocalcurveEditorwav->set_tooltip_markup("");
@ -2734,6 +2764,10 @@ void LocallabContrast::updateAdviceTooltips(const bool showTooltips)
wavshapecomp->setTooltip("");
threswav->set_tooltip_text("");
residcomp->set_tooltip_text("");
exprecovw->set_tooltip_markup("");
decayw->set_tooltip_text("");
lowthresw->set_tooltip_text("");
higthresw->set_tooltip_text("");
}
}
@ -2744,6 +2778,7 @@ void LocallabContrast::setDefaultExpanderVisibility()
expcontrastpyr->set_expanded(false);
expcontrastpyr2->set_expanded(false);
expmasklc->set_expanded(false);
exprecovw->set_expanded(false);
}
void LocallabContrast::disableListener()
@ -2898,6 +2933,10 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa
radmasklc->setValue(spot.radmasklc);
chromasklc->setValue(spot.chromasklc);
Lmasklcshape->setCurve(spot.Lmasklccurve);
recothresw->setValue((double)spot.recothresw);
lowthresw->setValue((double)spot.lowthresw);
higthresw->setValue((double)spot.higthresw);
decayw->setValue((double)spot.decayw);
}
// Enable all listeners
@ -3016,6 +3055,10 @@ void LocallabContrast::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
spot.radmasklc = radmasklc->getValue();
spot.chromasklc = chromasklc->getValue();
spot.Lmasklccurve = Lmasklcshape->getCurve();
spot.recothresw = recothresw->getValue();
spot.lowthresw = lowthresw->getValue();
spot.higthresw = higthresw->getValue();
spot.decayw = decayw->getValue();
}
// Note: No need to manage pedited as batch mode is deactivated for Locallab
@ -3074,6 +3117,10 @@ void LocallabContrast::setDefaults(const rtengine::procparams::ProcParams* defPa
blendmasklc->setDefault((double)defSpot.blendmasklc);
radmasklc->setDefault(defSpot.radmasklc);
chromasklc->setDefault(defSpot.chromasklc);
recothresw->setDefault((double)defSpot.recothresw);
lowthresw->setDefault((double)defSpot.lowthresw);
higthresw->setDefault((double)defSpot.higthresw);
decayw->setDefault((double)defSpot.decayw);
}
// Note: No need to manage pedited as batch mode is deactivated for Locallab
@ -3370,6 +3417,35 @@ void LocallabContrast::adjusterChanged(Adjuster* a, double newval)
}
}
if (a == recothresw) {
if (listener) {
listener->panelChanged(Evlocallabrecothresw,
recothresw->getTextValue() + " (" + escapeHtmlChars(spotName) + ")");
}
}
if (a == lowthresw) {
if (listener) {
listener->panelChanged(Evlocallablowthresw,
lowthresw->getTextValue() + " (" + escapeHtmlChars(spotName) + ")");
}
}
if (a == higthresw) {
if (listener) {
listener->panelChanged(Evlocallabhigthresw,
higthresw->getTextValue() + " (" + escapeHtmlChars(spotName) + ")");
}
}
if (a == decayw) {
if (listener) {
listener->panelChanged(Evlocallabdecayw,
decayw->getTextValue() + " (" + escapeHtmlChars(spotName) + ")");
}
}
if (a == blendmasklc) {
if (listener) {
listener->panelChanged(Evlocallabblendmasklc,
@ -3559,6 +3635,7 @@ void LocallabContrast::convertParamToNormal()
wavshapecomp->setCurve(defSpot.loccompwavcurve);
fatres->setValue(defSpot.fatres);
fftwlc->set_active(defSpot.fftwlc);
decayw->setValue(defSpot.decayw);
// Enable all listeners
enableListener();
@ -3593,6 +3670,11 @@ void LocallabContrast::convertParamToSimple()
// Lmasklcshape->setCurve(defSpot.Lmasklccurve);
// Enable all listeners
recothresw->setValue(defSpot.recothresw);
lowthresw->setValue(defSpot.lowthresw);
higthresw->setValue(defSpot.higthresw);
decayw->setValue(defSpot.decayw);
enableListener();
// Update GUI based on converted widget parameters:
@ -3611,6 +3693,10 @@ void LocallabContrast::updateGUIToMode(const modeType new_type)
expcontrastpyr2->hide();
fftwlc->hide();
expmasklc->hide();
exprecovw->hide();
decayw->hide();
maskusablew->hide();
maskunusablew->hide();
break;
@ -3623,6 +3709,16 @@ void LocallabContrast::updateGUIToMode(const modeType new_type)
// Specific Simple mode widgets are shown in Normal mode
localcontMethod->show();
expmasklc->show();
exprecovw->show();
decayw->hide();
if (enalcMask->get_active()) {
maskusablew->show();
maskunusablew->hide();
} else {
maskusablew->hide();
maskunusablew->show();
}
break;
@ -3641,6 +3737,17 @@ void LocallabContrast::updateGUIToMode(const modeType new_type)
}
expmasklc->show();
exprecovw->show();
decayw->show();
if (enalcMask->get_active()) {
maskusablew->show();
maskunusablew->hide();
} else {
maskusablew->hide();
maskunusablew->show();
}
}
}
@ -3864,6 +3971,15 @@ void LocallabContrast::showmasklcMethodChanged()
void LocallabContrast::enalcMaskChanged()
{
if (enalcMask->get_active()) {
maskusablew->show();
maskunusablew->hide();
} else {
maskusablew->hide();
maskunusablew->show();
}
if (isLocActivated && exp->getEnabled()) {
if (listener) {
if (enalcMask->get_active()) {

View File

@ -1500,6 +1500,10 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).radmasklc = locallab.spots.at(j).radmasklc && pSpot.radmaskcb == otherSpot.radmasklc;
locallab.spots.at(j).chromasklc = locallab.spots.at(j).chromasklc && pSpot.chromasklc == otherSpot.chromasklc;
locallab.spots.at(j).Lmasklccurve = locallab.spots.at(j).Lmasklccurve && pSpot.Lmasklccurve == otherSpot.Lmasklccurve;
locallab.spots.at(j).recothresw = locallab.spots.at(j).recothresw && pSpot.recothresw == otherSpot.recothresw;
locallab.spots.at(j).lowthresw = locallab.spots.at(j).lowthresw && pSpot.lowthresw == otherSpot.lowthresw;
locallab.spots.at(j).higthresw = locallab.spots.at(j).higthresw && pSpot.higthresw == otherSpot.higthresw;
locallab.spots.at(j).decayw = locallab.spots.at(j).decayw && pSpot.decayw == otherSpot.decayw;
// Contrast by detail levels
locallab.spots.at(j).visicbdl = locallab.spots.at(j).visicbdl && pSpot.visicbdl == otherSpot.visicbdl;
locallab.spots.at(j).expcbdl = locallab.spots.at(j).expcbdl && pSpot.expcbdl == otherSpot.expcbdl;
@ -4940,6 +4944,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).Lmasklccurve = mods.locallab.spots.at(i).Lmasklccurve;
}
if (locallab.spots.at(i).recothresw) {
toEdit.locallab.spots.at(i).recothresw = mods.locallab.spots.at(i).recothresw;
}
if (locallab.spots.at(i).lowthresw) {
toEdit.locallab.spots.at(i).lowthresw = mods.locallab.spots.at(i).lowthresw;
}
if (locallab.spots.at(i).higthresw) {
toEdit.locallab.spots.at(i).higthresw = mods.locallab.spots.at(i).higthresw;
}
if (locallab.spots.at(i).decayw) {
toEdit.locallab.spots.at(i).decayw = mods.locallab.spots.at(i).decayw;
}
// Contrast by detail levels
if (locallab.spots.at(i).visicbdl) {
toEdit.locallab.spots.at(i).visicbdl = mods.locallab.spots.at(i).visicbdl;
@ -6954,6 +6974,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
radmasklc(v),
chromasklc(v),
Lmasklccurve(v),
recothresw(v),
lowthresw(v),
higthresw(v),
decayw(v),
// Contrast by detail levels
visicbdl(v),
expcbdl(v),
@ -7502,6 +7526,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
radmasklc = v;
chromasklc = v;
Lmasklccurve = v;
recothresw = v;
lowthresw = v;
higthresw = v;
decayw = v;
// Contrast by detail levels
visicbdl = v;
expcbdl = v;

View File

@ -837,6 +837,10 @@ public:
bool radmasklc;
bool chromasklc;
bool Lmasklccurve;
bool recothresw;
bool lowthresw;
bool higthresw;
bool decayw;
// Contrast by detail levels
bool visicbdl;
bool expcbdl;