diff --git a/rtdata/languages/default b/rtdata/languages/default index d6a4f86ad..f440d29cc 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1017,10 +1017,11 @@ HISTORY_MSG_776;Local - Blur Denoise Mask contrast curve HISTORY_MSG_777;Local - Blur Mask local contrast curve HISTORY_MSG_778;Local - Blur Mask Wavelet level HISTORY_MSG_779;Local - Color Mask local contrast curve -HISTORY_MSG_780;Local - Color Mask Wavelet level +HISTORY_MSG_780;Local - Color Mask shadows HISTORY_MSG_781;Local - Local contrast Wavelet level HISTORY_MSG_782;Local - Blur Denoise Mask Wavelet levels HISTORY_MSG_783;Local - Color Mask Wavelet levels +HISTORY_MSG_784;Local - Mask DeltaE HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2123,10 +2124,12 @@ TP_LOCALLAB_CHROMA;Chrominance TP_LOCALLAB_CHROMASKCOL;Chroma mask TP_LOCALLAB_GAMMASKCOL;Gamma mask TP_LOCALLAB_SLOMASKCOL;Slope mask +TP_LOCALLAB_SHAMASKCOL;Shadows mask TP_LOCALLAB_LAPMASKCOL;Laplacian threshold mask TP_LOCALLAB_WAMASKCOL;Mask Wavelet level TP_LOCALLAB_CSTHRESHOLDBLUR;Mask Wavelet level TP_LOCALLAB_LAPLACC;Mask Laplacian solve PDE +TP_LOCALLAB_DELTAEC;Mask DeltaE Image TP_LOCALLAB_CHRRT;Chroma TP_LOCALLAB_CIRCRADIUS;Spot size TP_LOCALLAB_COFR;Color & Light - Small defects : red eyes, dust diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index b5bf834b0..91cb51674 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -10830,7 +10830,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float blendm = lp.blendmacol; float lap = params->locallab.spots.at(sp).lapmaskcol; float pde = params->locallab.spots.at(sp).laplac; -// int wavlevel = params->locallab.spots.at(sp).wavmaskcol; +// int wavlevel = params->locallab.spots.at(sp).shadmaskcol; int level_bl = params->locallab.spots.at(sp).csthresholdcol.getBottomLeft(); int level_hl = params->locallab.spots.at(sp).csthresholdcol.getTopLeft(); @@ -11040,7 +11040,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float blendm = lp.blendmacol; float lap = params->locallab.spots.at(sp).lapmaskcol; float pde = params->locallab.spots.at(sp).laplac; -// int wavlevel = params->locallab.spots.at(sp).wavmaskcol; +// int wavlevel = params->locallab.spots.at(sp).shadmaskcol; int level_bl = params->locallab.spots.at(sp).csthresholdcol.getBottomLeft(); int level_hl = params->locallab.spots.at(sp).csthresholdcol.getTopLeft(); int level_br = params->locallab.spots.at(sp).csthresholdcol.getBottomRight(); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 6462f754b..df60658dd 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -806,10 +806,11 @@ enum ProcEventCode { EvlocallabLLmaskblshapewav = 776, Evlocallabwavmaskbl = 777, EvlocallabLLmaskcolshapewav = 778, - Evlocallabwavmaskcol = 779, + Evlocallabshadmaskcol = 779, EvlocallabcsThreshold = 780, EvlocallabcsThresholdblur = 781, EvlocallabcsThresholdcol = 782, + Evlocallabdeltae = 783, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index d9ed7c48d..ff355a689 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2433,6 +2433,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : transitgrad(0.0), avoid(false), laplac(false), + deltae(false), // Color & Light expcolor(false), curvactiv(false), @@ -2452,7 +2453,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : chromaskcol(0.0), gammaskcol(1.0), slomaskcol(0.0), - wavmaskcol(5), + shadmaskcol(0), lapmaskcol(0.0), qualitycurveMethod("none"), gridMethod("one"), @@ -2729,6 +2730,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && transitgrad == other.transitgrad && avoid == other.avoid && laplac == other.laplac + && deltae == other.deltae // Color & Light && expcolor == other.expcolor && curvactiv == other.curvactiv @@ -2747,7 +2749,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && chromaskcol == other.chromaskcol && gammaskcol == other.gammaskcol && slomaskcol == other.slomaskcol - && wavmaskcol == other.wavmaskcol + && shadmaskcol == other.shadmaskcol && lapmaskcol == other.lapmaskcol && qualitycurveMethod == other.qualitycurveMethod && gridMethod == other.gridMethod @@ -4011,6 +4013,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).transitgrad, "Locallab", "Transitgrad_" + std::to_string(i), spot.transitgrad, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).avoid, "Locallab", "Avoid_" + std::to_string(i), spot.avoid, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).laplac, "Locallab", "Laplac_" + std::to_string(i), spot.laplac, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).deltae, "Locallab", "Deltae_" + std::to_string(i), spot.deltae, keyFile); // Color & Light saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expcolor, "Locallab", "Expcolor_" + std::to_string(i), spot.expcolor, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).curvactiv, "Locallab", "Curvactiv_" + std::to_string(i), spot.curvactiv, keyFile); @@ -4030,7 +4033,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskcol, "Locallab", "Chromaskcol_" + std::to_string(i), spot.chromaskcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskcol, "Locallab", "Gammaskcol_" + std::to_string(i), spot.gammaskcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskcol, "Locallab", "Slomaskcol_" + std::to_string(i), spot.slomaskcol, keyFile); - saveToKeyfile(!pedited || pedited->locallab.spots.at(i).wavmaskcol, "Locallab", "Wavmaskcollevel_" + std::to_string(i), spot.wavmaskcol, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).shadmaskcol, "Locallab", "shadmaskcol_" + std::to_string(i), spot.shadmaskcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).lapmaskcol, "Locallab", "Lapmaskcol_" + std::to_string(i), spot.lapmaskcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).qualitycurveMethod, "Locallab", "QualityCurveMethod_" + std::to_string(i), spot.qualitycurveMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gridMethod, "Locallab", "gridMethod_" + std::to_string(i), spot.gridMethod, keyFile); @@ -5408,6 +5411,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Transitgrad_" + std::to_string(i), pedited, spot.transitgrad, spotEdited.transitgrad); assignFromKeyfile(keyFile, "Locallab", "Avoid_" + std::to_string(i), pedited, spot.avoid, spotEdited.avoid); assignFromKeyfile(keyFile, "Locallab", "Laplac_" + std::to_string(i), pedited, spot.laplac, spotEdited.laplac); + assignFromKeyfile(keyFile, "Locallab", "Deltae_" + std::to_string(i), pedited, spot.deltae, spotEdited.deltae); // Color & Light assignFromKeyfile(keyFile, "Locallab", "Expcolor_" + std::to_string(i), pedited, spot.expcolor, spotEdited.expcolor); assignFromKeyfile(keyFile, "Locallab", "Curvactiv_" + std::to_string(i), pedited, spot.curvactiv, spotEdited.curvactiv); @@ -5427,7 +5431,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Chromaskcol_" + std::to_string(i), pedited, spot.chromaskcol, spotEdited.chromaskcol); assignFromKeyfile(keyFile, "Locallab", "Gammaskcol_" + std::to_string(i), pedited, spot.gammaskcol, spotEdited.gammaskcol); assignFromKeyfile(keyFile, "Locallab", "Slomaskcol_" + std::to_string(i), pedited, spot.slomaskcol, spotEdited.slomaskcol); - assignFromKeyfile(keyFile, "Locallab", "Wavmaskcollevel_" + std::to_string(i), pedited, spot.wavmaskcol, spotEdited.wavmaskcol); + assignFromKeyfile(keyFile, "Locallab", "shadmaskcol_" + std::to_string(i), pedited, spot.shadmaskcol, spotEdited.shadmaskcol); assignFromKeyfile(keyFile, "Locallab", "Lapmaskcol_" + std::to_string(i), pedited, spot.lapmaskcol, spotEdited.lapmaskcol); assignFromKeyfile(keyFile, "Locallab", "QualityCurveMethod_" + std::to_string(i), pedited, spot.qualitycurveMethod, spotEdited.qualitycurveMethod); assignFromKeyfile(keyFile, "Locallab", "gridMethod_" + std::to_string(i), pedited, spot.gridMethod, spotEdited.gridMethod); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 213f3ccb5..de82ab6f1 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -980,6 +980,7 @@ struct LocallabParams { double transitgrad; bool avoid; bool laplac; + bool deltae; // Color & Light bool expcolor; bool curvactiv; @@ -999,7 +1000,7 @@ struct LocallabParams { double chromaskcol; double gammaskcol; double slomaskcol; - int wavmaskcol; + int shadmaskcol; double lapmaskcol; Glib::ustring qualitycurveMethod; Glib::ustring gridMethod; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 56833d8e5..7f8f92bf0 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -806,10 +806,11 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //EvlocallabLLmaskblshapewav LUMINANCECURVE, //Evlocallabwavmaskbl LUMINANCECURVE, //EvlocallabLLmaskcolshapewav - LUMINANCECURVE, //Evlocallabwavmaskcol + LUMINANCECURVE, //Evlocallabshadmaskcol LUMINANCECURVE, //EvlocallabcsThreshold LUMINANCECURVE, //EvlocallabcsThresholdblur - LUMINANCECURVE //EvlocallabcsThresholdcol + LUMINANCECURVE, //EvlocallabcsThresholdcol + LUMINANCECURVE //Evlocallabdeltae }; namespace rtengine diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 25ad9ac55..fd7985efe 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -71,6 +71,7 @@ ControlSpotPanel::ControlSpotPanel(): avoid_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOID")))), laplac_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LAPLACC")))), + deltae_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_DELTAEC")))), lastObject_(-1), nbSpotChanged_(false), @@ -275,6 +276,9 @@ ControlSpotPanel::ControlSpotPanel(): laplacConn_ = laplac_->signal_toggled().connect( sigc::mem_fun(*this, &ControlSpotPanel::laplacChanged)); pack_start(*laplac_); + deltaeConn_ = deltae_->signal_toggled().connect( + sigc::mem_fun(*this, &ControlSpotPanel::deltaeChanged)); +// pack_start(*deltae_); show_all(); @@ -580,6 +584,7 @@ void ControlSpotPanel::load_ControlSpot_param() transitgrad_->setValue((double)row[spots_.transitgrad]); avoid_->set_active(row[spots_.avoid]); laplac_->set_active(row[spots_.laplac]); + deltae_->set_active(row[spots_.deltae]); } void ControlSpotPanel::controlspotChanged() @@ -1080,6 +1085,42 @@ void ControlSpotPanel::laplacChanged() } } + +void ControlSpotPanel::deltaeChanged() +{ + // printf("laplacChanged\n"); + + // Get selected control spot + const auto s = treeview_->get_selection(); + + if (!s->count_selected_rows()) { + return; + } + + const auto iter = s->get_selected(); + Gtk::TreeModel::Row row = *iter; + + if (multiImage) { + if (deltae_->get_inconsistent()) { + deltae_->set_inconsistent(false); + deltaeConn_.block(true); + deltae_->set_active(false); + deltaeConn_.block(false); + } + } + + row[spots_.deltae] = deltae_->get_active(); + + // Raise event + if (listener) { + if (deltae_->get_active()) { + listener->panelChanged(Evlocallabdeltae, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(Evlocallabdeltae, M("GENERAL_DISABLED")); + } + } +} + void ControlSpotPanel::disableParamlistener(bool cond) { // printf("disableParamlistener: %d\n", cond); @@ -1112,6 +1153,7 @@ void ControlSpotPanel::disableParamlistener(bool cond) transitgrad_->block(cond); avoidConn_.block(cond); laplacConn_.block(cond); + deltaeConn_.block(cond); } void ControlSpotPanel::setParamEditable(bool cond) @@ -1140,6 +1182,7 @@ void ControlSpotPanel::setParamEditable(bool cond) transitgrad_->set_sensitive(cond); avoid_->set_sensitive(cond); laplac_->set_sensitive(cond); + deltae_->set_sensitive(cond); } void ControlSpotPanel::addControlSpotCurve(Gtk::TreeModel::Row& row) @@ -1774,6 +1817,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int id) r->transitgrad = row[spots_.transitgrad]; r->avoid = row[spots_.avoid]; r->laplac = row[spots_.laplac]; + r->deltae = row[spots_.deltae]; return r; } @@ -1901,6 +1945,7 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot) row[spots_.transitgrad] = newSpot->transitgrad; row[spots_.avoid] = newSpot->avoid; row[spots_.laplac] = newSpot->laplac; + row[spots_.deltae] = newSpot->deltae; updateParamVisibility(); disableParamlistener(false); @@ -1947,6 +1992,7 @@ int ControlSpotPanel::updateControlSpot(SpotRow* spot) row[spots_.transitgrad] = spot->transitgrad; row[spots_.avoid] = spot->avoid; row[spots_.laplac] = spot->laplac; + row[spots_.deltae] = spot->deltae; updateControlSpotCurve(row); updateParamVisibility(); @@ -2039,6 +2085,7 @@ ControlSpotPanel::SpotEdited* ControlSpotPanel::getEditedStates() se->transitgrad = transitgrad_->getEditedState(); se->avoid = !avoid_->get_inconsistent(); se->laplac = !laplac_->get_inconsistent(); + se->deltae = !deltae_->get_inconsistent(); return se; } @@ -2109,6 +2156,7 @@ void ControlSpotPanel::setEditedStates(SpotEdited* se) transitgrad_->setEditedState(se->transitgrad ? Edited : UnEdited); avoid_->set_inconsistent(multiImage && !se->avoid); laplac_->set_inconsistent(multiImage && !se->laplac); + deltae_->set_inconsistent(multiImage && !se->deltae); // Update Control Spot GUI according to widgets edited states updateParamVisibility(); @@ -2260,6 +2308,7 @@ ControlSpotPanel::ControlSpots::ControlSpots() add(transitgrad); add(avoid); add(laplac); + add(deltae); } //----------------------------------------------------------------------------- diff --git a/rtgui/controlspotpanel.h b/rtgui/controlspotpanel.h index 5a361b453..9c6124733 100644 --- a/rtgui/controlspotpanel.h +++ b/rtgui/controlspotpanel.h @@ -67,6 +67,7 @@ public: double transitgrad; bool avoid; bool laplac; + bool deltae; }; /** @@ -99,6 +100,7 @@ public: bool transitgrad; bool avoid; bool laplac; + bool deltae; }; /** @@ -266,6 +268,7 @@ private: void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR); void avoidChanged(); void laplacChanged(); + void deltaeChanged(); void disableParamlistener(bool cond); @@ -314,6 +317,7 @@ private: Gtk::TreeModelColumn transitgrad; Gtk::TreeModelColumn avoid; Gtk::TreeModelColumn laplac; + Gtk::TreeModelColumn deltae; }; class RenameDialog: @@ -382,6 +386,8 @@ private: sigc::connection avoidConn_; Gtk::CheckButton* const laplac_; sigc::connection laplacConn_; + Gtk::CheckButton* const deltae_; + sigc::connection deltaeConn_; // Internal variables int lastObject_; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 4a29f5996..7987659c6 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -201,7 +201,7 @@ Locallab::Locallab(): gammaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), slomaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), lapmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), - wavmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_WAMASKCOL"), 1, 9, 1, 5))), + shadmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHAMASKCOL"), 0, 100, 1, 0))), softradiuscol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))), // Exposure expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), -2.0, 4.0, 0.05, 0.0))), @@ -515,7 +515,7 @@ Locallab::Locallab(): chromaskcol->setAdjusterListener(this); gammaskcol->setAdjusterListener(this); slomaskcol->setAdjusterListener(this); - wavmaskcol->setAdjusterListener(this); + shadmaskcol->setAdjusterListener(this); softradiuscol->setAdjusterListener(this); lapmaskcol->setAdjusterListener(this); @@ -755,9 +755,9 @@ Locallab::Locallab(): maskcolBox->pack_start(*chromaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*gammaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*slomaskcol, Gtk::PACK_SHRINK, 0); +// maskcolBox->pack_start(*shadmaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*mask2CurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor maskcolBox->pack_start(*mask2CurveEditorGwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor -// maskcolBox->pack_start(*wavmaskcol, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*csThresholdcol, Gtk::PACK_SHRINK, 0); expmaskcol->add(*maskcolBox, false); colorBox->pack_start(*expmaskcol); @@ -2806,6 +2806,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) r->transitgrad = pp->locallab.spots.at(i).transitgrad; r->avoid = pp->locallab.spots.at(i).avoid; r->laplac = pp->locallab.spots.at(i).laplac; + r->deltae = pp->locallab.spots.at(i).deltae; expsettings->addControlSpot(r); } @@ -2934,6 +2935,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) r->transitgrad = newSpot->transitgrad; r->avoid = newSpot->avoid; r->laplac = newSpot->laplac; + r->deltae = newSpot->deltae; expsettings->addControlSpot(r); // ProcParams update @@ -3151,6 +3153,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) r->transitgrad = newSpot->transitgrad; r->avoid = newSpot->avoid; r->laplac = newSpot->laplac; + r->deltae = newSpot->deltae; expsettings->addControlSpot(r); // ProcParams update @@ -3266,6 +3269,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).transitgrad = r->transitgrad; pp->locallab.spots.at(pp->locallab.selspot).avoid = r->avoid; pp->locallab.spots.at(pp->locallab.selspot).laplac = r->laplac; + pp->locallab.spots.at(pp->locallab.selspot).deltae = r->deltae; // Color & Light pp->locallab.spots.at(pp->locallab.selspot).expcolor = expcolor->getEnabled(); pp->locallab.spots.at(pp->locallab.selspot).curvactiv = curvactiv->get_active(); @@ -3308,7 +3312,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).chromaskcol = chromaskcol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).gammaskcol = gammaskcol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).slomaskcol = slomaskcol->getValue(); - pp->locallab.spots.at(pp->locallab.selspot).wavmaskcol = wavmaskcol->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).shadmaskcol = shadmaskcol->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).lapmaskcol = lapmaskcol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscol = softradiuscol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).Lmaskcurve = Lmaskshape->getCurve(); @@ -3646,6 +3650,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).balan = pe->locallab.spots.at(pp->locallab.selspot).balan || se->balan; pe->locallab.spots.at(pp->locallab.selspot).avoid = pe->locallab.spots.at(pp->locallab.selspot).avoid || se->avoid; pe->locallab.spots.at(pp->locallab.selspot).laplac = pe->locallab.spots.at(pp->locallab.selspot).laplac || se->laplac; + pe->locallab.spots.at(pp->locallab.selspot).deltae = pe->locallab.spots.at(pp->locallab.selspot).deltae || se->deltae; // Color & Light pe->locallab.spots.at(pp->locallab.selspot).expcolor = pe->locallab.spots.at(pp->locallab.selspot).expcolor || !expcolor->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).curvactiv = pe->locallab.spots.at(pp->locallab.selspot).curvactiv || !curvactiv->get_inconsistent(); @@ -3673,7 +3678,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).chromaskcol = pe->locallab.spots.at(pp->locallab.selspot).chromaskcol || chromaskcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).gammaskcol = pe->locallab.spots.at(pp->locallab.selspot).gammaskcol || gammaskcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).slomaskcol = pe->locallab.spots.at(pp->locallab.selspot).slomaskcol || slomaskcol->getEditedState(); - pe->locallab.spots.at(pp->locallab.selspot).wavmaskcol = pe->locallab.spots.at(pp->locallab.selspot).wavmaskcol || wavmaskcol->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).shadmaskcol = pe->locallab.spots.at(pp->locallab.selspot).shadmaskcol || shadmaskcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).lapmaskcol = pe->locallab.spots.at(pp->locallab.selspot).lapmaskcol || lapmaskcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).softradiuscol = pe->locallab.spots.at(pp->locallab.selspot).softradiuscol || softradiuscol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).Lmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).Lmaskcurve || !Lmaskshape->isUnChanged(); @@ -3947,6 +3952,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).transitgrad = pedited->locallab.spots.at(pp->locallab.selspot).transitgrad || se->transitgrad; pedited->locallab.spots.at(pp->locallab.selspot).avoid = pedited->locallab.spots.at(pp->locallab.selspot).avoid || se->avoid; pedited->locallab.spots.at(pp->locallab.selspot).laplac = pedited->locallab.spots.at(pp->locallab.selspot).laplac || se->laplac; + pedited->locallab.spots.at(pp->locallab.selspot).deltae = pedited->locallab.spots.at(pp->locallab.selspot).deltae || se->deltae; // Color & Light pedited->locallab.spots.at(pp->locallab.selspot).expcolor = pedited->locallab.spots.at(pp->locallab.selspot).expcolor || !expcolor->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).curvactiv = pedited->locallab.spots.at(pp->locallab.selspot).curvactiv || !curvactiv->get_inconsistent(); @@ -3973,7 +3979,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).chromaskcol = pedited->locallab.spots.at(pp->locallab.selspot).chromaskcol || chromaskcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).gammaskcol = pedited->locallab.spots.at(pp->locallab.selspot).gammaskcol || gammaskcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).slomaskcol = pedited->locallab.spots.at(pp->locallab.selspot).slomaskcol || slomaskcol->getEditedState(); - pedited->locallab.spots.at(pp->locallab.selspot).wavmaskcol = pedited->locallab.spots.at(pp->locallab.selspot).wavmaskcol || wavmaskcol->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).shadmaskcol = pedited->locallab.spots.at(pp->locallab.selspot).shadmaskcol || shadmaskcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).lapmaskcol = pedited->locallab.spots.at(pp->locallab.selspot).lapmaskcol || lapmaskcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).softradiuscol = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscol || softradiuscol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).Lmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).Lmaskcurve || !Lmaskshape->isUnChanged(); @@ -5949,7 +5955,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe chromaskcol->setDefault(defSpot->chromaskcol); gammaskcol->setDefault(defSpot->gammaskcol); slomaskcol->setDefault(defSpot->slomaskcol); - wavmaskcol->setDefault(defSpot->wavmaskcol); + shadmaskcol->setDefault(defSpot->shadmaskcol); lapmaskcol->setDefault(defSpot->lapmaskcol); softradiuscol->setDefault(defSpot->softradiuscol); csThresholdcol->setDefault(defSpot->csthresholdcol); @@ -6130,7 +6136,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe chromaskcol->setDefaultEditedState(Irrelevant); gammaskcol->setDefaultEditedState(Irrelevant); slomaskcol->setDefaultEditedState(Irrelevant); - wavmaskcol->setDefaultEditedState(Irrelevant); + shadmaskcol->setDefaultEditedState(Irrelevant); lapmaskcol->setDefaultEditedState(Irrelevant); softradiuscol->setDefaultEditedState(Irrelevant); csThresholdcol->setDefaultEditedState(Irrelevant); @@ -6315,7 +6321,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe chromaskcol->setDefaultEditedState(defSpotState->chromaskcol ? Edited : UnEdited); gammaskcol->setDefaultEditedState(defSpotState->gammaskcol ? Edited : UnEdited); slomaskcol->setDefaultEditedState(defSpotState->slomaskcol ? Edited : UnEdited); - wavmaskcol->setDefaultEditedState(defSpotState->wavmaskcol ? Edited : UnEdited); + shadmaskcol->setDefaultEditedState(defSpotState->shadmaskcol ? Edited : UnEdited); lapmaskcol->setDefaultEditedState(defSpotState->lapmaskcol ? Edited : UnEdited); softradiuscol->setDefaultEditedState(defSpotState->softradiuscol ? Edited : UnEdited); csThresholdcol->setDefaultEditedState(defSpotState->csthresholdcol ? Edited : UnEdited); @@ -6613,9 +6619,9 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } - if (a == wavmaskcol) { + if (a == shadmaskcol) { if (listener) { - listener->panelChanged(Evlocallabwavmaskcol, wavmaskcol->getTextValue()); + listener->panelChanged(Evlocallabshadmaskcol, shadmaskcol->getTextValue()); } } @@ -7617,7 +7623,7 @@ void Locallab::setBatchMode(bool batchMode) chromaskcol->showEditedCB(); gammaskcol->showEditedCB(); slomaskcol->showEditedCB(); - wavmaskcol->showEditedCB(); + shadmaskcol->showEditedCB(); lapmaskcol->showEditedCB(); softradiuscol->showEditedCB(); csThresholdcol->showEditedCB(); @@ -8156,7 +8162,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con chromaskcol->setValue(pp->locallab.spots.at(index).chromaskcol); gammaskcol->setValue(pp->locallab.spots.at(index).gammaskcol); slomaskcol->setValue(pp->locallab.spots.at(index).slomaskcol); - wavmaskcol->setValue(pp->locallab.spots.at(index).wavmaskcol); + shadmaskcol->setValue(pp->locallab.spots.at(index).shadmaskcol); lapmaskcol->setValue(pp->locallab.spots.at(index).lapmaskcol); softradiuscol->setValue(pp->locallab.spots.at(index).softradiuscol); Lmaskshape->setCurve(pp->locallab.spots.at(index).Lmaskcurve); @@ -8509,6 +8515,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con se->transitgrad = spotState->transitgrad; se->avoid = spotState->avoid; se->laplac = spotState->laplac; + se->deltae = spotState->deltae; expsettings->setEditedStates(se); // Color & Light @@ -8545,7 +8552,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con chromaskcol->setEditedState(spotState->chromaskcol ? Edited : UnEdited); gammaskcol->setEditedState(spotState->gammaskcol ? Edited : UnEdited); slomaskcol->setEditedState(spotState->slomaskcol ? Edited : UnEdited); - wavmaskcol->setEditedState(spotState->wavmaskcol ? Edited : UnEdited); + shadmaskcol->setEditedState(spotState->shadmaskcol ? Edited : UnEdited); lapmaskcol->setEditedState(spotState->lapmaskcol ? Edited : UnEdited); softradiuscol->setEditedState(spotState->softradiuscol ? Edited : UnEdited); Lmaskshape->setUnChanged(!spotState->Lmaskcurve); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 417a816e9..c2f170c56 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -158,7 +158,7 @@ private: Adjuster* const gammaskcol; Adjuster* const slomaskcol; Adjuster* const lapmaskcol; - Adjuster* const wavmaskcol; + Adjuster* const shadmaskcol; Adjuster* const softradiuscol; // Exposure Adjuster* const expcomp; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 828ab9420..c7f01d3bd 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -974,6 +974,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).transitgrad = locallab.spots.at(j).transitgrad && pSpot.transitgrad == otherSpot.transitgrad; locallab.spots.at(j).avoid = locallab.spots.at(j).avoid && pSpot.avoid == otherSpot.avoid; locallab.spots.at(j).laplac = locallab.spots.at(j).laplac && pSpot.laplac == otherSpot.laplac; + locallab.spots.at(j).deltae = locallab.spots.at(j).deltae && pSpot.deltae == otherSpot.deltae; // Color & Light locallab.spots.at(j).expcolor = locallab.spots.at(j).expcolor && pSpot.expcolor == otherSpot.expcolor; locallab.spots.at(j).curvactiv = locallab.spots.at(j).curvactiv && pSpot.curvactiv == otherSpot.curvactiv; @@ -993,7 +994,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).chromaskcol = locallab.spots.at(j).chromaskcol && pSpot.chromaskcol == otherSpot.chromaskcol; locallab.spots.at(j).gammaskcol = locallab.spots.at(j).gammaskcol && pSpot.gammaskcol == otherSpot.gammaskcol; locallab.spots.at(j).slomaskcol = locallab.spots.at(j).slomaskcol && pSpot.slomaskcol == otherSpot.slomaskcol; - locallab.spots.at(j).wavmaskcol = locallab.spots.at(j).wavmaskcol && pSpot.wavmaskcol == otherSpot.wavmaskcol; + locallab.spots.at(j).shadmaskcol = locallab.spots.at(j).shadmaskcol && pSpot.shadmaskcol == otherSpot.shadmaskcol; locallab.spots.at(j).lapmaskcol = locallab.spots.at(j).lapmaskcol && pSpot.lapmaskcol == otherSpot.lapmaskcol; locallab.spots.at(j).qualitycurveMethod = locallab.spots.at(j).qualitycurveMethod && pSpot.qualitycurveMethod == otherSpot.qualitycurveMethod; locallab.spots.at(j).gridMethod = locallab.spots.at(j).gridMethod && pSpot.gridMethod == otherSpot.gridMethod; @@ -2801,6 +2802,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).laplac = mods.locallab.spots.at(i).laplac; } + if (locallab.spots.at(i).deltae) { + toEdit.locallab.spots.at(i).deltae = mods.locallab.spots.at(i).deltae; + } + // Color & Light if (locallab.spots.at(i).expcolor) { toEdit.locallab.spots.at(i).expcolor = mods.locallab.spots.at(i).expcolor; @@ -2874,8 +2879,8 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).slomaskcol = mods.locallab.spots.at(i).slomaskcol; } - if (locallab.spots.at(i).wavmaskcol) { - toEdit.locallab.spots.at(i).wavmaskcol = mods.locallab.spots.at(i).wavmaskcol; + if (locallab.spots.at(i).shadmaskcol) { + toEdit.locallab.spots.at(i).shadmaskcol = mods.locallab.spots.at(i).shadmaskcol; } if (locallab.spots.at(i).lapmaskcol) { @@ -4811,6 +4816,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : transitgrad(v), avoid(v), laplac(v), + deltae(v), // Color & Light expcolor(v), curvactiv(v), @@ -4830,7 +4836,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : chromaskcol(v), gammaskcol(v), slomaskcol(v), - wavmaskcol(v), + shadmaskcol(v), lapmaskcol(v), qualitycurveMethod(v), gridMethod(v), @@ -5104,6 +5110,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) transitgrad = v; avoid = v; laplac = v; + deltae = v; // Color & Light expcolor = v; curvactiv = v; @@ -5123,7 +5130,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) chromaskcol = v; gammaskcol = v; slomaskcol = v; - wavmaskcol = v; + shadmaskcol = v; lapmaskcol = v; qualitycurveMethod = v; gridMethod = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index b51f7162d..1c958da6b 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -392,6 +392,7 @@ public: bool transitgrad; bool avoid; bool laplac; + bool deltae; // Color & Light bool expcolor; bool curvactiv; @@ -411,7 +412,7 @@ public: bool chromaskcol; bool gammaskcol; bool slomaskcol; - bool wavmaskcol; + bool shadmaskcol; bool lapmaskcol; bool qualitycurveMethod; bool gridMethod;