diff --git a/rtdata/languages/default b/rtdata/languages/default index d24aa19e6..56fe51929 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -975,7 +975,7 @@ HISTORY_MSG_732;Local - median iterations HISTORY_MSG_733;Local - soft radius HISTORY_MSG_734;Local - threshold HISTORY_MSG_738;Local - Local contrast Merge L -HISTORY_MSG_739;Local - Local contrast Merge C +HISTORY_MSG_739;Local - Local contrast Soft radius HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2066,9 +2066,9 @@ TP_LOCALLAB_CIRCRADIUS;Spot size TP_LOCALLAB_COFR;Color & Light - Small defects : red eyes, dust TP_LOCALLAB_EXPCOLOR_TOOLTIP;In the case of small defects.\n\nRed-eyes : red-centered circular selector, spot delimiters close to the eye, weak scope, "lightness" -100, "chrominance" -100.\n\nSpotIR :Circular selector centered on the defect, spot delimiters close to the default - reduce "chrominance", possibly act on "scope" to reduce the extent of the action.\n\nDust - grease (small) :Circular selector centered on the defect (adapt the size of the spot), spot delimiters not too close to the defect to allow an inconspicuous transition. a) "Transition" (low values) and "Transition weak" (high values); b) act on "lightness" and possibly on "chrominance" or "Color correction grid - direct" to approach the rendering of the polluted zone to that of the healthy zone; c) act moderately on "scope" to modulate the desired action.\n\nYou can also complete with Gaussian blur (Smooth Blur and noise) TP_LOCALLAB_CLARILRES;Merge Luma -TP_LOCALLAB_CLARICRES;Merge Chroma +TP_LOCALLAB_CLARISOFT;Soft radius TP_LOCALLAB_CLARIFRA;Sharp mask and Clarity -TP_LOCALLAB_CLARI_TOOLTIP;Under or equal level wavelet 4 Sharp mask is used.\nAbove level wavelet 5 Clarity is used. +TP_LOCALLAB_CLARI_TOOLTIP;Under or equal level wavelet 4, 'Sharp mask' is enabled.\nAbove level wavelet 5 'Clarity' is enabled. TP_LOCALLAB_CONTRAST;Contrast TP_LOCALLAB_CURV;Lightness - Contrast - Chrominance "Super" TP_LOCALLAB_CURVNONE;Disable curves @@ -2101,7 +2101,7 @@ TP_LOCALLAB_EXCLUF;Excluding TP_LOCALLAB_EXCLUF_TOOLTIP;Can be used to exclude this part of datas - move Scope to extend color.\n You can apply all settings to this RT-spot. TP_LOCALLAB_LABGRID_VALUES;High(a)=%1 High(b)=%2\nLow(a)=%3 Low(b)=%4 TP_LOCALLAB_LABGRID;Color correction grid -TP_LOCALLAB_LEVELWAV_TOOLTIP;The Level is automatically adapted to the size of the spot and the preview.\nFrom level 8 size max 512 to level 1 size max = 4 +TP_LOCALLAB_LEVELWAV_TOOLTIP;The Level is automatically adapted to the size of the spot and the preview.\nFrom level 9 size max 512 to level 1 size max = 4 TP_LOCALLAB_SATUR;Saturation TP_LOCALLAB_SENSIDEN;Scope TP_LOCALLAB_SENSIEXCLU;Scope diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 65543ed32..554fa5c7c 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -1264,8 +1264,15 @@ void ImProcFunctions::softproc(const LabImage* bufcolorig, const LabImage* bufco for (int ir = 0; ir < bfh; ir++) for (int jr = 0; jr < bfw; jr++) { + float X, Y, Z; + float L = bufcolorig->L[ir][jr]; + float a = bufcolorig->a[ir][jr]; + float b = bufcolorig->b[ir][jr]; + Color::Lab2XYZ(L, a, b, X, Y, Z); + + guid[ir][jr] = Y / 32768.f; + ble[ir][jr] = (bufcolfin->L[ir][jr]) / 32768.f; - guid[ir][jr] = bufcolorig->L[ir][jr] / 32768.f; } double aepsil = (epsilmax - epsilmin) / 90.f; @@ -2151,8 +2158,16 @@ void ImProcFunctions::blendstruc(int bfw, int bfh, LabImage* bufcolorig, float r for (int ir = 0; ir < bfh; ir++) { for (int jr = 0; jr < bfw; jr++) { + float X, Y, Z; + float L = bufcolorig->L[ir][jr]; + float a = bufcolorig->a[ir][jr]; + float b = bufcolorig->b[ir][jr]; + Color::Lab2XYZ(L, a, b, X, Y, Z); + + guid[ir][jr] = Y / 32768.f; + blend2[ir][jr] /= 32768.f; - guid[ir][jr] = bufcolorig->L[ir][jr] / 32768.f; + // guid[ir][jr] = bufcolorig->L[ir][jr] / 32768.f; } } @@ -2459,7 +2474,15 @@ void maskcalccol(int bfw, int bfh, int xstart, int ystart, int sk, int cx, int c bufmaskblurcol->a[ir][jr] = CLIPC(kmaskC + kmaskH); bufmaskblurcol->b[ir][jr] = CLIPC(kmaskC + kmaskH); ble[ir][jr] = bufmaskblurcol->L[ir][jr] / 32768.f; - guid[ir][jr] = bufcolorig->L[ir][jr] / 32768.f; + float X, Y, Z; + float L = bufcolorig->L[ir][jr]; + float a = bufcolorig->a[ir][jr]; + float b = bufcolorig->b[ir][jr]; + Color::Lab2XYZ(L, a, b, X, Y, Z); + + guid[ir][jr] = Y / 32768.f; + + // guid[ir][jr] = bufcolorig->L[ir][jr] / 32768.f; } } } @@ -5513,7 +5536,15 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bufmaskblurbl->a[ir][jr] = kmaskCH; bufmaskblurbl->b[ir][jr] = kmaskCH; ble[ir][jr] = bufmaskblurbl->L[ir][jr] / 32768.f; - guid[ir][jr] = bufgb->L[ir][jr] / 32768.f; + float X, Y, Z; + float L = bufgb->L[ir][jr]; + float a = bufgb->a[ir][jr]; + float b = bufgb->b[ir][jr]; + Color::Lab2XYZ(L, a, b, X, Y, Z); + + guid[ir][jr] = Y / 32768.f; + + // guid[ir][jr] = bufgb->L[ir][jr] / 32768.f; } } @@ -7655,7 +7686,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } } - if ((lp.lcamount > 0.f || wavcurve || params->locallab.spots.at(sp).residcont != 0.f) && call < 3 && lp.lcena) { +//params->locallab.spots.at(sp).clarilres != 0.f) + if ((lp.lcamount > 0.f || wavcurve || params->locallab.spots.at(sp).residcont != 0.f || params->locallab.spots.at(sp).clarilres != 0.f) && call < 3 && lp.lcena) { int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0); int yend = std::min(static_cast(lp.yc + lp.ly) - cy, original->H); int xstart = std::max(static_cast(lp.xc - lp.lxL) - cx, 0); @@ -7740,6 +7772,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o JaggedArray bufchro(bfw, bfh); std::unique_ptr bufgb(new LabImage(bfw, bfh)); std::unique_ptr tmp1(new LabImage(bfw, bfh)); + // int GW = original->W; + // int GH = original->H; + + std::unique_ptr tmpresid(new LabImage(bfw, bfh)); + std::unique_ptr tmpres(new LabImage(bfw, bfh)); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) @@ -7753,6 +7790,12 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o tmp1->L[y - ystart][x - xstart] = original->L[y][x]; tmp1->a[y - ystart][x - xstart] = original->a[y][x]; tmp1->b[y - ystart][x - xstart] = original->b[y][x]; + tmpresid->L[y - ystart][x - xstart] = original->L[y][x]; + tmpresid->a[y - ystart][x - xstart] = original->a[y][x]; + tmpresid->b[y - ystart][x - xstart] = original->b[y][x]; + tmpres->L[y - ystart][x - xstart] = original->L[y][x]; + tmpres->a[y - ystart][x - xstart] = original->a[y][x]; + tmpres->b[y - ystart][x - xstart] = original->b[y][x]; } } @@ -7800,8 +7843,17 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } else if (lp.locmet == 1) { //wavelet int wavelet_level = params->locallab.spots.at(sp).levelwav; + float mL = (float)(params->locallab.spots.at(sp).clarilres / 100.f); + float softr = (float)(params->locallab.spots.at(sp).clarisoft); + float mL0; +#ifdef _OPENMP + const int numThreads = omp_get_max_threads(); +#else + const int numThreads = 1; - int minwin = min(bfwr, bfhr); +#endif + + int minwin = min(bfw, bfh); int maxlevelspot = 9; // adap maximum level wavelet to size of RT-spot @@ -7845,9 +7897,48 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o maxlevelspot = 0; } + // int datalen = tmpresid->W * tmpresid->H; + wavelet_level = min(wavelet_level, maxlevelspot); - wavelet_decomposition wdspot(tmp1->data, bfw, bfh, wavelet_level, 1, sk); + wavelet_decomposition *wdspotresid = new wavelet_decomposition(tmpresid->L[0], tmpresid->W, tmpresid->H, wavelet_level, 1, sk, numThreads, 6); + + if (wdspotresid->memoryAllocationFailed) { + return; + } + + + int maxlvlresid = wdspotresid->maxlevel(); + + // printf("maxlvlresid=%i maxlevelspot=%i\n", maxlvlresid, maxlevelspot); + if (maxlvlresid > 4) {//Clarity + for (int dir = 1; dir < 4; dir++) { + for (int level = 0; level < maxlvlresid; ++level) { + int W_L = wdspotresid->level_W(level); + int H_L = wdspotresid->level_H(level); + float **wav_Lresid = wdspotresid->level_coeffs(level); + + for (int i = 0; i < W_L * H_L; i++) { + wav_Lresid[dir][i] = 0.f; + } + } + } + } else {//Sharp + float *wav_L0resid = wdspotresid->coeff0; + int W_L = wdspotresid->level_W(0); + int H_L = wdspotresid->level_H(0); + + for (int i = 0; i < W_L * H_L; i++) { + wav_L0resid[i] = 0.f; + } + } + + + wdspotresid->reconstruct(tmpresid->L[0], 1.f); + delete wdspotresid; + + + wavelet_decomposition wdspot(tmp1->data, bfw, bfh, wavelet_level, 1, sk, numThreads, 6); if (wdspot.memoryAllocationFailed) { return; @@ -7956,7 +8047,26 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o wdspot.reconstruct(tmp1->data, 1.f); + if (maxlvl <= 4) { + mL0 = 0.f; + mL = -mL; + } else { + mL0 = mL; + } + +#ifdef _OPENMP + #pragma omp parallel for +#endif + + for (int x = 0; x < bfh; x++) + for (int y = 0; y < bfw; y++) { + tmp1->L[x][y] = (1.f + mL0) * (tmp1->L[x][y]) - mL * tmpresid->L[x][y]; + } + + if (softr > 0.f) { + softproc(tmpres.get(), tmp1.get(), softr, bfh, bfw, 0.0001, 0.00001, 0.0001f, sk, multiThread); + } } float minL = tmp1->L[0][0] - bufgb->L[0][0]; @@ -8057,7 +8167,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o LabImage *buforigmas = nullptr; int bfh = int (lp.ly + lp.lyT) + del; //bfw bfh real size of square zone int bfw = int (lp.lx + lp.lxL) + del; - // printf("before bfh=%i bfw=%i bfhz=%i bfwz=%i\n", bfh, bfw, bfhz, bfwz); + // printf("before bfh=%i bfw=%i bfhz=%i bfwz=%i\n", bfh, bfw, bfhz, bfwz); if (bfwz > 2 && bfhz > 2) { @@ -9177,6 +9287,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o chprosl = CLIPCHRO(ampli * ch - ampli); } } + //printf("bfw=%i bfh=%i\n", bfw, bfh); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) @@ -9251,6 +9362,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bufcolfin->L[ir][jr] = bufcolcalcL; } + if (lp.softradiuscol > 0.f) { softproc(bufcolorig.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.0001, 0.00001, 0.0001f, sk, multiThread); // softprocess(bufcolorig.get(), buflight, lp.softradiuscol, bfh, bfw, sk, multiThread); @@ -9275,11 +9387,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bool execut = true; - if (ctoning && (bfw < 6 || bfh < 6)){ + if (ctoning && (bfw < 6 || bfh < 6)) { execut = false; } - if(execut) { + if (execut) { transit_shapedetect(0, bufcolorig.get(), originalmaskcol.get(), buflight, bufchro, buf_a, buf_b, bufhh, HHutili, hueref, chromaref, lumaref, sobelref, meansob, temp, lp, original, transformed, cx, cy, sk); } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 5ec59e867..111d348b0 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -765,7 +765,7 @@ enum ProcEventCode { EvlocallabshowmaskexpMethodinv = 735, EvlocallabshowmaskSHMethodinv = 736, Evlocallabclarilres = 737, - Evlocallabclaricres = 738, + Evlocallabclarisoft = 738, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 634b6d48e..79cb5ba37 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2544,7 +2544,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : levelwav(4), residcont(0.0), clarilres(0.0), - claricres(0.0), + clarisoft(0.0), sensilc(19), fftwlc(false), localcontMethod("loc"), @@ -2797,7 +2797,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && levelwav == other.levelwav && residcont == other.residcont && clarilres == other.clarilres - && claricres == other.claricres + && clarisoft == other.clarisoft && sensilc == other.sensilc && fftwlc == other.fftwlc && localcontMethod == other.localcontMethod @@ -4031,7 +4031,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).levelwav, "Locallab", "Levelwav_" + std::to_string(i), spot.levelwav, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residcont, "Locallab", "Residcont_" + std::to_string(i), spot.residcont, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).clarilres, "Locallab", "ClariLres_" + std::to_string(i), spot.clarilres, keyFile); - saveToKeyfile(!pedited || pedited->locallab.spots.at(i).claricres, "Locallab", "ClariCres_" + std::to_string(i), spot.claricres, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).clarisoft, "Locallab", "Clarisoft_" + std::to_string(i), spot.clarisoft, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensilc, "Locallab", "Sensilc_" + std::to_string(i), spot.sensilc, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).fftwlc, "Locallab", "Fftwlc_" + std::to_string(i), spot.fftwlc, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).localcontMethod, "Locallab", "localcontMethod_" + std::to_string(i), spot.localcontMethod, keyFile); @@ -5387,7 +5387,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Levelwav_" + std::to_string(i), pedited, spot.levelwav, spotEdited.levelwav); assignFromKeyfile(keyFile, "Locallab", "Residcont_" + std::to_string(i), pedited, spot.residcont, spotEdited.residcont); assignFromKeyfile(keyFile, "Locallab", "ClariLres_" + std::to_string(i), pedited, spot.clarilres, spotEdited.clarilres); - assignFromKeyfile(keyFile, "Locallab", "ClariCres_" + std::to_string(i), pedited, spot.claricres, spotEdited.claricres); + assignFromKeyfile(keyFile, "Locallab", "Clarisoft_" + std::to_string(i), pedited, spot.clarisoft, spotEdited.clarisoft); assignFromKeyfile(keyFile, "Locallab", "Sensilc_" + std::to_string(i), pedited, spot.sensilc, spotEdited.sensilc); assignFromKeyfile(keyFile, "Locallab", "Fftwlc_" + std::to_string(i), pedited, spot.fftwlc, spotEdited.fftwlc); assignFromKeyfile(keyFile, "Locallab", "localcontMethod_" + std::to_string(i), pedited, spot.localcontMethod, spotEdited.localcontMethod); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 94f82514e..dca85e1a6 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1145,7 +1145,7 @@ struct LocallabParams { int levelwav; double residcont; double clarilres; - double claricres; + double clarisoft; int sensilc; bool fftwlc; Glib::ustring localcontMethod; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index a3bf765be..ee614b734 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -765,7 +765,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvlocallabshowmaskexpMethodinv LUMINANCECURVE, // EvlocallabshowmaskSHMethodinv LUMINANCECURVE, //Evlocallabclarilres - LUMINANCECURVE //Evlocallabclaricres + LUMINANCECURVE //Evlocallabclarisoft }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 3b8b962c0..495b9b6a0 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -189,7 +189,7 @@ Locallab::Locallab(): chromaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), 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.))), - softradiuscol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.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))), hlcompr(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0))), @@ -207,7 +207,7 @@ Locallab::Locallab(): chromaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), gammaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), slomaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), - softradiusexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), + softradiusexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))), laplacexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACEXP"), 0.0, 100.0, 0.1, 20.))), balanexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANEXP"), 0.2, 1.2, 0.01, 0.8))), linear(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LINEAR"), 0., 1., 0.01, 0.))), @@ -268,7 +268,7 @@ Locallab::Locallab(): vart(Gtk::manage(new Adjuster(M("TP_LOCALLAB_VART"), 4.0, 500., 0.1, 70.))), dehaz(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEHAZ"), 0, 100, 1, 0))), sensih(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIH"), 0, 100, 1, 30))), - softradiusret(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GUIDFILTER"), 0.0, 100.0, 0.1, 0.))), + softradiusret(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GUIDFILTER"), 0.0, 100.0, 0.5, 0.))), blendmaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), radmaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 10.))), chromaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), @@ -291,10 +291,10 @@ Locallab::Locallab(): lcamount(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_AMOUNT"), 0, 1.0, 0.01, 0))), lcdarkness(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_DARKNESS"), 0, 3.0, 0.01, 1.0))), lclightness(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_LIGHTNESS"), 0, 3.0, 0.01, 1.0))), - levelwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LEVELWAV"), 3, 9, 1, 4))), + levelwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LEVELWAV"), 2, 9, 1, 4))), residcont(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCONT"), -100, 100, 1, 0))), clarilres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARILRES"), -20., 100., 0.5, 0.))), - claricres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARICRES"), -20., 100., 0.5, 0.))), + clarisoft(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARISOFT"), 0., 100., 0.5, 0.))), sensilc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))), // Contrast by detail levels chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0., 1.5, 0.01, 0.))), @@ -303,7 +303,7 @@ Locallab::Locallab(): contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0., 100., 0.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.))), + softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 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.))), @@ -1505,14 +1505,14 @@ Locallab::Locallab(): residcont->setAdjusterListener(this); clarilres->setAdjusterListener(this); - claricres->setAdjusterListener(this); + clarisoft->setAdjusterListener(this); sensilc->setAdjusterListener(this); clariFrame->set_label_align(0.025, 0.5); ToolParamBlock* const clariBox = Gtk::manage(new ToolParamBlock()); clariBox->pack_start(*clarilres); - clariBox->pack_start(*claricres); + clariBox->pack_start(*clarisoft); clariFrame->add(*clariBox); @@ -1525,7 +1525,7 @@ Locallab::Locallab(): contrastBox->pack_start(*LocalcurveEditorwav, Gtk::PACK_SHRINK, 4); contrastBox->pack_start(*levelwav); contrastBox->pack_start(*residcont); -// contrastBox->pack_start(*clariFrame); + contrastBox->pack_start(*clariFrame); contrastBox->pack_start(*sensilc); contrastBox->pack_start(*fftwlc); expcontrast->add(*contrastBox, false); @@ -2973,7 +2973,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).levelwav = levelwav->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).residcont = residcont->getValue(); pp->locallab.spots.at(pp->locallab.selspot).clarilres = clarilres->getValue(); - pp->locallab.spots.at(pp->locallab.selspot).claricres = claricres->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).clarisoft = clarisoft->getValue(); pp->locallab.spots.at(pp->locallab.selspot).sensilc = sensilc->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).fftwlc = fftwlc->get_active(); pp->locallab.spots.at(pp->locallab.selspot).locwavcurve = wavshape->getCurve(); @@ -3234,7 +3234,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).levelwav = pe->locallab.spots.at(pp->locallab.selspot).levelwav || levelwav->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).residcont = pe->locallab.spots.at(pp->locallab.selspot).residcont || residcont->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).clarilres = pe->locallab.spots.at(pp->locallab.selspot).clarilres || clarilres->getEditedState(); - pe->locallab.spots.at(pp->locallab.selspot).claricres = pe->locallab.spots.at(pp->locallab.selspot).claricres || claricres->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).clarisoft = pe->locallab.spots.at(pp->locallab.selspot).clarisoft || clarisoft->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).sensilc = pe->locallab.spots.at(pp->locallab.selspot).sensilc || sensilc->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).fftwlc = pe->locallab.spots.at(pp->locallab.selspot).fftwlc || !fftwlc->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).localcontMethod = pe->locallab.spots.at(pp->locallab.selspot).localcontMethod || localcontMethod->get_active_text() != M("GENERAL_UNCHANGED"); @@ -3493,7 +3493,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).levelwav = pedited->locallab.spots.at(pp->locallab.selspot).levelwav || levelwav->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).residcont = pedited->locallab.spots.at(pp->locallab.selspot).residcont || residcont->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).clarilres = pedited->locallab.spots.at(pp->locallab.selspot).clarilres || clarilres->getEditedState(); - pedited->locallab.spots.at(pp->locallab.selspot).claricres = pedited->locallab.spots.at(pp->locallab.selspot).claricres || claricres->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).clarisoft = pedited->locallab.spots.at(pp->locallab.selspot).clarisoft || clarisoft->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).sensilc = pedited->locallab.spots.at(pp->locallab.selspot).sensilc || sensilc->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).fftwlc = pedited->locallab.spots.at(pp->locallab.selspot).fftwlc || !fftwlc->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).locwavcurve = pedited->locallab.spots.at(pp->locallab.selspot).locwavcurve || !wavshape->isUnChanged(); @@ -3855,7 +3855,7 @@ void Locallab::localcontMethodChanged() levelwav->hide(); residcont->hide(); clarilres->hide(); - claricres->hide(); + clarisoft->hide(); clariFrame->hide(); lcradius->show(); lcamount->show(); @@ -3867,7 +3867,7 @@ void Locallab::localcontMethodChanged() levelwav->show(); residcont->show(); clarilres->show(); - claricres->show(); + clarisoft->show(); clariFrame->show(); lcradius->hide(); lcamount->hide(); @@ -5134,7 +5134,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe levelwav->setDefault(defSpot->levelwav); residcont->setDefault(defSpot->residcont); clarilres->setDefault(defSpot->clarilres); - claricres->setDefault(defSpot->claricres); + clarisoft->setDefault(defSpot->clarisoft); sensilc->setDefault((double)defSpot->sensilc); // Contrast by detail levels @@ -5289,7 +5289,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe levelwav->setDefaultEditedState(Irrelevant); residcont->setDefaultEditedState(Irrelevant); clarilres->setDefaultEditedState(Irrelevant); - claricres->setDefaultEditedState(Irrelevant); + clarisoft->setDefaultEditedState(Irrelevant); sensilc->setDefaultEditedState(Irrelevant); // Contrast by detail levels @@ -5448,7 +5448,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe levelwav->setDefaultEditedState(defSpotState->levelwav ? Edited : UnEdited); residcont->setDefaultEditedState(defSpotState->residcont ? Edited : UnEdited); clarilres->setDefaultEditedState(defSpotState->clarilres ? Edited : UnEdited); - claricres->setDefaultEditedState(defSpotState->claricres ? Edited : UnEdited); + clarisoft->setDefaultEditedState(defSpotState->clarisoft ? Edited : UnEdited); sensilc->setDefaultEditedState(defSpotState->sensilc ? Edited : UnEdited); // Contrast by detail levels @@ -6233,9 +6233,9 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } - if (a == claricres) { + if (a == clarisoft) { if (listener) { - listener->panelChanged(Evlocallabclaricres, claricres->getTextValue()); + listener->panelChanged(Evlocallabclarisoft, clarisoft->getTextValue()); } } @@ -6559,7 +6559,7 @@ void Locallab::setBatchMode(bool batchMode) levelwav->showEditedCB(); residcont->showEditedCB(); clarilres->showEditedCB(); - claricres->showEditedCB(); + clarisoft->showEditedCB(); sensilc->showEditedCB(); // Contrast by detail levels @@ -7158,7 +7158,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con levelwav->setValue(pp->locallab.spots.at(index).levelwav); residcont->setValue(pp->locallab.spots.at(index).residcont); clarilres->setValue(pp->locallab.spots.at(index).clarilres); - claricres->setValue(pp->locallab.spots.at(index).claricres); + clarisoft->setValue(pp->locallab.spots.at(index).clarisoft); sensilc->setValue(pp->locallab.spots.at(index).sensilc); fftwlc->set_active(pp->locallab.spots.at(index).fftwlc); @@ -7466,7 +7466,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con levelwav->setEditedState(spotState->levelwav ? Edited : UnEdited); residcont->setEditedState(spotState->residcont ? Edited : UnEdited); clarilres->setEditedState(spotState->clarilres ? Edited : UnEdited); - claricres->setEditedState(spotState->claricres ? Edited : UnEdited); + clarisoft->setEditedState(spotState->clarisoft ? Edited : UnEdited); sensilc->setEditedState(spotState->sensilc ? Edited : UnEdited); fftwlc->set_inconsistent(multiImage && !spotState->fftwlc); wavshape->setUnChanged(!spotState->locwavcurve); @@ -7728,7 +7728,7 @@ void Locallab::updateSpecificGUIState() levelwav->hide(); residcont->hide(); clarilres->hide(); - claricres->hide(); + clarisoft->hide(); clariFrame->hide(); lcradius->show(); lcamount->show(); @@ -7740,7 +7740,7 @@ void Locallab::updateSpecificGUIState() levelwav->show(); residcont->show(); clarilres->show(); - claricres->show(); + clarisoft->show(); clariFrame->show(); lcradius->hide(); lcamount->hide(); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 6a162ecc5..e32354d2d 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -242,7 +242,7 @@ private: Adjuster* const levelwav; Adjuster* const residcont; Adjuster* const clarilres; - Adjuster* const claricres; + Adjuster* const clarisoft; Adjuster* const sensilc; // Contrast by detail levels Adjuster* multiplier[6]; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index afbeedca5..73dc57dda 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1138,7 +1138,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).levelwav = locallab.spots.at(j).levelwav && pSpot.levelwav == otherSpot.levelwav; locallab.spots.at(j).residcont = locallab.spots.at(j).residcont && pSpot.residcont == otherSpot.residcont; locallab.spots.at(j).clarilres = locallab.spots.at(j).clarilres && pSpot.clarilres == otherSpot.clarilres; - locallab.spots.at(j).claricres = locallab.spots.at(j).claricres && pSpot.claricres == otherSpot.claricres; + locallab.spots.at(j).clarisoft = locallab.spots.at(j).clarisoft && pSpot.clarisoft == otherSpot.clarisoft; locallab.spots.at(j).sensilc = locallab.spots.at(j).sensilc && pSpot.sensilc == otherSpot.sensilc; locallab.spots.at(j).fftwlc = locallab.spots.at(j).fftwlc && pSpot.fftwlc == otherSpot.fftwlc; locallab.spots.at(j).localcontMethod = locallab.spots.at(j).localcontMethod && pSpot.localcontMethod == otherSpot.localcontMethod; @@ -3401,8 +3401,8 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).clarilres = mods.locallab.spots.at(i).clarilres; } - if (locallab.spots.at(i).claricres) { - toEdit.locallab.spots.at(i).claricres = mods.locallab.spots.at(i).claricres; + if (locallab.spots.at(i).clarisoft) { + toEdit.locallab.spots.at(i).clarisoft = mods.locallab.spots.at(i).clarisoft; } if (locallab.spots.at(i).sensilc) { @@ -4720,7 +4720,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : levelwav(v), residcont(v), clarilres(v), - claricres(v), + clarisoft(v), sensilc(v), fftwlc(v), localcontMethod(v), @@ -4969,7 +4969,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) levelwav = v; residcont = v; clarilres = v; - claricres = v; + clarisoft = v; sensilc = v; fftwlc = v; localcontMethod = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 151305f5a..95bd515fa 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -561,7 +561,7 @@ public: bool levelwav; bool residcont; bool clarilres; - bool claricres; + bool clarisoft; bool sensilc; bool fftwlc; bool localcontMethod;