diff --git a/rtdata/languages/default b/rtdata/languages/default index 30ef63207..d760e1d3b 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1080,6 +1080,7 @@ HISTORY_MSG_840;Local - CL Curve HISTORY_MSG_841;Local - LC curve HISTORY_MSG_842;Local - Contrast Threshold Mask blur HISTORY_MSG_843;Local - Radius Mask blur +HISTORY_MSG_844;Local - Color Mask fftw HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2261,6 +2262,7 @@ TP_LOCALLAB_FATLEVEL;Detail levels TP_LOCALLAB_FATSHFRA;Dynamic Range Compression Mask TP_LOCALLAB_FEATH_TOOLTIP;Gradient width in percent of the Spot diagonal\n.. TP_LOCALLAB_FEATVALUE;Feather gradient +TP_LOCALLAB_FFTCOL_MASK;FFTW TP_LOCALLAB_FFTW2;Use Fast Fourier Transform (TIF, JPG,..) TP_LOCALLAB_FFTW;Use Fast Fourier Transform TP_LOCALLAB_GAM;Gamma @@ -2294,9 +2296,11 @@ TP_LOCALLAB_INDSL;Independent (mouse + sliders) TP_LOCALLAB_INVERS;Inverse TP_LOCALLAB_ISOGR;Coarseness (ISO) TP_LOCALLAB_LABEL;Local Adjustements +TP_LOCALLAB_LABBLURM;Mask Blur TP_LOCALLAB_LABGRID;Color correction grid TP_LOCALLAB_LABGRIDMERG;Background TP_LOCALLAB_LABGRID_VALUES;High(a)=%1 High(b)=%2\nLow(a)=%3 Low(b)=%4 +TP_LOCALLAB_LABSTRUM;Mask Structure TP_LOCALLAB_LAPLACC;Mask Laplacian solve PDE TP_LOCALLAB_LAPLACE;Laplacian threshold deltaE TP_LOCALLAB_LAPLACEXP;Laplacian threshold @@ -2322,6 +2326,7 @@ TP_LOCALLAB_MASFRAME;Mask and Merge TP_LOCALLAB_MASFRAME_TOOLTIP;For all masks.\nTake into account deltaE image to avoid retouching the selection area when sliders gamma mask, slope mask, chroma mask and contrast curves and levels contrasts curves and structure mask (if enabled tool) are used.\nDisabled in Inverse TP_LOCALLAB_MASK2;Contrast curve mask TP_LOCALLAB_MASK;Mask +TP_LOCALLAB_MASKCOL;Mask Curves TP_LOCALLAB_MASKH;Hue curve mask TP_LOCALLAB_MASK_TOOLTIP;You can enable multiple masks for a single tool, this requires activating another tool (but without using the tool : sliders to 0,...) where is the mask you want to activate.\nMasks with this ability are marked '+'\nMasks with additional features are marked '*'\nThe number indicates the order of use of the masks.\n\nYou can combine the mask associated with the tool with an inverse mask.\nIn this case the new tool associated with the mask must be selected in inverse. TP_LOCALLAB_MED;Medium @@ -2394,7 +2399,7 @@ TP_LOCALLAB_PROXI;DeltaE weakening TP_LOCALLAB_QUALCURV_METHOD;Curves type TP_LOCALLAB_QUAL_METHOD;Global quality TP_LOCALLAB_RADIUS;Radius -TP_LOCALLAB_RADMASKCOL;Radius +TP_LOCALLAB_RADMASKCOL;Smooth Radius Mask TP_LOCALLAB_RECT;Rectangle TP_LOCALLAB_RECURS;Recursive references TP_LOCALLAB_RECURS_TOOLTIP;Recalculate references for hue, luma, chroma after each module and after each RT-spot.\nAlso useful for working with masks. @@ -2494,7 +2499,7 @@ TP_LOCALLAB_STRRETI_TOOLTIP;if Strength Retinex < 0.2 only Dehaze is enabled.\ni TP_LOCALLAB_STRUC;Structure TP_LOCALLAB_STRUCCOL1;Structure Spot TP_LOCALLAB_STRUCCOL;Structure -TP_LOCALLAB_STRUMASKCOL;Structure mask +TP_LOCALLAB_STRUMASKCOL;Structure mask strength TP_LOCALLAB_STYPE;Shape method TP_LOCALLAB_STYPE_TOOLTIP;You can choose between:\nSymmetrical - left handle linked to right, top handle linked to bottom.\nIndependent - all handles are independent. TP_LOCALLAB_SYM;Symmetrical (mouse) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 9cacf0fbb..aabf71e36 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -371,6 +371,7 @@ struct local_params { float adjch; int shapmet; bool enaColorMask; + bool fftColorMask; bool enaColorMaskinv; bool enaExpMask; bool enaExpMaskinv; @@ -552,6 +553,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.balanexp = locallab.spots.at(sp).balanexp; lp.linear = locallab.spots.at(sp).linear; + lp.fftColorMask = locallab.spots.at(sp).fftColorMask; + lp.showmaskcolmet = llColorMask; lp.showmaskcolmetinv = llColorMaskinv; lp.showmaskexpmet = llExpMask; @@ -1664,6 +1667,7 @@ void ImProcFunctions::softproc(const LabImage* bufcolorig, const LabImage* bufco for (int ir = 0; ir < bfh; ir++) for (int jr = 0; jr < bfw; jr++) { + float X, Y, Z; float L = bufcolorig->L[ir][jr]; float a = bufcolorig->a[ir][jr]; @@ -1678,6 +1682,7 @@ void ImProcFunctions::softproc(const LabImage* bufcolorig, const LabImage* bufco tmpImage->r(ir, jr) = X; tmpImage->g(ir, jr) = Y; tmpImage->b(ir, jr) = Z; + ble[ir][jr] = Y / 32768.f; } @@ -1709,14 +1714,21 @@ void ImProcFunctions::softproc(const LabImage* bufcolorig, const LabImage* bufco } else if (flag == 1) { if (rad > 0.f) { array2D ble(bfw, bfh); + array2D blechro(bfw, bfh); + array2D hue(bfw, bfh); array2D guid(bfw, bfh); + #ifdef _OPENMP #pragma omp parallel for #endif for (int ir = 0; ir < bfh; ir++) for (int jr = 0; jr < bfw; jr++) { +// hue[ir][jr] = xatan2f(bufcolfin->b[ir][jr], bufcolfin->a[ir][jr]); +// float chromah = sqrt(SQR(bufcolfin->b[ir][jr]) + SQR(bufcolfin->a[ir][jr])); + ble[ir][jr] = (bufcolfin->L[ir][jr]) / 32768.f; +// blechro[ir][jr] = chromah / 32768.f; guid[ir][jr] = bufcolorig->L[ir][jr] / 32768.f; } @@ -1724,9 +1736,21 @@ void ImProcFunctions::softproc(const LabImage* bufcolorig, const LabImage* bufco double bepsil = epsilmax - 100.f * aepsil; double epsil = aepsil * rad + bepsil; - float blur = 10.f / sk * (thres + 0.8f * rad); - rtengine::guidedFilter(guid, ble, ble, blur, epsil, multiThread, 4); + if (rad != 0.f) { + float blur = rad; + blur = blur < 0.f ? -1.f / blur : 1.f + blur; + // int r1 = max(int(4 / sk * blur + 0.5), 1); + int r2 = max(int(25 / sk * blur + 0.5), 1); + rtengine::guidedFilter(guid, ble, ble, r2, epsil, multiThread); +// rtengine::guidedFilter(guid, blechro, blechro, r1, 0.5 * epsil, multiThread); + } + +/* + // float blur = 10.f / sk * (thres + 0.8f * rad); + + rtengine::guidedFilter(guid, ble, ble, blur, epsil, multiThread, 4); +*/ #ifdef _OPENMP @@ -1735,7 +1759,11 @@ void ImProcFunctions::softproc(const LabImage* bufcolorig, const LabImage* bufco for (int ir = 0; ir < bfh; ir++) for (int jr = 0; jr < bfw; jr++) { + // float2 sincosval = xsincosf(hue[ir][jr]); + bufcolfin->L[ir][jr] = 32768.f * ble[ir][jr]; + // bufcolfin->a[ir][jr] = 32768.f * sincosval.y * blechro[ir][jr]; + // bufcolfin->b[ir][jr] = 32768.f * sincosval.x * blechro[ir][jr]; } } @@ -3438,8 +3466,8 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int ) { array2D ble(bfw, bfh); - array2D blea(bfw, bfh); - array2D bleb(bfw, bfh); + array2D blechro(bfw, bfh); + array2D hue(bfw, bfh); array2D guid(bfw, bfh); float meanfab, fab; mean_fab(xstart, ystart, bfw, bfh, bufcolorig, original, fab, meanfab, chrom); @@ -3499,10 +3527,10 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int } if (lp.blurcolmask >= 0.25f) { - if (lp.blurcolmask < 200.f) { + if (!lp.fftColorMask) { gaussianBlur(bufcolorig->L, blur, bfw, bfh, lp.blurcolmask); } else { - // ImProcFunctions::fftw_convol_blur2(bufcolorig->L, blur, bfw, bfh, lp.blurcolmask, 0, 0); + ImProcFunctions::fftw_convol_blur2(bufcolorig->L, blur, bfw, bfh, lp.blurcolmask, 0, 0); } for (int i = 0; i < bfh; i++) { @@ -3657,8 +3685,10 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int } ble[ir][jr] = bufmaskblurcol->L[ir][jr] / 32768.f; - blea[ir][jr] = bufmaskblurcol->a[ir][jr] / 32768.f;//must be good perhaps more or less, only incidence on LIM blea bleb - bleb[ir][jr] = bufmaskblurcol->b[ir][jr] / 32768.f; + hue[ir][jr] = xatan2f(bufmaskblurcol->b[ir][jr], bufmaskblurcol->a[ir][jr]); + float chromah = sqrt(SQR(bufmaskblurcol->b[ir][jr]) + SQR(bufmaskblurcol->a[ir][jr])); + + blechro[ir][jr] = chromah / 32768.f;//must be good perhaps more or less, only incidence on LIM blea bleb float X, Y, Z; float L = bufcolorig->L[ir][jr]; float a = bufcolorig->a[ir][jr]; @@ -3674,7 +3704,8 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int std::unique_ptr bufprov(new LabImage(bfw, bfh)); bufprov->CopyFrom(bufmaskblurcol); - printf("rad=%f \n", rad); + + if (rad != 0.f) { float blur = rad; @@ -3682,9 +3713,15 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int int r1 = max(int(4 / sk * blur + 0.5), 1); int r2 = max(int(25 / sk * blur + 0.5), 1); - rtengine::guidedFilter(guid, ble, ble, r2, 0.0001, multiThread); - rtengine::guidedFilter(guid, blea, blea, r1, 0.001, multiThread); - rtengine::guidedFilter(guid, bleb, bleb, r1, 0.001, multiThread); + double epsilmax = 0.0001; + double epsilmin = 0.00001; + + double aepsil = (epsilmax - epsilmin) / 90.f; + double bepsil = epsilmax - 100.f * aepsil; + double epsil = aepsil * rad + bepsil; + + rtengine::guidedFilter(guid, ble, ble, r2, epsil, multiThread); + rtengine::guidedFilter(guid, blechro, blechro, r1, 0.3 * epsil, multiThread); } LUTf lutTonemaskexp(65536); @@ -3696,12 +3733,14 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int for (int ir = 0; ir < bfh; ir++) { for (int jr = 0; jr < bfw; jr++) { + float2 sincosval = xsincosf(hue[ir][jr]); bufmaskblurcol->L[ir][jr] = lutTonemaskexp[LIM01(ble[ir][jr]) * 65536.f]; - bufmaskblurcol->a[ir][jr] = blea[ir][jr] * 32768.f; - bufmaskblurcol->b[ir][jr] = bleb[ir][jr] * 32768.f; + bufmaskblurcol->a[ir][jr] = 32768.f * sincosval.y * blechro[ir][jr]; + bufmaskblurcol->b[ir][jr] = 32768.f * sincosval.x * blechro[ir][jr]; } } + if (strumask > 0.f && astool) { #ifdef _OPENMP @@ -8011,6 +8050,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } array2D ble(GW, GH); + array2D blechro(GW, GH); + array2D hue(GW, GH); array2D guid(GW, GH); float meanfab, fab; mean_fab(0, 0, GW, GH, bufgb.get(), original, fab, meanfab, lp.chromabl); @@ -8093,6 +8134,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bufmaskblurbl->a[ir][jr] = kmaskCH; bufmaskblurbl->b[ir][jr] = kmaskCH; ble[ir][jr] = bufmaskblurbl->L[ir][jr] / 32768.f; + hue[ir][jr] = xatan2f(bufmaskblurbl->b[ir][jr], bufmaskblurbl->a[ir][jr]); + float chromah = sqrt(SQR(bufmaskblurbl->b[ir][jr]) + SQR(bufmaskblurbl->a[ir][jr])); + blechro[ir][jr] = chromah / 32768.f; float X, Y, Z; float L = bufgb->L[ir][jr]; float a = bufgb->a[ir][jr]; @@ -8108,8 +8152,23 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bufprov->CopyFrom(bufmaskblurbl.get()); - if (lp.radmabl > 0.f) { - guidedFilter(guid, ble, ble, lp.radmabl * 10.f / sk, 0.001, multiThread, 4); + if (lp.radmabl != 0.f) { + float blur = lp.radmabl; + blur = blur < 0.f ? -1.f / blur : 1.f + blur; + int r1 = max(int(4 / sk * blur + 0.5), 1); + int r2 = max(int(25 / sk * blur + 0.5), 1); + + double epsilmax = 0.0001; + double epsilmin = 0.00001; + + double aepsil = (epsilmax - epsilmin) / 90.f; + double bepsil = epsilmax - 100.f * aepsil; + double epsil = aepsil * lp.radmabl + bepsil; + + rtengine::guidedFilter(guid, ble, ble, r2, epsil, multiThread); + rtengine::guidedFilter(guid, blechro, blechro, r1, 0.3 * epsil, multiThread); + + // guidedFilter(guid, ble, ble, lp.radmabl * 10.f / sk, 0.001, multiThread, 4); } LUTf lutTonemaskbl(65536); @@ -8122,9 +8181,12 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int ir = 0; ir < GH; ir++) for (int jr = 0; jr < GW; jr++) { float L_; + float2 sincosval = xsincosf(hue[ir][jr]); bufmaskblurbl->L[ir][jr] = LIM01(ble[ir][jr]) * 32768.f; L_ = 2.f * bufmaskblurbl->L[ir][jr]; bufmaskblurbl->L[ir][jr] = lutTonemaskbl[L_]; + bufmaskblurbl->a[ir][jr] = 32768.f * sincosval.y * blechro[ir][jr]; + bufmaskblurbl->b[ir][jr] = 32768.f * sincosval.x * blechro[ir][jr]; } } @@ -13415,7 +13477,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } if (lp.softradiuscol > 0.f) { - softproc(bufcolreserv.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.0001, 0.00001, 0.1f, sk, multiThread, 0); + softproc(bufcolreserv.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.0001, 0.00001, 0.1f, sk, multiThread, 1); } @@ -13533,7 +13595,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o if (lp.softradiuscol > 0.f) { - softproc(bufcolorig.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.0001, 0.00001, 0.1f, sk, multiThread, 0); + softproc(bufcolorig.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.0001, 0.00001, 0.1f, sk, multiThread, 1); } transit_shapedetect2(0, bufcolorig.get(), bufcolfin.get(), originalmaskcol.get(), hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index a0ef4516e..ab7ffc2ad 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -787,6 +787,8 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo { array2D loctemp(W_L, H_L); array2D ble(W_L, H_L); + array2D blechro(W_L, H_L); + array2D hue(W_L, H_L); array2D guid(W_L, H_L); std::unique_ptr bufmaskblurreti; bufmaskblurreti.reset(new LabImage(W_L, H_L)); @@ -899,6 +901,9 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo bufmaskblurreti->a[ir][jr] = kmaskCH; bufmaskblurreti->b[ir][jr] = kmaskCH; ble[ir][jr] = bufmaskblurreti->L[ir][jr] / 32768.f; + hue[ir][jr] = xatan2f(bufmaskblurreti->b[ir][jr], bufmaskblurreti->a[ir][jr]); + float chromah = sqrt(SQR(bufmaskblurreti->b[ir][jr]) + SQR(bufmaskblurreti->a[ir][jr])); + blechro[ir][jr] = chromah / 32768.f; guid[ir][jr] = bufreti->L[ir][jr] / 32768.f; bufprov->L[ir][jr] = bufmaskblurreti->L[ir][jr]; bufprov->a[ir][jr] = bufmaskblurreti->a[ir][jr]; @@ -907,8 +912,23 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo } } - if (rad > 0.f) { - guidedFilter(guid, ble, ble, rad * 10.f / skip, 0.001, multiThread, 4); + if (rad != 0.f) { +// guidedFilter(guid, ble, ble, rad * 10.f / skip, 0.001, multiThread, 4); + float blur = rad; + blur = blur < 0.f ? -1.f / blur : 1.f + blur; + int r1 = max(int(4 / skip * blur + 0.5), 1); + int r2 = max(int(25 / skip * blur + 0.5), 1); + + double epsilmax = 0.0001; + double epsilmin = 0.00001; + + double aepsil = (epsilmax - epsilmin) / 90.f; + double bepsil = epsilmax - 100.f * aepsil; + double epsil = aepsil * rad + bepsil; + + rtengine::guidedFilter(guid, ble, ble, r2, epsil, multiThread); + rtengine::guidedFilter(guid, blechro, blechro, r1, 0.3 * epsil, multiThread); + } LUTf lutTonemaskreti(65536); @@ -922,9 +942,12 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo for (int ir = 0; ir < H_L; ir++) for (int jr = 0; jr < W_L; jr++) { float L_; + float2 sincosval = xsincosf(hue[ir][jr]); bufmaskblurreti->L[ir][jr] = LIM01(ble[ir][jr]) * 32768.f; L_ = 2.f * bufmaskblurreti->L[ir][jr]; bufmaskblurreti->L[ir][jr] = lutTonemaskreti[L_]; + bufmaskblurreti->a[ir][jr] = 32768.f * sincosval.y * blechro[ir][jr]; + bufmaskblurreti->b[ir][jr] = 32768.f * sincosval.x * blechro[ir][jr]; } if (lmaskretilocalcurve && localmaskretiutili) { diff --git a/rtengine/procevents.h b/rtengine/procevents.h index bd82a5dc7..0f7b5a008 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -867,6 +867,7 @@ enum ProcEventCode { Evlocallablcshape = 840, Evlocallabblurcol = 841, Evlocallabcontcol = 842, + EvLocallabfftColorMask = 843, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 36488d55c..daf8884e2 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2495,6 +2495,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : special(false), toolcol(true), enaColorMask(false), + fftColorMask(false), CCmaskcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.00, 1.0, 0.35, 0.35 }, LLmaskcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.00, 1.0, 0.35, 0.35 }, HHmaskcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.00, 1.0, 0.35, 0.35 }, @@ -2852,6 +2853,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && special == other.special && toolcol == other.toolcol && enaColorMask == other.enaColorMask + && fftColorMask == other.fftColorMask && CCmaskcurve == other.CCmaskcurve && LLmaskcurve == other.LLmaskcurve && HHmaskcurve == other.HHmaskcurve @@ -4210,6 +4212,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).special, "Locallab", "Special_" + std::to_string(i), spot.special, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).toolcol, "Locallab", "Toolcol_" + std::to_string(i), spot.toolcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).enaColorMask, "Locallab", "EnaColorMask_" + std::to_string(i), spot.enaColorMask, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).fftColorMask, "Locallab", "FftColorMask_" + std::to_string(i), spot.fftColorMask, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).CCmaskcurve, "Locallab", "CCmaskCurve_" + std::to_string(i), spot.CCmaskcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LLmaskcurve, "Locallab", "LLmaskCurve_" + std::to_string(i), spot.LLmaskcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHmaskcurve, "Locallab", "HHmaskCurve_" + std::to_string(i), spot.HHmaskcurve, keyFile); @@ -5672,6 +5675,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Special_" + std::to_string(i), pedited, spot.special, spotEdited.special); assignFromKeyfile(keyFile, "Locallab", "Toolcol_" + std::to_string(i), pedited, spot.toolcol, spotEdited.toolcol); assignFromKeyfile(keyFile, "Locallab", "EnaColorMask_" + std::to_string(i), pedited, spot.enaColorMask, spotEdited.enaColorMask); + assignFromKeyfile(keyFile, "Locallab", "FftColorMask_" + std::to_string(i), pedited, spot.fftColorMask, spotEdited.fftColorMask); assignFromKeyfile(keyFile, "Locallab", "CCmaskCurve_" + std::to_string(i), pedited, spot.CCmaskcurve, spotEdited.CCmaskcurve); assignFromKeyfile(keyFile, "Locallab", "LLmaskCurve_" + std::to_string(i), pedited, spot.LLmaskcurve, spotEdited.LLmaskcurve); assignFromKeyfile(keyFile, "Locallab", "HHmaskCurve_" + std::to_string(i), pedited, spot.HHmaskcurve, spotEdited.HHmaskcurve); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 6507fff20..d1b92204c 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1038,6 +1038,7 @@ struct LocallabParams { bool special; bool toolcol; bool enaColorMask; + bool fftColorMask; std::vector CCmaskcurve; std::vector LLmaskcurve; std::vector HHmaskcurve; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 2c6ccb187..db534a883 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -870,7 +870,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // Evlocallabclshape LUMINANCECURVE, // Evlocallablcshape LUMINANCECURVE, // Evlocallabblurcol - LUMINANCECURVE // Evlocallabcontcol + LUMINANCECURVE, // Evlocallabcontcol + LUMINANCECURVE // EvLocallabfftColorMask }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index f06d9bbeb..dadc38f55 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -162,7 +162,7 @@ Locallab::Locallab(): HCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))), H2CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))), rgbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_RGB"))), - maskCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), + maskCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKCOL"))), maskHCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKH"))), mask2CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), mask2CurveEditorGwav(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVMASK"))), @@ -280,13 +280,13 @@ Locallab::Locallab(): slomaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), lapmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), shadmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHAMASKCOL"), 0, 100, 1, 0))), - softradiuscol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))), + softradiuscol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), -10.0, 500.0, 0.5, 0.))), opacol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_OPACOL"), 0.0, 100.0, 0.5, 60.))), conthrcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTTHR"), 0.0, 100.0, 0.5, 0.))), strumaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUMASKCOL"), 0., 200., 0.1, 0.))), mercol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MERDCOL"), 0.0, 100.0, 0.5, 18.))), merlucol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MERLUCOL"), 0.0, 100.0, 0.5, 32., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), - blurcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCOL"), 0.2, 200., 0.5, 0.2))), + blurcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCOL"), 0.2, 100., 0.5, 0.2))), contcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTCOL"), 0., 200., 0.5, 0.))), // Exposure expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), -2.0, 3.0, 0.05, 0.0))), @@ -308,7 +308,7 @@ Locallab::Locallab(): gammaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), slomaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), lapmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), - softradiusexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))), + softradiusexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), -10.0, 500.0, 0.5, 0.))), laplacexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACEXP"), 0.0, 100.0, 0.1, 0.))), balanexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANEXP"), 0.2, 1.2, 0.01, 0.75))), linear(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LINEAR"), 0., 1., 0.01, 0.3))), @@ -405,7 +405,7 @@ estop(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ESTOP"), 0.1, 4., 0.01, 1.4))), scaltm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALTM"), 0.1, 10.0, 0.01, 1.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.))), +softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), -10.0, 500.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))), @@ -423,7 +423,7 @@ 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.))), +softradiusret(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRETI"), -10.0, 500.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.))), @@ -482,7 +482,7 @@ clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.1, 100., 0.1, 0 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.))), +softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), -10.0, 500.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"), -10.0, 500.0, 0.1, 0.))), chromaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), @@ -511,6 +511,7 @@ invers(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), special(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_SPECIAL")))), toolcol(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TOOLCOL")))), enaColorMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), +fftColorMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTCOL_MASK")))), // Exposure enaExpMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), enaExpMaskaft(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASKAFT")))), @@ -599,6 +600,8 @@ lumacontrastMinusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACO 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")))), +struFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABSTRUM")))), +blurFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABBLURM")))), gridmerFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRIDMERG")))), toolcolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK")))), toolblFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK")))), @@ -693,7 +696,9 @@ pe(nullptr) strengthgrid->setAdjusterListener(this); structcol->setAdjusterListener(this); blurcolde->setAdjusterListener(this); - blurcol->setAdjusterListener(this); + + +// blurcol->setAdjusterListener(this); contcol->setAdjusterListener(this); strcol->setAdjusterListener(this); angcol->setAdjusterListener(this); @@ -708,6 +713,8 @@ pe(nullptr) slomaskcol->setAdjusterListener(this); shadmaskcol->setAdjusterListener(this); strumaskcol->setAdjusterListener(this); + + softradiuscol->setLogScale(10, -10); softradiuscol->setAdjusterListener(this); opacol->setAdjusterListener(this); conthrcol->setAdjusterListener(this); @@ -929,6 +936,7 @@ pe(nullptr) enaColorMaskConn = enaColorMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enaColorMaskChanged)); + fftColorMaskConn = fftColorMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::fftColorMaskChanged)); maskCurveEditorG->setCurveListener(this); @@ -1122,31 +1130,46 @@ pe(nullptr) merge1colFrame->add(*mergecolBox); } - Gtk::HSeparator* const separatorblur = Gtk::manage(new Gtk::HSeparator()); ToolParamBlock* const maskcolBox = Gtk::manage(new ToolParamBlock()); maskcolBox->pack_start(*showmaskcolMethod, Gtk::PACK_SHRINK, 4); maskcolBox->pack_start(*showmaskcolMethodinv, Gtk::PACK_SHRINK, 4); maskcolBox->pack_start(*enaColorMask, Gtk::PACK_SHRINK, 0); - maskcolBox->pack_start(*maskCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + maskcolBox->pack_start(*maskCurveEditorG, Gtk::PACK_SHRINK, 4); + + struFrame->set_label_align(0.025, 0.5); + ToolParamBlock* const strumBox = Gtk::manage(new ToolParamBlock()); + if (complexsoft < 2) { + strumBox->pack_start(*strumaskcol); + strumBox->pack_start(*toolcol); + } + struFrame->add(*strumBox); if (complexsoft < 2) { - maskcolBox->pack_start(*strumaskcol, Gtk::PACK_SHRINK, 0); + maskcolBox->pack_start(*struFrame, Gtk::PACK_SHRINK, 0); } - if (complexsoft < 2) { - maskcolBox->pack_start(*toolcol); - } - - Gtk::HSeparator* const separatorstru = Gtk::manage(new Gtk::HSeparator()); + blurFrame->set_label_align(0.025, 0.5); + ToolParamBlock* const blurmBox = Gtk::manage(new ToolParamBlock()); if (complexsoft < 1) { - maskcolBox->pack_start(*separatorblur, Gtk::PACK_SHRINK, 2); - maskcolBox->pack_start(*contcol); - maskcolBox->pack_start(*blurcol); + blurmBox->pack_start(*fftColorMask, Gtk::PACK_SHRINK, 0); + } + + if (complexsoft < 2) { + if(complexsoft < 1) { + blurcol->setLimits (0., 500., 0.5, 0.2); + } + blurmBox->pack_start(*contcol); + blurcol->setAdjusterListener(this); + blurmBox->pack_start(*blurcol); + } + blurFrame->add(*blurmBox); + + if (complexsoft < 2) { + maskcolBox->pack_start(*blurFrame, Gtk::PACK_SHRINK, 0); } - maskcolBox->pack_start(*separatorstru, Gtk::PACK_SHRINK, 2); toolcolFrame->set_label_align(0.025, 0.5); ToolParamBlock* const toolcolBox = Gtk::manage(new ToolParamBlock()); @@ -1287,6 +1310,7 @@ pe(nullptr) lapmaskexp->setAdjusterListener(this); strmaskexp->setAdjusterListener(this); angmaskexp->setAdjusterListener(this); + softradiusexp->setLogScale(10, -10); softradiusexp->setAdjusterListener(this); laplacexp->setAdjusterListener(this); balanexp->setAdjusterListener(this); @@ -2081,6 +2105,7 @@ pe(nullptr) } sensitm->setAdjusterListener(this); + softradiustm->setLogScale(10, -10); softradiustm->setAdjusterListener(this); if (showtooltip) { @@ -2296,6 +2321,7 @@ pe(nullptr) } sensih->setAdjusterListener(this); + softradiusret->setLogScale(10, -10); softradiusret->setAdjusterListener(this); if (showtooltip) { @@ -2706,6 +2732,7 @@ pe(nullptr) } sensicb->setAdjusterListener(this); + softradiuscb->setLogScale(10, -10); softradiuscb->setAdjusterListener(this); clarityml->setAdjusterListener(this); contresid->setAdjusterListener(this); @@ -4437,6 +4464,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).special = special->get_active(); pp->locallab.spots.at(pp->locallab.selspot).toolcol = toolcol->get_active(); pp->locallab.spots.at(pp->locallab.selspot).enaColorMask = enaColorMask->get_active(); + pp->locallab.spots.at(pp->locallab.selspot).fftColorMask = fftColorMask->get_active(); pp->locallab.spots.at(pp->locallab.selspot).CCmaskcurve = CCmaskshape->getCurve(); pp->locallab.spots.at(pp->locallab.selspot).LLmaskcurve = LLmaskshape->getCurve(); pp->locallab.spots.at(pp->locallab.selspot).HHmaskcurve = HHmaskshape->getCurve(); @@ -4876,6 +4904,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).special = pe->locallab.spots.at(pp->locallab.selspot).special || !special->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).toolcol = pe->locallab.spots.at(pp->locallab.selspot).toolcol || !toolcol->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).enaColorMask = pe->locallab.spots.at(pp->locallab.selspot).enaColorMask || !enaColorMask->get_inconsistent(); + pe->locallab.spots.at(pp->locallab.selspot).fftColorMask = pe->locallab.spots.at(pp->locallab.selspot).fftColorMask || !fftColorMask->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).CCmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).CCmaskcurve || !CCmaskshape->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).LLmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).LLmaskcurve || !LLmaskshape->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).HHmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).HHmaskcurve || !HHmaskshape->isUnChanged(); @@ -5241,6 +5270,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).special = pedited->locallab.spots.at(pp->locallab.selspot).special || !special->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).toolcol = pedited->locallab.spots.at(pp->locallab.selspot).toolcol || !toolcol->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).enaColorMask = pedited->locallab.spots.at(pp->locallab.selspot).enaColorMask || !enaColorMask->get_inconsistent(); + pedited->locallab.spots.at(pp->locallab.selspot).fftColorMask = pedited->locallab.spots.at(pp->locallab.selspot).fftColorMask || !fftColorMask->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).CCmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).CCmaskcurve || !CCmaskshape->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcurve || !LLmaskshape->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcurve || !HHmaskshape->isUnChanged(); @@ -6721,6 +6751,30 @@ void Locallab::enaColorMaskChanged() } } +void Locallab::fftColorMaskChanged() +{ + // printf("fftColorMaskChanged\n"); + + if (multiImage) { + if (fftColorMask->get_inconsistent()) { + fftColorMask->set_inconsistent(false); + fftColorMaskConn.block(true); + fftColorMask->set_active(false); + fftColorMaskConn.block(false); + } + } + + if (getEnabled() && expcolor->getEnabled()) { + if (listener) { + if (fftColorMask->get_active()) { + listener->panelChanged(EvLocallabfftColorMask, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(EvLocallabfftColorMask, M("GENERAL_DISABLED")); + } + } + } +} + void Locallab::enaExpMaskChanged() { // printf("enaExpMaskChanged\n"); @@ -10008,6 +10062,7 @@ void Locallab::enableListener() showmaskcolMethodConn.block(false); showmaskcolMethodConninv.block(false); enaColorMaskConn.block(false); + fftColorMaskConn.block(false); // Exposure enableexposeConn.block(false); inversexConn.block(false); @@ -10095,7 +10150,7 @@ void Locallab::disableListener() toolcolConn.block(true); showmaskcolMethodConn.block(true); showmaskcolMethodConninv.block(true); - enaColorMaskConn.block(true); + fftColorMaskConn.block(true); // Exposure enableexposeConn.block(true); inversexConn.block(true); @@ -10308,6 +10363,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con special->set_active(pp->locallab.spots.at(index).special); toolcol->set_active(pp->locallab.spots.at(index).toolcol); enaColorMask->set_active(pp->locallab.spots.at(index).enaColorMask); + fftColorMask->set_active(pp->locallab.spots.at(index).fftColorMask); CCmaskshape->setCurve(pp->locallab.spots.at(index).CCmaskcurve); LLmaskshape->setCurve(pp->locallab.spots.at(index).LLmaskcurve); HHmaskshape->setCurve(pp->locallab.spots.at(index).HHmaskcurve); @@ -10350,10 +10406,13 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con toolcol->set_active(false); merMethod->set_active(0); } - if (complexsoft > 0) { - lapmaskcol->setValue(0); LLmaskcolshapewav->reset(); + fftColorMask->set_active(false); + } + + if (complexsoft == 2) { + lapmaskcol->setValue(0); blurcol->setValue(0.2); contcol->setValue(0.); } @@ -10944,6 +11003,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con special->set_inconsistent(multiImage && !spotState->special); toolcol->set_inconsistent(multiImage && !spotState->toolcol); enaColorMask->set_inconsistent(multiImage && !spotState->enaColorMask); + fftColorMask->set_inconsistent(multiImage && !spotState->fftColorMask); CCmaskshape->setUnChanged(!spotState->CCmaskcurve); LLmaskshape->setUnChanged(!spotState->LLmaskcurve); HHmaskshape->setUnChanged(!spotState->HHmaskcurve); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 589867765..45e72cfe3 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -377,7 +377,8 @@ private: Gtk::CheckButton* const special; Gtk::CheckButton* const toolcol; Gtk::CheckButton* const enaColorMask; - sigc::connection curvactivConn, inversConn, enaColorMaskConn, specialConn, toolcolConn; + Gtk::CheckButton* const fftColorMask; + sigc::connection curvactivConn, inversConn, enaColorMaskConn, specialConn, toolcolConn, fftColorMaskConn; // Exposure Gtk::CheckButton* const enaExpMask; sigc::connection enaExpMaskConn; @@ -519,6 +520,8 @@ private: Gtk::Button* const lumacontrastPlusButton; sigc::connection lumacontrastMinusPressedConn, lumaneutralPressedConn, lumacontrastPlusPressedConn; Gtk::Frame* const gridFrame; + Gtk::Frame* const struFrame; + Gtk::Frame* const blurFrame; Gtk::Frame* const gridmerFrame; Gtk::Frame* const toolcolFrame; Gtk::Frame* const toolblFrame; @@ -586,6 +589,7 @@ private: void specialChanged(); void toolcolChanged(); void enaColorMaskChanged(); + void fftColorMaskChanged(); // Exposure void enaExpMaskChanged(); void enaExpMaskaftChanged(); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index b609d2b93..03d828e1c 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1031,6 +1031,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).special = locallab.spots.at(j).special && pSpot.special == otherSpot.special; locallab.spots.at(j).toolcol = locallab.spots.at(j).toolcol && pSpot.toolcol == otherSpot.toolcol; locallab.spots.at(j).enaColorMask = locallab.spots.at(j).enaColorMask && pSpot.enaColorMask == otherSpot.enaColorMask; + locallab.spots.at(j).fftColorMask = locallab.spots.at(j).fftColorMask && pSpot.fftColorMask == otherSpot.fftColorMask; locallab.spots.at(j).CCmaskcurve = locallab.spots.at(j).CCmaskcurve && pSpot.CCmaskcurve == otherSpot.CCmaskcurve; locallab.spots.at(j).LLmaskcurve = locallab.spots.at(j).LLmaskcurve && pSpot.LLmaskcurve == otherSpot.LLmaskcurve; locallab.spots.at(j).HHmaskcurve = locallab.spots.at(j).HHmaskcurve && pSpot.HHmaskcurve == otherSpot.HHmaskcurve; @@ -3090,6 +3091,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).enaColorMask = mods.locallab.spots.at(i).enaColorMask; } + if (locallab.spots.at(i).fftColorMask) { + toEdit.locallab.spots.at(i).fftColorMask = mods.locallab.spots.at(i).fftColorMask; + } + if (locallab.spots.at(i).CCmaskcurve) { toEdit.locallab.spots.at(i).CCmaskcurve = mods.locallab.spots.at(i).CCmaskcurve; } @@ -5188,6 +5193,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : special(v), toolcol(v), enaColorMask(v), + fftColorMask(v), CCmaskcurve(v), LLmaskcurve(v), HHmaskcurve(v), @@ -5544,6 +5550,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) special = v; toolcol = v; enaColorMask = v; + fftColorMask = v; CCmaskcurve = v; LLmaskcurve = v; HHmaskcurve = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index f4ccdfac7..64b270926 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -465,6 +465,7 @@ public: bool special; bool toolcol; bool enaColorMask; + bool fftColorMask; bool CCmaskcurve; bool LLmaskcurve; bool HHmaskcurve;