From 7f7137c5ab54ea138ad6e9c376e6b1d95f85fb16 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 10 Nov 2019 13:53:12 +0100 Subject: [PATCH] Change GUI merge file from settings to Color and light --- rtdata/languages/default | 23 +- rtengine/iplocallab.cc | 167 ++++--- rtengine/procevents.h | 15 +- rtengine/procparams.cc | 12 +- rtengine/procparams.h | 3 +- rtengine/refreshmap.cc | 5 +- rtgui/controlspotpanel.cc | 213 +++++---- rtgui/controlspotpanel.h | 12 +- rtgui/locallab.cc | 900 +++++++++++++++++++++----------------- rtgui/locallab.h | 5 + rtgui/paramsedited.cc | 17 +- rtgui/paramsedited.h | 3 +- 12 files changed, 795 insertions(+), 580 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index baeec4bd0..2364208ce 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1034,13 +1034,13 @@ HISTORY_MSG_793;Local - SH TRC gamma HISTORY_MSG_794;Local - SH TRC slope HISTORY_MSG_795;Local - Mask save restore image HISTORY_MSG_796;Local - Recursive references -HISTORY_MSG_797;Local - Merge and Masks method -HISTORY_MSG_798;Local - Merge Original method -HISTORY_MSG_799;Local - Opacity -HISTORY_MSG_800;Local - Color RGB ToneCurve -HISTORY_MSG_801;Local - Color ToneCurve Method -HISTORY_MSG_802;Local - Color ToneCurve Special -HISTORY_MSG_803;Local - Contrast threshold +HISTORY_MSG_797;Local - Merge Original method +HISTORY_MSG_798;Local - Opacity +HISTORY_MSG_799;Local - Color RGB ToneCurve +HISTORY_MSG_800;Local - Color ToneCurve Method +HISTORY_MSG_801;Local - Color ToneCurve Special +HISTORY_MSG_802;Local - Contrast threshold +HISTORY_MSG_803;Local - Color Merge HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2157,6 +2157,10 @@ TP_LOCALLAB_SAVREST;Save - Restore Current Image TP_LOCALLAB_SCOPEMASK;Scope Mask DeltaE Image TP_LOCALLAB_SCOPEMASK_TOOLTIP;Enabled if Mask DeltaE Image is enabled.\nLow values avoid retouching selected area TP_LOCALLAB_MASFRAME;Mask and Merge +TP_LOCALLAB_MRONE;None +TP_LOCALLAB_MRTWO;Short Curves 'L' Mask +TP_LOCALLAB_MRTHR;Original Image +TP_LOCALLAB_MRFOU;Previous Spot TP_LOCALLAB_MERGETYPE;Merge image and mask TP_LOCALLAB_MERGETYPE_TOOLTIP;None, use all mask in LCH mode.\nShort curves 'L' mask, use a short circuit for mask 2, 3, 4, 6, 7.\nOriginal mask 7, blend current image with original TP_LOCALLAB_MERGENONE;None @@ -2165,7 +2169,7 @@ TP_LOCALLAB_MERGETWO;Original(Mask 7) TP_LOCALLAB_MERGETHR;Original(Mask 7) + Mask LCH TP_LOCALLAB_MERGEFOU;Previous Spot(Mask 7) TP_LOCALLAB_MERGEFIV;Previous Spot(Mask 7) + Mask LCH -TP_LOCALLAB_MERGE1COLFRA;Merge with Original +TP_LOCALLAB_MERGE1COLFRA;Merge with Original or Previous TP_LOCALLAB_OPACOL;Opacity TP_LOCALLAB_CONTTHR;Contrast Threshold TP_LOCALLAB_MERGEOPA_TOOLTIP;Opacity merge % current Spot with original or previous Spot.\nContrast threshold : adjust result in function of Original contrast @@ -2380,7 +2384,8 @@ TP_LOCALLAB_SHOWT;3 - Mask and modifications TP_LOCALLAB_SHOWS;4+* - Mask and modifications TP_LOCALLAB_SHOWR;5 - Mask and modifications TP_LOCALLAB_SHOWE;6+ - Mask and modifications -TP_LOCALLAB_SHOWC;7+* - Mask and modifications - Merge +TP_LOCALLAB_SHOWC;7+* - Mask and modifications +TP_LOCALLAB_SHOWC1;Merge file TP_LOCALLAB_SHOWPLUS;1+* - Mask and modifications - Smooth-Blur & Denoise TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display modifications.\nBeware, you can only view one modification (color and light or Exposure or Shadows-Highlight or TM or CBDL or Retinex MSR or Blur).\n\nUse Mask is before algorihtm shape detection TP_LOCALLAB_SHOWMNONE;None diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index f54317c25..382b36935 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -588,18 +588,14 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.excmet = 1; } - if (locallab.spots.at(sp).mergeMethod == "none") { + if (locallab.spots.at(sp).merMethod == "mone") { lp.mergemet = 0; - } else if (locallab.spots.at(sp).mergeMethod == "short") { + } else if (locallab.spots.at(sp).merMethod == "mtwo") { lp.mergemet = 1; - } else if (locallab.spots.at(sp).mergeMethod == "orig") { + } else if (locallab.spots.at(sp).merMethod == "mthr") { lp.mergemet = 2; - } else if (locallab.spots.at(sp).mergeMethod == "origmas") { + } else if (locallab.spots.at(sp).merMethod == "mfou") { lp.mergemet = 3; - } else if (locallab.spots.at(sp).mergeMethod == "lastspot") { - lp.mergemet = 4; - } else if (locallab.spots.at(sp).mergeMethod == "lastspotmas") { - lp.mergemet = 5; } if (locallab.spots.at(sp).mergecolMethod == "one") { @@ -5297,27 +5293,29 @@ const int fftw_size[] = {18144, 18000, 17920, 17836, 17820, 17640, 17600, 17550, int N_fftwsize = sizeof(fftw_size) / sizeof(fftw_size[0]); -static void softlig(float &a, float &b) +static void softlig(float &a, float &b, float minc, float maxc) { - if (b <= 0.5f) { - a = (2.f * a * b) + a * a * (1.f - 2.f * b); + float alpha = 0.5f * (maxc - minc); + if (b <= alpha) { + a = (2.f * a * b) + a * a * (maxc - 2.f * b); } else { - a = 2.f * a * (1.f - b) + sqrt(a) * (2.f * b - 1.f); + a = 2.f * a * (maxc - b) + sqrt(LIM(a, 0.f, 2.f)) * (2.f * b - maxc); } } -static void overlay(float &a, float &b) +static void overlay(float &a, float &b, float minc, float maxc) { - if (b <= 0.5f) { + float alpha = 0.5f * (maxc - minc); + if (b <= alpha) { a = (2.f * a * b); } else { - a = 1.f - 2.f * (1.f - a) * (1.f - b); + a = maxc - 2.f * (1.f - a) * (maxc - b); } } -static void screen(float &a, float &b) +static void screen(float &a, float &b, float maxc) { - a = 1.f - (1.f - a) * (1.f - b); + a = 1.f - (1.f - a) * (maxc - b); } static void exclusion(float &a, float &b) @@ -8411,7 +8409,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bool lmasutilicolwav = false; float amountcd = 0.f; float anchorcd = 50.f; - int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc; + int shortcu = 0; //lp.mergemet; //params->locallab.spots.at(sp).shortc; maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, loctemp.get(), bufmaskorigcb.get(), originalmaskcb.get(), original, inv, lp, locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, multiThread, @@ -8702,7 +8700,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float blendm = lp.blendmatm; float lap = params->locallab.spots.at(sp).lapmasktm; float pde = params->locallab.spots.at(sp).laplac; - int shortcu = lp.mergemet;// params->locallab.spots.at(sp).shortc; + int shortcu = 0; //lp.mergemet;// params->locallab.spots.at(sp).shortc; int lumask = params->locallab.spots.at(sp).lumask; if (!params->locallab.spots.at(sp).enatmMaskaft) { @@ -8749,7 +8747,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bool lmasutilicolwav = false; bool delt = params->locallab.spots.at(sp).deltae; int sco = params->locallab.spots.at(sp).scopemask; - int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc; + int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; int lumask = params->locallab.spots.at(sp).lumask; const int limscope = 80; @@ -8951,7 +8949,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bool lmasutilicolwav = false; bool delt = params->locallab.spots.at(sp).deltae; int sco = params->locallab.spots.at(sp).scopemask; - int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc; + int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; const int limscope = 80; const float mindE = 2.f + MINSCOPE * sco * lp.thr; @@ -9101,7 +9099,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o // bool delt = params->locallab.spots.at(sp).deltae; bool delt = false; int sco = params->locallab.spots.at(sp).scopemask; - int shortcu = lp.mergemet; + int shortcu = 0;//lp.mergemet; params->locallab.spots.at(sp).shortc; const int limscope = 80;// @@ -11176,7 +11174,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bool delt = params->locallab.spots.at(sp).deltae; int sco = params->locallab.spots.at(sp).scopemask; int shado = 0; - int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc; + int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; const int limscope = 80; const float mindE = 2.f + MINSCOPE * sco * lp.thr; @@ -11466,7 +11464,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bool delt = false; int sco = params->locallab.spots.at(sp).scopemask; int shado = 0; - int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc; + int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc; int lumask = params->locallab.spots.at(sp).lumask; const int limscope = 80; @@ -11511,7 +11509,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float b_base = lp.lowB / scaling; bool ctoning = (a_scale != 0.f || b_scale != 0.f || a_base != 0.f || b_base != 0.f); - if (!lp.inv && (lp.chro != 0 || lp.ligh != 0.f || lp.cont != 0 || ctoning || lp.mergemet >= 2 || lp.qualcurvemet != 0 || lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4 || lp.showmaskcolmet == 5) && lp.colorena) { // || lllocalcurve)) { //interior ellipse renforced lightness and chroma //locallutili + if (!lp.inv && (lp.chro != 0 || lp.ligh != 0.f || lp.cont != 0 || ctoning || lp.mergemet > 0 || lp.qualcurvemet != 0 || lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4 || lp.showmaskcolmet == 5) && lp.colorena) { // || lllocalcurve)) { //interior ellipse renforced lightness and chroma //locallutili /* //test for fftw blur with tiles fftw_tile_blur....not good we can see tiles - very long time int GW = original->W; @@ -11769,7 +11767,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float amountcd = 0.f; float anchorcd = 50.f; - if (lp.mergemet != 2) { +// if (lp.mergemet != 2) { maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, inv, lp, locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, multiThread, enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmasklocalcurve, localmaskutili, loclmasCurvecolwav, lmasutilicolwav, @@ -11783,7 +11781,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o return; } - } +// } if (lp.showmaskcolmet == 4) { return; @@ -12075,7 +12073,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int x = 0; x < bfw; x++) { lumreserv[y][x] = reserved->L[y + ystart][x + xstart]; - if (lp.mergemet == 2 || lp.mergemet == 3) { + if (lp.mergemet == 2) { bufcolreserv->L[y][x] = reserved->L[y + ystart][x + xstart]; bufcolreserv->a[y][x] = reserved->a[y + ystart][x + xstart]; bufcolreserv->b[y][x] = reserved->b[y + ystart][x + xstart]; @@ -12125,6 +12123,47 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o lab2rgb(*bufcolreserv, *tmpImagereserv, params->icm.workingProfile); tmpImagereserv->normalizeFloatTo1(); + float minR = tmpImagereserv->r(0, 0); + float maxR = minR; +#ifdef _OPENMP + #pragma omp parallel for reduction(max:maxR) reduction(min:minR) schedule(dynamic,16) +#endif + + for (int ir = 0; ir < bfh; ir++) { + for (int jr = 0; jr < bfw; jr++) { + minR = rtengine::min(minR, tmpImagereserv->r(ir, jr)); + maxR = rtengine::max(maxR, tmpImagereserv->r(ir, jr)); + } + } + + float minG = tmpImagereserv->g(0, 0); + float maxG = minG; +#ifdef _OPENMP + #pragma omp parallel for reduction(max:maxG) reduction(min:minG) schedule(dynamic,16) +#endif + + for (int ir = 0; ir < bfh; ir++) { + for (int jr = 0; jr < bfw; jr++) { + minG = rtengine::min(minG, tmpImagereserv->g(ir, jr)); + maxG = rtengine::max(maxG, tmpImagereserv->g(ir, jr)); + } + } + + float minB = tmpImagereserv->b(0, 0); + float maxB = minB; +#ifdef _OPENMP + #pragma omp parallel for reduction(max:maxB) reduction(min:minB) schedule(dynamic,16) +#endif + + for (int ir = 0; ir < bfh; ir++) { + for (int jr = 0; jr < bfw; jr++) { + minB = rtengine::min(minB, tmpImagereserv->b(ir, jr)); + maxB = rtengine::max(maxB, tmpImagereserv->b(ir, jr)); + } + } + + + //various combinaison substrct, multiply, difference, etc if (lp.mergecolMethod == 1) { //substract #ifdef _OPENMP @@ -12133,9 +12172,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int y = 0; y < bfh ; y++) {//LIM(x 0 2) 2 arbitral value but limit... for (int x = 0; x < bfw; x++) { - tmpImageorig->r(y, x) = lp.opacol * LIM((tmpImageorig->r(y, x) - tmpImagereserv->r(y, x)), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x); - tmpImageorig->g(y, x) = lp.opacol * LIM((tmpImageorig->g(y, x) - tmpImagereserv->g(y, x)), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x); - tmpImageorig->b(y, x) = lp.opacol * LIM((tmpImageorig->b(y, x) - tmpImagereserv->b(y, x)), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x); + tmpImageorig->r(y, x) = lp.opacol * ((tmpImageorig->r(y, x) - tmpImagereserv->r(y, x))) + (1.f - lp.opacol) * tmpImageorig->r(y, x); + tmpImageorig->g(y, x) = lp.opacol * ((tmpImageorig->g(y, x) - tmpImagereserv->g(y, x))) + (1.f - lp.opacol) * tmpImageorig->g(y, x); + tmpImageorig->b(y, x) = lp.opacol * ((tmpImageorig->b(y, x) - tmpImagereserv->b(y, x))) + (1.f - lp.opacol) * tmpImageorig->b(y, x); } } } else if (lp.mergecolMethod == 2) { //difference @@ -12169,9 +12208,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int y = 0; y < bfh ; y++) { for (int x = 0; x < bfw; x++) { - tmpImageorig->r(y, x) = lp.opacol * LIM(tmpImageorig->r(y, x) + tmpImagereserv->r(y, x), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x); - tmpImageorig->g(y, x) = lp.opacol * LIM(tmpImageorig->g(y, x) + tmpImagereserv->g(y, x), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x); - tmpImageorig->b(y, x) = lp.opacol * LIM(tmpImageorig->b(y, x) + tmpImagereserv->b(y, x), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x); + tmpImageorig->r(y, x) = lp.opacol * (tmpImageorig->r(y, x) + tmpImagereserv->r(y, x)) + (1.f - lp.opacol) * tmpImageorig->r(y, x); + tmpImageorig->g(y, x) = lp.opacol * (tmpImageorig->g(y, x) + tmpImagereserv->g(y, x)) + (1.f - lp.opacol) * tmpImageorig->g(y, x); + tmpImageorig->b(y, x) = lp.opacol * (tmpImageorig->b(y, x) + tmpImagereserv->b(y, x)) + (1.f - lp.opacol) * tmpImageorig->b(y, x); } } } else if (lp.mergecolMethod == 5) { //divide @@ -12181,9 +12220,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int y = 0; y < bfh ; y++) { for (int x = 0; x < bfw; x++) { - tmpImageorig->r(y, x) = lp.opacol * LIM(tmpImageorig->r(y, x) / (tmpImagereserv->r(y, x) + 0.00001f), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x); - tmpImageorig->g(y, x) = lp.opacol * LIM(tmpImageorig->g(y, x) / (tmpImagereserv->g(y, x) + 0.00001f), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x); - tmpImageorig->b(y, x) = lp.opacol * LIM(tmpImageorig->b(y, x) / (tmpImagereserv->b(y, x) + 0.00001f), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x); + tmpImageorig->r(y, x) = lp.opacol * (tmpImageorig->r(y, x) / (tmpImagereserv->r(y, x) + 0.00001f)) + (1.f - lp.opacol) * tmpImageorig->r(y, x); + tmpImageorig->g(y, x) = lp.opacol * (tmpImageorig->g(y, x) / (tmpImagereserv->g(y, x) + 0.00001f)) + (1.f - lp.opacol) * tmpImageorig->g(y, x); + tmpImageorig->b(y, x) = lp.opacol * (tmpImageorig->b(y, x) / (tmpImagereserv->b(y, x) + 0.00001f)) + (1.f - lp.opacol) * tmpImageorig->b(y, x); } } } else if (lp.mergecolMethod == 6) { //soft light softlig (float &a, float &b) @@ -12195,16 +12234,16 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int x = 0; x < bfw; x++) { float a = tmpImageorig->r(y, x); float b = tmpImagereserv->r(y, x); - softlig(a, b); - tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x); + softlig(a, b, minR, maxR); + tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x); a = tmpImageorig->g(y, x); b = tmpImagereserv->g(y, x); - softlig(a, b); - tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x); + softlig(a, b, minG, maxG); + tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x); a = tmpImageorig->b(y, x); b = tmpImagereserv->b(y, x); - softlig(a, b); - tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x); + softlig(a, b, minB, maxB); + tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x); } } } else if (lp.mergecolMethod == 7) { //hard light overlay (float &b, float &a) @@ -12216,16 +12255,16 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int x = 0; x < bfw; x++) { float a = tmpImageorig->r(y, x); float b = tmpImagereserv->r(y, x); - overlay(b, a); - tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x); + overlay(b, a, minR, maxR); + tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x); a = tmpImageorig->g(y, x); b = tmpImagereserv->g(y, x); - overlay(b, a); - tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x); + overlay(b, a, minG, maxG); + tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x); a = tmpImageorig->b(y, x); b = tmpImagereserv->b(y, x); - overlay(b, a); - tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x); + overlay(b, a, minB, maxB); + tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x); } } } else if (lp.mergecolMethod == 8) { //overlay overlay(float &a, float &b) @@ -12237,16 +12276,16 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int x = 0; x < bfw; x++) { float a = tmpImageorig->r(y, x); float b = tmpImagereserv->r(y, x); - overlay(a, b); - tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x); + overlay(a, b, minR, maxR); + tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x); a = tmpImageorig->g(y, x); b = tmpImagereserv->g(y, x); - overlay(a, b); - tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x); + overlay(a, b, minG, maxG); + tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x); a = tmpImageorig->b(y, x); b = tmpImagereserv->b(y, x); - overlay(a, b); - tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x); + overlay(a, b, minB, maxB); + tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x); } } } else if (lp.mergecolMethod == 9) { //screen screen (float &a, float &b) @@ -12258,16 +12297,16 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int x = 0; x < bfw; x++) { float a = tmpImageorig->r(y, x); float b = tmpImagereserv->r(y, x); - screen(a, b); - tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x); + screen(a, b, maxR); + tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x); a = tmpImageorig->g(y, x); b = tmpImagereserv->g(y, x); - screen(a, b); - tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x); + screen(a, b, maxG); + tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x); a = tmpImageorig->b(y, x); b = tmpImagereserv->b(y, x); - screen(a, b); - tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x); + screen(a, b, maxB); + tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x); } } } else if (lp.mergecolMethod == 10) { //darken only @@ -12304,15 +12343,15 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float a = tmpImageorig->r(y, x); float b = tmpImagereserv->r(y, x); exclusion(a, b); - tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x); + tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x); a = tmpImageorig->g(y, x); b = tmpImagereserv->g(y, x); exclusion(a, b); - tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x); + tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x); a = tmpImageorig->b(y, x); b = tmpImagereserv->b(y, x); exclusion(a, b); - tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x); + tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x); } } } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 7d0f19197..2fdcd1df0 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -819,13 +819,14 @@ enum ProcEventCode { EvlocallabsloSH = 793, Evlocallabsavrest = 794, Evlocallabrecurs = 795, - EvLocallabSpotmergeMethod = 796, - EvLocallabmergecolMethod = 797, - Evlocallabopacol = 798, - Evlocallabrgbshape = 799, - EvLocallabtoneMethod = 800, - EvLocallabspecial = 801, - Evlocallabconthrcol = 802, +// EvLocallabSpotmergeMethod = 796, + EvLocallabmergecolMethod = 796, + Evlocallabopacol = 797, + Evlocallabrgbshape = 798, + EvLocallabtoneMethod = 799, + EvLocallabspecial = 800, + Evlocallabconthrcol = 801, + EvLocallabmerMethod = 802, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index bf3dc282a..2d02eaa37 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2418,7 +2418,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : isvisible(true), shape("ELI"), spotMethod("norm"), - mergeMethod("none"), +// mergeMethod("none"), sensiexclu(12), structexclu(0), struc(4.0), @@ -2468,6 +2468,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : lapmaskcol(0.0), qualitycurveMethod("none"), gridMethod("one"), + merMethod("mone"), toneMethod("fou"), mergecolMethod("one"), llcurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}, @@ -2734,7 +2735,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && isvisible == other.isvisible && shape == other.shape && spotMethod == other.spotMethod - && mergeMethod == other.mergeMethod + // && mergeMethod == other.mergeMethod && sensiexclu == other.sensiexclu && structexclu == other.structexclu && struc == other.struc @@ -2783,6 +2784,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && lapmaskcol == other.lapmaskcol && qualitycurveMethod == other.qualitycurveMethod && gridMethod == other.gridMethod + && merMethod == other.merMethod && toneMethod == other.toneMethod && mergecolMethod == other.mergecolMethod && llcurve == other.llcurve @@ -4045,7 +4047,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).isvisible, "Locallab", "Isvisible_" + std::to_string(i), spot.isvisible, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).shape, "Locallab", "Shape_" + std::to_string(i), spot.shape, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).spotMethod, "Locallab", "SpotMethod_" + std::to_string(i), spot.spotMethod, keyFile); - saveToKeyfile(!pedited || pedited->locallab.spots.at(i).mergeMethod, "Locallab", "MergeMethod_" + std::to_string(i), spot.mergeMethod, keyFile); +// saveToKeyfile(!pedited || pedited->locallab.spots.at(i).mergeMethod, "Locallab", "MergeMethod_" + std::to_string(i), spot.mergeMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensiexclu, "Locallab", "SensiExclu_" + std::to_string(i), spot.sensiexclu, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).structexclu, "Locallab", "StructExclu_" + std::to_string(i), spot.structexclu, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).struc, "Locallab", "Struc_" + std::to_string(i), spot.struc, keyFile); @@ -4095,6 +4097,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo 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); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).merMethod, "Locallab", "Merg_Method_" + std::to_string(i), spot.merMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).toneMethod, "Locallab", "ToneMethod_" + std::to_string(i), spot.toneMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).mergecolMethod, "Locallab", "mergecolMethod_" + std::to_string(i), spot.mergecolMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).llcurve, "Locallab", "LLCurve_" + std::to_string(i), spot.llcurve, keyFile); @@ -5464,7 +5467,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Isvisible_" + std::to_string(i), pedited, spot.isvisible, spotEdited.isvisible); assignFromKeyfile(keyFile, "Locallab", "Shape_" + std::to_string(i), pedited, spot.shape, spotEdited.shape); assignFromKeyfile(keyFile, "Locallab", "SpotMethod_" + std::to_string(i), pedited, spot.spotMethod, spotEdited.spotMethod); - assignFromKeyfile(keyFile, "Locallab", "MergeMethod_" + std::to_string(i), pedited, spot.mergeMethod, spotEdited.mergeMethod); +// assignFromKeyfile(keyFile, "Locallab", "MergeMethod_" + std::to_string(i), pedited, spot.mergeMethod, spotEdited.mergeMethod); assignFromKeyfile(keyFile, "Locallab", "ShapeMethod_" + std::to_string(i), pedited, spot.shapeMethod, spotEdited.shapeMethod); assignFromKeyfile(keyFile, "Locallab", "SensiExclu_" + std::to_string(i), pedited, spot.sensiexclu, spotEdited.sensiexclu); assignFromKeyfile(keyFile, "Locallab", "StructExclu_" + std::to_string(i), pedited, spot.structexclu, spotEdited.structexclu); @@ -5514,6 +5517,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) 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); + assignFromKeyfile(keyFile, "Locallab", "Merge_Method_" + std::to_string(i), pedited, spot.merMethod, spotEdited.merMethod); assignFromKeyfile(keyFile, "Locallab", "ToneMethod_" + std::to_string(i), pedited, spot.toneMethod, spotEdited.toneMethod); assignFromKeyfile(keyFile, "Locallab", "mergecolMethod_" + std::to_string(i), pedited, spot.mergecolMethod, spotEdited.mergecolMethod); assignFromKeyfile(keyFile, "Locallab", "LLCurve_" + std::to_string(i), pedited, spot.llcurve, spotEdited.llcurve); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index f9032296f..c665f59cb 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -961,7 +961,7 @@ struct LocallabParams { bool isvisible; Glib::ustring shape; // ELI, RECT Glib::ustring spotMethod; // norm, exc - Glib::ustring mergeMethod; // none, short, orig +// Glib::ustring mergeMethod; // none, short, orig int sensiexclu; int structexclu; double struc; @@ -1011,6 +1011,7 @@ struct LocallabParams { double lapmaskcol; Glib::ustring qualitycurveMethod; Glib::ustring gridMethod; + Glib::ustring merMethod; Glib::ustring toneMethod; Glib::ustring mergecolMethod; std::vector llcurve; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 843d8ff64..567f3b82f 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -823,13 +823,14 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //EvlocallabsloSH LUMINANCECURVE, //Evlocallabsavrest LUMINANCECURVE, //Evlocallabrecurs - LUMINANCECURVE, // EvLocallabSpotmergeMethod +// LUMINANCECURVE, // EvLocallabSpotmergeMethod LUMINANCECURVE, //EvLocallabmergecolMethod LUMINANCECURVE, //EvLocallabopacol LUMINANCECURVE, //Evlocallabrgbshape LUMINANCECURVE, //EvLocallabtoneMethod LUMINANCECURVE, // EvLocallabspecial - LUMINANCECURVE //EvLocallabconthrcol + LUMINANCECURVE, //EvLocallabconthrcol + LUMINANCECURVE //EvLocallabmerMethod }; namespace rtengine diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 5351d591c..9cea72de4 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -51,11 +51,11 @@ ControlSpotPanel::ControlSpotPanel(): spotMethod_(Gtk::manage(new MyComboBoxText())), shapeMethod_(Gtk::manage(new MyComboBoxText())), qualityMethod_(Gtk::manage(new MyComboBoxText())), - mergeMethod_(Gtk::manage(new MyComboBoxText())), +// mergeMethod_(Gtk::manage(new MyComboBoxText())), sensiexclu_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIEXCLU"), 0, 100, 1, 12))), structexclu_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))), - + struc_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRES"), 1.0, 12.0, 0.1, 4.0))), locX_(Gtk::manage(new Adjuster(M("TP_LOCAL_WIDTH"), 2, 3000, 1, 150))), locXL_(Gtk::manage(new Adjuster(M("TP_LOCAL_WIDTH_L"), 2, 3000, 1, 150))), @@ -96,7 +96,7 @@ ControlSpotPanel::ControlSpotPanel(): buttondeleteconn_ = button_delete_->signal_clicked().connect( sigc::mem_fun(*this, &ControlSpotPanel::on_button_delete)); buttonduplicateconn_ = button_duplicate_->signal_clicked().connect( - sigc::mem_fun(*this, &ControlSpotPanel::on_button_duplicate)); + sigc::mem_fun(*this, &ControlSpotPanel::on_button_duplicate)); hbox1_->pack_start(*button_add_); hbox1_->pack_start(*button_delete_); hbox1_->pack_start(*button_duplicate_); @@ -107,7 +107,11 @@ ControlSpotPanel::ControlSpotPanel(): sigc::mem_fun(*this, &ControlSpotPanel::on_button_rename)); buttonvisibilityconn_ = button_visibility_->signal_button_release_event().connect( sigc::mem_fun(*this, &ControlSpotPanel::on_button_visibility)); - if(showtooltip) button_visibility_->set_tooltip_markup(M("TP_LOCALLAB_VIS_TOOLTIP")); + + if (showtooltip) { + button_visibility_->set_tooltip_markup(M("TP_LOCALLAB_VIS_TOOLTIP")); + } + hbox2_->pack_start(*button_rename_); hbox2_->pack_start(*button_visibility_); pack_start(*hbox2_); @@ -122,8 +126,8 @@ ControlSpotPanel::ControlSpotPanel(): // Disable search to prevent hijacking keyboard shortcuts #5265 treeview_->set_enable_search(false); treeview_->signal_key_press_event().connect( - sigc::mem_fun( - *this, &ControlSpotPanel::blockTreeviewSearch), false); + sigc::mem_fun( + *this, &ControlSpotPanel::blockTreeviewSearch), false); auto cell = Gtk::manage(new Gtk::CellRendererText()); int cols_count = treeview_->append_column("ID", *cell); @@ -175,7 +179,11 @@ 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); - if(showtooltip) 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); @@ -186,9 +194,17 @@ ControlSpotPanel::ControlSpotPanel(): pack_start(*ctboxspotmethod); excluFrame->set_label_align(0.025, 0.5); - if(showtooltip) 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()); - if(showtooltip) 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_); @@ -199,7 +215,11 @@ 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); - if(showtooltip) 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")); @@ -235,7 +255,11 @@ 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); - if(showtooltip) 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_ENH")); qualityMethod_->append(M("TP_LOCALLAB_ENHDEN")); qualityMethod_->set_active(1); @@ -247,15 +271,38 @@ ControlSpotPanel::ControlSpotPanel(): Gtk::Frame* const transitFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TRANSIT"))); transitFrame->set_label_align(0.025, 0.5); - if(showtooltip) 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()); - if(showtooltip) transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); - if(showtooltip) transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP")); - if(showtooltip) transitgrad_->set_tooltip_text(M("TP_LOCALLAB_TRANSITGRAD_TOOLTIP")); - if(showtooltip) scopemask_->set_tooltip_text(M("TP_LOCALLAB_SCOPEMASK_TOOLTIP")); + + if (showtooltip) { + transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); + } + + if (showtooltip) { + transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP")); + } + + if (showtooltip) { + transitgrad_->set_tooltip_text(M("TP_LOCALLAB_TRANSITGRAD_TOOLTIP")); + } + + if (showtooltip) { + scopemask_->set_tooltip_text(M("TP_LOCALLAB_SCOPEMASK_TOOLTIP")); + } + // if(showtooltip) lumask_->set_tooltip_text(M("TP_LOCALLAB_LUMASK_TOOLTIP")); - if(showtooltip) shortc_->set_tooltip_text(M("TP_LOCALLAB_SHORTCMASK_TOOLTIP")); - if(showtooltip) savrest_->set_tooltip_text(M("TP_LOCALLAB_SAVREST_TOOLTIP")); + if (showtooltip) { + shortc_->set_tooltip_text(M("TP_LOCALLAB_SHORTCMASK_TOOLTIP")); + } + + if (showtooltip) { + savrest_->set_tooltip_text(M("TP_LOCALLAB_SAVREST_TOOLTIP")); + } + transit_->setAdjusterListener(this); transitweak_->setAdjusterListener(this); transitgrad_->setAdjusterListener(this); @@ -267,10 +314,14 @@ ControlSpotPanel::ControlSpotPanel(): transitBox->pack_start(*transitgrad_); transitFrame->add(*transitBox); pack_start(*transitFrame); - + Gtk::Frame* const artifFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_ARTIF"))); artifFrame->set_label_align(0.025, 0.5); - if(showtooltip) 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); @@ -282,51 +333,58 @@ ControlSpotPanel::ControlSpotPanel(): balan_->setAdjusterListener(this); artifFrame->add(*artifBox); pack_start(*artifFrame); - - Gtk::HBox* const ctboxmergemethod = Gtk::manage(new Gtk::HBox()); - Gtk::Label* const labelmergemethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MERGETYPE") + ":")); - ctboxmergemethod->pack_start(*labelmergemethod, Gtk::PACK_SHRINK, 4); - if(showtooltip) ctboxmergemethod->set_tooltip_markup(M("TP_LOCALLAB_MERGETYPE_TOOLTIP")); - mergeMethod_->append(M("TP_LOCALLAB_MERGENONE")); - mergeMethod_->append(M("TP_LOCALLAB_MERGEONE")); - mergeMethod_->append(M("TP_LOCALLAB_MERGETWO")); - mergeMethod_->append(M("TP_LOCALLAB_MERGETHR")); - mergeMethod_->append(M("TP_LOCALLAB_MERGEFOU")); - mergeMethod_->append(M("TP_LOCALLAB_MERGEFIV")); - mergeMethod_->set_active(0); - mergeMethodconn_ = mergeMethod_->signal_changed().connect( - sigc::mem_fun( - *this, &ControlSpotPanel::mergeMethodChanged)); - ctboxmergemethod->pack_start(*mergeMethod_); - + /* + Gtk::HBox* const ctboxmergemethod = Gtk::manage(new Gtk::HBox()); + Gtk::Label* const labelmergemethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MERGETYPE") + ":")); + ctboxmergemethod->pack_start(*labelmergemethod, Gtk::PACK_SHRINK, 4); + if(showtooltip) ctboxmergemethod->set_tooltip_markup(M("TP_LOCALLAB_MERGETYPE_TOOLTIP")); + mergeMethod_->append(M("TP_LOCALLAB_MERGENONE")); + mergeMethod_->append(M("TP_LOCALLAB_MERGEONE")); + mergeMethod_->append(M("TP_LOCALLAB_MERGETWO")); + mergeMethod_->append(M("TP_LOCALLAB_MERGETHR")); + mergeMethod_->append(M("TP_LOCALLAB_MERGEFOU")); + mergeMethod_->append(M("TP_LOCALLAB_MERGEFIV")); + mergeMethod_->set_active(0); + mergeMethodconn_ = mergeMethod_->signal_changed().connect( + sigc::mem_fun( + *this, &ControlSpotPanel::mergeMethodChanged)); + // ctboxmergemethod->pack_start(*mergeMethod_); + */ avoidConn_ = avoid_->signal_toggled().connect( - sigc::mem_fun(*this, &ControlSpotPanel::avoidChanged)); + sigc::mem_fun(*this, &ControlSpotPanel::avoidChanged)); pack_start(*avoid_); recursConn_ = recurs_->signal_toggled().connect( - sigc::mem_fun(*this, &ControlSpotPanel::recursChanged)); + sigc::mem_fun(*this, &ControlSpotPanel::recursChanged)); pack_start(*recurs_); - if(showtooltip) recurs_->set_tooltip_text(M("TP_LOCALLAB_RECURS_TOOLTIP")); - + + if (showtooltip) { + recurs_->set_tooltip_text(M("TP_LOCALLAB_RECURS_TOOLTIP")); + } + Gtk::Frame* const maskFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_MASFRAME"))); maskFrame->set_label_align(0.025, 0.5); - if(showtooltip) maskFrame->set_tooltip_text(M("TP_LOCALLAB_MASFRAME_TOOLTIP")); + + if (showtooltip) { + maskFrame->set_tooltip_text(M("TP_LOCALLAB_MASFRAME_TOOLTIP")); + } + ToolParamBlock* const maskBox = Gtk::manage(new ToolParamBlock()); maskBox->pack_start(*laplac_); laplacConn_ = laplac_->signal_toggled().connect( - sigc::mem_fun(*this, &ControlSpotPanel::laplacChanged)); + sigc::mem_fun(*this, &ControlSpotPanel::laplacChanged)); deltaeConn_ = deltae_->signal_toggled().connect( - sigc::mem_fun(*this, &ControlSpotPanel::deltaeChanged)); + sigc::mem_fun(*this, &ControlSpotPanel::deltaeChanged)); shortcConn_ = shortc_->signal_toggled().connect( - sigc::mem_fun(*this, &ControlSpotPanel::shortcChanged)); + sigc::mem_fun(*this, &ControlSpotPanel::shortcChanged)); savrestConn_ = savrest_->signal_toggled().connect( - sigc::mem_fun(*this, &ControlSpotPanel::savrestChanged)); + sigc::mem_fun(*this, &ControlSpotPanel::savrestChanged)); maskBox->pack_start(*deltae_); maskBox->pack_start(*scopemask_); // maskBox->pack_start(*shortc_); Gtk::HSeparator *separator = Gtk::manage(new Gtk::HSeparator()); maskBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); - maskBox->pack_start(*ctboxmergemethod); +// maskBox->pack_start(*ctboxmergemethod); Gtk::HSeparator *separator1 = Gtk::manage(new Gtk::HSeparator()); maskBox->pack_start(*separator1, Gtk::PACK_SHRINK, 2); @@ -349,7 +407,7 @@ ControlSpotPanel::ControlSpotPanel(): colorMouseovertext.set_green(100. / 255.); colorMouseovertext.set_blue(0.); colorMouseovertext.set_alpha(0.5); - + // Nominal spot (transparent black) colorNominal.set_red(0.); colorNominal.set_green(0.); @@ -473,16 +531,18 @@ void ControlSpotPanel::on_button_duplicate() // Raise event const int selId = getSelectedSpot(); + if (selId == 0) { // No selected spot to duplicate return; } + nbSpotChanged_ = true; selSpotChanged_ = true; eventType = SpotDuplication; const int newId = getNewId(); listener->panelChanged(EvLocallabSpotCreated, "ID#" + std::to_string(newId) - + " (" + M("TP_LOCALLAB_EV_DUPL") + " ID#" - + std::to_string(selId) + ")"); + + " (" + M("TP_LOCALLAB_EV_DUPL") + " ID#" + + std::to_string(selId) + ")"); } void ControlSpotPanel::on_button_rename() @@ -512,6 +572,7 @@ void ControlSpotPanel::on_button_rename() // Update actual name and raise event if (status == RenameDialog::OkButton) { const Glib::ustring newname = d.get_new_name(); + if (newname != actualname) { // Event is only raised if name is updated nameChanged_ = true; row[spots_.name] = newname; @@ -620,7 +681,7 @@ void ControlSpotPanel::load_ControlSpot_param() // Load param in selected control spot shape_->set_active(row[spots_.shape]); spotMethod_->set_active(row[spots_.spotMethod]); - mergeMethod_->set_active(row[spots_.mergeMethod]); +// mergeMethod_->set_active(row[spots_.mergeMethod]); sensiexclu_->setValue((double)row[spots_.sensiexclu]); structexclu_->setValue((double)row[spots_.structexclu]); struc_->setValue((double)row[spots_.struc]); @@ -717,7 +778,7 @@ void ControlSpotPanel::spotMethodChanged() listener->panelChanged(EvLocallabSpotSpotMethod, spotMethod_->get_active_text()); } } - +/* void ControlSpotPanel::mergeMethodChanged() { // printf("mergeMethodChanged\n"); @@ -733,22 +794,12 @@ void ControlSpotPanel::mergeMethodChanged() Gtk::TreeModel::Row row = *iter; row[spots_.mergeMethod] = mergeMethod_->get_active_row_number(); -/* - // Update Control Spot GUI according to spotMethod_ combobox state (to be compliant with updateParamVisibility function) - if (multiImage && mergeMethod_->get_active_text() == M("GENERAL_UNCHANGED")) { - excluFrame->show(); - } else if (spotMethod_->get_active_row_number() == 0) { // Normal case - excluFrame->hide(); - } else { // Excluding case - excluFrame->show(); - } -*/ // Raise event if (listener) { listener->panelChanged(EvLocallabSpotmergeMethod, mergeMethod_->get_active_text()); } } - +*/ void ControlSpotPanel::shapeMethodChanged() { @@ -858,6 +909,7 @@ void ControlSpotPanel::updateParamVisibility() // Update Control Spot GUI according to shapeMethod_ combobox state (to be compliant with shapeMethodChanged function) const int method = shapeMethod_->get_active_row_number(); + if (!batchMode) { if (method == 1 || method == 3) { // Symmetrical cases locXL_->hide(); @@ -960,7 +1012,7 @@ void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval) listener->panelChanged(Evlocallabstructexlu, structexclu_->getTextValue()); } } - + if (a == struc_) { row[spots_.struc] = struc_->getValue(); @@ -1348,7 +1400,7 @@ void ControlSpotPanel::disableParamlistener(bool cond) buttonvisibilityconn_.block(cond); shapeconn_.block(cond); spotMethodconn_.block(cond); - mergeMethodconn_.block(cond); +// mergeMethodconn_.block(cond); sensiexclu_->block(cond); structexclu_->block(cond); struc_->block(cond); @@ -1383,7 +1435,7 @@ void ControlSpotPanel::setParamEditable(bool cond) shape_->set_sensitive(cond); spotMethod_->set_sensitive(cond); - mergeMethod_->set_sensitive(cond); +// mergeMethod_->set_sensitive(cond); sensiexclu_->set_sensitive(cond); structexclu_->set_sensitive(cond); struc_->set_sensitive(cond); @@ -1689,9 +1741,10 @@ CursorShape ControlSpotPanel::getCursor(int objectID) const // When there is no control spot (i.e. no selected row), objectID can unexpectedly be different from -1 and produced not desired behavior const auto s = treeview_->get_selection(); + if (!s->count_selected_rows()) { - return CSHandOpen; - } + return CSHandOpen; + } const int rem_ = objectID % 7; @@ -1765,6 +1818,7 @@ bool ControlSpotPanel::mouseOver(int modifierKey) for (auto iter = children.begin(); iter != children.end(); iter++) { Gtk::TreeModel::Row row = *iter; + if (row[spots_.curveid] == curveId_ && *row != *selRow) { row[spots_.mouseover] = true; } else { @@ -1867,7 +1921,7 @@ bool ControlSpotPanel::button1Pressed(int modifierKey) } lastCoord_.set(provider->posImage.x + provider->deltaImage.x, provider->posImage.y + provider->deltaImage.y); - EditSubscriber::action = EditSubscriber::Action::DRAGGING; + EditSubscriber::action = EditSubscriber::Action::DRAGGING; return true; } @@ -2024,7 +2078,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int id) r->isvisible = row[spots_.isvisible]; r->shape = row[spots_.shape]; r->spotMethod = row[spots_.spotMethod]; - r->mergeMethod = row[spots_.mergeMethod]; +// r->mergeMethod = row[spots_.mergeMethod]; r->sensiexclu = row[spots_.sensiexclu]; r->structexclu = row[spots_.structexclu]; r->struc = row[spots_.struc]; @@ -2158,7 +2212,7 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot) row[spots_.curveid] = 0; // No associated curve row[spots_.shape] = newSpot->shape; row[spots_.spotMethod] = newSpot->spotMethod; - row[spots_.mergeMethod] = newSpot->mergeMethod; +// row[spots_.mergeMethod] = newSpot->mergeMethod; row[spots_.sensiexclu] = newSpot->sensiexclu; row[spots_.structexclu] = newSpot->structexclu; row[spots_.struc] = newSpot->struc; @@ -2211,7 +2265,7 @@ int ControlSpotPanel::updateControlSpot(SpotRow* spot) row[spots_.isvisible] = spot->isvisible; row[spots_.shape] = spot->shape; row[spots_.spotMethod] = spot->spotMethod; - row[spots_.mergeMethod] = spot->mergeMethod; +// row[spots_.mergeMethod] = spot->mergeMethod; row[spots_.sensiexclu] = spot->sensiexclu; row[spots_.structexclu] = spot->structexclu; row[spots_.struc] = spot->struc; @@ -2310,7 +2364,7 @@ ControlSpotPanel::SpotEdited* ControlSpotPanel::getEditedStates() se->shape = shape_->get_active_text() != M("GENERAL_UNCHANGED"); se->spotMethod = spotMethod_->get_active_text() != M("GENERAL_UNCHANGED"); - se->mergeMethod = mergeMethod_->get_active_text() != M("GENERAL_UNCHANGED"); +// se->mergeMethod = mergeMethod_->get_active_text() != M("GENERAL_UNCHANGED"); se->sensiexclu = sensiexclu_->getEditedState(); se->structexclu = structexclu_->getEditedState(); se->struc = struc_->getEditedState(); @@ -2379,10 +2433,11 @@ void ControlSpotPanel::setEditedStates(SpotEdited* se) spotMethod_->set_active_text(M("GENERAL_UNCHANGED")); } - if (!se->mergeMethod) { - mergeMethod_->set_active_text(M("GENERAL_UNCHANGED")); - } - + /* + if (!se->mergeMethod) { + mergeMethod_->set_active_text(M("GENERAL_UNCHANGED")); + } + */ sensiexclu_->setEditedState(se->sensiexclu ? Edited : UnEdited); structexclu_->setEditedState(se->structexclu ? Edited : UnEdited); struc_->setEditedState(se->struc ? Edited : UnEdited); @@ -2539,7 +2594,7 @@ void ControlSpotPanel::setBatchMode(bool batchMode) // Set batch mode for comboBoxText shape_->append(M("GENERAL_UNCHANGED")); spotMethod_->append(M("GENERAL_UNCHANGED")); - mergeMethod_->append(M("GENERAL_UNCHANGED")); +// mergeMethod_->append(M("GENERAL_UNCHANGED")); shapeMethod_->append(M("GENERAL_UNCHANGED")); qualityMethod_->append(M("GENERAL_UNCHANGED")); } @@ -2583,7 +2638,7 @@ ControlSpotPanel::ControlSpots::ControlSpots() add(deltae); add(shortc); add(savrest); - add(mergeMethod); +// add(mergeMethod); } //----------------------------------------------------------------------------- diff --git a/rtgui/controlspotpanel.h b/rtgui/controlspotpanel.h index 53efa7fe7..867c707ff 100644 --- a/rtgui/controlspotpanel.h +++ b/rtgui/controlspotpanel.h @@ -73,7 +73,7 @@ public: bool deltae; bool shortc; bool savrest; - int mergeMethod; // 0 = None, 1 = short circuit, 2 = original +// int mergeMethod; // 0 = None, 1 = short circuit, 2 = original }; /** @@ -112,7 +112,7 @@ public: bool deltae; bool shortc; bool savrest; - bool mergeMethod; +// bool mergeMethod; }; /** @@ -269,7 +269,7 @@ private: void shapeChanged(); void spotMethodChanged(); void shapeMethodChanged(); - void mergeMethodChanged(); +// void mergeMethodChanged(); void qualityMethodChanged(); void updateParamVisibility(); void adjusterChanged(Adjuster* a, double newval); @@ -339,7 +339,7 @@ private: Gtk::TreeModelColumn deltae; Gtk::TreeModelColumn shortc; Gtk::TreeModelColumn savrest; - Gtk::TreeModelColumn mergeMethod; // 0 = None, 1 = short cir, 2 = original +// Gtk::TreeModelColumn mergeMethod; // 0 = None, 1 = short cir, 2 = original }; class RenameDialog: @@ -386,8 +386,8 @@ private: sigc::connection shapeMethodconn_; MyComboBoxText* const qualityMethod_; sigc::connection qualityMethodconn_; - MyComboBoxText* const mergeMethod_; - sigc::connection mergeMethodconn_; +// MyComboBoxText* const mergeMethod_; + // sigc::connection mergeMethodconn_; Adjuster* const sensiexclu_; Adjuster* const structexclu_; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 8ad61d667..9aba310a3 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -144,6 +144,7 @@ Locallab::Locallab(): expcbdl(Gtk::manage(new MyExpander(true, Gtk::manage(new Gtk::HBox())))), expdenoi(Gtk::manage(new MyExpander(true, Gtk::manage(new Gtk::HBox())))), expmaskcol(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWC")))), + expmaskcol1(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWC1")))), expmaskexp(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWE")))), expmasksh(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWS")))), expmaskcb(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWCB")))), @@ -292,296 +293,302 @@ Locallab::Locallab(): fatanchor(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 1., 100., 1., 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), fatlevel(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATLEVEL"), 0, 3, 1, 2))), multipliersh( - [this]() -> std::array - { - std::array res = {}; - for (unsigned int i = 0; i < res.size(); ++i) { - Glib::ustring ss = Glib::ustring::format(i); + [this]() -> std::array +{ + std::array res = {}; - if (i == 0) { - ss += Glib::ustring::compose(" (%1)", M("TP_LOCALLAB_LUMADARKEST")); - } else if (i == 4) { - ss += Glib::ustring::compose(" (%1)", M("TP_LOCALLAB_LUMAWHITESEST")); - } + for (unsigned int i = 0; i < res.size(); ++i) { + Glib::ustring ss = Glib::ustring::format(i); - res[i] = Gtk::manage(new Adjuster(std::move(ss), -100, 100, 1, 0)); - res[i]->setAdjusterListener(this); - } - return res; - }() - ), - //Shadow hightlights - highlights(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0))), - h_tonalwidth(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 70))), - shadows(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0))), - s_tonalwidth(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 30))), - sh_radius(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_RADIUS"), 0, 100, 1, 40))), - sensihs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), - blendmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), - radmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), - blurSHde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), - chromaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), - gammaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), - slomaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), - lapmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), - detailSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAILSH"), -5, 5, 1, 0))), - fatamountSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATAMOUNT"), 1., 100., 1., 1.))), - fatanchorSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 1., 100., 1., 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), - gamSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMSH"), 0.25, 15.0, 0.01, 2.4))), - sloSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOSH"), 0.0, 100.0, 0.01, 12.92))), - // Vibrance - saturated(Gtk::manage(new Adjuster(M("TP_VIBRANCE_SATURATED"), -100., 100., 1., 0.))), - pastels(Gtk::manage(new Adjuster(M("TP_VIBRANCE_PASTELS"), -100., 100., 1., 0.))), - sensiv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), - //Soft Light - streng(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENG"), 1, 100, 1, 1))), - laplace(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACE"), 0., 100., 0.5, 25.))), - sensisf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 1, 100, 1, 15))), - // Blur & Noise - radius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADIUS"), 1.5, 1000.0, 0.1, 1.5))), - strength(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENGTH"), 0, 100, 1, 0))), - itera(Gtk::manage(new Adjuster(M("TP_DIRPYRDENOISE_MEDIAN_PASSES"), 1, 4, 1, 1))), - guidbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GUIDBL"), 0, 1000, 1, 0))), - epsbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_EPSBL"), -10, 10, 1, 0))), - sensibn(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIBN"), 0, 100, 1, 40))), - blendmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), - radmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), - chromaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), - gammaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))), - slomaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), - lapmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), - shadmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_HIGHMASKCOL"), 0, 100, 1, 0))), - isogr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ISOGR"), 20, 6400, 1, 400))), - strengr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENGR"), 0, 100, 1, 0))), - scalegr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALEGR"), 0, 100, 1, 100))), - // Tone Mapping - stren(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STREN"), -0.5, 2.0, 0.01, 0.5))), - gamma(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAM"), 0.4, 4.0, 0.11, 1.0))), - estop(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ESTOP"), 0.1, 4.0, 0.01, 0.5))), - scaltm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALTM"), 0.1, 10.0, 0.01, 4.0))), - rewei(Gtk::manage(new Adjuster(M("TP_LOCALLAB_REWEI"), 0, 3, 1, 0))), - sensitm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), - softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), - amount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AMOUNT"), 50., 100.0, 0.5, 95.))), - satur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SATUR"), -100., 100., 0.1, 0.))),//by default satur = 0 ==> use Mantiuk value - blendmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), - radmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), - chromasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), - gammasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))), - slomasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), - lapmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), - // Retinex - str(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STR"), 0., 100., 0.1, 0.2))), - chrrt(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHRRT"), 0.0, 100.0, 0.1, 0.0))), - neigh(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NEIGH"), MINNEIGH, MAXNEIGH, 0.5, 50., nullptr, nullptr, &retiSlider2neigh, &retiNeigh2Slider))), - vart(Gtk::manage(new Adjuster(M("TP_LOCALLAB_VART"), 0.1, 500., 0.1, 150.))), - offs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_OFFS"), -16386., 32768., 1., 0.))), - dehaz(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEHAZ"), 0, 100, 1, 0))), - depth(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEPTH"), 0, 100, 1, 25))), - sensih(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIH"), 0, 100, 1, 60))), - softradiusret(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRETI"), 0.0, 100.0, 0.5, 40.))), - 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.))), - gammaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))), - slomaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), - lapmaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), - scalereti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALERETI"), 1.0, 10.0, 1., 2.))), - darkness(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DARKRETI"), 0.01, 6.0, 0.01, 2.0))), - lightnessreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LIGHTRETI"), 0.01, 4.0, 0.01, 1.))), - limd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESRETI"), 1.2, 100.0, 0.1, 8.))), - cliptm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLIPTM"), 0.02, 2.0, 0.01, 1.))), - // Sharpening - sharcontrast(Gtk::manage(new Adjuster(M("TP_SHARPENING_CONTRAST"), 0, 200, 1, 20))), - sharradius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARRADIUS"), 0.4, 2.5, 0.01, 0.75))), - sharamount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARAMOUNT"), 0, 100, 1, 100))), - shardamping(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARDAMPING"), 0, 100, 1, 0))), - shariter(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARITER"), 5, 100, 1, 30))), - sharblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARBLUR"), 0.2, 2.0, 0.05, 0.2))), - sensisha(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))), - // Local Contrast - lcradius(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_RADIUS"), 20, 400, 1, 80))), - 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"), 1, 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.))), - clarisoft(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARISOFT"), 0., 100., 0.5, 0.))), - claricres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARICRES"), -20., 100., 0.5, 0.))), - sensilc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))), - residchro(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCHRO"), -100, 100, 1, 0))), - multiplier( - [this]() -> std::array - { - std::array res = {}; - for (unsigned int i = 0; i < res.size(); ++i) { - Glib::ustring ss = Glib::ustring::format(i); + if (i == 0) { + ss += Glib::ustring::compose(" (%1)", M("TP_LOCALLAB_LUMADARKEST")); + } else if (i == 4) { + ss += Glib::ustring::compose(" (%1)", M("TP_LOCALLAB_LUMAWHITESEST")); + } - if (i == 0) { - ss += Glib::ustring::compose(" (%1)", M("TP_DIRPYREQUALIZER_LUMAFINEST")); - } else if (i == 5) { - ss += Glib::ustring::compose(" (%1)", M("TP_DIRPYREQUALIZER_LUMACOARSEST")); - } + res[i] = Gtk::manage(new Adjuster(std::move(ss), -100, 100, 1, 0)); + res[i]->setAdjusterListener(this); + } - res[i] = Gtk::manage(new Adjuster(std::move(ss), 0.0, 4.0, 0.01, 1.0)); - res[i]->setAdjusterListener(this); - } - return res; - }() - ), - // Contrast by detail levels - chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0., 1.5, 0.01, 0.))), - threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))), - clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.1, 100., 0.1, 0.1))), - 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.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, 0.))), - 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.))), - lapmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), - // Denoise - noiselumf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINE"), MINCHRO, MAXCHRO, 0.01, 0.))), - noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 0.01, 0.))), - noiselumf2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINETWO"), MINCHRO, MAXCHRO, 0.01, 0.))), - noiselumc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMCOARSE"), MINCHRO, MAXCHROCC, 0.01, 0.))), - noiselumdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMDETAIL"), 0., 100., 0.01, 0.))), - noiselequal(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELEQUAL"), -2, 10, 1, 7, Gtk::manage(new RTImage("circle-white-small.png")), Gtk::manage(new RTImage("circle-black-small.png"))))), - noisechrof(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROFINE"), MINCHRO, MAXCHRO, 0.01, 0.))), - noisechroc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROCOARSE"), MINCHRO, MAXCHROCC, 0.01, 0.))), - noisechrodetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHRODETAIL"), 0., 100., 0.01, 0.))), - adjblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ADJ"), -100., 100., 1., 0., Gtk::manage(new RTImage("circle-blue-small.png")), Gtk::manage(new RTImage("circle-red-small.png"))))), - bilateral(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BILATERAL"), 0, 100, 1, 0))), - sensiden(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIDEN"), 0, 100, 1, 20))), - detailthr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAILTHR"), 0, 100, 1, 0))), + return res; +} +() +), +//Shadow hightlights +highlights(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0))), +h_tonalwidth(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 70))), +shadows(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0))), +s_tonalwidth(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 30))), +sh_radius(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_RADIUS"), 0, 100, 1, 40))), +sensihs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), +blendmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), +radmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), +blurSHde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), +chromaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), +gammaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), +slomaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), +lapmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), +detailSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAILSH"), -5, 5, 1, 0))), +fatamountSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATAMOUNT"), 1., 100., 1., 1.))), +fatanchorSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 1., 100., 1., 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), +gamSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMSH"), 0.25, 15.0, 0.01, 2.4))), +sloSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOSH"), 0.0, 100.0, 0.01, 12.92))), +// Vibrance +saturated(Gtk::manage(new Adjuster(M("TP_VIBRANCE_SATURATED"), -100., 100., 1., 0.))), +pastels(Gtk::manage(new Adjuster(M("TP_VIBRANCE_PASTELS"), -100., 100., 1., 0.))), +sensiv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), +//Soft Light +streng(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENG"), 1, 100, 1, 1))), +laplace(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACE"), 0., 100., 0.5, 25.))), +sensisf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 1, 100, 1, 15))), +// Blur & Noise +radius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADIUS"), 1.5, 1000.0, 0.1, 1.5))), +strength(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENGTH"), 0, 100, 1, 0))), +itera(Gtk::manage(new Adjuster(M("TP_DIRPYRDENOISE_MEDIAN_PASSES"), 1, 4, 1, 1))), +guidbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GUIDBL"), 0, 1000, 1, 0))), +epsbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_EPSBL"), -10, 10, 1, 0))), +sensibn(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIBN"), 0, 100, 1, 40))), +blendmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), +radmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), +chromaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), +gammaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))), +slomaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), +lapmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), +shadmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_HIGHMASKCOL"), 0, 100, 1, 0))), +isogr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ISOGR"), 20, 6400, 1, 400))), +strengr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENGR"), 0, 100, 1, 0))), +scalegr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALEGR"), 0, 100, 1, 100))), +// Tone Mapping +stren(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STREN"), -0.5, 2.0, 0.01, 0.5))), +gamma(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAM"), 0.4, 4.0, 0.11, 1.0))), +estop(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ESTOP"), 0.1, 4.0, 0.01, 0.5))), +scaltm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALTM"), 0.1, 10.0, 0.01, 4.0))), +rewei(Gtk::manage(new Adjuster(M("TP_LOCALLAB_REWEI"), 0, 3, 1, 0))), +sensitm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), +softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), +amount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AMOUNT"), 50., 100.0, 0.5, 95.))), +satur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SATUR"), -100., 100., 0.1, 0.))),//by default satur = 0 ==> use Mantiuk value +blendmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), +radmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), +chromasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), +gammasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))), +slomasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), +lapmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), +// Retinex +str(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STR"), 0., 100., 0.1, 0.2))), +chrrt(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHRRT"), 0.0, 100.0, 0.1, 0.0))), +neigh(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NEIGH"), MINNEIGH, MAXNEIGH, 0.5, 50., nullptr, nullptr, &retiSlider2neigh, &retiNeigh2Slider))), +vart(Gtk::manage(new Adjuster(M("TP_LOCALLAB_VART"), 0.1, 500., 0.1, 150.))), +offs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_OFFS"), -16386., 32768., 1., 0.))), +dehaz(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEHAZ"), 0, 100, 1, 0))), +depth(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEPTH"), 0, 100, 1, 25))), +sensih(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIH"), 0, 100, 1, 60))), +softradiusret(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRETI"), 0.0, 100.0, 0.5, 40.))), +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.))), +gammaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))), +slomaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), +lapmaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), +scalereti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALERETI"), 1.0, 10.0, 1., 2.))), +darkness(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DARKRETI"), 0.01, 6.0, 0.01, 2.0))), +lightnessreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LIGHTRETI"), 0.01, 4.0, 0.01, 1.))), +limd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESRETI"), 1.2, 100.0, 0.1, 8.))), +cliptm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLIPTM"), 0.02, 2.0, 0.01, 1.))), +// Sharpening +sharcontrast(Gtk::manage(new Adjuster(M("TP_SHARPENING_CONTRAST"), 0, 200, 1, 20))), +sharradius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARRADIUS"), 0.4, 2.5, 0.01, 0.75))), +sharamount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARAMOUNT"), 0, 100, 1, 100))), +shardamping(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARDAMPING"), 0, 100, 1, 0))), +shariter(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARITER"), 5, 100, 1, 30))), +sharblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARBLUR"), 0.2, 2.0, 0.05, 0.2))), +sensisha(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))), +// Local Contrast +lcradius(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_RADIUS"), 20, 400, 1, 80))), +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"), 1, 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.))), +clarisoft(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARISOFT"), 0., 100., 0.5, 0.))), +claricres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARICRES"), -20., 100., 0.5, 0.))), +sensilc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))), +residchro(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCHRO"), -100, 100, 1, 0))), +multiplier( +[this]() -> std::array { + std::array res = {}; - // ButtonCheck widgets - // Color & Light - curvactiv(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_CURV")))), - invers(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), - special(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_SPECIAL")))), - enaColorMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - // Exposure - enaExpMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - enaExpMaskaft(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASKAFT")))), - inversex(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), - //Shadows Highlight - enaSHMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - inverssh(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), - // Vibrance - protectSkins(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_PROTECTSKINS")))), - avoidColorShift(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_AVOIDCOLORSHIFT")))), - pastSatTog(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_PASTSATTOG")))), - // Blur & Noise - activlum(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ACTIV")))), - enablMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - fftwbl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW2")))), - //TM - equiltm(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))), - enatmMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - enatmMaskaft(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_AFTER_MASK")))), - // Retinex - equilret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))), - inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), - loglin(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LOGLIN")))), - lumonly(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LUMONLY")))), - enaretiMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), - enaretiMasktmap(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TM_MASK")))), - fftwreti(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW")))), - // Sharpening - inverssha(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), - // Local contrast - fftwlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW2")))), - //CBDL - enacbMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), + for (unsigned int i = 0; i < res.size(); ++i) + { + Glib::ustring ss = Glib::ustring::format(i); - // ComboBox widgets - // Color & Light - qualitycurveMethod(Gtk::manage(new MyComboBoxText())), - gridMethod(Gtk::manage(new MyComboBoxText())), + if (i == 0) { + ss += Glib::ustring::compose(" (%1)", M("TP_DIRPYREQUALIZER_LUMAFINEST")); + } else if (i == 5) { + ss += Glib::ustring::compose(" (%1)", M("TP_DIRPYREQUALIZER_LUMACOARSEST")); + } + + res[i] = Gtk::manage(new Adjuster(std::move(ss), 0.0, 4.0, 0.01, 1.0)); + res[i]->setAdjusterListener(this); + } + return res; +}() +), +// Contrast by detail levels +chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0., 1.5, 0.01, 0.))), +threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))), +clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.1, 100., 0.1, 0.1))), +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.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, 0.))), +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.))), +lapmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), +// Denoise +noiselumf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINE"), MINCHRO, MAXCHRO, 0.01, 0.))), +noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 0.01, 0.))), +noiselumf2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINETWO"), MINCHRO, MAXCHRO, 0.01, 0.))), +noiselumc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMCOARSE"), MINCHRO, MAXCHROCC, 0.01, 0.))), +noiselumdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMDETAIL"), 0., 100., 0.01, 0.))), +noiselequal(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELEQUAL"), -2, 10, 1, 7, Gtk::manage(new RTImage("circle-white-small.png")), Gtk::manage(new RTImage("circle-black-small.png"))))), +noisechrof(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROFINE"), MINCHRO, MAXCHRO, 0.01, 0.))), +noisechroc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROCOARSE"), MINCHRO, MAXCHROCC, 0.01, 0.))), +noisechrodetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHRODETAIL"), 0., 100., 0.01, 0.))), +adjblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ADJ"), -100., 100., 1., 0., Gtk::manage(new RTImage("circle-blue-small.png")), Gtk::manage(new RTImage("circle-red-small.png"))))), +bilateral(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BILATERAL"), 0, 100, 1, 0))), +sensiden(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIDEN"), 0, 100, 1, 20))), +detailthr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAILTHR"), 0, 100, 1, 0))), + +// ButtonCheck widgets +// Color & Light +curvactiv(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_CURV")))), +invers(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), +special(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_SPECIAL")))), +enaColorMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), +// Exposure +enaExpMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), +enaExpMaskaft(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASKAFT")))), +inversex(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), +//Shadows Highlight +enaSHMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), +inverssh(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), +// Vibrance +protectSkins(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_PROTECTSKINS")))), +avoidColorShift(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_AVOIDCOLORSHIFT")))), +pastSatTog(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_PASTSATTOG")))), +// Blur & Noise +activlum(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ACTIV")))), +enablMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), +fftwbl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW2")))), +//TM +equiltm(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))), +enatmMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), +enatmMaskaft(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_AFTER_MASK")))), +// Retinex +equilret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))), +inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), +loglin(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LOGLIN")))), +lumonly(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LUMONLY")))), +enaretiMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), +enaretiMasktmap(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TM_MASK")))), +fftwreti(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW")))), +// Sharpening +inverssha(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), +// Local contrast +fftwlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW2")))), +//CBDL +enacbMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), + +// ComboBox widgets +// Color & Light +qualitycurveMethod(Gtk::manage(new MyComboBoxText())), +gridMethod(Gtk::manage(new MyComboBoxText())), +merMethod(Gtk::manage(new MyComboBoxText())), // toneMethod(Gtk::manage(new MyComboBoxText())), - showmaskcolMethod(Gtk::manage(new MyComboBoxText())), - showmaskcolMethodinv(Gtk::manage(new MyComboBoxText())), - mergecolMethod(Gtk::manage(new MyComboBoxText())), - csThresholdcol(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLDBLUR"), 0, 9, 0, 0, 6, 5, 0, false))), - //Exposure - showmaskexpMethod(Gtk::manage(new MyComboBoxText())), - showmaskexpMethodinv(Gtk::manage(new MyComboBoxText())), - expMethod(Gtk::manage(new MyComboBoxText())), - exnoiseMethod(Gtk::manage(new MyComboBoxText())), - //Shadows Highlight - shMethod(Gtk::manage(new MyComboBoxText())), - showmaskSHMethod(Gtk::manage(new MyComboBoxText())), - showmaskSHMethodinv(Gtk::manage(new MyComboBoxText())), - // Blur & Noise - blurMethod(Gtk::manage(new MyComboBoxText())), - //soft Method - softMethod(Gtk::manage(new MyComboBoxText())), - showmasksoftMethod(Gtk::manage(new MyComboBoxText())), - //Blur - blMethod(Gtk::manage(new MyComboBoxText())), - medMethod(Gtk::manage(new MyComboBoxText())), - showmaskblMethod(Gtk::manage(new MyComboBoxText())), - csThresholdblur(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLDBLUR"), 0, 9, 0, 0, 6, 5, 0, false))), - //TM - showmasktmMethod(Gtk::manage(new MyComboBoxText())), - // Retinex - retinexMethod(Gtk::manage(new MyComboBoxText())), - showmaskretiMethod(Gtk::manage(new MyComboBoxText())), - //Local contrast - localcontMethod(Gtk::manage(new MyComboBoxText())), - csThreshold(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLD"), 0, 9, 0, 0, 5, 5, 0, false))), - //CBDL - showmaskcbMethod(Gtk::manage(new MyComboBoxText())), +showmaskcolMethod(Gtk::manage(new MyComboBoxText())), +showmaskcolMethodinv(Gtk::manage(new MyComboBoxText())), +mergecolMethod(Gtk::manage(new MyComboBoxText())), +csThresholdcol(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLDBLUR"), 0, 9, 0, 0, 6, 5, 0, false))), +//Exposure +showmaskexpMethod(Gtk::manage(new MyComboBoxText())), +showmaskexpMethodinv(Gtk::manage(new MyComboBoxText())), +expMethod(Gtk::manage(new MyComboBoxText())), +exnoiseMethod(Gtk::manage(new MyComboBoxText())), +//Shadows Highlight +shMethod(Gtk::manage(new MyComboBoxText())), +showmaskSHMethod(Gtk::manage(new MyComboBoxText())), +showmaskSHMethodinv(Gtk::manage(new MyComboBoxText())), +// Blur & Noise +blurMethod(Gtk::manage(new MyComboBoxText())), +//soft Method +softMethod(Gtk::manage(new MyComboBoxText())), +showmasksoftMethod(Gtk::manage(new MyComboBoxText())), +//Blur +blMethod(Gtk::manage(new MyComboBoxText())), +medMethod(Gtk::manage(new MyComboBoxText())), +showmaskblMethod(Gtk::manage(new MyComboBoxText())), +csThresholdblur(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLDBLUR"), 0, 9, 0, 0, 6, 5, 0, false))), +//TM +showmasktmMethod(Gtk::manage(new MyComboBoxText())), +// Retinex +retinexMethod(Gtk::manage(new MyComboBoxText())), +showmaskretiMethod(Gtk::manage(new MyComboBoxText())), +//Local contrast +localcontMethod(Gtk::manage(new MyComboBoxText())), +csThreshold(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLD"), 0, 9, 0, 0, 5, 5, 0, false))), +//CBDL +showmaskcbMethod(Gtk::manage(new MyComboBoxText())), - // ThresholdAdjuster widgets - // Vibrance - psThreshold(Gtk::manage(new ThresholdAdjuster(M("TP_VIBRANCE_PSTHRESHOLD"), -100., 100., 0., M("TP_VIBRANCE_PSTHRESHOLD_WEIGTHING"), 0, 0., 100., 75., M("TP_VIBRANCE_PSTHRESHOLD_SATTHRESH"), 0, this, false))), +// ThresholdAdjuster widgets +// Vibrance +psThreshold(Gtk::manage(new ThresholdAdjuster(M("TP_VIBRANCE_PSTHRESHOLD"), -100., 100., 0., M("TP_VIBRANCE_PSTHRESHOLD_WEIGTHING"), 0, 0., 100., 75., M("TP_VIBRANCE_PSTHRESHOLD_SATTHRESH"), 0, this, false))), - // Other widgets - labqualcurv(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_QUALCURV_METHOD") + ":"))), - lumacontrastMinusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS")))), - lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))), - lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))), - gridFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRID")))), - mergecolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_MERGECOLFRA")))), - merge1colFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_MERGE1COLFRA")))), - pdeFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_PDEFRA")))), - fatFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_FATFRA")))), - fatSHFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_FATSHFRA")))), - gamFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GAMFRA")))), - dehaFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_DEHAFRA")))), - retiFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RETIFRA")))), - retitoolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RETITOOLFRA")))), - residFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID")))), - clariFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CLARIFRA")))), - grainFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRAINFRA")))), +// Other widgets +labqualcurv(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_QUALCURV_METHOD") + ":"))), +lumacontrastMinusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS")))), +lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))), +lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))), +gridFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRID")))), +mergecolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_MERGECOLFRA")))), +merge1colFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_MERGE1COLFRA")))), +pdeFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_PDEFRA")))), +fatFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_FATFRA")))), +fatSHFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_FATSHFRA")))), +gamFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GAMFRA")))), +dehaFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_DEHAFRA")))), +retiFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RETIFRA")))), +retitoolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RETITOOLFRA")))), +residFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID")))), +clariFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CLARIFRA")))), +grainFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRAINFRA")))), // retiBox(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CLARIFRA")))), - retiBox(Gtk::manage(new ToolParamBlock())), - maskretiBox(Gtk::manage(new ToolParamBlock())), - labgrid(Gtk::manage(new LabGrid(EvLocallabLabGridValue, M("TP_LOCALLAB_LABGRID_VALUES")))), - mMLabels(Gtk::manage(new Gtk::Label("---"))), - transLabels(Gtk::manage(new Gtk::Label("---"))), - transLabels2(Gtk::manage(new Gtk::Label("---"))), +retiBox(Gtk::manage(new ToolParamBlock())), +maskretiBox(Gtk::manage(new ToolParamBlock())), +mask7(Gtk::manage(new ToolParamBlock())), +labgrid(Gtk::manage(new LabGrid(EvLocallabLabGridValue, M("TP_LOCALLAB_LABGRID_VALUES")))), +mMLabels(Gtk::manage(new Gtk::Label("---"))), +transLabels(Gtk::manage(new Gtk::Label("---"))), +transLabels2(Gtk::manage(new Gtk::Label("---"))), - // Others - ctboxsoftmethod(Gtk::manage(new Gtk::HBox())), - ctboxexpmethod(Gtk::manage(new Gtk::HBox())), - nextmin(0.), - nextmax(0.), - nextminiT(0.), - nextmaxiT(0.), - nextmeanT(0.), - nextminT(0.), - nextmaxT(0.), - nextsigma(0.), - defparams(nullptr), - defpedited(nullptr), - pe(nullptr) +// Others +ctboxsoftmethod(Gtk::manage(new Gtk::HBox())), +ctboxexpmethod(Gtk::manage(new Gtk::HBox())), +nextmin(0.), +nextmax(0.), +nextminiT(0.), +nextmaxiT(0.), +nextmeanT(0.), +nextminT(0.), +nextmaxT(0.), +nextsigma(0.), +defparams(nullptr), +defpedited(nullptr), +pe(nullptr) { ToolVBox* const panel = Gtk::manage(new ToolVBox()); const bool showtooltip = options.showtooltip; @@ -603,6 +610,9 @@ Locallab::Locallab(): setExpandAlignProperties(expmaskcol, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); expmaskcol->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmaskcol)); expmaskcol->setLevel(2); + setExpandAlignProperties(expmaskcol1, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + expmaskcol1->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmaskcol1)); + expmaskcol1->setLevel(2); if (showtooltip) { expmaskcol->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); @@ -661,6 +671,13 @@ Locallab::Locallab(): gridMethod->set_active(0); gridMethodConn = gridMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::gridMethodChanged)); + merMethod->append(M("TP_LOCALLAB_MRONE")); + merMethod->append(M("TP_LOCALLAB_MRTWO")); + merMethod->append(M("TP_LOCALLAB_MRTHR")); + merMethod->append(M("TP_LOCALLAB_MRFOU")); + merMethod->set_active(0); + merMethodConn = merMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::merMethodChanged)); + toneMethod->append(M("TP_EXPOSURE_TCMODE_STANDARD")); toneMethod->append(M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD")); toneMethod->append(M("TP_EXPOSURE_TCMODE_LUMINANCE")); @@ -903,10 +920,14 @@ Locallab::Locallab(): colorBox->pack_start(*rgbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor colorBox->pack_start(*special); colorBox->pack_start(*invers); + Gtk::HSeparator* const separatormer = Gtk::manage(new Gtk::HSeparator()); + + mergecolFrame->set_label_align(0.025, 0.5); merge1colFrame->set_label_align(0.025, 0.5); ToolParamBlock* const mergecolBox = Gtk::manage(new ToolParamBlock()); + mergecolBox->pack_start(*separatormer, Gtk::PACK_SHRINK, 2); mergecolBox->pack_start(*mergecolMethod); mergecolBox->pack_start(*opacol); mergecolBox->pack_start(*conthrcol); @@ -929,12 +950,13 @@ Locallab::Locallab(): maskcolBox->pack_start(*csThresholdcol, Gtk::PACK_SHRINK, 0); mergecolFrame->add(*maskcolBox); - - ToolParamBlock* const maskcol1Box = Gtk::manage(new ToolParamBlock()); - maskcol1Box->pack_start(*merge1colFrame); - maskcol1Box->pack_start(*mergecolFrame); - - expmaskcol->add(*maskcol1Box, false); + ToolParamBlock* const mask7Box = Gtk::manage(new ToolParamBlock()); + mask7Box->pack_start(*merMethod); + mask7->pack_start(*merge1colFrame); + mask7Box->pack_start(*mask7); + expmaskcol1->add(*mask7Box, false); + expmaskcol->add(*mergecolFrame, false); + colorBox->pack_start(*expmaskcol1); colorBox->pack_start(*expmaskcol); expcolor->add(*colorBox, false); @@ -965,11 +987,6 @@ Locallab::Locallab(): exnoiseMethod->append(M("TP_LOCALLAB_NONENOISE")); exnoiseMethod->append(M("TP_LOCALLAB_MEDIAN")); exnoiseMethod->append(M("TP_LOCALLAB_WEDIANHI")); - /* - exnoiseMethod->append(M("TP_LOCALLAB_WAVLOW")); - exnoiseMethod->append(M("TP_LOCALLAB_WAVMED")); - exnoiseMethod->append(M("TP_LOCALLAB_WAVHIGH")); - */ exnoiseMethod->set_active(0); exnoiseMethodConn = exnoiseMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::exnoiseMethodChanged)); @@ -2596,6 +2613,7 @@ void Locallab::foldAllButMe(GdkEventButton* event, MyExpander *expander) expcbdl->set_expanded(expcbdl == expander); expdenoi->set_expanded(expdenoi == expander); expmaskcol->set_expanded(expmaskcol == expander); + expmaskcol1->set_expanded(expmaskcol1 == expander); expmaskexp->set_expanded(expmaskexp == expander); expmasksh->set_expanded(expmasksh == expander); expmaskcb->set_expanded(expmaskcb == expander); @@ -2689,6 +2707,7 @@ void Locallab::writeOptions(std::vector &tpOpen) tpOpen.push_back(expcbdl->get_expanded()); tpOpen.push_back(expdenoi->get_expanded()); tpOpen.push_back(expmaskcol->get_expanded()); + tpOpen.push_back(expmaskcol1->get_expanded()); tpOpen.push_back(expmaskexp->get_expanded()); tpOpen.push_back(expmasksh->get_expanded()); tpOpen.push_back(expmaskcb->get_expanded()); @@ -2840,7 +2859,7 @@ void Locallab::refChanged(double huer, double lumar, double chromar) void Locallab::updateToolState(std::vector &tpOpen) { - if (tpOpen.size() >= 21) { + if (tpOpen.size() >= 22) { expsettings->setExpanded(tpOpen.at(0)); expcolor->set_expanded(tpOpen.at(1)); expexpose->set_expanded(tpOpen.at(2)); @@ -2855,12 +2874,13 @@ void Locallab::updateToolState(std::vector &tpOpen) expcbdl->set_expanded(tpOpen.at(11)); expdenoi->set_expanded(tpOpen.at(12)); expmaskcol->set_expanded(tpOpen.at(13)); - expmaskexp->set_expanded(tpOpen.at(14)); - expmasksh->set_expanded(tpOpen.at(15)); - expmaskcb->set_expanded(tpOpen.at(16)); - expmaskreti->set_expanded(tpOpen.at(17)); - expmasktm->set_expanded(tpOpen.at(18)); - expmaskbl->set_expanded(tpOpen.at(19)); + expmaskcol1->set_expanded(tpOpen.at(14)); + expmaskexp->set_expanded(tpOpen.at(15)); + expmasksh->set_expanded(tpOpen.at(16)); + expmaskcb->set_expanded(tpOpen.at(17)); + expmaskreti->set_expanded(tpOpen.at(18)); + expmasktm->set_expanded(tpOpen.at(19)); + expmaskbl->set_expanded(tpOpen.at(20)); } } @@ -2942,32 +2962,39 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit r->spotMethod = 1; } - if (pp->locallab.spots.at(i).mergeMethod == "none") { - r->mergeMethod = 0; - merge1colFrame->hide(); - mergecolFrame->show(); - } else if (pp->locallab.spots.at(i).mergeMethod == "short") { - r->mergeMethod = 1; - merge1colFrame->hide(); - mergecolFrame->show(); - } else if (pp->locallab.spots.at(i).mergeMethod == "orig") { - r->mergeMethod = 2; - merge1colFrame->show(); - mergecolFrame->hide(); - } else if (pp->locallab.spots.at(i).mergeMethod == "origmas") { - r->mergeMethod = 3; - merge1colFrame->show(); - mergecolFrame->show(); - } else if (pp->locallab.spots.at(i).mergeMethod == "lastspot") { - r->mergeMethod = 4; - merge1colFrame->show(); - mergecolFrame->hide(); - } else if (pp->locallab.spots.at(i).mergeMethod == "lastspotmas") { - r->mergeMethod = 5; - merge1colFrame->show(); - mergecolFrame->hide(); - } + /* + if (pp->locallab.spots.at(i).mergeMethod == "none") { + r->mergeMethod = 0; + expmaskcol1->hide(); + expmaskcol->show(); + } else if (pp->locallab.spots.at(i).mergeMethod == "short") { + r->mergeMethod = 1; + expmaskcol1->hide(); + expmaskcol->show(); + + } else if (pp->locallab.spots.at(i).mergeMethod == "orig") { + r->mergeMethod = 2; + expmaskcol1->show(); + expmaskcol->hide(); + + } else if (pp->locallab.spots.at(i).mergeMethod == "origmas") { + r->mergeMethod = 3; + expmaskcol1->show(); + expmaskcol->show(); + + } else if (pp->locallab.spots.at(i).mergeMethod == "lastspot") { + r->mergeMethod = 4; + expmaskcol1->show(); + expmaskcol->hide(); + + } else if (pp->locallab.spots.at(i).mergeMethod == "lastspotmas") { + r->mergeMethod = 5; + expmaskcol1->show(); + expmaskcol->hide(); + + } + */ r->sensiexclu = pp->locallab.spots.at(i).sensiexclu; r->structexclu = pp->locallab.spots.at(i).structexclu; r->struc = pp->locallab.spots.at(i).struc; @@ -3083,33 +3110,36 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited r->spotMethod = 1; } - if (newSpot->mergeMethod == "none") { - r->mergeMethod = 0; - merge1colFrame->hide(); - mergecolFrame->show(); - } else if (newSpot->mergeMethod == "short") { - r->mergeMethod = 1; - merge1colFrame->hide(); - mergecolFrame->show(); - } else if (newSpot->mergeMethod == "orig") { - r->mergeMethod = 2; - merge1colFrame->show(); - mergecolFrame->hide(); - } else if (newSpot->mergeMethod == "origmas") { - r->mergeMethod = 3; - merge1colFrame->show(); - mergecolFrame->show(); - } else if (newSpot->mergeMethod == "lastspot") { - r->mergeMethod = 4; - merge1colFrame->show(); - mergecolFrame->hide(); - } else if (newSpot->mergeMethod == "lastspotmas") { - r->mergeMethod = 5; - merge1colFrame->show(); - mergecolFrame->show(); + /* + if (newSpot->mergeMethod == "none") { + r->mergeMethod = 0; + expmaskcol1->hide(); + expmaskcol->show(); - } + } else if (newSpot->mergeMethod == "short") { + r->mergeMethod = 1; + expmaskcol1->hide(); + expmaskcol->show(); + } else if (newSpot->mergeMethod == "orig") { + r->mergeMethod = 2; + expmaskcol1->show(); + expmaskcol->hide(); + } else if (newSpot->mergeMethod == "origmas") { + r->mergeMethod = 3; + expmaskcol1->show(); + expmaskcol->show(); + } else if (newSpot->mergeMethod == "lastspot") { + r->mergeMethod = 4; + expmaskcol1->show(); + expmaskcol->hide(); + } else if (newSpot->mergeMethod == "lastspotmas") { + r->mergeMethod = 5; + expmaskcol1->show(); + expmaskcol->show(); + + } + */ r->sensiexclu = newSpot->sensiexclu; r->structexclu = newSpot->structexclu; r->struc = newSpot->struc; @@ -3333,32 +3363,33 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited r->spotMethod = 1; } - if (newSpot->mergeMethod == "none") { - r->mergeMethod = 0; - merge1colFrame->hide(); - mergecolFrame->show(); - } else if (newSpot->mergeMethod == "short") { - r->mergeMethod = 1; - merge1colFrame->hide(); - mergecolFrame->show(); - } else if (newSpot->mergeMethod == "orig") { - r->mergeMethod = 2; - merge1colFrame->show(); - mergecolFrame->hide(); - } else if (newSpot->mergeMethod == "origmas") { - r->mergeMethod = 3; - merge1colFrame->show(); - mergecolFrame->show(); - } else if (newSpot->mergeMethod == "lastspot") { - r->mergeMethod = 4; - merge1colFrame->show(); - mergecolFrame->hide(); - } else if (newSpot->mergeMethod == "lastspotmas") { - r->mergeMethod = 5; - merge1colFrame->show(); - mergecolFrame->show(); - } - + /* + if (newSpot->mergeMethod == "none") { + r->mergeMethod = 0; + expmaskcol1->hide(); + expmaskcol->show(); + } else if (newSpot->mergeMethod == "short") { + r->mergeMethod = 1; + expmaskcol1->hide(); + expmaskcol->show(); + } else if (newSpot->mergeMethod == "orig") { + r->mergeMethod = 2; + expmaskcol1->show(); + expmaskcol->hide(); + } else if (newSpot->mergeMethod == "origmas") { + r->mergeMethod = 3; + expmaskcol1->show(); + expmaskcol->show(); + } else if (newSpot->mergeMethod == "lastspot") { + r->mergeMethod = 4; + expmaskcol1->show(); + expmaskcol->hide(); + } else if (newSpot->mergeMethod == "lastspotmas") { + r->mergeMethod = 5; + expmaskcol1->show(); + expmaskcol->show(); + } + */ r->sensiexclu = newSpot->sensiexclu; r->structexclu = newSpot->structexclu; r->struc = newSpot->struc; @@ -3499,34 +3530,35 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "exc"; } - if (r->mergeMethod == 0) { - pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "none"; - merge1colFrame->hide(); - mergecolFrame->show(); + /* + if (r->mergeMethod == 0) { + pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "none"; + expmaskcol1->hide(); + expmaskcol->show(); - } else if (r->mergeMethod == 1) { - pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "short"; - merge1colFrame->hide(); - mergecolFrame->show(); - } else if (r->mergeMethod == 2) { - pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "orig"; - merge1colFrame->show(); - mergecolFrame->hide(); - } else if (r->mergeMethod == 3) { - pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "origmas"; - merge1colFrame->show(); - mergecolFrame->show(); - } else if (r->mergeMethod == 4) { - pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "lastspot"; - merge1colFrame->show(); - mergecolFrame->hide(); - } else if (r->mergeMethod == 5) { - pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "lastspotmas"; - merge1colFrame->show(); - mergecolFrame->show(); - - } + } else if (r->mergeMethod == 1) { + pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "short"; + expmaskcol1->hide(); + expmaskcol->show(); + } else if (r->mergeMethod == 2) { + pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "orig"; + expmaskcol1->show(); + expmaskcol->hide(); + } else if (r->mergeMethod == 3) { + pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "origmas"; + expmaskcol1->show(); + expmaskcol->show(); + } else if (r->mergeMethod == 4) { + pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "lastspot"; + expmaskcol1->show(); + expmaskcol->hide(); + } else if (r->mergeMethod == 5) { + pp->locallab.spots.at(pp->locallab.selspot).mergeMethod = "lastspotmas"; + expmaskcol1->show(); + expmaskcol->show(); + } + */ pp->locallab.spots.at(pp->locallab.selspot).sensiexclu = r->sensiexclu; pp->locallab.spots.at(pp->locallab.selspot).structexclu = r->structexclu; pp->locallab.spots.at(pp->locallab.selspot).struc = r->struc; @@ -3597,6 +3629,16 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).gridMethod = "two"; } + if (merMethod->get_active_row_number() == 0) { + pp->locallab.spots.at(pp->locallab.selspot).merMethod = "mone"; + } else if (merMethod->get_active_row_number() == 1) { + pp->locallab.spots.at(pp->locallab.selspot).merMethod = "mtwo"; + } else if (merMethod->get_active_row_number() == 2) { + pp->locallab.spots.at(pp->locallab.selspot).merMethod = "mthr"; + } else if (merMethod->get_active_row_number() == 3) { + pp->locallab.spots.at(pp->locallab.selspot).merMethod = "mfou"; + } + if (toneMethod->get_active_row_number() == 0) { pp->locallab.spots.at(pp->locallab.selspot).toneMethod = "one"; } else if (toneMethod->get_active_row_number() == 1) { @@ -3987,7 +4029,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).isvisible = pe->locallab.spots.at(pp->locallab.selspot).isvisible || se->isvisible; pe->locallab.spots.at(pp->locallab.selspot).shape = pe->locallab.spots.at(pp->locallab.selspot).shape || se->shape; pe->locallab.spots.at(pp->locallab.selspot).spotMethod = pe->locallab.spots.at(pp->locallab.selspot).spotMethod || se->spotMethod; - pe->locallab.spots.at(pp->locallab.selspot).mergeMethod = pe->locallab.spots.at(pp->locallab.selspot).mergeMethod || se->mergeMethod; +// pe->locallab.spots.at(pp->locallab.selspot).mergeMethod = pe->locallab.spots.at(pp->locallab.selspot).mergeMethod || se->mergeMethod; pe->locallab.spots.at(pp->locallab.selspot).sensiexclu = pe->locallab.spots.at(pp->locallab.selspot).sensiexclu || se->sensiexclu; pe->locallab.spots.at(pp->locallab.selspot).structexclu = pe->locallab.spots.at(pp->locallab.selspot).structexclu || se->structexclu; pe->locallab.spots.at(pp->locallab.selspot).struc = pe->locallab.spots.at(pp->locallab.selspot).struc || se->struc; @@ -4026,6 +4068,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).structcol = pe->locallab.spots.at(pp->locallab.selspot).structcol || structcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod = pe->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod || qualitycurveMethod->get_active_text() != M("GENERAL_UNCHANGED"); pe->locallab.spots.at(pp->locallab.selspot).gridMethod = pe->locallab.spots.at(pp->locallab.selspot).gridMethod || gridMethod->get_active_text() != M("GENERAL_UNCHANGED"); + pe->locallab.spots.at(pp->locallab.selspot).merMethod = pe->locallab.spots.at(pp->locallab.selspot).merMethod || merMethod->get_active_text() != M("GENERAL_UNCHANGED"); pe->locallab.spots.at(pp->locallab.selspot).toneMethod = pe->locallab.spots.at(pp->locallab.selspot).toneMethod || toneMethod->get_active_text() != M("GENERAL_UNCHANGED"); pe->locallab.spots.at(pp->locallab.selspot).mergecolMethod = pe->locallab.spots.at(pp->locallab.selspot).mergecolMethod || mergecolMethod->get_active_text() != M("GENERAL_UNCHANGED"); pe->locallab.spots.at(pp->locallab.selspot).llcurve = pe->locallab.spots.at(pp->locallab.selspot).llcurve || !llshape->isUnChanged(); @@ -4313,7 +4356,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).isvisible = pedited->locallab.spots.at(pp->locallab.selspot).isvisible || se->isvisible; pedited->locallab.spots.at(pp->locallab.selspot).shape = pedited->locallab.spots.at(pp->locallab.selspot).shape || se->shape; pedited->locallab.spots.at(pp->locallab.selspot).spotMethod = pedited->locallab.spots.at(pp->locallab.selspot).spotMethod || se->spotMethod; - pedited->locallab.spots.at(pp->locallab.selspot).mergeMethod = pedited->locallab.spots.at(pp->locallab.selspot).mergeMethod || se->mergeMethod; +// pedited->locallab.spots.at(pp->locallab.selspot).mergeMethod = pedited->locallab.spots.at(pp->locallab.selspot).mergeMethod || se->mergeMethod; pedited->locallab.spots.at(pp->locallab.selspot).sensiexclu = pedited->locallab.spots.at(pp->locallab.selspot).sensiexclu || se->sensiexclu; pedited->locallab.spots.at(pp->locallab.selspot).structexclu = pedited->locallab.spots.at(pp->locallab.selspot).structexclu || se->structexclu; pedited->locallab.spots.at(pp->locallab.selspot).struc = pedited->locallab.spots.at(pp->locallab.selspot).struc || se->struc; @@ -4351,6 +4394,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).structcol = pedited->locallab.spots.at(pp->locallab.selspot).structcol || structcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod = pedited->locallab.spots.at(pp->locallab.selspot).qualitycurveMethod || qualitycurveMethod->get_active_text() != M("GENERAL_UNCHANGED"); pedited->locallab.spots.at(pp->locallab.selspot).gridMethod = pedited->locallab.spots.at(pp->locallab.selspot).gridMethod || gridMethod->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->locallab.spots.at(pp->locallab.selspot).merMethod = pedited->locallab.spots.at(pp->locallab.selspot).merMethod || merMethod->get_active_text() != M("GENERAL_UNCHANGED"); pedited->locallab.spots.at(pp->locallab.selspot).toneMethod = pedited->locallab.spots.at(pp->locallab.selspot).toneMethod || toneMethod->get_active_text() != M("GENERAL_UNCHANGED"); pedited->locallab.spots.at(pp->locallab.selspot).mergecolMethod = pedited->locallab.spots.at(pp->locallab.selspot).mergecolMethod || mergecolMethod->get_active_text() != M("GENERAL_UNCHANGED"); pedited->locallab.spots.at(pp->locallab.selspot).llcurve = pedited->locallab.spots.at(pp->locallab.selspot).llcurve || !llshape->isUnChanged(); @@ -5178,6 +5222,25 @@ void Locallab::gridMethodChanged() } } +void Locallab::merMethodChanged() +{ + if (merMethod->get_active_row_number() == 0) { + mask7->hide(); + } else if (merMethod->get_active_row_number() == 1) { + mask7->hide(); + } else if (merMethod->get_active_row_number() == 2) { + mask7->show(); + } else if (merMethod->get_active_row_number() == 3) { + mask7->show(); + } + + if (getEnabled() && expcolor->getEnabled()) { + if (listener) { + listener->panelChanged(EvLocallabmerMethod, merMethod->get_active_text()); + } + } +} + void Locallab::toneMethodChanged() { // printf("qualitycurveMethodChanged\n"); @@ -5893,6 +5956,7 @@ void Locallab::inversChanged() qualitycurveMethod->show(); labqualcurv->show(); expmaskcol->show(); + expmaskcol1->show(); structcol->show(); strengthgrid->hide(); blurcolde->show(); @@ -5910,6 +5974,7 @@ void Locallab::inversChanged() qualitycurveMethod->hide(); labqualcurv->hide(); expmaskcol->show(); + expmaskcol1->hide(); structcol->hide(); blurcolde->show(); gridFrame->hide(); @@ -5926,6 +5991,7 @@ void Locallab::inversChanged() qualitycurveMethod->show(); labqualcurv->show(); expmaskcol->show(); + expmaskcol1->show(); structcol->show(); blurcolde->show(); gridFrame->show(); @@ -8404,6 +8470,7 @@ void Locallab::setBatchMode(bool batchMode) // Color & Light qualitycurveMethod->append(M("GENERAL_UNCHANGED")); gridMethod->append(M("GENERAL_UNCHANGED")); + merMethod->append(M("GENERAL_UNCHANGED")); toneMethod->append(M("GENERAL_UNCHANGED")); mergecolMethod->append(M("GENERAL_UNCHANGED")); //exposure @@ -8573,6 +8640,7 @@ void Locallab::enableListener() curvactivConn.block(false); qualitycurveMethodConn.block(false); gridMethodConn.block(false); + merMethodConn.block(false); toneMethodConn.block(false); mergecolMethodConn.block(false); inversConn.block(false); @@ -8656,6 +8724,7 @@ void Locallab::disableListener() curvactivConn.block(true); qualitycurveMethodConn.block(true); gridMethodConn.block(true); + merMethodConn.block(true); toneMethodConn.block(true); mergecolMethodConn.block(true); inversConn.block(true); @@ -8758,6 +8827,16 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con gridMethod->set_active(1); } + if (pp->locallab.spots.at(index).merMethod == "mone") { + merMethod->set_active(0); + } else if (pp->locallab.spots.at(index).merMethod == "mtwo") { + merMethod->set_active(1); + } else if (pp->locallab.spots.at(index).merMethod == "mthr") { + merMethod->set_active(2); + } else if (pp->locallab.spots.at(index).merMethod == "mfou") { + merMethod->set_active(3); + } + if (pp->locallab.spots.at(index).toneMethod == "one") { toneMethod->set_active(0); } else if (pp->locallab.spots.at(index).toneMethod == "two") { @@ -9178,7 +9257,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con se->isvisible = spotState->isvisible; se->shape = spotState->shape; se->spotMethod = spotState->spotMethod; - se->mergeMethod = spotState->mergeMethod; +// se->mergeMethod = spotState->mergeMethod; se->sensiexclu = spotState->sensiexclu; se->structexclu = spotState->structexclu; se->struc = spotState->struc; @@ -9226,6 +9305,10 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con gridMethod->set_active_text(M("GENERAL_UNCHANGED")); } + if (!spotState->merMethod) { + merMethod->set_active_text(M("GENERAL_UNCHANGED")); + } + if (!spotState->toneMethod) { toneMethod->set_active_text(M("GENERAL_UNCHANGED")); } @@ -9561,6 +9644,7 @@ void Locallab::updateSpecificGUIState() qualitycurveMethod->show(); labqualcurv->show(); expmaskcol->show(); + expmaskcol1->show(); structcol->show(); softradiuscol->show(); showmaskcolMethod->show(); // Being able to change Color & Light mask visibility is useless in batch mode @@ -9573,6 +9657,7 @@ void Locallab::updateSpecificGUIState() qualitycurveMethod->hide(); labqualcurv->hide(); expmaskcol->show(); + expmaskcol1->hide(); softradiuscol->hide(); structcol->hide(); gridFrame->hide(); @@ -9584,6 +9669,7 @@ void Locallab::updateSpecificGUIState() qualitycurveMethod->show(); labqualcurv->show(); expmaskcol->show(); + expmaskcol1->show(); structcol->show(); gridFrame->show(); softradiuscol->show(); @@ -9597,6 +9683,16 @@ void Locallab::updateSpecificGUIState() } } + if (merMethod->get_active_row_number() == 0) { + mask7->hide(); + } else if (merMethod->get_active_row_number() == 1) { + mask7->hide(); + } else if (merMethod->get_active_row_number() == 2) { + mask7->show(); + } else if (merMethod->get_active_row_number() == 3) { + mask7->show(); + } + // Update Exposure GUI according to black adjuster state (to be compliant with adjusterChanged function) sensiex->show(); curveEditorG->show(); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 4a2a6541e..372064862 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -63,6 +63,7 @@ private: MyExpander* const expcbdl; MyExpander* const expdenoi; MyExpander* const expmaskcol; + MyExpander* const expmaskcol1; MyExpander* const expmaskexp; MyExpander* const expmasksh; MyExpander* const expmaskcb; @@ -399,6 +400,8 @@ private: sigc::connection qualitycurveMethodConn; MyComboBoxText* const gridMethod; sigc::connection gridMethodConn; + MyComboBoxText* const merMethod; + sigc::connection merMethodConn; // MyComboBoxText* const toneMethod; sigc::connection toneMethodConn; MyComboBoxText* const showmaskcolMethod; @@ -481,6 +484,7 @@ private: Gtk::Frame* const grainFrame; ToolParamBlock* const retiBox; ToolParamBlock* const maskretiBox; + ToolParamBlock* const mask7; LabGrid* const labgrid; Gtk::Label* const mMLabels; Gtk::Label* const transLabels; @@ -559,6 +563,7 @@ private: // Color & Light void qualitycurveMethodChanged(); void gridMethodChanged(); + void merMethodChanged(); void toneMethodChanged(); void showmaskcolMethodChanged(); void showmaskcolMethodChangedinv(); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 95b8e4400..2b50ec54b 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -954,7 +954,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).isvisible = locallab.spots.at(j).isvisible && pSpot.isvisible == otherSpot.isvisible; locallab.spots.at(j).shape = locallab.spots.at(j).shape && pSpot.shape == otherSpot.shape; locallab.spots.at(j).spotMethod = locallab.spots.at(j).spotMethod && pSpot.spotMethod == otherSpot.spotMethod; - locallab.spots.at(j).mergeMethod = locallab.spots.at(j).mergeMethod && pSpot.mergeMethod == otherSpot.mergeMethod; +// locallab.spots.at(j).mergeMethod = locallab.spots.at(j).mergeMethod && pSpot.mergeMethod == otherSpot.mergeMethod; locallab.spots.at(j).sensiexclu = locallab.spots.at(j).sensiexclu && pSpot.sensiexclu == otherSpot.sensiexclu; locallab.spots.at(j).structexclu = locallab.spots.at(j).structexclu && pSpot.structexclu == otherSpot.structexclu; locallab.spots.at(j).struc = locallab.spots.at(j).struc && pSpot.struc == otherSpot.struc; @@ -1004,6 +1004,7 @@ void ParamsEdited::initFrom(const std::vector& 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; + locallab.spots.at(j).merMethod = locallab.spots.at(j).merMethod && pSpot.merMethod == otherSpot.merMethod; locallab.spots.at(j).toneMethod = locallab.spots.at(j).toneMethod && pSpot.toneMethod == otherSpot.toneMethod; locallab.spots.at(j).mergecolMethod = locallab.spots.at(j).mergecolMethod && pSpot.mergecolMethod == otherSpot.mergecolMethod; locallab.spots.at(j).llcurve = locallab.spots.at(j).llcurve && pSpot.llcurve == otherSpot.llcurve; @@ -2741,11 +2742,11 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng if (locallab.spots.at(i).spotMethod) { toEdit.locallab.spots.at(i).spotMethod = mods.locallab.spots.at(i).spotMethod; } - +/* if (locallab.spots.at(i).mergeMethod) { toEdit.locallab.spots.at(i).mergeMethod = mods.locallab.spots.at(i).mergeMethod; } - +*/ if (locallab.spots.at(i).sensiexclu) { toEdit.locallab.spots.at(i).sensiexclu = mods.locallab.spots.at(i).sensiexclu; } @@ -2940,6 +2941,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).gridMethod = mods.locallab.spots.at(i).gridMethod; } + if (locallab.spots.at(i).merMethod) { + toEdit.locallab.spots.at(i).merMethod = mods.locallab.spots.at(i).merMethod; + } + if (locallab.spots.at(i).toneMethod) { toEdit.locallab.spots.at(i).toneMethod = mods.locallab.spots.at(i).toneMethod; } @@ -4896,7 +4901,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : isvisible(v), shape(v), spotMethod(v), - mergeMethod(v), +// mergeMethod(v), sensiexclu(v), structexclu(v), struc(v), @@ -4946,6 +4951,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : lapmaskcol(v), qualitycurveMethod(v), gridMethod(v), + merMethod(v), toneMethod(v), mergecolMethod(v), llcurve(v), @@ -5209,7 +5215,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) isvisible = v; shape = v; spotMethod = v; - mergeMethod = v; +// mergeMethod = v; sensiexclu = v; structexclu = v; struc = v; @@ -5259,6 +5265,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) lapmaskcol = v; qualitycurveMethod = v; gridMethod = v; + merMethod = v; toneMethod = v; mergecolMethod = v; llcurve = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index fb0919a73..0833b798e 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -384,7 +384,7 @@ public: bool isvisible; bool shape; bool spotMethod; - bool mergeMethod; +// bool mergeMethod; bool sensiexclu; bool structexclu; bool struc; @@ -434,6 +434,7 @@ public: bool lapmaskcol; bool qualitycurveMethod; bool gridMethod; + bool merMethod; bool toneMethod; bool mergecolMethod; bool llcurve;