Merge with branch laspotmain

This commit is contained in:
U-PCSPECIALIST01\jdesm 2024-01-28 15:41:09 +01:00
parent c8b23d1b7c
commit c0bec095c6
17 changed files with 1381 additions and 89 deletions

View File

@ -1740,7 +1740,7 @@ MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: <b>Alt-u</b>
MAIN_TAB_FILTER; Filter
MAIN_TAB_INSPECT; Inspect
MAIN_TAB_IPTC;IPTC
MAIN_TAB_LOCALLAB;Local
MAIN_TAB_LOCALLAB;Selective Editing
MAIN_TAB_LOCALLAB_TOOLTIP;Shortcut: <b>Alt-o</b>
MAIN_TAB_METADATA;Metadata
MAIN_TAB_METADATA_TOOLTIP;Shortcut: <b>Alt-m</b>
@ -1827,8 +1827,8 @@ PARTIALPASTE_LABCURVE;L*a*b* adjustments
PARTIALPASTE_LENSGROUP;Lens Related Settings
PARTIALPASTE_LENSPROFILE;Profiled lens correction
PARTIALPASTE_LOCALCONTRAST;Local contrast
PARTIALPASTE_LOCALLAB;Local Adjustments
PARTIALPASTE_LOCALLABGROUP;Local Adjustments Settings
PARTIALPASTE_LOCALLAB;Selective Editing
PARTIALPASTE_LOCALLABGROUP;Selective Editing Settings
PARTIALPASTE_METADATA;Metadata mode
PARTIALPASTE_METAGROUP;Metadata settings
PARTIALPASTE_PCVIGNETTE;Vignette filter
@ -2057,6 +2057,7 @@ PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for n
PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done
PREFERENCES_SND_QUEUEDONE;Queue processing done
PREFERENCES_SND_THRESHOLDSECS;After seconds
PREFERENCES_SPOTLOC;Define Spot method for Local Adjustments
PREFERENCES_STARTUPIMDIR;Image Directory at Startup
PREFERENCES_TAB_BROWSER;File Browser
PREFERENCES_TAB_COLORMGR;Color Management
@ -2904,7 +2905,7 @@ TP_LOCALLAB_CLARI_TOOLTIP;Levels 0 to 4 (included): 'Sharp mask' is enabled\nLev
TP_LOCALLAB_CLIPTM;Clip restored data (gain)
TP_LOCALLAB_COFR;Color & Light
TP_LOCALLAB_COLORDE;ΔE preview color - intensity
TP_LOCALLAB_COLORDEPREV_TOOLTIP;Preview ΔE button will only work if you have activated one (and only one) of the tools in 'Add tool to current spot' menu.\nTo be able to preview ΔE with several tools enabled, use Mask and modifications - Preview ΔE.
TP_LOCALLAB_COLORDEPREV_TOOLTIP;Preview ΔE button in Settings will only work if you have activated 'Sharpening' or 'Soft Light and Original Retinex' or 'Blur/Grain and Denoise' or 'Dehaze and Retinex' or 'Contrast by Detail Levels' in 'Add tool to current spot' menu.\nFor others tools Preview ΔE button is 'in the tool' - to be able to preview ΔE with several tools enabled, use preferably Mask and modifications.
TP_LOCALLAB_COLORDE_TOOLTIP;Show a blue color preview for ΔE selection if negative and green if positive.\n\nMask and modifications (show modified areas without mask): show actual modifications if positive, show enhanced modifications (luminance only) with blue and yellow if negative.
TP_LOCALLAB_COLORSCOPE;Scope (color tools)
TP_LOCALLAB_COLORSCOPE_TOOLTIP;Common Scope slider for Color and Light, Shadows/Highlights, Vibrance.\nOther tools have their own scope controls.
@ -2994,6 +2995,7 @@ TP_LOCALLAB_EXCLUTYPE;Spot method
TP_LOCALLAB_EXCLUTYPE_TOOLTIP;Normal spot uses recursive data.\n\nExcluding spot reinitializes all local adjustment data.\nCan be used to totally or partially cancel a previous action or to carry out operations in Inverse mode.\n\n'Full image' allows you to use the local adjustment tools on the whole image.\n The RT Spot delimiters are set beyond the image preview boundaries.\n The transition is set to 100.\nNote, you may have to reposition the RT Spot slightly and adjust the Spot size to get the desired effect.\nPlease note: using Denoise or Wavelet or FFTW in full-image mode uses large amounts of memory and may cause the application to crash on lower capacity systems.
TP_LOCALLAB_EXECLU;Excluding spot
TP_LOCALLAB_EXFULL;Full image
TP_LOCALLAB_EXMAIN;Global
TP_LOCALLAB_EXNORM;Normal spot
TP_LOCALLAB_EXPCBDL_TOOLTIP;Can be used to remove marks on the sensor or lens by reducing the contrast on the appropriate detail level(s).
TP_LOCALLAB_EXPCHROMA;Chroma compensation
@ -3124,7 +3126,7 @@ TP_LOCALLAB_JZTARGET_EV;Viewing Mean luminance (Yb%)
TP_LOCALLAB_JZTHRHCIE;Threshold Chroma for Jz(Hz)
TP_LOCALLAB_JZWAVEXP;Wavelet Jz
TP_LOCALLAB_LABBLURM;Blur Mask
TP_LOCALLAB_LABEL;Local Adjustments
TP_LOCALLAB_LABEL;Selective Editing
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

View File

@ -1270,6 +1270,11 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
maxicamp = new float[sizespot];
bool *autocam = nullptr;
autocam = new bool[sizespot];
//new controls mainfp and scopefp with multi spots
int *mainfp = nullptr;
mainfp = new int[sizespot];
int *scopefp = nullptr;
scopefp = new int[sizespot];
for (int sp = 0; sp < (int)params->locallab.spots.size(); sp++) {
@ -1280,8 +1285,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (params->locallab.spots.at(sp).equilret && params->locallab.spots.at(sp).expreti) {
savenormreti.reset(new LabImage(*oprevl, true));
}
autocam[sp] = params->locallab.spots.at(sp).comprcieauto;
if(params->locallab.spots.at(sp).colorscope != 30) {//compatibility with old method in controlspotpanel to change scope - default value 30
scopefp[sp]= params->locallab.spots.at(sp).colorscope;
}
// Set local curves of current spot to LUT
locRETgainCurve.Set(params->locallab.spots.at(sp).localTgaincurve);
locRETtransCurve.Set(params->locallab.spots.at(sp).localTtranscurve);
@ -1663,6 +1669,31 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
}
// new used linked to global and scope
mainfp[sp] = 0;
if (params->locallab.spots.at(sp).spotMethod == "main") {
mainfp[sp] = 3;
} else if (params->locallab.spots.at(sp).spotMethod == "full") {
mainfp[sp] = 2;
}
//keep using tools
bool iscolor = params->locallab.spots.at(sp).expcolor;
bool issh = params->locallab.spots.at(sp).expshadhigh;
bool isvib = params->locallab.spots.at(sp).expvibrance;
bool isexpos = params->locallab.spots.at(sp).expexpose;
bool issoft = params->locallab.spots.at(sp).expsoft;
bool isblur = params->locallab.spots.at(sp).expblur;
bool istom = params->locallab.spots.at(sp).exptonemap;
bool isret = params->locallab.spots.at(sp).expreti;
bool issharp = params->locallab.spots.at(sp).expsharp;
bool iscont = params->locallab.spots.at(sp).expcontrast;
bool iscbdl = params->locallab.spots.at(sp).expcbdl;
bool islog = params->locallab.spots.at(sp).explog;
bool ismas = params->locallab.spots.at(sp).expmask;
bool iscie = params->locallab.spots.at(sp).expcie;
bool isset = iscolor || issh || isvib;
if (locallListener) {
locallListener->refChanged2(huerefp, chromarefp, lumarefp, fabrefp, params->locallab.selspot);
locallListener->minmaxChanged(locallretiminmax, params->locallab.selspot);
@ -1670,7 +1701,18 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (params->locallab.spots.at(sp).expprecam) {
locallListener->cieChanged(locallcielc,params->locallab.selspot);
}
locallListener->sigChanged(locallciesig,params->locallab.selspot);
if (mainfp[sp] >= 0) {//minimize call to idle register
//used by Global fullimage.
locallListener->mainChanged(mainfp[sp], params->locallab.selspot, iscolor, issh, isvib, isexpos, issoft, isblur, istom, isret, issharp, iscont, iscbdl, islog, ismas, iscie);
}
if(params->locallab.spots.at(sp).colorscope != 30) {//compatibility with old method in controlspotpanel
locallListener->scopeChangedcol(scopefp[sp], params->locallab.selspot, iscolor);
locallListener->scopeChangedsh(scopefp[sp], params->locallab.selspot, issh);
locallListener->scopeChangedvib(scopefp[sp], params->locallab.selspot, isvib);
locallListener->scopeChangedset(scopefp[sp], params->locallab.selspot, isset);
params->locallab.spots.at(sp).colorscope = 30;
}
}
}
@ -1681,6 +1723,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
delete [] fabrefp;
delete [] maxicamp;
delete [] autocam;
delete [] mainfp;
delete [] scopefp;
ipf.lab2rgb(*nprevl, *oprevi, params->icm.workingProfile);
//*************************************************************

View File

