diff --git a/rtdata/languages/default b/rtdata/languages/default index 2fafdd15a..1ca590f77 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1069,6 +1069,7 @@ HISTORY_MSG_829;Local - SH gradient angle HISTORY_MSG_830;Local - Color gradient strength L HISTORY_MSG_831;Local - Color gradient angle HISTORY_MSG_832;Local - Color gradient strength C +HISTORY_MSG_833;Local - Gradient feather HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2298,6 +2299,10 @@ TP_LOCALLAB_EXNORM;Normal spot TP_LOCALLAB_EXECLU;Excluding spot TP_LOCALLAB_EXPOSE;Exposure TP_LOCALLAB_GRADFRA;Graduated Filter +TP_LOCALLAB_FEATH_TOOLTIP;Gradient width in percent of the Spot diagonal\n.Disabled for negatives chrominance. +TP_LOCALLAB_GRADSTR_TOOLTIP;Filter strength in stops +TP_LOCALLAB_GRADANG_TOOLTIP;Rotation angle in degrees -90 0 +90 +TP_LOCALLAB_GRADSTRAB_TOOLTIP;Filter chroma strength TP_LOCALLAB_ENABLE_MASKAFT;Use all algorithms Exposure TP_LOCALLAB_EXPOSURE_TOOLTIP;In some cases (strong shadows ..) you can use the module "Shadows Highlights" TP_LOCALLAB_EXPCHROMA;Chroma compensation @@ -2472,6 +2477,7 @@ TP_LOCALLAB_TM_MASK;Use transmission map TP_LOCALLAB_TRANSIT;Transition Gradient TP_LOCALLAB_TRANSIT_TOOLTIP;Adjust smoothness of transition between affected and unaffected areas. TP_LOCALLAB_TRANSITVALUE;Transition value +TP_LOCALLAB_FEATVALUE;Feather gradient TP_LOCALLAB_TRANSITGRAD;Transition differentiation XY TP_LOCALLAB_TRANSITGRAD_TOOLTIP;Changes the transition of the abscissa to that of the ordinate TP_LOCALLAB_TRANSITWEAK;Transition weakening diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 514ad4cbf..fd0f10953 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -35,7 +35,7 @@ #include "jaggedarray.h" #include "rt_algo.h" #include "settings.h" - +#include "utils.h" #ifdef _OPENMP #include #endif @@ -272,6 +272,7 @@ struct local_params { int guidb; float epsb; float trans; + float feath; float transweak; float transgrad; int dehaze; @@ -768,6 +769,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float blurcolor = (float) locallab.spots.at(sp).blurcolde; float blurSH = (float) locallab.spots.at(sp).blurSHde; float local_transit = locallab.spots.at(sp).transit; + float local_feather = locallab.spots.at(sp).feather; float local_transitweak = (float)locallab.spots.at(sp).transitweak; float local_transitgrad = (float)locallab.spots.at(sp).transitgrad; float radius = (float) locallab.spots.at(sp).radius; @@ -929,6 +931,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall } lp.trans = local_transit; + lp.feath = local_feather; lp.transweak = local_transitweak; lp.transgrad = local_transitgrad; lp.rad = radius; @@ -2623,8 +2626,13 @@ void calclocalGradientParams(const struct local_params& lp, struct grad_params& double gradient_center_x = LIM01((lp.xc - xstart) / bfw); double gradient_center_y = LIM01((lp.yc - ystart) / bfh); double gradient_angle = angs / 180.0 * rtengine::RT_PI; + double varfeath = 0.01 * lp.feath; - printf("xstart=%f ysta=%f lpxc=%f lpyc=%f stop=%f bb=%f cc=%f ang=%f ff=%d gg=%d\n", xstart, ystart, lp.xc, lp.yc, gradient_stops, gradient_center_x, gradient_center_y, gradient_angle, w, h); + if(indic ==4 && lp.strcolab > 0.f) { //chroma + varfeath = 1.f; + } + + // printf("xstart=%f ysta=%f lpxc=%f lpyc=%f stop=%f bb=%f cc=%f ang=%f ff=%d gg=%d\n", xstart, ystart, lp.xc, lp.yc, gradient_stops, gradient_center_x, gradient_center_y, gradient_angle, w, h); // make 0.0 <= gradient_angle < 2 * rtengine::RT_PI gradient_angle = fmod(gradient_angle, 2 * rtengine::RT_PI); @@ -2683,7 +2691,7 @@ void calclocalGradientParams(const struct local_params& lp, struct grad_params& gp.ta = tan(gradient_angle); gp.xc = w * gradient_center_x; gp.yc = h * gradient_center_y; - gp.ys = sqrt((float)h * h + (float)w * w) * (1.f / cos(gradient_angle)); + gp.ys = sqrt((float)h * h + (float)w * w) * (varfeath / cos(gradient_angle)); gp.ys_inv = 1.0 / gp.ys; gp.top_edge_0 = gp.yc - gp.ys / 2.0; @@ -12561,7 +12569,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (ch <= 1.f) { chprosl = 99.f * ch - 99.f; } else { - constexpr float ampli = 70.f; + constexpr float ampli = 50.f; chprosl = CLIPCHRO(ampli * ch - ampli); } } @@ -12730,16 +12738,42 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o //test for write text , now it compile... but does nothing // why ?? is arial found (I tried others) or I missed something - /* +/* locImage = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, bfw, bfh); Cairo::RefPtr cr = Cairo::Context::create(locImage); + cr->set_source_rgb(0.1, 0.1, 0.1); - cr->select_font_face ("Arial", Cairo::FontSlant::FONT_SLANT_NORMAL, Cairo::FontWeight::FONT_WEIGHT_BOLD); - cr->set_font_size (20); - cr->move_to (20, 20); - cr->show_text ("Coucou"); - printf("OK \n"); - */ + cr->select_font_face("Arial", Cairo::FontSlant::FONT_SLANT_NORMAL, Cairo::FontWeight::FONT_WEIGHT_BOLD); + cr->set_font_size(20); + cr->move_to(20, 20); + cr->show_text("Coucou"); + Imagefloat *tmpImageorig = nullptr; + tmpImageorig = new Imagefloat(bfw, bfh); + lab2rgb(*bufcolfin, *tmpImageorig, params->icm.workingProfile); + tmpImageorig->normalizeFloatTo1(); + for (int y = 0; y < bfh ; y++) { + unsigned char *dst = locImage->get_data() + (y * bfw + x) * 4; + + for (int x = 0; x < bfw; x++) { + float r = tmpImageorig->r(y, x); + float g = tmpImageorig->g(y, x); + float b = tmpImageorig->b(y, x); + poke01_d(dst, r, g, b); + tmpImageorig->r(y, x) = r; + tmpImageorig->g(y, x) = g; + tmpImageorig->b(y, x) = b; + + } + } + + locImage->mark_dirty(); + + + + tmpImageorig->normalizeFloatTo65535(); + rgb2lab(*tmpImageorig, *bufcolfin, params->icm.workingProfile); + delete tmpImageorig; +*/ JaggedArray blend(bfw, bfh); buildBlendMask(lumreserv, blend, bfw, bfh, conthr, 1.f); float rm = 20.f / sk; @@ -13411,6 +13445,32 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bufcolfin->L[ir][jr] *= factor; } } + + if (lp.strcolab != 0.f) { + struct grad_params gpab; + calclocalGradientParams(lp, gpab, ystart, xstart, bfw, bfh, 4); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + double factor = 1.0; + factor = ImProcFunctions::calcGradientFactor(gpab, jr, ir); + float cor = 0.f; + + if(factor < 1.f) { + cor = -60.f * factor; + } else if(factor > 1.f) { + cor = 2.f * factor; + } + bufchro[ir][jr] += cor; + if(bufchro[ir][jr] < -99.f) { + bufchro[ir][jr] = -99.f; + } + } + } if (lp.softradiuscol > 0.f) { softproc(bufcolorig.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.0001, 0.00001, 0.1f, sk, multiThread, 0); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index b1c53d073..f54e544ae 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -856,6 +856,7 @@ enum ProcEventCode { Evlocallabstrcol = 829, Evlocallabangcol = 830, Evlocallabstrcolab = 831, + EvLocallabSpotfeather = 832, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index e09f738fa..4a2053d31 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2432,6 +2432,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : circrad(18), qualityMethod("enh"), transit(60.), + feather(50.), thresh(2.0), iter(2.0), balan(1.0), @@ -2781,6 +2782,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && circrad == other.circrad && qualityMethod == other.qualityMethod && transit == other.transit + && feather == other.feather && thresh == other.thresh && iter == other.iter && balan == other.balan @@ -4124,6 +4126,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).circrad, "Locallab", "Circrad_" + std::to_string(i), spot.circrad, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).qualityMethod, "Locallab", "QualityMethod_" + std::to_string(i), spot.qualityMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).transit, "Locallab", "Transit_" + std::to_string(i), spot.transit, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).feather, "Locallab", "Feather_" + std::to_string(i), spot.feather, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).thresh, "Locallab", "Thresh_" + std::to_string(i), spot.thresh, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).iter, "Locallab", "Iter_" + std::to_string(i), spot.iter, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).balan, "Locallab", "Balan_" + std::to_string(i), spot.balan, keyFile); @@ -5575,6 +5578,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Circrad_" + std::to_string(i), pedited, spot.circrad, spotEdited.circrad); assignFromKeyfile(keyFile, "Locallab", "QualityMethod_" + std::to_string(i), pedited, spot.qualityMethod, spotEdited.qualityMethod); assignFromKeyfile(keyFile, "Locallab", "Transit_" + std::to_string(i), pedited, spot.transit, spotEdited.transit); + assignFromKeyfile(keyFile, "Locallab", "Feather_" + std::to_string(i), pedited, spot.feather, spotEdited.feather); assignFromKeyfile(keyFile, "Locallab", "Thresh_" + std::to_string(i), pedited, spot.thresh, spotEdited.thresh); assignFromKeyfile(keyFile, "Locallab", "Iter_" + std::to_string(i), pedited, spot.iter, spotEdited.iter); assignFromKeyfile(keyFile, "Locallab", "Balan_" + std::to_string(i), pedited, spot.balan, spotEdited.balan); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index a010c0e3c..f94e37a8b 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -975,6 +975,7 @@ struct LocallabParams { int circrad; Glib::ustring qualityMethod; // none, std, enh, enhsup, contr, sob2 double transit; + double feather; double thresh; double iter; double balan; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 2660b8e28..245db4fe9 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -859,7 +859,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //EvlocallabangSH LUMINANCECURVE, // Evlocallabstrcol LUMINANCECURVE, // Evlocallabangcol - LUMINANCECURVE // Evlocallabstrcolab + LUMINANCECURVE, // Evlocallabstrcolab + LUMINANCECURVE // EvLocallabSpotfeather }; diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 2322298a7..afc744bae 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -65,6 +65,7 @@ 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., 100., 0.1, 60.))), + feather_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FEATVALUE"), 10., 100., 0.1, 50.))), 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"))))), @@ -286,6 +287,10 @@ ControlSpotPanel::ControlSpotPanel(): transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP")); } + if (showtooltip) { + feather_->set_tooltip_text(M("TP_LOCALLAB_FEATH_TOOLTIP")); + } + if (showtooltip) { transitgrad_->set_tooltip_text(M("TP_LOCALLAB_TRANSITGRAD_TOOLTIP")); } @@ -304,6 +309,7 @@ ControlSpotPanel::ControlSpotPanel(): } transit_->setAdjusterListener(this); + feather_->setAdjusterListener(this); transitweak_->setAdjusterListener(this); transitgrad_->setAdjusterListener(this); scopemask_->setAdjusterListener(this); @@ -312,6 +318,7 @@ ControlSpotPanel::ControlSpotPanel(): transitBox->pack_start(*transit_); transitBox->pack_start(*transitweak_); transitBox->pack_start(*transitgrad_); + transitBox->pack_start(*feather_); transitFrame->add(*transitBox); pack_start(*transitFrame); @@ -695,6 +702,7 @@ void ControlSpotPanel::load_ControlSpot_param() circrad_->setValue((double)row[spots_.circrad]); qualityMethod_->set_active(row[spots_.qualityMethod]); transit_->setValue((double)row[spots_.transit]); + feather_->setValue((double)row[spots_.feather]); thresh_->setValue((double)row[spots_.thresh]); iter_->setValue((double)row[spots_.iter]); balan_->setValue((double)row[spots_.balan]); @@ -1118,6 +1126,13 @@ void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval) } } + if (a == feather_) { + row[spots_.feather] = feather_->getValue(); + + if (listener) { + listener->panelChanged(EvLocallabSpotfeather, feather_->getTextValue()); + } + } if (a == thresh_) { row[spots_.thresh] = thresh_->getValue(); @@ -1414,6 +1429,7 @@ void ControlSpotPanel::disableParamlistener(bool cond) circrad_->block(cond); qualityMethodconn_.block(cond); transit_->block(cond); + feather_->block(cond); thresh_->block(cond); iter_->block(cond); balan_->block(cond); @@ -1449,6 +1465,7 @@ void ControlSpotPanel::setParamEditable(bool cond) circrad_->set_sensitive(cond); qualityMethod_->set_sensitive(cond); transit_->set_sensitive(cond); + feather_->set_sensitive(cond); thresh_->set_sensitive(cond); iter_->set_sensitive(cond); balan_->set_sensitive(cond); @@ -2092,6 +2109,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int id) r->circrad = row[spots_.circrad]; r->qualityMethod = row[spots_.qualityMethod]; r->transit = row[spots_.transit]; + r->feather = row[spots_.feather]; r->thresh = row[spots_.thresh]; r->iter = row[spots_.iter]; r->balan = row[spots_.balan]; @@ -2226,6 +2244,7 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot) row[spots_.circrad] = newSpot->circrad; row[spots_.qualityMethod] = newSpot->qualityMethod; row[spots_.transit] = newSpot->transit; + row[spots_.feather] = newSpot->feather; row[spots_.thresh] = newSpot->thresh; row[spots_.iter] = newSpot->iter; row[spots_.balan] = newSpot->balan; @@ -2279,6 +2298,7 @@ int ControlSpotPanel::updateControlSpot(SpotRow* spot) row[spots_.circrad] = spot->circrad; row[spots_.qualityMethod] = spot->qualityMethod; row[spots_.transit] = spot->transit; + row[spots_.feather] = spot->feather; row[spots_.thresh] = spot->thresh; row[spots_.iter] = spot->iter; row[spots_.balan] = spot->balan; @@ -2378,6 +2398,7 @@ ControlSpotPanel::SpotEdited* ControlSpotPanel::getEditedStates() se->circrad = circrad_->getEditedState(); se->qualityMethod = qualityMethod_->get_active_text() != M("GENERAL_UNCHANGED"); se->transit = transit_->getEditedState(); + se->feather = feather_->getEditedState(); se->thresh = thresh_->getEditedState(); se->iter = iter_->getEditedState(); se->balan = balan_->getEditedState(); @@ -2459,6 +2480,7 @@ void ControlSpotPanel::setEditedStates(SpotEdited* se) } transit_->setEditedState(se->transit ? Edited : UnEdited); + feather_->setEditedState(se->feather ? Edited : UnEdited); thresh_->setEditedState(se->thresh ? Edited : UnEdited); iter_->setEditedState(se->iter ? Edited : UnEdited); balan_->setEditedState(se->balan ? Edited : UnEdited); @@ -2511,6 +2533,7 @@ void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defP centerY_->setDefault((double)defSpot->centerY); circrad_->setDefault((double)defSpot->circrad); transit_->setDefault(defSpot->transit); + feather_->setDefault(defSpot->feather); thresh_->setDefault(defSpot->thresh); iter_->setDefault(defSpot->iter); balan_->setDefault(defSpot->balan); @@ -2532,6 +2555,7 @@ void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defP centerY_->setDefaultEditedState(Irrelevant); circrad_->setDefaultEditedState(Irrelevant); transit_->setDefaultEditedState(Irrelevant); + feather_->setDefaultEditedState(Irrelevant); thresh_->setDefaultEditedState(Irrelevant); iter_->setDefaultEditedState(Irrelevant); balan_->setDefaultEditedState(Irrelevant); @@ -2557,6 +2581,7 @@ void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defP centerY_->setDefaultEditedState(defSpotState->centerY ? Edited : UnEdited); circrad_->setDefaultEditedState(defSpotState->circrad ? Edited : UnEdited); transit_->setDefaultEditedState(defSpotState->transit ? Edited : UnEdited); + feather_->setDefaultEditedState(defSpotState->feather ? Edited : UnEdited); thresh_->setDefaultEditedState(defSpotState->thresh ? Edited : UnEdited); iter_->setDefaultEditedState(defSpotState->iter ? Edited : UnEdited); balan_->setDefaultEditedState(defSpotState->balan ? Edited : UnEdited); @@ -2583,6 +2608,7 @@ void ControlSpotPanel::setBatchMode(bool batchMode) centerY_->showEditedCB(); circrad_->showEditedCB(); transit_->showEditedCB(); + feather_->showEditedCB(); thresh_->showEditedCB(); iter_->showEditedCB(); balan_->showEditedCB(); @@ -2625,6 +2651,7 @@ ControlSpotPanel::ControlSpots::ControlSpots() add(circrad); add(qualityMethod); add(transit); + add(feather); add(thresh); add(iter); add(balan); diff --git a/rtgui/controlspotpanel.h b/rtgui/controlspotpanel.h index 867c707ff..e289d59ec 100644 --- a/rtgui/controlspotpanel.h +++ b/rtgui/controlspotpanel.h @@ -60,6 +60,7 @@ public: int circrad; int qualityMethod; // 0 = Standard, 1 = Enhanced, 2 = Enhanced + chroma denoise int transit; + double feather; double thresh; double iter; double balan; @@ -99,6 +100,7 @@ public: bool circrad; bool qualityMethod; bool transit; + bool feather; bool thresh; bool iter; bool balan; @@ -326,6 +328,7 @@ private: Gtk::TreeModelColumn circrad; Gtk::TreeModelColumn qualityMethod; // 0 = Standard, 1 = Enhanced, 2 = Enhanced + chroma denoise Gtk::TreeModelColumn transit; + Gtk::TreeModelColumn feather; Gtk::TreeModelColumn thresh; Gtk::TreeModelColumn iter; Gtk::TreeModelColumn balan; @@ -400,6 +403,7 @@ private: Adjuster* const centerY_; Adjuster* const circrad_; Adjuster* const transit_; + Adjuster* const feather_; Adjuster* const thresh_; Adjuster* const iter_; Adjuster* const balan_; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index b20209692..b5a48e669 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -705,6 +705,12 @@ pe(nullptr) // chromaskcol->set_tooltip_text(M("TP_LOCALLAB_CHROMASK_TOOLTIP")); } + if (showtooltip) { + strcol->set_tooltip_text(M("TP_LOCALLAB_GRADSTR_TOOLTIP")); + strcolab->set_tooltip_text(M("TP_LOCALLAB_GRADSTRAB_TOOLTIP")); + angcol->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); + } + qualitycurveMethod->append(M("TP_LOCALLAB_CURVNONE")); qualitycurveMethod->append(M("TP_LOCALLAB_CURVCURR")); qualitycurveMethod->set_active(0); @@ -1162,6 +1168,13 @@ pe(nullptr) fatanchor->setAdjusterListener(this); fatlevel->setAdjusterListener(this); + if (showtooltip) { + strexp->set_tooltip_text(M("TP_LOCALLAB_GRADSTR_TOOLTIP")); + strmaskexp->set_tooltip_text(M("TP_LOCALLAB_GRADSTR_TOOLTIP")); + angexp->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); + angmaskexp->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); + } + if (showtooltip) { radmaskexp->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); lapmaskexp->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); @@ -1391,6 +1404,11 @@ pe(nullptr) lapmaskSH->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); } + if (showtooltip) { + strSH->set_tooltip_text(M("TP_LOCALLAB_GRADSTR_TOOLTIP")); + angSH->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); + } + enaSHMaskConn = enaSHMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enaSHMaskChanged)); inversshConn = inverssh->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::inversshChanged)); @@ -3267,6 +3285,7 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit } r->transit = pp->locallab.spots.at(i).transit; + r->feather = pp->locallab.spots.at(i).feather; r->thresh = pp->locallab.spots.at(i).thresh; r->iter = pp->locallab.spots.at(i).iter; r->balan = pp->locallab.spots.at(i).balan; @@ -3431,6 +3450,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited } r->transit = newSpot->transit; + r->feather = newSpot->feather; r->thresh = newSpot->thresh; r->iter = newSpot->iter; r->balan = newSpot->balan; @@ -3681,6 +3701,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited } r->transit = newSpot->transit; + r->feather = newSpot->feather; r->thresh = newSpot->thresh; r->iter = newSpot->iter; r->balan = newSpot->balan; @@ -3831,6 +3852,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited } pp->locallab.spots.at(pp->locallab.selspot).transit = r->transit; + pp->locallab.spots.at(pp->locallab.selspot).feather = r->feather; pp->locallab.spots.at(pp->locallab.selspot).thresh = r->thresh; pp->locallab.spots.at(pp->locallab.selspot).iter = r->iter; pp->locallab.spots.at(pp->locallab.selspot).balan = r->balan; @@ -4336,6 +4358,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).circrad = pe->locallab.spots.at(pp->locallab.selspot).circrad || se->circrad; pe->locallab.spots.at(pp->locallab.selspot).qualityMethod = pe->locallab.spots.at(pp->locallab.selspot).qualityMethod || se->qualityMethod; pe->locallab.spots.at(pp->locallab.selspot).transit = pe->locallab.spots.at(pp->locallab.selspot).transit || se->transit; + pe->locallab.spots.at(pp->locallab.selspot).feather = pe->locallab.spots.at(pp->locallab.selspot).feather || se->feather; pe->locallab.spots.at(pp->locallab.selspot).thresh = pe->locallab.spots.at(pp->locallab.selspot).thresh || se->thresh; pe->locallab.spots.at(pp->locallab.selspot).iter = pe->locallab.spots.at(pp->locallab.selspot).iter || se->iter; pe->locallab.spots.at(pp->locallab.selspot).transitweak = pe->locallab.spots.at(pp->locallab.selspot).transitweak || se->transitweak; @@ -4691,6 +4714,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).circrad = pedited->locallab.spots.at(pp->locallab.selspot).circrad || se->circrad; pedited->locallab.spots.at(pp->locallab.selspot).qualityMethod = pedited->locallab.spots.at(pp->locallab.selspot).qualityMethod || se->qualityMethod; pedited->locallab.spots.at(pp->locallab.selspot).transit = pedited->locallab.spots.at(pp->locallab.selspot).transit || se->transit; + pedited->locallab.spots.at(pp->locallab.selspot).feather = pedited->locallab.spots.at(pp->locallab.selspot).feather || se->feather; pedited->locallab.spots.at(pp->locallab.selspot).thresh = pedited->locallab.spots.at(pp->locallab.selspot).thresh || se->thresh; pedited->locallab.spots.at(pp->locallab.selspot).iter = pedited->locallab.spots.at(pp->locallab.selspot).iter || se->iter; pedited->locallab.spots.at(pp->locallab.selspot).balan = pedited->locallab.spots.at(pp->locallab.selspot).balan || se->balan; @@ -5612,7 +5636,7 @@ void Locallab::merMethodChanged() blurcolde->set_sensitive(true); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(true); - strcolab->set_sensitive(false); + // strcolab->set_sensitive(false); special->set_sensitive(true); invers->set_sensitive(true); gridmerFrame->hide(); @@ -5625,7 +5649,7 @@ void Locallab::merMethodChanged() rgbCurveEditorG->set_sensitive(true); special->set_sensitive(true); invers->set_sensitive(true); - strcolab->set_sensitive(false); +// strcolab->set_sensitive(false); conthrcol->hide(); gridmerFrame->hide(); } else if (merMethod->get_active_row_number() == 2) { @@ -10066,6 +10090,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con se->circrad = spotState->circrad; se->qualityMethod = spotState->qualityMethod; se->transit = spotState->transit; + se->feather = spotState->feather; se->thresh = spotState->thresh; se->iter = spotState->iter; se->balan = spotState->balan; @@ -10510,7 +10535,7 @@ void Locallab::updateSpecificGUIState() mask7->hide(); conthrcol->hide(); structcol->set_sensitive(true); - strcolab->set_sensitive(false); +// strcolab->set_sensitive(false); sensi->set_sensitive(true); blurcolde->set_sensitive(true); H2CurveEditorG->set_sensitive(true); @@ -10521,7 +10546,7 @@ void Locallab::updateSpecificGUIState() } else if (merMethod->get_active_row_number() == 1) { mask7->hide(); structcol->set_sensitive(true); - strcolab->set_sensitive(false); + // strcolab->set_sensitive(false); sensi->set_sensitive(true); blurcolde->set_sensitive(true); H2CurveEditorG->set_sensitive(true); @@ -10533,7 +10558,7 @@ void Locallab::updateSpecificGUIState() } else if (merMethod->get_active_row_number() == 2) { mask7->show(); structcol->set_sensitive(false); - strcolab->set_sensitive(true); + // strcolab->set_sensitive(true); sensi->set_sensitive(false); blurcolde->set_sensitive(false); H2CurveEditorG->set_sensitive(false); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 543245684..9d0e7bf08 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -968,6 +968,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).circrad = locallab.spots.at(j).circrad && pSpot.circrad == otherSpot.circrad; locallab.spots.at(j).qualityMethod = locallab.spots.at(j).qualityMethod && pSpot.qualityMethod == otherSpot.qualityMethod; locallab.spots.at(j).transit = locallab.spots.at(j).transit && pSpot.transit == otherSpot.transit; + locallab.spots.at(j).feather = locallab.spots.at(j).feather && pSpot.feather == otherSpot.feather; locallab.spots.at(j).thresh = locallab.spots.at(j).thresh && pSpot.thresh == otherSpot.thresh; locallab.spots.at(j).iter = locallab.spots.at(j).iter && pSpot.iter == otherSpot.iter; locallab.spots.at(j).balan = locallab.spots.at(j).balan && pSpot.balan == otherSpot.balan; @@ -2830,6 +2831,9 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).transit = mods.locallab.spots.at(i).transit; } + if (locallab.spots.at(i).feather) { + toEdit.locallab.spots.at(i).feather = mods.locallab.spots.at(i).feather; + } if (locallab.spots.at(i).thresh) { toEdit.locallab.spots.at(i).thresh = mods.locallab.spots.at(i).thresh; @@ -5071,6 +5075,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : circrad(v), qualityMethod(v), transit(v), + feather(v), thresh(v), iter(v), balan(v), @@ -5416,6 +5421,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) circrad = v; qualityMethod = v; transit = v; + feather = v; thresh = v; iter = v; balan = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index d64a00d0f..5ebc50faa 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -402,6 +402,7 @@ public: bool circrad; bool qualityMethod; bool transit; + bool feather; bool thresh; bool iter; bool balan;