diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index b7f188889..85b9c2bd6 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -28,7 +28,8 @@ #define RANGEFN(i) ((1000.0f / (i + 1000.0f))) #define DIRWT(i1,j1,i,j) ( domker[(i1-i)/scale+halfwin][(j1-j)/scale+halfwin] * RANGEFN(fabsf((data_fine[i1][j1]-data_fine[i][j]))) ) -#define CLIPLL(x) LIM(x,0.f,32768.f) // limit L to about L=120 probably engh ? +#define CLIPLL(x) LIM(x,0.f,32768.f) +#define CLIPLLN(x) LIM(-32768.f,0.f,32768.f) namespace rtengine { @@ -424,6 +425,9 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid } float clar = 0.01f * mergeL; + if(clar == 0.f) { + clar = 0.001f; + } #pragma omp parallel for for (int i = 0; i < srcheight; i++) @@ -814,7 +818,7 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data // if(level == 5 && mult[level] > 1.f) { // multbis[level] = 1.f + 0.45f * (mult[level] - 1.f); // } - double sensicrash = settings->cbdlsensi; + double sensicrash = 1.;//settings->cbdlsensi; LUTf irangefn(0x20000); { const float noisehi = 1.33f * noise * sensicrash * dirpyrThreshold / expf(level * log(3.0)), noiselo = 0.66f * noise * sensicrash * dirpyrThreshold / expf(level * log(3.0)); @@ -843,9 +847,10 @@ void ImProcFunctions::idirpyr_eq_channel_loc(float ** data_coarse, float ** data #endif for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { + float hipass = (data_fine[i][j] - data_coarse[i][j]); - buffer[i][j] += CLIPLL(irangefn[hipass + 0x10000] * hipass); - buffer[i][j] = CLIPLL(buffer[i][j]); + buffer[i][j] += irangefn[hipass + 0x10000] * hipass; + } } if(blurcb > 0.f) { diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 2c49578af..f1bc421fe 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -691,7 +691,11 @@ enum ProcEventCode { Evlocallabnoiselumf0 = 661, Evlocallabnoiselumf2 = 662, EvLocallabblurcbdl = 663, - + Evlocallabblendmaskcb = 664, + Evlocallabradmaskcb = 665, + Evlocallabchromaskcb = 666, + Evlocallabgammaskcb = 667, + Evlocallabslomaskcb = 668, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 5c682fd60..3feb52a5e 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2501,6 +2501,11 @@ LocallabParams::LocallabSpot::LocallabSpot() : contresid(0), blurcbdl(0), softradiuscb(0.0), + blendmaskcb(0), + radmaskcb(10.0), + chromaskcb(0.0), + gammaskcb(1.0), + slomaskcb(0.0), // Denoise expdenoi(false), noiselumf(0), @@ -2696,6 +2701,11 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && contresid == other.contresid && blurcbdl == other.blurcbdl && softradiuscb == other.softradiuscb + && blendmaskcb == other.blendmaskcb + && radmaskcb == other.radmaskcb + && chromaskcb == other.chromaskcb + && gammaskcb == other.gammaskcb + && slomaskcb == other.slomaskcb // Denoise && expdenoi == other.expdenoi && noiselumf == other.noiselumf @@ -3833,6 +3843,11 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).contresid, "Locallab", "Contresid_" + std::to_string(i), spot.contresid, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurcbdl, "Locallab", "Blurcbdl_" + std::to_string(i), spot.blurcbdl, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiuscb, "Locallab", "Softradiuscb_" + std::to_string(i), spot.softradiuscb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blendmaskcb, "Locallab", "Blendmaskcb_" + std::to_string(i), spot.blendmaskcb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).radmaskcb, "Locallab", "Radmaskcb_" + std::to_string(i), spot.radmaskcb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskcb, "Locallab", "Chromaskcb_" + std::to_string(i), spot.chromaskcb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskcb, "Locallab", "Gammaskcb_" + std::to_string(i), spot.gammaskcb, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskcb, "Locallab", "Slomaskcb_" + std::to_string(i), spot.slomaskcb, keyFile); // Denoise saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expdenoi, "Locallab", "Expdenoi_" + std::to_string(i), spot.expdenoi, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).noiselumf, "Locallab", "noiselumf_" + std::to_string(i), spot.noiselumf, keyFile); @@ -5116,6 +5131,11 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Contresid_" + std::to_string(i), pedited, spot.contresid, spotEdited.contresid); assignFromKeyfile(keyFile, "Locallab", "Blurcbdl_" + std::to_string(i), pedited, spot.blurcbdl, spotEdited.blurcbdl); assignFromKeyfile(keyFile, "Locallab", "Softradiuscb_" + std::to_string(i), pedited, spot.softradiuscb, spotEdited.softradiuscb); + assignFromKeyfile(keyFile, "Locallab", "Blendmaskcb_" + std::to_string(i), pedited, spot.blendmaskcb, spotEdited.blendmaskcb); + assignFromKeyfile(keyFile, "Locallab", "Radmaskcb_" + std::to_string(i), pedited, spot.radmaskcb, spotEdited.radmaskcb); + assignFromKeyfile(keyFile, "Locallab", "Chromaskcb_" + std::to_string(i), pedited, spot.chromaskcb, spotEdited.chromaskcb); + assignFromKeyfile(keyFile, "Locallab", "Gammaskcb_" + std::to_string(i), pedited, spot.gammaskcb, spotEdited.gammaskcb); + assignFromKeyfile(keyFile, "Locallab", "Slomaskcb_" + std::to_string(i), pedited, spot.slomaskcb, spotEdited.slomaskcb); // Denoise assignFromKeyfile(keyFile, "Locallab", "Expdenoi_" + std::to_string(i), pedited, spot.expdenoi, spotEdited.expdenoi); assignFromKeyfile(keyFile, "Locallab", "noiselumf_" + std::to_string(i), pedited, spot.noiselumf, spotEdited.noiselumf); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 6de7b04c9..d1d0b6074 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1102,6 +1102,11 @@ struct LocallabParams { int contresid; int blurcbdl; double softradiuscb; + int blendmaskcb; + double radmaskcb; + double chromaskcb; + double gammaskcb; + double slomaskcb; // Denoise bool expdenoi; int noiselumf; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 7488ab587..9f09b5382 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -690,7 +690,14 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvLocallabcontresid LUMINANCECURVE, //Evlocallabnoiselumf0 LUMINANCECURVE, //Evlocallabnoiselumf2 - LUMINANCECURVE //Evlocallabblurcbdl + LUMINANCECURVE, //Evlocallabblurcbdl + LUMINANCECURVE, //Evlocallabblendmaskcb + LUMINANCECURVE, // Evlocallabradmaskcb + LUMINANCECURVE, //Evlocallabchromaskcb + LUMINANCECURVE, //Evlocallabgammaskcb + LUMINANCECURVE //Evlocallabslomaskcb + + }; diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 0fecf9b54..a69db5375 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -23,8 +23,10 @@ #include "multilangmgr.h" #include #include "editwidgets.h" +#include "options.h" using namespace rtengine; +extern Options options; //----------------------------------------------------------------------------- // ControlSpotPanel @@ -58,10 +60,10 @@ ControlSpotPanel::ControlSpotPanel(): centerY_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CENTER_Y"), -1000, 1000, 1, 0))), circrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CIRCRADIUS"), 2, 150, 1, 18))), transit_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITVALUE"), 5, 95, 1, 60))), - thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 8.0, 0.1, 2.0))), - iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 4.0, 0.1, 2.0))), - balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.3, 1.7, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), - transitweak_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITWEAK"), 0.5, 4.0, 0.1, 1.0))), + thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 10.0, 0.1, 2.0))), + iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 10.0, 0.1, 2.0))), + balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), + transitweak_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITWEAK"), 0.5, 8.0, 0.1, 1.0))), avoid_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOID")))), @@ -74,6 +76,8 @@ ControlSpotPanel::ControlSpotPanel(): eventType(0), excluFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_EXCLUF")))) { + bool showtooltip = options.showtooltip; + Gtk::HBox* const hbox1_ = Gtk::manage(new Gtk::HBox(true, 4)); hbox1_->pack_start(button_add_); hbox1_->pack_start(button_delete_); @@ -157,7 +161,7 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::HBox* const ctboxspotmethod = Gtk::manage(new Gtk::HBox()); Gtk::Label* const labelspotmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_EXCLUTYPE") + ":")); ctboxspotmethod->pack_start(*labelspotmethod, Gtk::PACK_SHRINK, 4); - ctboxspotmethod->set_tooltip_markup(M("TP_LOCALLAB_EXCLUTYPE_TOOLTIP")); + if(showtooltip) ctboxspotmethod->set_tooltip_markup(M("TP_LOCALLAB_EXCLUTYPE_TOOLTIP")); spotMethod_->append(M("TP_LOCALLAB_EXNORM")); spotMethod_->append(M("TP_LOCALLAB_EXECLU")); spotMethod_->set_active(0); @@ -168,9 +172,9 @@ ControlSpotPanel::ControlSpotPanel(): pack_start(*ctboxspotmethod); excluFrame->set_label_align(0.025, 0.5); - excluFrame->set_tooltip_text(M("TP_LOCALLAB_EXCLUF_TOOLTIP")); + if(showtooltip) excluFrame->set_tooltip_text(M("TP_LOCALLAB_EXCLUF_TOOLTIP")); ToolParamBlock* const excluBox = Gtk::manage(new ToolParamBlock()); - sensiexclu_->set_tooltip_text(M("TP_LOCALLAB_SENSIEXCLU_TOOLTIP")); + if(showtooltip) sensiexclu_->set_tooltip_text(M("TP_LOCALLAB_SENSIEXCLU_TOOLTIP")); sensiexclu_->setAdjusterListener(this); structexclu_->setAdjusterListener(this); excluBox->pack_start(*sensiexclu_); @@ -181,7 +185,7 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::HBox* const ctboxshapemethod = Gtk::manage(new Gtk::HBox()); Gtk::Label* const labelshapemethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_STYPE") + ":")); ctboxshapemethod->pack_start(*labelshapemethod, Gtk::PACK_SHRINK, 4); - ctboxshapemethod->set_tooltip_markup(M("TP_LOCALLAB_STYPE_TOOLTIP")); + if(showtooltip) ctboxshapemethod->set_tooltip_markup(M("TP_LOCALLAB_STYPE_TOOLTIP")); shapeMethod_->append(M("TP_LOCALLAB_IND")); shapeMethod_->append(M("TP_LOCALLAB_SYM")); shapeMethod_->append(M("TP_LOCALLAB_INDSL")); @@ -217,7 +221,7 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::HBox* const ctboxqualitymethod = Gtk::manage(new Gtk::HBox()); Gtk::Label* const labelqualitymethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_QUAL_METHOD") + ":")); ctboxqualitymethod->pack_start(*labelqualitymethod, Gtk::PACK_SHRINK, 4); - ctboxqualitymethod->set_tooltip_markup(M("TP_LOCALLAB_METHOD_TOOLTIP")); + if(showtooltip) ctboxqualitymethod->set_tooltip_markup(M("TP_LOCALLAB_METHOD_TOOLTIP")); // qualityMethod_->append(M("TP_LOCALLAB_STD")); qualityMethod_->append(M("TP_LOCALLAB_ENH")); qualityMethod_->append(M("TP_LOCALLAB_ENHDEN")); @@ -230,10 +234,10 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::Frame* const transitFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TRANSIT"))); transitFrame->set_label_align(0.025, 0.5); - transitFrame->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); + if(showtooltip) transitFrame->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); ToolParamBlock* const transitBox = Gtk::manage(new ToolParamBlock()); - transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); - transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP")); + if(showtooltip) transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); + if(showtooltip) transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP")); transit_->setAdjusterListener(this); transitweak_->setAdjusterListener(this); @@ -245,7 +249,7 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::Frame* const artifFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_ARTIF"))); artifFrame->set_label_align(0.025, 0.5); - artifFrame->set_tooltip_text(M("TP_LOCALLAB_ARTIF_TOOLTIP")); + if(showtooltip) artifFrame->set_tooltip_text(M("TP_LOCALLAB_ARTIF_TOOLTIP")); ToolParamBlock* const artifBox = Gtk::manage(new ToolParamBlock()); thresh_->setAdjusterListener(this); struc_->setAdjusterListener(this); diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index b29e3b5e3..521bd4557 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -167,6 +167,11 @@ Locallab::Locallab(): blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0, 100, 1, 0))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), + blendmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), + radmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 10.))), + chromaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), + gammaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), + slomaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), // Denoise noiselumf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINE"), MINCHRO, MAXCHRO, 1, 0))), noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 1, 0))), @@ -930,6 +935,11 @@ Locallab::Locallab(): clarityml->setAdjusterListener(this); contresid->setAdjusterListener(this); blurcbdl->setAdjusterListener(this); + blendmaskcb->setAdjusterListener(this); + radmaskcb->setAdjusterListener(this); + chromaskcb->setAdjusterListener(this); + gammaskcb->setAdjusterListener(this); + slomaskcb->setAdjusterListener(this); ToolParamBlock* const cbdlBox = Gtk::manage(new ToolParamBlock()); Gtk::HBox* buttonBox = Gtk::manage(new Gtk::HBox(true, 10)); @@ -958,6 +968,11 @@ Locallab::Locallab(): cbdlBox->pack_start(*residFrame); cbdlBox->pack_start(*softradiuscb); cbdlBox->pack_start(*sensicb); + //cbdlBox->pack_start(*blendmaskcb); + //cbdlBox->pack_start(*radmaskcb); + //cbdlBox->pack_start(*chromaskcb); + //cbdlBox->pack_start(*gammaskcb); + //cbdlBox->pack_start(*slomaskcb); expcbdl->add(*cbdlBox); expcbdl->setLevel(2); @@ -1874,6 +1889,13 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue(); + + pp->locallab.spots.at(pp->locallab.selspot).blendmaskcb = blendmaskcb->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).radmaskcb = radmaskcb->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).chromaskcb = chromaskcb->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).gammaskcb = gammaskcb->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).slomaskcb = slomaskcb->getValue(); + // Denoise pp->locallab.spots.at(pp->locallab.selspot).expdenoi = expdenoi->getEnabled(); pp->locallab.spots.at(pp->locallab.selspot).noiselumf = noiselumf->getIntValue(); @@ -2059,6 +2081,13 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).contresid = pe->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).blurcbdl = pe->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).softradiuscb = pe->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); + + pe->locallab.spots.at(pp->locallab.selspot).blendmaskcb = pe->locallab.spots.at(pp->locallab.selspot).blendmaskcb || blendmaskcb->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).radmaskcb = pe->locallab.spots.at(pp->locallab.selspot).radmaskcb || radmaskcb->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).chromaskcb = pe->locallab.spots.at(pp->locallab.selspot).chromaskcb || chromaskcb->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).gammaskcb = pe->locallab.spots.at(pp->locallab.selspot).gammaskcb || gammaskcb->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).slomaskcb = pe->locallab.spots.at(pp->locallab.selspot).slomaskcb || slomaskcb->getEditedState(); + // Denoise pe->locallab.spots.at(pp->locallab.selspot).expdenoi = pe->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).noiselumf = pe->locallab.spots.at(pp->locallab.selspot).noiselumf || noiselumf->getEditedState(); @@ -2246,6 +2275,13 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).contresid = pedited->locallab.spots.at(pp->locallab.selspot).contresid || contresid->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl = pedited->locallab.spots.at(pp->locallab.selspot).blurcbdl || blurcbdl->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscb || softradiuscb->getEditedState(); + + pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcb = pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcb || blendmaskcb->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).radmaskcb = pedited->locallab.spots.at(pp->locallab.selspot).radmaskcb || radmaskcb->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).chromaskcb = pedited->locallab.spots.at(pp->locallab.selspot).chromaskcb || chromaskcb->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).gammaskcb = pedited->locallab.spots.at(pp->locallab.selspot).gammaskcb || gammaskcb->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).slomaskcb = pedited->locallab.spots.at(pp->locallab.selspot).slomaskcb || slomaskcb->getEditedState(); + // Denoise pedited->locallab.spots.at(pp->locallab.selspot).expdenoi = pedited->locallab.spots.at(pp->locallab.selspot).expdenoi || !expdenoi->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).noiselumf = pedited->locallab.spots.at(pp->locallab.selspot).noiselumf || noiselumf->getEditedState(); @@ -3114,6 +3150,12 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe contresid->setDefault((double)defSpot->contresid); blurcbdl->setDefault((double)defSpot->blurcbdl); softradiuscb->setDefault(defSpot->softradiuscb); + blendmaskcb->setDefault((double)defSpot->blendmaskcb); + radmaskcb->setDefault(defSpot->radmaskcb); + chromaskcb->setDefault(defSpot->chromaskcb); + gammaskcb->setDefault(defSpot->gammaskcb); + slomaskcb->setDefault(defSpot->slomaskcb); + // Denoise noiselumf->setDefault((double)defSpot->noiselumf); noiselumf0->setDefault((double)defSpot->noiselumf0); @@ -3228,6 +3270,12 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe contresid->setDefaultEditedState(Irrelevant); blurcbdl->setDefaultEditedState(Irrelevant); softradiuscb->setDefaultEditedState(Irrelevant); + blendmaskcb->setDefaultEditedState(Irrelevant); + radmaskcb->setDefaultEditedState(Irrelevant); + chromaskcb->setDefaultEditedState(Irrelevant); + gammaskcb->setDefaultEditedState(Irrelevant); + slomaskcb->setDefaultEditedState(Irrelevant); + // Denoise noiselumf->setDefaultEditedState(Irrelevant); noiselumf0->setDefaultEditedState(Irrelevant); @@ -3346,6 +3394,13 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe contresid->setDefaultEditedState(defSpotState->contresid ? Edited : UnEdited); blurcbdl->setDefaultEditedState(defSpotState->blurcbdl ? Edited : UnEdited); softradiuscb->setDefaultEditedState(defSpotState->softradiuscb ? Edited : UnEdited); + + blendmaskcb->setDefaultEditedState(defSpotState->blendmaskcb ? Edited : UnEdited); + radmaskcb->setDefaultEditedState(defSpotState->radmaskcb ? Edited : UnEdited); + chromaskcb->setDefaultEditedState(defSpotState->chromaskcb ? Edited : UnEdited); + gammaskcb->setDefaultEditedState(defSpotState->gammaskcb ? Edited : UnEdited); + slomaskcb->setDefaultEditedState(defSpotState->slomaskcb ? Edited : UnEdited); + // Denoise noiselumf->setDefaultEditedState(defSpotState->noiselumf ? Edited : UnEdited); noiselumf0->setDefaultEditedState(defSpotState->noiselumf0 ? Edited : UnEdited); @@ -3952,7 +4007,37 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) listener->panelChanged(Evlocallabsoftradiuscb, softradiuscb->getTextValue()); } } - + + if (a == blendmaskcb) { + if (listener) { + listener->panelChanged(Evlocallabblendmaskcb, blendmaskcb->getTextValue()); + } + } + + if (a == radmaskcb) { + if (listener) { + listener->panelChanged(Evlocallabradmaskcb, radmaskcb->getTextValue()); + } + } + + if (a == chromaskcb) { + if (listener) { + listener->panelChanged(Evlocallabchromaskcb, chromaskcb->getTextValue()); + } + } + + if (a == gammaskcb) { + if (listener) { + listener->panelChanged(Evlocallabgammaskcb, gammaskcb->getTextValue()); + } + } + + if (a == slomaskcb) { + if (listener) { + listener->panelChanged(Evlocallabslomaskcb, slomaskcb->getTextValue()); + } + } + } // Denoise @@ -4155,6 +4240,12 @@ void Locallab::setBatchMode(bool batchMode) contresid->showEditedCB(); blurcbdl->showEditedCB(); softradiuscb->showEditedCB(); + blendmaskcb->showEditedCB(); + radmaskcb->showEditedCB(); + chromaskcb->showEditedCB(); + gammaskcb->showEditedCB(); + slomaskcb->showEditedCB(); + // Denoise noiselumf->showEditedCB(); noiselumc->showEditedCB(); @@ -4597,6 +4688,11 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con contresid->setValue(pp->locallab.spots.at(index).contresid); blurcbdl->setValue(pp->locallab.spots.at(index).blurcbdl); softradiuscb->setValue(pp->locallab.spots.at(index).softradiuscb); + blendmaskcb->setValue(pp->locallab.spots.at(index).blendmaskcb); + radmaskcb->setValue(pp->locallab.spots.at(index).radmaskcb); + chromaskcb->setValue(pp->locallab.spots.at(index).chromaskcb); + gammaskcb->setValue(pp->locallab.spots.at(index).gammaskcb); + slomaskcb->setValue(pp->locallab.spots.at(index).slomaskcb); // Denoise expdenoi->setEnabled(pp->locallab.spots.at(index).expdenoi); @@ -4819,6 +4915,11 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con contresid->setEditedState(spotState->contresid ? Edited : UnEdited); blurcbdl->setEditedState(spotState->blurcbdl ? Edited : UnEdited); softradiuscb->setEditedState(spotState->softradiuscb ? Edited : UnEdited); + blendmaskcb->setEditedState(spotState->blendmaskcb ? Edited : UnEdited); + radmaskcb->setEditedState(spotState->radmaskcb ? Edited : UnEdited); + chromaskcb->setEditedState(spotState->chromaskcb ? Edited : UnEdited); + gammaskcb->setEditedState(spotState->gammaskcb ? Edited : UnEdited); + slomaskcb->setEditedState(spotState->slomaskcb ? Edited : UnEdited); // Denoise expdenoi->set_inconsistent(!spotState->expdenoi); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 8be29fbdf..a2dc79281 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -187,6 +187,12 @@ private: Adjuster* const blurcbdl; Adjuster* const sensicb; Adjuster* const softradiuscb; + Adjuster* const blendmaskcb; + Adjuster* const radmaskcb; + Adjuster* const chromaskcb; + Adjuster* const gammaskcb; + Adjuster* const slomaskcb; + // Denoise Adjuster* const noiselumf; Adjuster* const noiselumf0; diff --git a/rtgui/options.cc b/rtgui/options.cc index 01cfe0e10..41fd72011 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -594,7 +594,7 @@ void Options::setDefaults() rtSettings.reduclow = 0.85;//transition for luminance out scope rtSettings.detectshape = true;//experimental new detection shape rtSettings.previewselection = 5;//betwen 1 to 40 - rtSettings.cbdlsensi = 0.4;//betwen 0.001 to 1 + rtSettings.cbdlsensi = 1.0;//betwen 0.001 to 1 // end locallab diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index d8cc20385..c3bde6e57 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1094,6 +1094,11 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).clarityml = locallab.spots.at(j).clarityml && pSpot.clarityml == otherSpot.clarityml; locallab.spots.at(j).contresid = locallab.spots.at(j).contresid && pSpot.contresid == otherSpot.contresid; locallab.spots.at(j).blurcbdl = locallab.spots.at(j).blurcbdl && pSpot.blurcbdl == otherSpot.blurcbdl; + locallab.spots.at(j).blendmaskcb = locallab.spots.at(j).blendmaskcb && pSpot.blendmaskcb == otherSpot.blendmaskcb; + locallab.spots.at(j).radmaskcb = locallab.spots.at(j).radmaskcb && pSpot.radmaskcb == otherSpot.radmaskcb; + locallab.spots.at(j).chromaskcb = locallab.spots.at(j).chromaskcb && pSpot.chromaskcb == otherSpot.chromaskcb; + locallab.spots.at(j).gammaskcb = locallab.spots.at(j).gammaskcb && pSpot.gammaskcb == otherSpot.gammaskcb; + locallab.spots.at(j).slomaskcb = locallab.spots.at(j).slomaskcb && pSpot.slomaskcb == otherSpot.slomaskcb; locallab.spots.at(j).softradiuscb = locallab.spots.at(j).softradiuscb && pSpot.softradiuscb == otherSpot.softradiuscb; // Denoise locallab.spots.at(j).expdenoi = locallab.spots.at(j).expdenoi && pSpot.expdenoi == otherSpot.expdenoi; @@ -3152,6 +3157,26 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).blurcbdl = mods.locallab.spots.at(i).blurcbdl; } + if (locallab.spots.at(i).blendmaskcb) { + toEdit.locallab.spots.at(i).blendmaskcb = mods.locallab.spots.at(i).blendmaskcb; + } + + if (locallab.spots.at(i).radmaskcb) { + toEdit.locallab.spots.at(i).radmaskcb = mods.locallab.spots.at(i).radmaskcb; + } + + if (locallab.spots.at(i).chromaskcb) { + toEdit.locallab.spots.at(i).chromaskcb = mods.locallab.spots.at(i).chromaskcb; + } + + if (locallab.spots.at(i).gammaskcb) { + toEdit.locallab.spots.at(i).gammaskcb = mods.locallab.spots.at(i).gammaskcb; + } + + if (locallab.spots.at(i).slomaskcb) { + toEdit.locallab.spots.at(i).slomaskcb = mods.locallab.spots.at(i).slomaskcb; + } + if (locallab.spots.at(i).softradiuscb) { toEdit.locallab.spots.at(i).softradiuscb = mods.locallab.spots.at(i).softradiuscb; } @@ -4313,6 +4338,11 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : clarityml(v), contresid(v), blurcbdl(v), + blendmaskcb(v), + radmaskcb(v), + chromaskcb(v), + gammaskcb(v), + slomaskcb(v), softradiuscb(v), // Denoise expdenoi(v), @@ -4500,6 +4530,11 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) clarityml = v; contresid = v; blurcbdl = v; + blendmaskcb = v; + radmaskcb = v; + chromaskcb = v; + gammaskcb = v; + slomaskcb = v; softradiuscb = v; // Denoise expdenoi = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 316730398..3283cd400 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -517,7 +517,13 @@ public: bool clarityml; bool contresid; bool blurcbdl; + bool blendmaskcb; + bool radmaskcb; + bool chromaskcb; + bool gammaskcb; + bool slomaskcb; bool softradiuscb; + // Denoise bool expdenoi; bool noiselumf;