@ -929,7 +929,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.fullim = 1;
} else if (locallab.spots.at(sp).spotMethod == "full") {
lp.fullim = 2;
} else if (locallab.spots.at(sp).spotMethod == "main") {//new Global
lp.fullim = 3;
}
lp.fftColorMask = locallab.spots.at(sp).fftColorMask;
lp.prevdE = prevDeltaE;
@ -1073,8 +1076,11 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.excmet = 1;
} else if (locallab.spots.at(sp).spotMethod == "full") {
lp.excmet = 2;
} else if (locallab.spots.at(sp).spotMethod == "main") {
lp.excmet = 3;
}
if (locallab.spots.at(sp).merMethod == "mone") {
lp.mergemet = 0;
} else if (locallab.spots.at(sp).merMethod == "mtwo") {
@ -1802,10 +1808,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.blwh = locallab.spots.at(sp).blwh;
lp.senscolor = (int) locallab.spots.at(sp).colorscope;
//replace scope color vibrance shadows
lp.sens = lp.senscolor;
/* lp.sens = lp.senscolor;
lp.sensv = lp.senscolor;
lp.senshs = lp.senscolor;
*/
lp.mLjz = locallab.spots.at(sp).clarilresjz / 100.0;
lp.mCjz = locallab.spots.at(sp).claricresjz / 100.0;
lp.softrjz = locallab.spots.at(sp).clarisoftjz;
@ -5005,7 +5011,10 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, Lab
//simple algo , perhaps we can improve as the others, but noise is here and not good for hue detection
// BENCHFUN
lumaref *= 327.68f;
const float ach = lp.trans / 100.f;
float ach = lp.trans / 100.f;
if(lp.fullim == 3 ) {//disabled transit
ach = 1.f;
}
const float factnoise1 = 1.f + (lp.noisecf) / 500.f;
const float factnoise2 = 1.f + (lp.noisecc) / 500.f;
@ -5082,6 +5091,9 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, Lab
} else { /*if (lp.shapmet == 1)*/
calcTransitionrect(lox, loy, ach, lp, zone, localFactor);
}
if(lp.fullim == 3 ) {//disabled scope
localFactor = 1.f;
}
if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values
continue;
@ -5116,6 +5128,9 @@ void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, Lab
difa = tmp1.a[y][x] - original->a[y][x];
difb = tmp1.b[y][x] - original->b[y][x];
}
if(lp.fullim == 3 ) {//disable scope
reducdEL = reducdEa = reducdEb = 1.f;
}
difL *= localFactor * reducdEL;
difa *= localFactor * reducdEa;
@ -5161,7 +5176,10 @@ void ImProcFunctions::DeNoise_Local2(const struct local_params& lp, LabImage* or
lumaref *= 327.68f;
const float ach = lp.trans / 100.f;
float ach = lp.trans / 100.f;
if(lp.fullim == 3 ) {//disabled transit
ach = 1.f;
}
const float factnoise1 = 1.f + (lp.noisecf) / 500.f;
const float factnoise2 = 1.f + (lp.noisecc) / 500.f;
@ -5238,6 +5256,9 @@ void ImProcFunctions::DeNoise_Local2(const struct local_params& lp, LabImage* or
} else { /*if (lp.shapmet == 1)*/
calcTransitionrect(lox, loy, ach, lp, zone, localFactor);
}
if(lp.fullim == 3 ) {//disabled scope
localFactor = 1.f;
}
if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values
continue;
@ -5266,6 +5287,9 @@ void ImProcFunctions::DeNoise_Local2(const struct local_params& lp, LabImage* or
difL = tmp1.L[y - ystart][x - xstart] - original->L[y][x];
difa = tmp1.a[y - ystart][x - xstart] - original->a[y][x];
difb = tmp1.b[y - ystart][x - xstart] - original->b[y][x];
if(lp.fullim == 3 ) {//disable scope
reducdEL = reducdEa = reducdEb = 1.f;
}
difL *= localFactor * reducdEL;
difa *= localFactor * reducdEa;
@ -5355,7 +5379,10 @@ void ImProcFunctions::InverseReti_Local(const struct local_params & lp, const fl
float rL = origblur->L[y][x] / 327.68f;
float dE = std::sqrt(kab * SQR(refa - origblur->a[y][x] / 327.68f) + kab * SQR(refb - origblur->b[y][x] / 327.68f) + kL * SQR(lumaref - rL));
const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensh);
float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensh);
if(lp.fullim == 3 ) {//disable scope
reducdE = 1.f;
}
switch (zone) {
case 0: { // outside selection and outside transition zone => full effect, no transition
@ -5504,6 +5531,10 @@ void ImProcFunctions::InverseBlurNoise_Local(LabImage * originalmask, const stru
float huedelta2 = abdelta2 - chrodelta2;
float dE = std::sqrt(kab * (kch * chrodelta2 + kH * huedelta2) + kL * SQR(refL - maskptr->L[y][x]));
reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, lp.sensbn);
if(lp.fullim == 3 ) {//disabled scope
reducdE = 1.f;
}
}
switch (zone) {
@ -5850,13 +5881,19 @@ static void blendmask(const local_params& lp, int xstart, int ystart, int cx, in
int zone;
float localFactor = 1.f;
const float achm = lp.trans / 100.f;
float achm = lp.trans / 100.f;
if(lp.fullim == 3 ) {//disable transit
achm = 1.f;
}
if (lp.shapmet == 0) {
calcTransition(lox, loy, achm, lp, zone, localFactor);
} else { /*if (lp.shapmet == 1)*/
calcTransitionrect(lox, loy, achm, lp, zone, localFactor);
}
if(lp.fullim == 3 ) {//disable scope
localFactor = 1.f;
}
if (inv == 0) {
if (zone > 0) {
@ -8088,7 +8125,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage * bufexpo
transformed->L[y][x] = CLIP(12000.f + difL);
transformed->a[y][x] = clipC(difa);
transformed->b[y][x] = clipC(difb);
} else if (previewcb || previewtm || lp.prevdE) {
} else if (/* previewcb ||*/ previewtm || lp.prevdE) {
if (std::fabs(difb) < 500.f) {
difb += difL;
}
@ -8705,7 +8742,7 @@ void optfft(int N_fftwsize, int &bfh, int &bfw, int &bfhr, int &bfwr, struct loc
}
}
if (fulima == 2) { // if full image, the ftsizeH and ftsizeW is a bit larger (about 10 to 200 pixels) than the image dimensions so that it is fully processed (consumes a bit more resources)
if(fulima >= 2) {// if full image, the ftsizeH and ftsizeW is a bit larger (about 10 to 200 pixels) than the image dimensions so that it is fully processed (consumes a bit more resources)
for (int ftfu = 0; ftfu < N_fftwsize; ftfu++) { //find best values
if (fftw_size[ftfu] <= (H + deltah)) {
ftsizeH = fftw_size[ftfu];
@ -9016,16 +9053,16 @@ void ImProcFunctions::transit_shapedetect2(int sp, float meantm, float stdtm, in
const bool masshow = ((lp.showmask_met == 1) && senstype == 20);
const bool previewvib = ((lp.showmaskvibmet == 4) && senstype == 2);
const bool previewexp = ((lp.showmaskexpmet == 5) && senstype == 1);
const bool previewcol = ((lp.showmaskcolmet == 5) && senstype == 0);
const bool previewSH = ((lp.showmaskSHmet == 4) && senstype == 9);
const bool previewtm = ((lp.showmasktmmet == 4) && senstype == 8);
const bool previewlc = ((lp.showmasklcmet == 4) && senstype == 10);
const bool previewvib = ((lp.showmaskvibmet == 4) && senstype == 2 && lp.fullim != 3);
const bool previewexp = ((lp.showmaskexpmet == 5) && senstype == 1 && lp.fullim != 3);
const bool previewcol = ((lp.showmaskcolmet == 5) && senstype == 0 && lp.fullim != 3);
const bool previewSH = ((lp.showmaskSHmet == 4) && senstype == 9 && lp.fullim != 3);
const bool previewtm = ((lp.showmasktmmet == 4) && senstype == 8 && lp.fullim != 3);
const bool previewlc = ((lp.showmasklcmet == 4) && senstype == 10 && lp.fullim != 3);
const bool previeworig = ((lp.showmasksoftmet == 6) && senstype == 3 && lp.softmet == 1);
const bool previewmas = ((lp.showmask_met == 3) && senstype == 20);
const bool previewlog = ((lp.showmasklogmet == 4) && senstype == 11);
const bool previewcie = ((lp.showmaskciemet == 4) && senstype == 31);
const bool previewmas = ((lp.showmask_met == 3) && senstype == 20 && lp.fullim != 3);
const bool previewlog = ((lp.showmasklogmet == 4) && senstype == 11 && lp.fullim != 3);
const bool previewcie = ((lp.showmaskciemet == 4) && senstype == 31 && lp.fullim != 3);
float radius = 3.f / sk;
@ -9230,7 +9267,10 @@ void ImProcFunctions::transit_shapedetect2(int sp, float meantm, float stdtm, in
const int lox = x + xstart + cx;
int zone;
float localFactor = 1.f;
const float achm = lp.trans / 100.f;
float achm = lp.trans / 100.f;
if(lp.fullim == 3 ) {//disable transit
achm = 1.f;
}
//calculate transition
if (lp.shapmet == 0) {
@ -9238,6 +9278,9 @@ void ImProcFunctions::transit_shapedetect2(int sp, float meantm, float stdtm, in
} else { /*if (lp.shapmet == 1)*/
calcTransitionrect(lox, loy, achm, lp, zone, localFactor);
}
if(lp.fullim == 3 ) {//disable scope
localFactor = 1.f;
}
// float hueh = 0;
#ifdef __SSE2__
@ -9286,6 +9329,10 @@ void ImProcFunctions::transit_shapedetect2(int sp, float meantm, float stdtm, in
if(varsens == 100.f) {
reducdE = 1.f;
}
if(lp.fullim == 3 ) {//disable scope
reducdE = 1.f;
}
float cli = (bufexpfin->L[y][x] - bufexporig->L[y][x]);
float cla = (bufexpfin->a[y][x] - bufexporig->a[y][x]);
float clb = (bufexpfin->b[y][x] - bufexporig->b[y][x]);
@ -15394,7 +15441,11 @@ void ImProcFunctions::Lab_Local(
for (int y = 0; y < transformed->H ; y++)
for (int x = 0; x < transformed->W; x++) {
float dE = std::sqrt(SQR(refa - bufreti->a[y][x] / 327.68f) + SQR(refb - bufreti->b[y][x] / 327.68f) + SQR(static_cast<float>(lumaref) - bufreti->b[y][x] / 327.68f));
const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sensibefore);
float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sensibefore);
if(lp.fullim == 3 ) {//disable scope
reducdE = 1.f;
}
reducDE[y][x] = clipDE(reducdE);
}
@ -15755,7 +15806,11 @@ void ImProcFunctions::Lab_Local(
for (int y = ystart; y < yend ; y++) {
for (int x = xstart; x < xend; x++) {
const float dE = std::sqrt(SQR(refa - bufreti->a[y - ystart][x - xstart] / 327.68f) + SQR(refb - bufreti->b[y - ystart][x - xstart] / 327.68f) + SQR(static_cast<float>(lumaref) - bufreti->b[y - ystart][x - xstart] / 327.68f));
const float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sensibefore);
float reducdE = calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sensibefore);
if(lp.fullim == 3 ) {//disable scope
reducdE = 1.f;
}
reducDE[y - ystart][x - xstart] = clipDE(reducdE);
}
}
@ -17534,8 +17589,7 @@ void ImProcFunctions::Lab_Local(
int begx = lp.xc - lp.lxL;
int yEn = lp.yc + lp.ly;
int xEn = lp.xc + lp.lx;
if (lp.fullim == 2) { //limit sharpening to image dimension...no more...to avoid a long treatment
if(lp.fullim >= 2) {//full-iamge and global - limit sharpening to image dimension...no more...to avoid a long treatme
begy = 0;
begx = 0;
yEn = original->H;

View File

@ -3027,7 +3027,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
labgridAHighmerg(-3500.0),
labgridBHighmerg(-4600.0),
strengthgrid(30),
sensi(15),
sensi(30),
structcol(0),
strcol(0.),
strcolab(0.),
@ -3373,7 +3373,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
shadows(0),
s_tonalwidth(30),
sh_radius(40),
sensihs(15),
sensihs(30),
enaSHMask(false),
CCmaskSHcurve{
static_cast<double>(FCT_MinMaxCPoints),
@ -3460,7 +3460,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
protectskins(false),
avoidcolorshift(true),
pastsattog(true),
sensiv(15),
sensiv(30),
skintonescurve{
static_cast<double>(DCT_Linear)
},
@ -4749,9 +4749,80 @@ LocallabParams::LocallabSpot::LocallabSpot() :
0.35
},
csthresholdcie(0, 0, 6, 5, false)
{
// init settings with Preferences / options : must be followed by call to spotMethodChanged in controlspotpanel.cc (idle_register)
// new values default with different SpotMethod.
if(options.spotmet == 3) {//global
spotMethod = "main";
loc = {3000, 3000, 3000, 3000};
transit =100.;
shape = "RECT";
} else if(options.spotmet == 2) {//full image
spotMethod = "full";
loc = {3000, 3000, 3000, 3000};
transit =100.;
shape = "RECT";
sensi = 30;
sensiex = 60;
sensihs = 30;
sensiv = 30;
sensisf = 30;
sensibn = 40;
sensiden = 60;
sensitm = 60;
sensih = 60;
sensisha = 40;
sensilc = 60;
sensicb = 60;
sensilog = 60;
sensimask = 60;
sensicie = 60;
} else if(options.spotmet == 1) {//exclude
spotMethod = "exc";
shape = "ELI";
loc = {150, 150, 150, 150};
transit= 60.;
sensi = 30;
sensiex = 60;
sensihs = 30;
sensiv = 30;
sensibn = 40;
sensiden = 60;
sensitm = 60;
sensih = 60;
sensisha = 40;
sensilc = 60;
sensicb = 60;
sensilog = 60;
sensimask = 60;
sensicie = 60;
} else if(options.spotmet == 0) {//normal
spotMethod = "norm";
shape = "ELI";
loc = {150, 150, 150, 150};
transit= 60.;
sensi = 30;
sensiex = 60;
sensihs = 30;
sensiv = 30;
sensibn = 40;
sensiden = 60;
sensitm = 60;
sensih = 60;
sensisha = 40;
sensilc = 60;
sensicb = 60;
sensilog = 60;
sensimask = 60;
sensicie = 60;
}
}
bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const

View File

@ -455,6 +455,12 @@ public:
virtual void refChanged2(float *huerefp, float *chromarefp, float *lumarefp, float *fabrefp, int selspot) = 0;
virtual void maxcam(float *maxicamp, bool *autocam, int selspot) = 0;
virtual void mainChanged(int spottype, int selspot, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool iscie) = 0;
virtual void scopeChangedcol(int scope, int selspot, bool enab) = 0;
virtual void scopeChangedsh(int scope, int selspot, bool enab) = 0;
virtual void scopeChangedvib(int scope, int selspot, bool enab) = 0;
virtual void scopeChangedset(int scope, int selspot, bool enab) = 0;
};
class AutoColorTonListener

View File

@ -99,8 +99,11 @@ ControlSpotPanel::ControlSpotPanel():
preview_(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
ctboxshape(Gtk::manage(new Gtk::Box())),
ctboxactivmethod(Gtk::manage(new Gtk::Box())),
ctboxspotmethod(Gtk::manage(new Gtk::Box())),
ctboxshapemethod(Gtk::manage(new Gtk::Box())),
ctboxgamut(Gtk::manage(new Gtk::Box())),
artifBox2(Gtk::manage(new ToolParamBlock())),
controlPanelListener(nullptr),
lastObject_(-1),
@ -115,7 +118,7 @@ ControlSpotPanel::ControlSpotPanel():
auto m = ProcEventMapper::getInstance();
EvLocallabavoidgamutMethod = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_GAMUTMUNSEL");
const bool showtooltip = options.showtooltip;
pack_start(*hishow_);
// pack_start(*hishow_);
Gtk::Box* const ctboxprevmethod = Gtk::manage(new Gtk::Box());
prevMethod_->append(M("TP_LOCALLAB_PREVHIDE"));
@ -203,8 +206,9 @@ ControlSpotPanel::ControlSpotPanel():
scrolledwindow_->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
scrolledwindow_->set_min_content_height(150);
pack_start(*scrolledwindow_);
pack_start(*hishow_);
Gtk::Box* const ctboxactivmethod = Gtk::manage(new Gtk::Box());
// Gtk::Box* const ctboxactivmethod = Gtk::manage(new Gtk::Box());
ctboxactivmethod->pack_start(*activ_);
pack_start(*ctboxactivmethod);
@ -222,7 +226,6 @@ ControlSpotPanel::ControlSpotPanel():
shape_->set_tooltip_text(M("TP_LOCALLAB_SHAPE_TOOLTIP"));
}
Gtk::Box* const ctboxspotmethod = Gtk::manage(new Gtk::Box());
Gtk::Label* const labelspotmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_EXCLUTYPE") + ":"));
ctboxspotmethod->pack_start(*labelspotmethod, Gtk::PACK_SHRINK, 4);
@ -233,6 +236,7 @@ ControlSpotPanel::ControlSpotPanel():
spotMethod_->append(M("TP_LOCALLAB_EXNORM"));
spotMethod_->append(M("TP_LOCALLAB_EXECLU"));
spotMethod_->append(M("TP_LOCALLAB_EXFULL"));
spotMethod_->append(M("TP_LOCALLAB_EXMAIN"));//new choice Global
spotMethod_->set_active(0);
spotMethodconn_ = spotMethod_->signal_changed().connect(
sigc::mem_fun(
@ -387,10 +391,11 @@ ControlSpotPanel::ControlSpotPanel():
// artifBox->pack_start(*colorscope_);
expShapeDetect_->add(*artifBox, false);
pack_start(*expShapeDetect_, false, false);
ToolParamBlock* const artifBox2 = Gtk::manage(new ToolParamBlock());
// ToolParamBlock* const artifBox2 = Gtk::manage(new ToolParamBlock());
artifBox2->pack_start(*preview_);
artifBox2->pack_start(*colorscope_);
artifBox2->pack_start(*colorscope_);//unused with contrlspotpanel since 17 / 01 : 2024 but data used in color, vibrance, sh
colorscope_->hide();
pack_start(*artifBox2);
ToolParamBlock* const specCaseBox = Gtk::manage(new ToolParamBlock());
@ -551,7 +556,6 @@ ControlSpotPanel::ControlSpotPanel():
pack_start(*ctboxwavmethod);
*/
show_all();
// Define row background color
// Mouseovered spot (opaque orange)
colorMouseover.set_red(1.);
@ -794,6 +798,7 @@ bool ControlSpotPanel::on_button_visibility(GdkEventButton* event)
return false;
}
bool ControlSpotPanel::blockTreeviewSearch(GdkEventKey* event)
{
// printf("blockTreeviewSearch\n");
@ -981,7 +986,7 @@ void ControlSpotPanel::prevMethodChanged()
void ControlSpotPanel::spotMethodChanged()
{
//01 2024 take into account new problems linked to Global spotmethod
// Get selected control spot
const auto s = treeview_->get_selection();
@ -994,15 +999,20 @@ void ControlSpotPanel::spotMethodChanged()
const int oldSpotMethod = row[spots_.spotMethod];
row[spots_.spotMethod] = spotMethod_->get_active_row_number();
//ctboxspotmethod->show();
hishow_->show();
ctboxshape->show();
artifBox2->show();
colorscope_->hide();
// Update Control Spot GUI according to spotMethod_ combobox state (to be compliant with updateParamVisibility function)
if (multiImage && spotMethod_->get_active_text() == M("GENERAL_UNCHANGED")) {
excluFrame->show();
} else if (spotMethod_->get_active_row_number() == 0) { // Normal case
excluFrame->hide();
// Reset spot shape only if previous spotMethod is Full image
if (oldSpotMethod == 2) {
if (oldSpotMethod == 2 || oldSpotMethod == 3) {
disableParamlistener(true);
locX_->setValue(150.);
row[spots_.locX] = locX_->getIntValue();
@ -1022,8 +1032,8 @@ void ControlSpotPanel::spotMethodChanged()
} else if (spotMethod_->get_active_row_number() == 1) { // Excluding case
excluFrame->show();
// Reset spot shape only if previous spotMethod is Full image
if (oldSpotMethod == 2) {
// Reset spot shape only if previous spotMethod is Full image or Global
if (oldSpotMethod == 2 || oldSpotMethod == 3) {
disableParamlistener(true);
locX_->setValue(150.);
row[spots_.locX] = locX_->getIntValue();
@ -1040,7 +1050,7 @@ void ControlSpotPanel::spotMethodChanged()
disableParamlistener(false);
updateControlSpotCurve(row);
}
} else if (spotMethod_->get_active_row_number() == 2) { // Full image case
} else if (spotMethod_->get_active_row_number() == 2 || spotMethod_->get_active_row_number() == 3) { // Full image or Global case
excluFrame->hide();
shape_->set_active(0);
@ -1056,6 +1066,32 @@ void ControlSpotPanel::spotMethodChanged()
row[spots_.shape] = shape_->get_active_row_number();
transit_->setValue(100.);
row[spots_.transit] = transit_->getValue();
if(spotMethod_->get_active_row_number() == 3) { //global
ctboxshape->hide();
artifBox2->hide();
hishow_->hide();
expTransGrad_->hide();
expShapeDetect_->hide();
expSpecCases_->hide();
expMaskMerge_->hide();
circrad_->hide();
ctboxshape->hide();
} else {
ctboxshape->show();
circrad_->show();
artifBox2->show();
colorscope_->hide();
hishow_->show();
if(hishow_->get_active()) {
expTransGrad_->show();
expShapeDetect_->show();
expSpecCases_->show();
expMaskMerge_->show();
}
}
}
// Raise event
@ -1303,7 +1339,12 @@ void ControlSpotPanel::updateParamVisibility()
} else {
avoidrad_->hide();
}
// ctboxspotmethod->show();
hishow_->show();
artifBox2->show();
ctboxshape->show();
colorscope_->hide();
// Update Control Spot GUI according to spotMethod_ combobox state (to be compliant with spotMethodChanged function)
if (multiImage && spotMethod_->get_active_text() == M("GENERAL_UNCHANGED")) {
excluFrame->show();
@ -1311,8 +1352,35 @@ void ControlSpotPanel::updateParamVisibility()
excluFrame->hide();
} else if (spotMethod_->get_active_row_number() == 1) { // Excluding case
excluFrame->show();
} else if (spotMethod_->get_active_row_number() == 2) {//full image
} else if (spotMethod_->get_active_row_number() == 2 || spotMethod_->get_active_row_number() == 3) {//full image or global
excluFrame->hide();
if(spotMethod_->get_active_row_number() == 3) {
artifBox2->hide();
hishow_->hide();
hishow_->set_active(false);
ctboxshape->hide();
circrad_->hide();
expTransGrad_->hide();
expShapeDetect_->hide();
expSpecCases_->hide();
expMaskMerge_->hide();
} else {
artifBox2->show();
colorscope_->hide();
hishow_->show();
ctboxshape->show();
circrad_->show();
if(hishow_->get_active()) {
expTransGrad_->show();
expShapeDetect_->show();
expSpecCases_->show();
expMaskMerge_->show();
}
}
}
/*
@ -1325,13 +1393,35 @@ void ControlSpotPanel::updateParamVisibility()
ctboxshape->show();
} else if (prevMethod_->get_active_row_number() == 0) { // Normal case
*/
if (!hishow_->get_active()) { // Normal case
//ctboxshape->show();
// artifBox2->show();
if (!hishow_->get_active() || spotMethod_->get_active_row_number() == 3) { // Normal case or Global
expTransGrad_->hide();
expShapeDetect_->hide();
expSpecCases_->hide();
expMaskMerge_->hide();
circrad_->hide();
ctboxshape->hide();
if(spotMethod_->get_active_row_number() == 3) {
artifBox2->hide();
hishow_->hide();
ctboxshape->hide();
circrad_->hide();
expTransGrad_->hide();
expShapeDetect_->hide();
expSpecCases_->hide();
expMaskMerge_->hide();
} else {
hishow_->show();
artifBox2->show();
colorscope_->hide();
hishow_->show();
ctboxshape->show();
circrad_->show();
}
} else { // Excluding case
expTransGrad_->show();
expShapeDetect_->show();
@ -1339,6 +1429,8 @@ void ControlSpotPanel::updateParamVisibility()
expMaskMerge_->show();
circrad_->show();
ctboxshape->show();
hishow_->show();
}
@ -1602,8 +1694,9 @@ void ControlSpotPanel::hishowChanged()
row[spots_.hishow] = hishow_->get_active();
ctboxshape->show();
if (!hishow_->get_active()) { // Normal case
if (!hishow_->get_active() || spotMethod_->get_active_row_number() == 3) { // Normal case or Global
expTransGrad_->hide();
expShapeDetect_->hide();
expSpecCases_->hide();
@ -1611,6 +1704,20 @@ void ControlSpotPanel::hishowChanged()
circrad_->hide();
ctboxshape->hide();
shapeMethod_->set_active(0);
if(spotMethod_->get_active_row_number() == 3) {
hishow_->hide();
hishow_->set_active(false);
circrad_->hide();
expTransGrad_->hide();
expShapeDetect_->hide();
expSpecCases_->hide();
expMaskMerge_->hide();
} else {
hishow_->show();
circrad_->show();
}
} else { // Excluding case
expTransGrad_->show();
@ -1619,7 +1726,9 @@ void ControlSpotPanel::hishowChanged()
expMaskMerge_->show();
circrad_->show();
ctboxshape->show();
}
hishow_->show();
}
// Raise event
if (listener) {
@ -2760,6 +2869,56 @@ void ControlSpotPanel::deleteControlSpot(const int index)
disableParamlistener(false);
}
//new function linked to Global and options
void ControlSpotPanel::updateguiset(int spottype, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool iscie)
{
{ //with this function we can 1) activate Settings SpotMethod
// also if need GUI for mask , todo...
idle_register.add(
[this, spottype, iscolor, issh , isvib, isexpos, issoft, isblur, istom, isret, issharp, iscont, iscbdl, islog, ismas, iscie]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype >= 2 && options.spotmet >= 2) {//optimize update
spotMethodChanged();
}
if((iscolor || issh || isvib || isexpos || istom || iscont || iscbdl || islog || ismas || iscie)
&& !issharp && !issoft && !isret && !isblur) {
preview_->hide();
} else if (issoft || isblur || isret || issharp) {
preview_->show();
}
enableListener();
return false;
}
);
}
}
//new function linked to change scope
void ControlSpotPanel::updateguiscopeset(int scope)
{
{ //with this function we can disabled old values scope
idle_register.add(
[this, scope]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
disableListener();
colorscope_->setValue(scope);
adjusterChanged(colorscope_, 0.);
enableListener();
return false;
}
);
}
}
void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defParams, const ParamsEdited * pedited)
{
const int index = defParams->locallab.selspot;

View File

@ -53,7 +53,7 @@ public:
bool isvisible;
int prevMethod; // 0 = Normal, 1 = Excluding
int shape; // 0 = Ellipse, 1 = Rectangle
int spotMethod; // 0 = Normal, 1 = Excluding
int spotMethod; // 0 = Normal, 1 = Excluding 2 = fullimage 3 = main
int sensiexclu;
int structexclu;
int shapeMethod; // 0 = Independent (mouse), 1 = Symmetrical (mouse), 2 = Independent (mouse + sliders), 3 = Symmetrical (mouse + sliders)
@ -104,6 +104,7 @@ public:
SpotDuplication = 4,
SpotAllVisibilityChanged = 5
};
IdleRegister idle_register;
// Constructor and management functions
/**
@ -218,6 +219,12 @@ public:
// Batch mode management
// Note: Batch mode is deactivated for Locallab
/**
* upadte function to work with Preferences and spotMethod
*/
void updateguiset(int spottype, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool iscie);
void updateguiscopeset(int scope);
private:
// Cell renderer
@ -433,8 +440,12 @@ private:
sigc::connection previewConn_;
Gtk::Box* const ctboxshape;
Gtk::Box* const ctboxactivmethod;
Gtk::Box* const ctboxspotmethod;
Gtk::Box* const ctboxshapemethod;
Gtk::Box* const ctboxgamut;
ToolParamBlock* const artifBox2;
// Internal variables
ControlPanelListener* controlPanelListener;

View File

@ -249,7 +249,7 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
if (pp->locallab.spots.at(i).shape == "ELI") {
r->shape = 0;
} else {
} else if (pp->locallab.spots.at(i).shape == "RECT") {
r->shape = 1;
}
@ -265,8 +265,10 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
r->spotMethod = 1;
} else if (pp->locallab.spots.at(i).spotMethod == "full"){
r->spotMethod = 2;
} else if (pp->locallab.spots.at(i).spotMethod == "main"){
r->spotMethod = 3;
}
r->sensiexclu = pp->locallab.spots.at(i).sensiexclu;
r->structexclu = pp->locallab.spots.at(i).structexclu;
@ -421,7 +423,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
if (newSpot->shape == "ELI") {
r->shape = 0;
} else {
} else if (newSpot->shape == "RECT"){
r->shape = 1;
}
@ -438,6 +440,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->spotMethod = 1;
} else if(newSpot->spotMethod == "full") {
r->spotMethod = 2;
} else if(newSpot->spotMethod == "main") {
r->spotMethod = 3;
}
r->sensiexclu = newSpot->sensiexclu;
@ -746,7 +750,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
if (newSpot->shape == "ELI") {
r->shape = 0;
} else {
} else if (newSpot->shape == "RECT"){
r->shape = 1;
}
@ -762,8 +766,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
r->spotMethod = 1;
} else if (newSpot->spotMethod == "full") {
r->spotMethod = 2;
} else if (newSpot->spotMethod == "main") {
r->spotMethod = 3;
}
r->sensiexclu = newSpot->sensiexclu;
r->structexclu = newSpot->structexclu;
@ -810,7 +816,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
}
}
if(r->spotMethod != 2) {
if(r->spotMethod == 0 || r->spotMethod == 1 ) {
r->locX = newSpot->loc.at(0);
r->locXL = newSpot->loc.at(1);
r->locY = newSpot->loc.at(2);
@ -958,6 +964,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "exc";
} else if (r->spotMethod == 2) {
pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "full";
} else if (r->spotMethod == 3) {
pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "main";
}
pp->locallab.spots.at(pp->locallab.selspot).sensiexclu = r->sensiexclu;
@ -1127,6 +1135,108 @@ void Locallab::denChanged(const std::vector<locallabDenoiseLC> &denlc, int selsp
expblur.updatedenlc(highres, nres, highres46, nres46, Lhighres, Lnres, Lhighres46, Lnres46);
}
}
// New fonctions to change Scope color
void Locallab::scopeChangedcol(int scope, int selspot, bool enab)
{
if(enab) {
expcolor.updateguiscopecolor(scope);
}
}
// New fonctions to change Scope Shadows Highlight
void Locallab::scopeChangedsh(int scope, int selspot, bool enab)
{
if(enab) {
expshadhigh.updateguiscopesahd(scope);
}
}
// New fonctions to change Scope Vibrance
void Locallab::scopeChangedvib(int scope, int selspot, bool enab)
{
if(enab) {
expvibrance.updateguiscopevib(scope);
}
}
//reinit expsettings
void Locallab::scopeChangedset(int scope, int selspot, bool enab)
{
if(enab) {
expsettings->updateguiscopeset(30);//30 defaut value..perhaps possible to pass default value ??
}
}
//main new fonction global to hide show and activated or not some functions - inverse, scope...
void Locallab::mainChanged(int spottype, int selspot, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool iscie )
{
if(iscolor) {
expcolor.updateguicolor(spottype);
}
if(issh) {
expshadhigh.updateguishad(spottype);
}
if(isvib) {
expvibrance.updateguivib(spottype);
}
if(isexpos) {
expexpose.updateguiexpos(spottype);
}
if(issoft) {
expsoft.updateguisoft(spottype);
}
if(isblur) {
expblur.updateguiblur(spottype);
}
if(istom) {
exptonemap.updateguitone(spottype);
}
if(isret) {
expreti.updateguireti(spottype);
}
if(issharp) {
expsharp.updateguisharp(spottype);
}
if(iscont) {
expcontrast.updateguicont(spottype);
}
if(iscbdl) {
expcbdl.updateguicbdl(spottype);
}
if(islog) {
explog.updateguilog(spottype);
}
if(ismas) {
expmask.updateguimask(spottype);
}
if(iscie) {
expcie.updateguicie(spottype);
}
expsettings->updateguiset(spottype, iscolor, issh, isvib, isexpos, issoft, isblur, istom, isret, issharp, iscont, iscbdl, islog, ismas, iscie);
}
void Locallab::sigChanged(const std::vector<locallabcieSIG> &ciesig, int selspot)

View File

@ -151,7 +151,15 @@ public:
// Locallab Retinex tool min/man management function
void minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int selspot) override;
// new functions for global - normal use
void mainChanged(int spottype, int selspot, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool iscie)override;
void scopeChangedcol(int scope, int selspot, bool enab)override;
void scopeChangedsh(int scope, int selspot, bool enab)override;
void scopeChangedvib(int scope, int selspot, bool enab)override;
void scopeChangedset(int scope, int selspot, bool enab)override;
//Locallab denoise
// Locallab Retinex tool min/man management function
void denChanged(const std::vector<locallabDenoiseLC> &denlc, int selspot) override;

View File

@ -367,6 +367,8 @@ void LocallabTool::enableListener()
}
}
bool LocallabTool::on_remove_change(GdkEventButton* event)
{
if (event->button == GDK_BUTTON_PRIMARY) {
@ -445,7 +447,9 @@ LocallabColor::LocallabColor():
labgrid(Gtk::manage(new LabGrid(EvLocallabLabGridValue, M("TP_LOCALLAB_LABGRID_VALUES"), true, false))),
gridMethod(Gtk::manage(new MyComboBoxText())),
strengthgrid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRGRID"), 0, 100, 1, 30))),
sensi(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))),
sensi(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 30))),
previewcol(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
structcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL1"), 0, 100, 1, 0))),
blurcolde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))),
softradiuscol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))),
@ -526,6 +530,8 @@ LocallabColor::LocallabColor():
LLmaskcolshapewav(static_cast<FlatCurveEditor*>(mask2CurveEditorGwav->addCurve(CT_Flat, "L(L)", nullptr, false, false))),
csThresholdcol(Gtk::manage(new ThresholdAdjuster(M("TP_LOCALLAB_CSTHRESHOLDBLUR"), 0, 9, 0, 0, 6, 5, 0, false)))
{
auto m = ProcEventMapper::getInstance();
Evlocallabpreviewcol = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_PREVIEWCOL");
set_orientation(Gtk::ORIENTATION_VERTICAL);
@ -596,6 +602,11 @@ LocallabColor::LocallabColor():
setExpandAlignProperties(expcurvcol, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
previewcol->set_active(false);
previewcolConn = previewcol->signal_clicked().connect(
sigc::mem_fun(
*this, &LocallabColor::previewcolChanged));
qualitycurveMethod->append(M("TP_LOCALLAB_CURVNONE"));
qualitycurveMethod->append(M("TP_LOCALLAB_CURVCURR"));
qualitycurveMethod->set_active(0);
@ -813,6 +824,9 @@ LocallabColor::LocallabColor():
// Add Color & Light specific widgets to GUI
pack_start(*reparcol);
pack_start(*sensi);
pack_start(*previewcol);
pack_start(*invers);
ToolParamBlock* const lumBox = Gtk::manage(new ToolParamBlock());
lumBox->pack_start(*lightness);
@ -833,7 +847,7 @@ LocallabColor::LocallabColor():
superBox->pack_start(*gridFrame);
superFrame->add(*superBox);
pack_start(*superFrame);
// pack_start(*sensi);
// pack_start(*sensi);
pack_start(*structcol);
pack_start(*blurcolde);
pack_start(*softradiuscol);
@ -949,6 +963,22 @@ LocallabColor::~LocallabColor()
delete mask2CurveEditorGwav;
}
void LocallabColor::previewcolChanged()
{
if(previewcol->get_active()) {
showmaskcolMethod->set_active(5);
} else {
showmaskcolMethod->set_active(0);
}
if (isLocActivated) {
if (listener) {
listener->panelChanged(Evlocallabpreviewcol,"");
}
}
}
void LocallabColor::setListener(ToolPanelListener* tpl)
{
LocallabTool::setListener(tpl);
@ -957,6 +987,64 @@ void LocallabColor::setListener(ToolPanelListener* tpl)
labgridmerg->setListener(tpl);
}
//new function Global
void LocallabColor::updateguicolor(int spottype)
{
{
// Disable all listeners
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
invers->hide();
sensi->hide();
showmaskcolMethod->set_active(0);
previewcol->hide();
previewcol->set_active(false);
resetMaskView();
} else {
invers->show();
sensi->show();
if(!invers->get_active()) {
previewcol->show();
} else {
previewcol->hide();
}
}
enableListener();
return false;
}
);
}
}
//new function scope
void LocallabColor::updateguiscopecolor(int scope)
{
{
idle_register.add(
[this, scope]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
disableListener();
sensi->setValue(scope);
enableListener();
return false;
}
);
}
}
bool LocallabColor::isMaskViewActive()
{
return ((showmaskcolMethod->get_active_row_number() != 0) || (showmaskcolMethodinv->get_active_row_number() != 0));
@ -1550,7 +1638,7 @@ void LocallabColor::setDefaults(const rtengine::procparams::ProcParams* defParam
void LocallabColor::adjusterChanged(Adjuster* a, double newval)
{
if (isLocActivated && exp->getEnabled()) {
if (a == lightness) {
if (a == lightness) {
if (listener) {
listener->panelChanged(Evlocallablightness,
lightness->getTextValue() + " (" + escapeHtmlChars(getSpotName()) + ")");
@ -1595,7 +1683,7 @@ void LocallabColor::adjusterChanged(Adjuster* a, double newval)
if (a == sensi) {
if (listener) {
listener->panelChanged(Evlocallabsensi,
sensi->getTextValue() + " (" + escapeHtmlChars(getSpotName()) + ")");
sensi->getTextValue() + " (" + escapeHtmlChars(getSpotName()) + ")");
}
}
@ -2574,6 +2662,8 @@ LocallabExposure::LocallabExposure():
fatanchor(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 0.1, 100.0, 0.01, 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))),
gamex(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMC"), 0.5, 3.0, 0.05, 1.))),
sensiex(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))),
previewexe(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
structexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))),
blurexpde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))),
exptoolexp(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_EXPTOOL")))),
@ -2625,6 +2715,8 @@ LocallabExposure::LocallabExposure():
set_orientation(Gtk::ORIENTATION_VERTICAL);
const LocallabParams::LocallabSpot defSpot;
auto m = ProcEventMapper::getInstance();
Evlocallabpreviewexe = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_PREVIEWEXE");
// Parameter Exposure specific widgets
expMethod->append(M("TP_LOCALLAB_STD"));
@ -2706,6 +2798,12 @@ LocallabExposure::LocallabExposure():
lowthrese->setAdjusterListener(this);
higthrese->setAdjusterListener(this);
decaye->setAdjusterListener(this);
previewexe->set_active(false);
previewexeConn = previewexe->signal_clicked().connect(
sigc::mem_fun(
*this, &LocallabExposure::previewexeChanged));
setExpandAlignProperties(exprecove, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
normConn = norm->signal_toggled().connect(sigc::mem_fun(*this, &LocallabExposure::normChanged));
fatsaturConn = fatsatur->signal_toggled().connect(sigc::mem_fun(*this, &LocallabExposure::fatsaturChanged));
@ -2781,6 +2879,7 @@ LocallabExposure::LocallabExposure():
// Add Color & Light specific widgets to GUI
pack_start(*sensiex);
pack_start(*previewexe);
pack_start(*reparexp);
pack_start(*inversex);
ToolParamBlock* const pdeBox = Gtk::manage(new ToolParamBlock());
@ -2873,6 +2972,60 @@ bool LocallabExposure::isMaskViewActive()
return ((showmaskexpMethod->get_active_row_number() != 0) || (showmaskexpMethodinv->get_active_row_number() != 0));
}
//new function Global
void LocallabExposure::updateguiexpos(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
inversex->hide();
sensiex->hide();
previewexe->hide();
showmaskexpMethod->set_active(0);
previewexe->set_active(false);
resetMaskView();
} else {
inversex->show();
sensiex->show();
if(!inversex->get_active()) {
previewexe->show();
} else {
previewexe->hide();
}
}
enableListener();
return false;
}
);
}
}
void LocallabExposure::previewexeChanged()
{
if(previewexe->get_active()) {
showmaskexpMethod->set_active(5);
} else {
showmaskexpMethod->set_active(0);
}
if (isLocActivated) {
if (listener) {
listener->panelChanged(Evlocallabpreviewexe,"");
}
}
}
void LocallabExposure::resetMaskView()
{
showmaskexpMethodConn.block(true);
@ -3616,6 +3769,7 @@ void LocallabExposure::convertParamToSimple()
softradiusexp->setValue(defSpot.softradiusexp);
enaExpMask->set_active(defSpot.enaExpMask);
enaExpMaskaft->set_active(defSpot.enaExpMaskaft);
showmaskexpMethod->set_active(0);
gamex->setValue(defSpot.gamex);
// CCmaskexpshape->setCurve(defSpot.CCmaskexpcurve);
// LLmaskexpshape->setCurve(defSpot.CCmaskexpcurve);
@ -4040,7 +4194,8 @@ LocallabShadow::LocallabShadow():
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))),//unused here, but used for normalize_mean_dt
sensihs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 30))),//reused - unused here, but used for normalize_mean_dt
previewsh(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
blurSHde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))),
exprecovs(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))),
maskusables(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))),
@ -4078,6 +4233,9 @@ LocallabShadow::LocallabShadow():
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"))))),
EvlocallabTePivot(ProcEventMapper::getInstance()->newEvent(AUTOEXP, "HISTORY_MSG_LOCALLAB_TE_PIVOT"))
{
auto m = ProcEventMapper::getInstance();
Evlocallabpreviewsh = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_PREVIEWSH");
set_orientation(Gtk::ORIENTATION_VERTICAL);
const LocallabParams::LocallabSpot defSpot;
@ -4134,6 +4292,11 @@ LocallabShadow::LocallabShadow():
setExpandAlignProperties(expmasksh, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
previewsh->set_active(false);
previewshConn = previewsh->signal_clicked().connect(
sigc::mem_fun(
*this, &LocallabShadow::previewshChanged));
showmaskSHMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
showmaskSHMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
showmaskSHMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
@ -4196,6 +4359,9 @@ LocallabShadow::LocallabShadow():
// Add Shadow highlight specific widgets to GUI
pack_start(*reparsh);
pack_start(*sensihs);// reused / unused here, but used for normalize_mean_dt
pack_start(*previewsh);
pack_start(*inverssh);
pack_start(*shMethod);
@ -4210,7 +4376,7 @@ LocallabShadow::LocallabShadow():
pack_start(*shadows);
pack_start(*s_tonalwidth);
pack_start(*sh_radius);
// pack_start(*sensihs);//unused here, but used for normalize_mean_dt
// pack_start(*sensihs);// reused / unused here, but used for normalize_mean_dt
pack_start(*blurSHde);
ToolParamBlock* const shBox3 = Gtk::manage(new ToolParamBlock());
shBox3->pack_start(*maskusables, Gtk::PACK_SHRINK, 0);
@ -4278,6 +4444,80 @@ void LocallabShadow::resetMaskView()
showmaskSHMethodConninv.block(false);
}
void LocallabShadow::previewshChanged()
{
if(previewsh->get_active()) {
showmaskSHMethod->set_active(4);
} else {
showmaskSHMethod->set_active(0);
}
if (isLocActivated) {
if (listener) {
listener->panelChanged(Evlocallabpreviewsh,"");
}
}
}
//new function Global
void LocallabShadow::updateguishad(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
inverssh->hide();
sensihs->hide();
showmaskSHMethod->set_active(0);
previewsh->hide();
previewsh->set_active(false);
resetMaskView();
} else {
sensihs->show();
inverssh->show();
if(!inverssh->get_active()) {
previewsh->show();
} else {
previewsh->hide();
}
}
enableListener();
return false;
}
);
}
}
void LocallabShadow::updateguiscopesahd(int scope)
{
{
idle_register.add(
[this, scope]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
disableListener();
sensihs->setValue(scope);
enableListener();
return false;
}
);
}
}
void LocallabShadow::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask)
{
shMask = showmaskSHMethod->get_active_row_number();
@ -5154,7 +5394,8 @@ LocallabVibrance::LocallabVibrance():
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")))),
sensiv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))),//unused here, but used for normalize_mean_dt
sensiv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 30))),//reused - unused here, but used for normalize_mean_dt
previewvib(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
curveEditorGG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL"))),
skinTonesCurve(static_cast<DiagonalCurveEditor*>(curveEditorGG->addCurve(CT_Diagonal, M("TP_VIBRANCE_CURVEEDITOR_SKINTONES")))),
exprecovv(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))),
@ -5186,6 +5427,9 @@ LocallabVibrance::LocallabVibrance():
mask2vibCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))),
Lmaskvibshape(static_cast<DiagonalCurveEditor*>(mask2vibCurveEditorG->addCurve(CT_Diagonal, "L(L)")))
{
auto m = ProcEventMapper::getInstance();
Evlocallabpreviewvib = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_PREVIEWVIB");
set_orientation(Gtk::ORIENTATION_VERTICAL);
float R, G, B;
@ -5250,6 +5494,11 @@ LocallabVibrance::LocallabVibrance():
angvib->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP"));
angvib->setAdjusterListener(this);
previewvib->set_active(false);
previewvibConn = previewvib->signal_clicked().connect(
sigc::mem_fun(
*this, &LocallabVibrance::previewvibChanged));
setExpandAlignProperties(expmaskvib, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
showmaskvibMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
@ -5301,6 +5550,8 @@ LocallabVibrance::LocallabVibrance():
mask2vibCurveEditorG->curveListComplete();
// Add Vibrance specific widgets to GUI
pack_start(*sensiv, Gtk::PACK_SHRINK, 0);//reused - nused here, but used for normalize_mean_dt
pack_start(*previewvib, Gtk::PACK_SHRINK, 0);
pack_start(*saturated, Gtk::PACK_SHRINK, 0);
pack_start(*pastels, Gtk::PACK_SHRINK, 0);
pack_start(*vibgam, Gtk::PACK_SHRINK, 0);
@ -5311,7 +5562,7 @@ LocallabVibrance::LocallabVibrance():
pack_start(*protectSkins, Gtk::PACK_SHRINK, 0);
pack_start(*avoidColorShift, Gtk::PACK_SHRINK, 0);
pack_start(*pastSatTog, Gtk::PACK_SHRINK, 0);
// pack_start(*sensiv, Gtk::PACK_SHRINK, 0);//unused here, but used for normalize_mean_dt
// pack_start(*sensiv, Gtk::PACK_SHRINK, 0);//reused - nused here, but used for normalize_mean_dt
pack_start(*curveEditorGG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
ToolParamBlock* const vibBox3 = Gtk::manage(new ToolParamBlock());
vibBox3->pack_start(*maskusablev, Gtk::PACK_SHRINK, 0);
@ -5365,6 +5616,71 @@ void LocallabVibrance::resetMaskView()
showmaskvibMethodConn.block(false);
}
//new function Global
void LocallabVibrance::updateguivib(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensiv->hide();
showmaskvibMethod->set_active(0);
previewvib->hide();
previewvib->set_active(false);
resetMaskView();
} else {
sensiv->show();
previewvib->show();
}
enableListener();
return false;
}
);
}
}
void LocallabVibrance::previewvibChanged()
{
if(previewvib->get_active()) {
showmaskvibMethod->set_active(4);
} else {
showmaskvibMethod->set_active(0);
}
if (isLocActivated) {
if (listener) {
listener->panelChanged(Evlocallabpreviewvib,"");
}
}
}
//new function scope
void LocallabVibrance::updateguiscopevib(int scope)
{
{
idle_register.add(
[this, scope]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
disableListener();
sensiv->setValue(scope);
enableListener();
return false;
}
);
}
}
void LocallabVibrance::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask)
{
vibMask = showmaskvibMethod->get_active_row_number();
@ -6188,6 +6504,32 @@ void LocallabSoft::resetMaskView()
showmasksoftMethodConn.block(false);
}
//new function Global
void LocallabSoft::updateguisoft(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensisf->hide();
} else {
sensisf->show();
}
enableListener();
return false;
}
);
}
}
void LocallabSoft::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask)
{
softMask = showmasksoftMethod->get_active_row_number();
@ -7063,6 +7405,39 @@ void LocallabBlur::resetMaskView()
showmaskblMethodConn.block(false);
}
//new function Global
void LocallabBlur::updateguiblur(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensibn->hide();
sensiden->hide();
invbl->hide();
} else {
sensibn->show();
sensiden->show();
invbl->show();
}
enableListener();
return false;
}
);
}
}
void LocallabBlur::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask)
{
blMask = showmaskblMethod->get_active_row_number();

View File

@ -64,6 +64,15 @@ protected:
rtengine::ProcEvent Evlocallabhighmaskcie;
rtengine::ProcEvent Evlocallabshadmaskcie;
rtengine::ProcEvent Evlocallabsigmoidsenscie;
rtengine::ProcEvent Evlocallabpreviewcol;
rtengine::ProcEvent Evlocallabpreviewexe;
rtengine::ProcEvent Evlocallabpreviewsh;
rtengine::ProcEvent Evlocallabpreviewvib;
rtengine::ProcEvent Evlocallabpreviewtm;
rtengine::ProcEvent Evlocallabpreviewlc;
rtengine::ProcEvent Evlocallabpreviewlog;
rtengine::ProcEvent Evlocallabpreviewcie;
rtengine::ProcEvent Evlocallabpreviewmas;
rtengine::ProcEvent EvlocallabLLmaskcieshapewav;
rtengine::ProcEvent EvlocallabcsThresholdcie;
rtengine::ProcEvent Evlocallabcomprcie;
@ -231,6 +240,8 @@ private:
MyComboBoxText* const gridMethod;
Adjuster* const strengthgrid;
Adjuster* const sensi;
Gtk::ToggleButton* const previewcol;
Adjuster* const structcol;
Adjuster* const blurcolde;
Adjuster* const softradiuscol;
@ -309,14 +320,13 @@ private:
FlatCurveEditor* const LLmaskcolshapewav;
ThresholdAdjuster* const csThresholdcol;
sigc::connection curvactivConn, gridMethodConn, inversConn, qualitycurveMethodConn, toneMethodConn, specialConn, merMethodConn, mergecolMethodConn, showmaskcolMethodConn, showmaskcolMethodConninv, enaColorMaskConn, toolcolConn, fftColorMaskConn;
sigc::connection curvactivConn, previewcolConn, gridMethodConn, inversConn, qualitycurveMethodConn, toneMethodConn, specialConn, merMethodConn, mergecolMethodConn, showmaskcolMethodConn, showmaskcolMethodConninv, enaColorMaskConn, toolcolConn, fftColorMaskConn;
public:
LocallabColor();
~LocallabColor();
void setListener(ToolPanelListener* tpl) override;
bool isMaskViewActive() override;
void resetMaskView() override;
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
@ -337,6 +347,9 @@ public:
void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight) override {}; // Not used
void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR) override;
void curveChanged(CurveEditor* ce) override;
void updateguicolor(int spottype);
void updateguiscopecolor(int scope);
void previewcolChanged();
private:
void enabledChanged() override;
@ -345,7 +358,6 @@ private:
void updateGUIToMode(const modeType new_type) override;
void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer, const double normHuerjz) override;
void curvactivChanged();
void gridMethodChanged();
void inversChanged();
@ -359,7 +371,6 @@ private:
void enaColorMaskChanged();
void toolcolChanged();
void fftColorMaskChanged();
void updateColorGUI1();
void updateColorGUI2();
void updateColorGUI3();
@ -392,6 +403,8 @@ private:
Adjuster* const fatanchor;
Adjuster* const gamex;
Adjuster* const sensiex;
Gtk::ToggleButton* const previewexe;
Adjuster* const structexp;
Adjuster* const blurexpde;
MyExpander* const exptoolexp;
@ -439,7 +452,7 @@ private:
DiagonalCurveEditor* const Lmaskexpshape;
rtengine::ProcEvent Evlocallabtmosatur;
sigc::connection expMethodConn, exnoiseMethodConn, inversexConn, normConn, fatsaturConn, showmaskexpMethodConn, showmaskexpMethodConninv, enaExpMaskConn, enaExpMaskaftConn;
sigc::connection expMethodConn, exnoiseMethodConn, previewexeConn, inversexConn, normConn, fatsaturConn, showmaskexpMethodConn, showmaskexpMethodConninv, enaExpMaskConn, enaExpMaskaftConn;
public:
LocallabExposure();
@ -459,6 +472,8 @@ public:
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void adjusterChanged(Adjuster* a, double newval) override;
void curveChanged(CurveEditor* ce) override;
void updateguiexpos(int spottype);
void previewexeChanged();
private:
void enabledChanged() override;
@ -502,6 +517,8 @@ private:
Adjuster* const s_tonalwidth;
Adjuster* const sh_radius;
Adjuster* const sensihs;
Gtk::ToggleButton* const previewsh;
Adjuster* const blurSHde;
MyExpander* const exprecovs;
Gtk::Label* const maskusables;
@ -539,7 +556,7 @@ private:
rtengine::ProcEvent EvlocallabTePivot;
sigc::connection shMethodConn, inversshConn, showmaskSHMethodConn, showmaskSHMethodConninv, enaSHMaskConn;
sigc::connection shMethodConn, previewshConn, inversshConn, showmaskSHMethodConn, showmaskSHMethodConninv, enaSHMaskConn;
public:
LocallabShadow();
@ -550,7 +567,9 @@ public:
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateAdviceTooltips(const bool showTooltips) override;
void updateguishad(int spottype);
void updateguiscopesahd(int scope);
void setDefaultExpanderVisibility() override;
void disableListener() override;
void enableListener() override;
@ -559,6 +578,7 @@ public:
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void adjusterChanged(Adjuster* a, double newval) override;
void curveChanged(CurveEditor* ce) override;
void previewshChanged();
private:
void enabledChanged() override;
@ -596,6 +616,8 @@ private:
Gtk::CheckButton* const avoidColorShift;
Gtk::CheckButton* const pastSatTog;
Adjuster* const sensiv;
Gtk::ToggleButton* const previewvib;
CurveEditorGroup* const curveEditorGG;
DiagonalCurveEditor* const skinTonesCurve;
MyExpander* const exprecovv;
@ -626,7 +648,7 @@ private:
CurveEditorGroup* const mask2vibCurveEditorG;
DiagonalCurveEditor* const Lmaskvibshape;
sigc::connection pskinsConn, ashiftConn, pastsattogConn, showmaskvibMethodConn, enavibMaskConn;
sigc::connection pskinsConn, previewvibConn, ashiftConn, pastsattogConn, showmaskvibMethodConn, enavibMaskConn;
public:
LocallabVibrance();
@ -637,6 +659,8 @@ public:
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateAdviceTooltips(const bool showTooltips) override;
void updateguivib(int spottype);
void updateguiscopevib(int scope);
void setDefaultExpanderVisibility() override;
void disableListener() override;
@ -653,6 +677,7 @@ public:
void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR) override {}; // Not used
std::vector<double> getCurvePoints(ThresholdSelector* tAdjuster) const override;
void curveChanged(CurveEditor* ce) override;
void previewvibChanged();
private:
void enabledChanged() override;
@ -695,6 +720,7 @@ public:
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateAdviceTooltips(const bool showTooltips) override;
void updateguisoft(int spottype);
void disableListener() override;
void enableListener() override;
@ -748,6 +774,7 @@ private:
Adjuster* const lowthres;
Adjuster* const higthres;
Adjuster* const sensibn;
MyComboBoxText* const blurMethod;
Gtk::CheckButton* const invbl;
MyComboBoxText* const chroMethod;
@ -810,6 +837,7 @@ private:
Adjuster* const nlgam;
Adjuster* const bilateral;
Adjuster* const sensiden;
Adjuster* const reparden;
Gtk::Button* neutral;
MyExpander* const expmaskbl;
@ -846,13 +874,13 @@ public:
~LocallabBlur();
void updatedenlc(const double highres, const double nres, const double highres46, const double nres46, const double Lhighres, const double Lnres, const double Lhighres46, const double Lnres46);
bool isMaskViewActive() override;
void resetMaskView() override;
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateAdviceTooltips(const bool showTooltips) override;
void neutral_pressed();
void updateguiblur(int spottype);
void setDefaultExpanderVisibility() override;
void disableListener() override;
@ -914,6 +942,8 @@ private:
Adjuster* const rewei;
Adjuster* const softradiustm;
Adjuster* const sensitm;
Gtk::ToggleButton* const previewtm;
MyExpander* const exprecovt;
Gtk::Label* const maskusablet;
Gtk::Label* const maskunusablet;
@ -938,7 +968,7 @@ private:
CurveEditorGroup* const mask2tmCurveEditorG;
DiagonalCurveEditor* const Lmasktmshape;
sigc::connection equiltmConn, showmasktmMethodConn, enatmMaskConn, enatmMaskaftConn;
sigc::connection equiltmConn, previewtmConn, showmasktmMethodConn, enatmMaskConn, enatmMaskaftConn;
public:
LocallabTone();
@ -949,7 +979,8 @@ public:
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateAdviceTooltips(const bool showTooltips) override;
void updateguitone(int spottype);
void previewtmChanged();
void setDefaultExpanderVisibility() override;
void disableListener() override;
void enableListener() override;
@ -1045,6 +1076,7 @@ public:
~LocallabRetinex();
void updateMinMax(const double cdma, const double cdmin, const double mini, const double maxi, const double Tmean, const double Tsigma, const double Tmin, const double Tmax);
void updateguireti(int spottype);
bool isMaskViewActive() override;
void resetMaskView() override;
@ -1111,6 +1143,7 @@ public:
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateAdviceTooltips(const bool showTooltips) override;
void updateguisharp(int spottype);
void disableListener() override;
void enableListener() override;
@ -1159,6 +1192,8 @@ private:
Adjuster* const residgam;
Adjuster* const residslop;
Adjuster* const sensilc;
Gtk::ToggleButton* const previewlc;
Adjuster* const reparw;
Gtk::Frame* const clariFrame;
Adjuster* const clarilres;
@ -1234,7 +1269,7 @@ private:
CurveEditorGroup* const mask2lcCurveEditorG;
DiagonalCurveEditor* const Lmasklcshape;
sigc::connection localcontMethodConn, origlcConn, wavgradlConn, wavedgConn, localedgMethodConn, waveshowConn, localneiMethodConn, wavblurConn, blurlcConn, wavcontConn, wavcompreConn, wavcompConn, fftwlcConn, showmasklcMethodConn, enalcMaskConn;
sigc::connection localcontMethodConn, previewlcConn, origlcConn, wavgradlConn, wavedgConn, localedgMethodConn, waveshowConn, localneiMethodConn, wavblurConn, blurlcConn, wavcontConn, wavcompreConn, wavcompConn, fftwlcConn, showmasklcMethodConn, enalcMaskConn;
public:
LocallabContrast();
@ -1245,7 +1280,7 @@ public:
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateAdviceTooltips(const bool showTooltips) override;
void updateguicont(int spottype);
void setDefaultExpanderVisibility() override;
void disableListener() override;
void enableListener() override;
@ -1260,6 +1295,7 @@ public:
void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight) override {}; // Not used
void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR) override;
void curveChanged(CurveEditor* ce) override;
void previewlcChanged();
private:
void enabledChanged() override;
@ -1344,6 +1380,7 @@ public:
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateAdviceTooltips(const bool showTooltips) override;
void updateguicbdl(int spottype);
void setDefaultExpanderVisibility() override;
void disableListener() override;
@ -1422,6 +1459,8 @@ private:
Adjuster* const decayl;
Adjuster* const sensilog;
Gtk::ToggleButton* const previewlog;
Gtk::Frame* const gradlogFrame;
Adjuster* const strlog;
Adjuster* const anglog;
@ -1440,7 +1479,7 @@ private:
sigc::connection autoconn, ciecamconn, fullimageConn, AutograyConn;
sigc::connection surroundconn, sursourconn;
sigc::connection showmaskLMethodConn, enaLMaskConn;
sigc::connection showmaskLMethodConn, enaLMaskConn, previewlogConn;
public:
LocallabLog();
~LocallabLog();
@ -1448,6 +1487,8 @@ public:
bool isMaskViewActive() override;
void resetMaskView() override;
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateguilog(int spottype);
void previewlogChanged();
void updateAdviceTooltips(const bool showTooltips) override;
void surroundChanged();
@ -1492,6 +1533,8 @@ class LocallabMask:
{
private:
Adjuster* const sensimask;
Gtk::ToggleButton* const previewmas;
Adjuster* const blendmask;
Adjuster* const blendmaskab;
Adjuster* const softradiusmask;
@ -1526,7 +1569,7 @@ private:
Adjuster* const str_mask;
Adjuster* const ang_mask;
sigc::connection showmask_MethodConn, enamaskConn, toolmaskConn, fftmaskConn;
sigc::connection showmask_MethodConn, previewmasConn, enamaskConn, toolmaskConn, fftmaskConn;
public:
LocallabMask();
@ -1537,6 +1580,8 @@ public:
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateAdviceTooltips(const bool showTooltips) override;
void updateguimask(int spottype);
void previewmasChanged();
void disableListener() override;
void enableListener() override;
@ -1579,6 +1624,8 @@ class Locallabcie:
{
private:
Adjuster* const sensicie;
Gtk::ToggleButton* const previewcie;
Adjuster* const reparcie;
Gtk::CheckButton* const jabcie;
MyComboBoxText* const modecam;
@ -1802,7 +1849,7 @@ private:
ThresholdAdjuster* const csThresholdcie;
int nextcomprciecount = 0;
sigc::connection AutograycieConn, primMethodconn, illMethodconn, catMethodconn, forcejzConn, forcebwConn, qtojConn, showmaskcieMethodConn, enacieMaskConn, jabcieConn, sursourcieconn, surroundcieconn, modecieconn, modecamconn, comprcieautoconn, normcieconn, logcieconn, logjzconn, sigjzconn, sigqconn, chjzcieconn, toneMethodcieConn, toneMethodcieConn2, toolcieConn, bwevMethodConn, fftcieMaskConn, gamutcieconn, expprecamconn, sigcieconn;
sigc::connection AutograycieConn, primMethodconn, previewcieConn, illMethodconn, catMethodconn, forcejzConn, forcebwConn, qtojConn, showmaskcieMethodConn, enacieMaskConn, jabcieConn, sursourcieconn, surroundcieconn, modecieconn, modecamconn, comprcieautoconn, normcieconn, logcieconn, logjzconn, sigjzconn, sigqconn, chjzcieconn, toneMethodcieConn, toneMethodcieConn2, toolcieConn, bwevMethodConn, fftcieMaskConn, gamutcieconn, expprecamconn, sigcieconn;
public:
Locallabcie();
~Locallabcie();
@ -1815,7 +1862,8 @@ public:
void updateAdviceTooltips(const bool showTooltips) override;
void setDefaultExpanderVisibility() override;
void updateguicie(int spottype);
void previewcieChanged();
void disableListener() override;
void enableListener() override;
void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) override;

View File

@ -132,6 +132,7 @@ LocallabTone::LocallabTone():
rewei(Gtk::manage(new Adjuster(M("TP_LOCALLAB_REWEI"), 0, 3, 1, 0))),
softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))),//unused here, but used for normalize_mean_dt
sensitm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))),
previewtm(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
exprecovt(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI2_EXP")))),
maskusablet(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUSABLE")))),
maskunusablet(Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MASKUNUSABLE")))),
@ -157,6 +158,9 @@ LocallabTone::LocallabTone():
mask2tmCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))),
Lmasktmshape(static_cast<DiagonalCurveEditor*>(mask2tmCurveEditorG->addCurve(CT_Diagonal, "L(L)")))
{
auto m = ProcEventMapper::getInstance();
Evlocallabpreviewtm = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_PREVIEWTM");
set_orientation(Gtk::ORIENTATION_VERTICAL);
const LocallabParams::LocallabSpot defSpot;
@ -191,6 +195,11 @@ LocallabTone::LocallabTone():
decayt->setAdjusterListener(this);
setExpandAlignProperties(exprecovt, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
previewtm->set_active(false);
previewtmConn = previewtm->signal_clicked().connect(
sigc::mem_fun(
*this, &LocallabTone::previewtmChanged));
setExpandAlignProperties(expmasktm, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
showmasktmMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
@ -246,6 +255,7 @@ LocallabTone::LocallabTone():
// Add Tone Mapping specific widgets to GUI
// pack_start(*amount); // To use if we change transit_shapedetect parameters
pack_start(*sensitm);
pack_start(*previewtm);
pack_start(*repartm);
pack_start(*separatortm);
pack_start(*stren);
@ -395,6 +405,58 @@ void LocallabTone::enableListener()
enatmMaskaftConn.block(false);
}
//new function Global
void LocallabTone::updateguitone(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensitm->hide();
// showmasktmMethodConn.block(true);
showmasktmMethod->set_active(0);
// showmasktmMethodConn.block(false);
previewtm->hide();
// previewtmConn.block(true);
previewtm->set_active(false);
// previewtmConn.block(false);
resetMaskView();
} else {
sensitm->show();
previewtm->show();
}
enableListener();
return false;
}
);
}
}
void LocallabTone::previewtmChanged()
{
// showmasktmMethodConn.block(true);
if(previewtm->get_active()) {
showmasktmMethod->set_active(4);
} else {
showmasktmMethod->set_active(0);
}
// showmasktmMethodConn.block(false);
if (isLocActivated) {
if (listener) {
listener->panelChanged(Evlocallabpreviewtm,"");
}
}
}
void LocallabTone::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
{
// Disable all listeners
@ -945,7 +1007,7 @@ LocallabRetinex::LocallabRetinex():
showmaskretiMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
showmaskretiMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
showmaskretiMethod->append(M("TP_LOCALLAB_SHOWMASK"));
showmaskretiMethod->append(M("TP_LOCALLAB_SHOWREF"));
// showmaskretiMethod->append(M("TP_LOCALLAB_SHOWREF"));
showmaskretiMethod->set_active(0);
showmaskretiMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP"));
showmaskretiMethodConn = showmaskretiMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabRetinex::showmaskretiMethodChanged));
@ -1103,6 +1165,32 @@ void LocallabRetinex::updateMinMax(const double cdma, const double cdmin, const
);
}
//new function Global
void LocallabRetinex::updateguireti(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensih->hide();
} else {
sensih->show();
}
enableListener();
return false;
}
);
}
}
bool LocallabRetinex::isMaskViewActive()
{
return (showmaskretiMethod->get_active_row_number() != 0);
@ -2109,6 +2197,33 @@ void LocallabSharp::enableListener()
showmasksharMethodConn.block(false);
}
//new function Global
void LocallabSharp::updateguisharp(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensisha->hide();
inverssha->hide();
} else {
sensisha->show();
inverssha->show();
}
enableListener();
return false;
}
);
}
}
void LocallabSharp::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
{
// Disable all listeners
@ -2397,6 +2512,7 @@ LocallabContrast::LocallabContrast():
residgam(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMSH"), 0.25, 15.0, 0.01, 2.4))),
residslop(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOSH"), 0.0, 500.0, 0.01, 12.92))),
sensilc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))),
previewlc(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
reparw(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))),
clariFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CLARIFRA")))),
clarilres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARILRES"), -20., 100., 0.5, 0.))),
@ -2474,6 +2590,9 @@ LocallabContrast::LocallabContrast():
mask2lcCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))),
Lmasklcshape(static_cast<DiagonalCurveEditor*>(mask2lcCurveEditorG->addCurve(CT_Diagonal, "L(L)")))
{
auto m = ProcEventMapper::getInstance();
Evlocallabpreviewlc = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_PREVIEWLC");
set_orientation(Gtk::ORIENTATION_VERTICAL);
const LocallabParams::LocallabSpot defSpot;
@ -2720,6 +2839,11 @@ LocallabContrast::LocallabContrast():
setExpandAlignProperties(expmasklc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
previewlc->set_active(false);
previewlcConn = previewlc->signal_clicked().connect(
sigc::mem_fun(
*this, &LocallabContrast::previewlcChanged));
showmasklcMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
showmasklcMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
showmasklcMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
@ -2764,6 +2888,7 @@ LocallabContrast::LocallabContrast():
// Add Local contrast specific widgets to GUI
pack_start(*sensilc);
pack_start(*previewlc);
pack_start(*reparw);
pack_start(*localcontMethod);
pack_start(*lcradius);
@ -2957,6 +3082,52 @@ void LocallabContrast::getMaskView(int &colorMask, int &colorMaskinv, int &expMa
lcMask = showmasklcMethod->get_active_row_number();
}
//new function Global
void LocallabContrast::updateguicont(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensilc->hide();
showmasklcMethod->set_active(0);
previewlc->hide();
previewlc->set_active(false);
resetMaskView();
} else {
sensilc->show();
previewlc->show();
}
enableListener();
return false;
}
);
}
}
void LocallabContrast::previewlcChanged()
{
if(previewlc->get_active()) {
showmasklcMethod->set_active(4);
} else {
showmasklcMethod->set_active(0);
}
if (isLocActivated) {
if (listener) {
listener->panelChanged(Evlocallabpreviewlc,"");
}
}
}
void LocallabContrast::updateAdviceTooltips(const bool showTooltips)
{
if (showTooltips) {
@ -4532,7 +4703,7 @@ lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACON
showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMASK"));
showmaskcbMethod->append(M("TP_LOCALLAB_SHOWREF"));
// showmaskcbMethod->append(M("TP_LOCALLAB_SHOWREF"));
showmaskcbMethod->set_active(0);
showmaskcbMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP"));
showmaskcbMethodConn = showmaskcbMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabCBDL::showmaskcbMethodChanged));
@ -4662,6 +4833,32 @@ void LocallabCBDL::getMaskView(int &colorMask, int &colorMaskinv, int &expMask,
cbMask = showmaskcbMethod->get_active_row_number();
}
//new function Global
void LocallabCBDL::updateguicbdl(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensicb->hide();
} else {
sensicb->show();
}
enableListener();
return false;
}
);
}
}
void LocallabCBDL::updateAdviceTooltips(const bool showTooltips)
{
if (showTooltips) {
@ -5291,6 +5488,7 @@ LocallabLog::LocallabLog():
decayl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKDDECAY"), 0.5, 4., 0.1, 2.))),
sensilog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))),
previewlog(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
gradlogFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADLOGFRA")))),
strlog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -2.0, 2.0, 0.05, 0.))),
anglog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))),
@ -5313,6 +5511,8 @@ LocallabLog::LocallabLog():
auto m = ProcEventMapper::getInstance();
Evlocallabwhiteslog = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_LOG_WHITES");
Evlocallabblackslog = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_LOG_BLACKS");
Evlocallabpreviewlog = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_PREVIEWLOG");
Evlocallabcomprlog = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_LOG_COMPR");
set_orientation(Gtk::ORIENTATION_VERTICAL);
@ -5420,6 +5620,11 @@ LocallabLog::LocallabLog():
setExpandAlignProperties(expmaskL, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
previewlog->set_active(false);
previewlogConn = previewlog->signal_clicked().connect(
sigc::mem_fun(
*this, &LocallabLog::previewlogChanged));
showmaskLMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
showmaskLMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
showmaskLMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
@ -5463,6 +5668,8 @@ LocallabLog::LocallabLog():
// Add Log encoding specific widgets to GUI
pack_start(*sensilog);
pack_start(*previewlog);
pack_start(*repar);
pack_start(*ciecam);
logPFrame->set_label_align(0.025, 0.5);
@ -5566,6 +5773,54 @@ void LocallabLog::setDefaultExpanderVisibility()
}
//new function Global
void LocallabLog::updateguilog(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensilog->hide();
showmaskLMethod->set_active(0);
previewlog->hide();
previewlog->set_active(false);
resetMaskView();
} else {
sensilog->show();
previewlog->show();
}
enableListener();
return false;
}
);
}
}
void LocallabLog::previewlogChanged()
{
if(previewlog->get_active()) {
showmaskLMethod->set_active(4);
} else {
showmaskLMethod->set_active(0);
}
if (isLocActivated) {
if (listener) {
listener->panelChanged(Evlocallabpreviewlog,"");
}
}
}
void LocallabLog::updateAdviceTooltips(const bool showTooltips)
{
if (showTooltips) {
@ -5951,6 +6206,7 @@ void LocallabLog::updateGUIToMode(const modeType new_type)
maskusablel->hide();
maskunusablel->hide();
decayl->hide();
break;
case Normal:
@ -6044,6 +6300,7 @@ void LocallabLog::convertParamToSimple()
strlog->setValue(defSpot.strlog);
anglog->setValue(defSpot.anglog);
enaLMask->set_active(false);
showmaskLMethod->set_active(0);
recothresl->setValue(defSpot.recothresl);
lowthresl->setValue(defSpot.lowthresl);
higthresl->setValue(defSpot.higthresl);
@ -6642,6 +6899,7 @@ LocallabMask::LocallabMask():
// Common mask specific widgets
sensimask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))),
previewmas(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
blendmask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKMASK"), -100., 100., 0.1, -10.))),
blendmaskab(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKMASKAB"), -100., 100., 0.1, -10.))),
softradiusmask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 1.))),
@ -6678,6 +6936,9 @@ LocallabMask::LocallabMask():
ang_mask(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180., 180., 0.1, 0.)))
{
auto m = ProcEventMapper::getInstance();
Evlocallabpreviewmas = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_PREVIEWMAS");
set_orientation(Gtk::ORIENTATION_VERTICAL);
const LocallabParams::LocallabSpot defSpot;
@ -6693,6 +6954,11 @@ LocallabMask::LocallabMask():
softradiusmask->setAdjusterListener(this);
previewmas->set_active(false);
previewmasConn = previewmas->signal_clicked().connect(
sigc::mem_fun(
*this, &LocallabMask::previewmasChanged));
showmask_Method->append(M("TP_LOCALLAB_SHOWMNONE"));
showmask_Method->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
showmask_Method->append(M("TP_LOCALLAB_SHOWMASK"));
@ -6784,6 +7050,7 @@ LocallabMask::LocallabMask():
// Add Common mask specific widgets to GUI
pack_start(*sensimask);
pack_start(*previewmas);
pack_start(*blendmask);
pack_start(*blendmaskab);
pack_start(*softradiusmask);
@ -6846,6 +7113,54 @@ void LocallabMask::getMaskView(int &colorMask, int &colorMaskinv, int &expMask,
maskMask = showmask_Method->get_active_row_number();
}
//new function Global
void LocallabMask::updateguimask(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensimask->hide();
showmask_Method->set_active(0);
previewmas->hide();
previewmas->set_active(false);
resetMaskView();
} else {
sensimask->show();
previewmas->show();
}
enableListener();
return false;
}
);
}
}
void LocallabMask::previewmasChanged()
{
if(previewmas->get_active()) {
showmask_Method->set_active(3);
} else {
showmask_Method->set_active(0);
}
if (isLocActivated) {
if (listener) {
listener->panelChanged(Evlocallabpreviewmas,"");
}
}
}
void LocallabMask::updateAdviceTooltips(const bool showTooltips)
{
if (showTooltips) {
@ -7316,6 +7631,7 @@ void LocallabMask::convertParamToSimple()
// Set hidden specific GUI widgets in Simple mode to default spot values
gammask->setValue(defSpot.gammask);
slopmask->setValue(defSpot.slopmask);
//Lmask_shape->setCurve(defSpot.Lmask_curve);
// Enable all listeners
@ -7476,6 +7792,8 @@ Locallabcie::Locallabcie():
LocallabTool(this, M("TP_LOCALLAB_CIE_TOOLNAME"), M("TP_LOCALLAB_CIE"), false),
// ciecam specific widgets
sensicie(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 60))),
previewcie(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_PREVIEW")))),
reparcie(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))),
jabcie(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_JAB")))),
modecam(Gtk::manage(new MyComboBoxText())),
@ -7698,6 +8016,7 @@ Locallabcie::Locallabcie():
auto m = ProcEventMapper::getInstance();
Evlocallabnormcie = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_CIE_NORM");
Evlocallabstrumaskcie = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_CIEMASK_STRU");
Evlocallabpreviewcie = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_PREVIEWCIE");
EvLocallabtoolcie = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_CIEMASK_STRU_TOOL");
EvLocallabfftcieMask = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_CIEMASK_BLURFFT");
Evlocallabcontcie = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_CIEMASK_BLURCONT");
@ -7746,6 +8065,7 @@ Locallabcie::Locallabcie():
pack_start(*sensicie);
pack_start(*previewcie);
pack_start(*reparcie);
modeHBoxcam->set_spacing(2);
//modeHBoxcam->set_tooltip_markup (M ("TP_LOCALLAB_CAMMODE_TOOLTIP"));
@ -8465,6 +8785,11 @@ Locallabcie::Locallabcie():
setExpandAlignProperties(expmaskcie, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
previewcie->set_active(false);
previewcieConn = previewcie->signal_clicked().connect(
sigc::mem_fun(
*this, &Locallabcie::previewcieChanged));
showmaskcieMethod->append(M("TP_LOCALLAB_SHOWMNONE"));
showmaskcieMethod->append(M("TP_LOCALLAB_SHOWMODIF"));
showmaskcieMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK"));
@ -8633,6 +8958,52 @@ void Locallabcie::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, i
cieMask = showmaskcieMethod->get_active_row_number();
}
//new function Global
void Locallabcie::updateguicie(int spottype)
{
{
idle_register.add(
[this, spottype]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main
disableListener();
if(spottype == 3) {
sensicie->hide();
showmaskcieMethod->set_active(0);
previewcie->hide();
previewcie->set_active(false);
resetMaskView();
} else {
sensicie->show();
previewcie->show();
}
enableListener();
return false;
}
);
}
}
void Locallabcie::previewcieChanged()
{
if(previewcie->get_active()) {
showmaskcieMethod->set_active(4);
} else {
showmaskcieMethod->set_active(0);
}
if (isLocActivated) {
if (listener) {
listener->panelChanged(Evlocallabpreviewcie,"");
}
}
}
void Locallabcie::setDefaultExpanderVisibility()
{
expLcie->set_expanded(false);

View File

@ -466,6 +466,8 @@ void Options::setDefaults()
histogramTraceBrightness = 1;
curvebboxpos = 1;
complexity = 2;
spotmet = 3;
inspectorWindow = false;
zoomOnScroll = true;
prevdemo = PD_Sidecar;
@ -1723,6 +1725,10 @@ void Options::readFromFile(Glib::ustring fname)
complexity = keyFile.get_integer("GUI", "Complexity");
}
if (keyFile.has_key("GUI", "Spotmet")) {
spotmet = keyFile.get_integer("GUI", "Spotmet");
}
if (keyFile.has_key("GUI", "InspectorWindow")) {
inspectorWindow = keyFile.get_boolean("GUI", "InspectorWindow");
}
@ -2585,6 +2591,7 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_integer("GUI", "CurveBBoxPosition", curvebboxpos);
keyFile.set_boolean("GUI", "Showtooltip", showtooltip);
keyFile.set_integer("GUI", "Complexity", complexity);
keyFile.set_integer("GUI", "Spotmet", spotmet);
keyFile.set_boolean("GUI", "InspectorWindow", inspectorWindow);
keyFile.set_boolean("GUI", "ZoomOnScroll", zoomOnScroll);

View File

@ -327,6 +327,8 @@ public:
bool internalThumbIfUntouched;
bool overwriteOutputFile;
int complexity;
int spotmet;
bool inspectorWindow; // open inspector in separate window
bool zoomOnScroll; // translate scroll events to zoom

View File

@ -7949,9 +7949,9 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
gamm(v),
fatamount(v),
fatdetail(v),
fatsatur(v),
fatanchor(v),
fatlevel(v),
fatsatur(v),
recothrese(v),
lowthrese(v),
higthrese(v),

View File

@ -1080,6 +1080,9 @@ Gtk::Widget* Preferences::getGeneralPanel()
workflowGrid->attach_next_to(*curveBBoxPosL, *flayoutlab, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*curveBBoxPosC, *editorLayout, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*curveBBoxPosRestartL, *lNextStart, Gtk::POS_BOTTOM, 1, 1);
curveBBoxPosS = Gtk::manage(new Gtk::ComboBoxText());
setExpandAlignProperties(curveBBoxPosS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
Gtk::Label* complexityL = Gtk::manage(new Gtk::Label(M("PREFERENCES_COMPLEXITYLOC") + ":"));
setExpandAlignProperties(complexityL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
@ -1092,13 +1095,29 @@ Gtk::Widget* Preferences::getGeneralPanel()
workflowGrid->attach_next_to(*complexityL, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*complexitylocal, *curveBBoxPosC, Gtk::POS_BOTTOM, 1, 1);
Gtk::Label* spotlocalL = Gtk::manage(new Gtk::Label(M("PREFERENCES_SPOTLOC") + ":"));
setExpandAlignProperties(spotlocalL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
spotlocal = Gtk::manage(new Gtk::ComboBoxText());
setExpandAlignProperties(spotlocal, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
spotlocal->append(M("TP_LOCALLAB_EXNORM"));
spotlocal->append(M("TP_LOCALLAB_EXECLU"));
spotlocal->append(M("TP_LOCALLAB_EXFULL"));
spotlocal->append(M("TP_LOCALLAB_EXMAIN"));
spotlocal->set_active(2);
workflowGrid->attach_next_to(*spotlocalL, *complexityL, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*spotlocal, *complexitylocal, Gtk::POS_BOTTOM, 1, 1);
zoomOnScrollCB = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_ZOOMONSCROLL")));
setExpandAlignProperties(zoomOnScrollCB, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*zoomOnScrollCB, *complexityL, Gtk::POS_BOTTOM, 1, 1);
//workflowGrid->attach_next_to(*zoomOnScrollCB, *complexityL, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*zoomOnScrollCB, *spotlocalL, Gtk::POS_BOTTOM, 1, 1);
inspectorWindowCB = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_INSPECTORWINDOW")));
setExpandAlignProperties(inspectorWindowCB, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*inspectorWindowCB, *complexitylocal, Gtk::POS_BOTTOM, 1, 1);
// workflowGrid->attach_next_to(*inspectorWindowCB, *complexitylocal, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*inspectorWindowCB, *spotlocal, Gtk::POS_BOTTOM, 1, 1);
Gtk::Label* inspectorNextStartL = Gtk::manage(new Gtk::Label(Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")"));
setExpandAlignProperties(inspectorNextStartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*inspectorNextStartL, *inspectorWindowCB, Gtk::POS_RIGHT, 1, 1);
@ -1962,6 +1981,8 @@ void Preferences::storePreferences()
moptions.curvebboxpos = curveBBoxPosC->get_active_row_number();
moptions.complexity = complexitylocal->get_active_row_number();
moptions.spotmet = spotlocal->get_active_row_number();
moptions.inspectorWindow = inspectorWindowCB->get_active();
moptions.zoomOnScroll = zoomOnScrollCB->get_active();
moptions.histogramPosition = ckbHistogramPositionLeft->get_active() ? 1 : 2;
@ -2178,6 +2199,7 @@ void Preferences::fillPreferences()
curveBBoxPosC->set_active(moptions.curvebboxpos);
complexitylocal->set_active(moptions.complexity);
spotlocal->set_active(moptions.spotmet);
inspectorWindowCB->set_active(moptions.inspectorWindow);
zoomOnScrollCB->set_active(moptions.zoomOnScroll);

View File

@ -171,8 +171,10 @@ class Preferences final :
Gtk::ComboBoxText* cprevdemo;
Gtk::CheckButton* ctiffserialize;
Gtk::ComboBoxText* curveBBoxPosC;
Gtk::ComboBoxText* curveBBoxPosS;
Gtk::ComboBoxText* complexitylocal;
Gtk::ComboBoxText* spotlocal;
Gtk::CheckButton* inspectorWindowCB;
Gtk::CheckButton* zoomOnScrollCB;