Change GUI merge file from settings to Color and light

This commit is contained in:
Desmis 2019-11-10 13:53:12 +01:00
parent e79bb87c91
commit 7f7137c5ab
12 changed files with 795 additions and 580 deletions

View File

@ -1034,13 +1034,13 @@ HISTORY_MSG_793;Local - SH TRC gamma
HISTORY_MSG_794;Local - SH TRC slope
HISTORY_MSG_795;Local - Mask save restore image
HISTORY_MSG_796;Local - Recursive references
HISTORY_MSG_797;Local - Merge and Masks method
HISTORY_MSG_798;Local - Merge Original method
HISTORY_MSG_799;Local - Opacity
HISTORY_MSG_800;Local - Color RGB ToneCurve
HISTORY_MSG_801;Local - Color ToneCurve Method
HISTORY_MSG_802;Local - Color ToneCurve Special
HISTORY_MSG_803;Local - Contrast threshold
HISTORY_MSG_797;Local - Merge Original method
HISTORY_MSG_798;Local - Opacity
HISTORY_MSG_799;Local - Color RGB ToneCurve
HISTORY_MSG_800;Local - Color ToneCurve Method
HISTORY_MSG_801;Local - Color ToneCurve Special
HISTORY_MSG_802;Local - Contrast threshold
HISTORY_MSG_803;Local - Color Merge
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@ -2157,6 +2157,10 @@ TP_LOCALLAB_SAVREST;Save - Restore Current Image
TP_LOCALLAB_SCOPEMASK;Scope Mask DeltaE Image
TP_LOCALLAB_SCOPEMASK_TOOLTIP;Enabled if Mask DeltaE Image is enabled.\nLow values avoid retouching selected area
TP_LOCALLAB_MASFRAME;Mask and Merge
TP_LOCALLAB_MRONE;None
TP_LOCALLAB_MRTWO;Short Curves 'L' Mask
TP_LOCALLAB_MRTHR;Original Image
TP_LOCALLAB_MRFOU;Previous Spot
TP_LOCALLAB_MERGETYPE;Merge image and mask
TP_LOCALLAB_MERGETYPE_TOOLTIP;None, use all mask in LCH mode.\nShort curves 'L' mask, use a short circuit for mask 2, 3, 4, 6, 7.\nOriginal mask 7, blend current image with original
TP_LOCALLAB_MERGENONE;None
@ -2165,7 +2169,7 @@ TP_LOCALLAB_MERGETWO;Original(Mask 7)
TP_LOCALLAB_MERGETHR;Original(Mask 7) + Mask LCH
TP_LOCALLAB_MERGEFOU;Previous Spot(Mask 7)
TP_LOCALLAB_MERGEFIV;Previous Spot(Mask 7) + Mask LCH
TP_LOCALLAB_MERGE1COLFRA;Merge with Original
TP_LOCALLAB_MERGE1COLFRA;Merge with Original or Previous
TP_LOCALLAB_OPACOL;Opacity
TP_LOCALLAB_CONTTHR;Contrast Threshold
TP_LOCALLAB_MERGEOPA_TOOLTIP;Opacity merge % current Spot with original or previous Spot.\nContrast threshold : adjust result in function of Original contrast
@ -2380,7 +2384,8 @@ TP_LOCALLAB_SHOWT;3 - Mask and modifications
TP_LOCALLAB_SHOWS;4+* - Mask and modifications
TP_LOCALLAB_SHOWR;5 - Mask and modifications
TP_LOCALLAB_SHOWE;6+ - Mask and modifications
TP_LOCALLAB_SHOWC;7+* - Mask and modifications - Merge
TP_LOCALLAB_SHOWC;7+* - Mask and modifications
TP_LOCALLAB_SHOWC1;Merge file
TP_LOCALLAB_SHOWPLUS;1+* - Mask and modifications - Smooth-Blur & Denoise
TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display modifications.\nBeware, you can only view one modification (color and light or Exposure or Shadows-Highlight or TM or CBDL or Retinex MSR or Blur).\n\nUse Mask is before algorihtm shape detection
TP_LOCALLAB_SHOWMNONE;None

View File

@ -588,18 +588,14 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.excmet = 1;
}
if (locallab.spots.at(sp).mergeMethod == "none") {
if (locallab.spots.at(sp).merMethod == "mone") {
lp.mergemet = 0;
} else if (locallab.spots.at(sp).mergeMethod == "short") {
} else if (locallab.spots.at(sp).merMethod == "mtwo") {
lp.mergemet = 1;
} else if (locallab.spots.at(sp).mergeMethod == "orig") {
} else if (locallab.spots.at(sp).merMethod == "mthr") {
lp.mergemet = 2;
} else if (locallab.spots.at(sp).mergeMethod == "origmas") {
} else if (locallab.spots.at(sp).merMethod == "mfou") {
lp.mergemet = 3;
} else if (locallab.spots.at(sp).mergeMethod == "lastspot") {
lp.mergemet = 4;
} else if (locallab.spots.at(sp).mergeMethod == "lastspotmas") {
lp.mergemet = 5;
}
if (locallab.spots.at(sp).mergecolMethod == "one") {
@ -5297,27 +5293,29 @@ const int fftw_size[] = {18144, 18000, 17920, 17836, 17820, 17640, 17600, 17550,
int N_fftwsize = sizeof(fftw_size) / sizeof(fftw_size[0]);
static void softlig(float &a, float &b)
static void softlig(float &a, float &b, float minc, float maxc)
{
if (b <= 0.5f) {
a = (2.f * a * b) + a * a * (1.f - 2.f * b);
float alpha = 0.5f * (maxc - minc);
if (b <= alpha) {
a = (2.f * a * b) + a * a * (maxc - 2.f * b);
} else {
a = 2.f * a * (1.f - b) + sqrt(a) * (2.f * b - 1.f);
a = 2.f * a * (maxc - b) + sqrt(LIM(a, 0.f, 2.f)) * (2.f * b - maxc);
}
}
static void overlay(float &a, float &b)
static void overlay(float &a, float &b, float minc, float maxc)
{
if (b <= 0.5f) {
float alpha = 0.5f * (maxc - minc);
if (b <= alpha) {
a = (2.f * a * b);
} else {
a = 1.f - 2.f * (1.f - a) * (1.f - b);
a = maxc - 2.f * (1.f - a) * (maxc - b);
}
}
static void screen(float &a, float &b)
static void screen(float &a, float &b, float maxc)
{
a = 1.f - (1.f - a) * (1.f - b);
a = 1.f - (1.f - a) * (maxc - b);
}
static void exclusion(float &a, float &b)
@ -8411,7 +8409,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool lmasutilicolwav = false;
float amountcd = 0.f;
float anchorcd = 50.f;
int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc;
int shortcu = 0; //lp.mergemet; //params->locallab.spots.at(sp).shortc;
maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, loctemp.get(), bufmaskorigcb.get(), originalmaskcb.get(), original, inv, lp,
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, multiThread,
@ -8702,7 +8700,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float blendm = lp.blendmatm;
float lap = params->locallab.spots.at(sp).lapmasktm;
float pde = params->locallab.spots.at(sp).laplac;
int shortcu = lp.mergemet;// params->locallab.spots.at(sp).shortc;
int shortcu = 0; //lp.mergemet;// params->locallab.spots.at(sp).shortc;
int lumask = params->locallab.spots.at(sp).lumask;
if (!params->locallab.spots.at(sp).enatmMaskaft) {
@ -8749,7 +8747,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool lmasutilicolwav = false;
bool delt = params->locallab.spots.at(sp).deltae;
int sco = params->locallab.spots.at(sp).scopemask;
int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc;
int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc;
int lumask = params->locallab.spots.at(sp).lumask;
const int limscope = 80;
@ -8951,7 +8949,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool lmasutilicolwav = false;
bool delt = params->locallab.spots.at(sp).deltae;
int sco = params->locallab.spots.at(sp).scopemask;
int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc;
int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc;
const int limscope = 80;
const float mindE = 2.f + MINSCOPE * sco * lp.thr;
@ -9101,7 +9099,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
// bool delt = params->locallab.spots.at(sp).deltae;
bool delt = false;
int sco = params->locallab.spots.at(sp).scopemask;
int shortcu = lp.mergemet;
int shortcu = 0;//lp.mergemet;
params->locallab.spots.at(sp).shortc;
const int limscope = 80;//
@ -11176,7 +11174,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool delt = params->locallab.spots.at(sp).deltae;
int sco = params->locallab.spots.at(sp).scopemask;
int shado = 0;
int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc;
int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc;
const int limscope = 80;
const float mindE = 2.f + MINSCOPE * sco * lp.thr;
@ -11466,7 +11464,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool delt = false;
int sco = params->locallab.spots.at(sp).scopemask;
int shado = 0;
int shortcu = lp.mergemet; //params->locallab.spots.at(sp).shortc;
int shortcu = 0;//lp.mergemet; //params->locallab.spots.at(sp).shortc;
int lumask = params->locallab.spots.at(sp).lumask;
const int limscope = 80;
@ -11511,7 +11509,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float b_base = lp.lowB / scaling;
bool ctoning = (a_scale != 0.f || b_scale != 0.f || a_base != 0.f || b_base != 0.f);
if (!lp.inv && (lp.chro != 0 || lp.ligh != 0.f || lp.cont != 0 || ctoning || lp.mergemet >= 2 || lp.qualcurvemet != 0 || lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4 || lp.showmaskcolmet == 5) && lp.colorena) { // || lllocalcurve)) { //interior ellipse renforced lightness and chroma //locallutili
if (!lp.inv && (lp.chro != 0 || lp.ligh != 0.f || lp.cont != 0 || ctoning || lp.mergemet > 0 || lp.qualcurvemet != 0 || lp.showmaskcolmet == 2 || lp.enaColorMask || lp.showmaskcolmet == 3 || lp.showmaskcolmet == 4 || lp.showmaskcolmet == 5) && lp.colorena) { // || lllocalcurve)) { //interior ellipse renforced lightness and chroma //locallutili
/*
//test for fftw blur with tiles fftw_tile_blur....not good we can see tiles - very long time
int GW = original->W;
@ -11769,7 +11767,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float amountcd = 0.f;
float anchorcd = 50.f;
if (lp.mergemet != 2) {
// if (lp.mergemet != 2) {
maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskcol.get(), original, inv, lp,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmasklocalcurve, localmaskutili, loclmasCurvecolwav, lmasutilicolwav,
@ -11783,7 +11781,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
return;
}
}
// }
if (lp.showmaskcolmet == 4) {
return;
@ -12075,7 +12073,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int x = 0; x < bfw; x++) {
lumreserv[y][x] = reserved->L[y + ystart][x + xstart];
if (lp.mergemet == 2 || lp.mergemet == 3) {
if (lp.mergemet == 2) {
bufcolreserv->L[y][x] = reserved->L[y + ystart][x + xstart];
bufcolreserv->a[y][x] = reserved->a[y + ystart][x + xstart];
bufcolreserv->b[y][x] = reserved->b[y + ystart][x + xstart];
@ -12125,6 +12123,47 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
lab2rgb(*bufcolreserv, *tmpImagereserv, params->icm.workingProfile);
tmpImagereserv->normalizeFloatTo1();
float minR = tmpImagereserv->r(0, 0);
float maxR = minR;
#ifdef _OPENMP
#pragma omp parallel for reduction(max:maxR) reduction(min:minR) schedule(dynamic,16)
#endif
for (int ir = 0; ir < bfh; ir++) {
for (int jr = 0; jr < bfw; jr++) {
minR = rtengine::min(minR, tmpImagereserv->r(ir, jr));
maxR = rtengine::max(maxR, tmpImagereserv->r(ir, jr));
}
}
float minG = tmpImagereserv->g(0, 0);
float maxG = minG;
#ifdef _OPENMP
#pragma omp parallel for reduction(max:maxG) reduction(min:minG) schedule(dynamic,16)
#endif
for (int ir = 0; ir < bfh; ir++) {
for (int jr = 0; jr < bfw; jr++) {
minG = rtengine::min(minG, tmpImagereserv->g(ir, jr));
maxG = rtengine::max(maxG, tmpImagereserv->g(ir, jr));
}
}
float minB = tmpImagereserv->b(0, 0);
float maxB = minB;
#ifdef _OPENMP
#pragma omp parallel for reduction(max:maxB) reduction(min:minB) schedule(dynamic,16)
#endif
for (int ir = 0; ir < bfh; ir++) {
for (int jr = 0; jr < bfw; jr++) {
minB = rtengine::min(minB, tmpImagereserv->b(ir, jr));
maxB = rtengine::max(maxB, tmpImagereserv->b(ir, jr));
}
}
//various combinaison substrct, multiply, difference, etc
if (lp.mergecolMethod == 1) { //substract
#ifdef _OPENMP
@ -12133,9 +12172,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int y = 0; y < bfh ; y++) {//LIM(x 0 2) 2 arbitral value but limit...
for (int x = 0; x < bfw; x++) {
tmpImageorig->r(y, x) = lp.opacol * LIM((tmpImageorig->r(y, x) - tmpImagereserv->r(y, x)), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
tmpImageorig->g(y, x) = lp.opacol * LIM((tmpImageorig->g(y, x) - tmpImagereserv->g(y, x)), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
tmpImageorig->b(y, x) = lp.opacol * LIM((tmpImageorig->b(y, x) - tmpImagereserv->b(y, x)), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
tmpImageorig->r(y, x) = lp.opacol * ((tmpImageorig->r(y, x) - tmpImagereserv->r(y, x))) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
tmpImageorig->g(y, x) = lp.opacol * ((tmpImageorig->g(y, x) - tmpImagereserv->g(y, x))) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
tmpImageorig->b(y, x) = lp.opacol * ((tmpImageorig->b(y, x) - tmpImagereserv->b(y, x))) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
}
}
} else if (lp.mergecolMethod == 2) { //difference
@ -12169,9 +12208,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int y = 0; y < bfh ; y++) {
for (int x = 0; x < bfw; x++) {
tmpImageorig->r(y, x) = lp.opacol * LIM(tmpImageorig->r(y, x) + tmpImagereserv->r(y, x), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
tmpImageorig->g(y, x) = lp.opacol * LIM(tmpImageorig->g(y, x) + tmpImagereserv->g(y, x), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
tmpImageorig->b(y, x) = lp.opacol * LIM(tmpImageorig->b(y, x) + tmpImagereserv->b(y, x), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
tmpImageorig->r(y, x) = lp.opacol * (tmpImageorig->r(y, x) + tmpImagereserv->r(y, x)) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
tmpImageorig->g(y, x) = lp.opacol * (tmpImageorig->g(y, x) + tmpImagereserv->g(y, x)) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
tmpImageorig->b(y, x) = lp.opacol * (tmpImageorig->b(y, x) + tmpImagereserv->b(y, x)) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
}
}
} else if (lp.mergecolMethod == 5) { //divide
@ -12181,9 +12220,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int y = 0; y < bfh ; y++) {
for (int x = 0; x < bfw; x++) {
tmpImageorig->r(y, x) = lp.opacol * LIM(tmpImageorig->r(y, x) / (tmpImagereserv->r(y, x) + 0.00001f), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
tmpImageorig->g(y, x) = lp.opacol * LIM(tmpImageorig->g(y, x) / (tmpImagereserv->g(y, x) + 0.00001f), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
tmpImageorig->b(y, x) = lp.opacol * LIM(tmpImageorig->b(y, x) / (tmpImagereserv->b(y, x) + 0.00001f), 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
tmpImageorig->r(y, x) = lp.opacol * (tmpImageorig->r(y, x) / (tmpImagereserv->r(y, x) + 0.00001f)) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
tmpImageorig->g(y, x) = lp.opacol * (tmpImageorig->g(y, x) / (tmpImagereserv->g(y, x) + 0.00001f)) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
tmpImageorig->b(y, x) = lp.opacol * (tmpImageorig->b(y, x) / (tmpImagereserv->b(y, x) + 0.00001f)) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
}
}
} else if (lp.mergecolMethod == 6) { //soft light softlig (float &a, float &b)
@ -12195,16 +12234,16 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int x = 0; x < bfw; x++) {
float a = tmpImageorig->r(y, x);
float b = tmpImagereserv->r(y, x);
softlig(a, b);
tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
softlig(a, b, minR, maxR);
tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x);
a = tmpImageorig->g(y, x);
b = tmpImagereserv->g(y, x);
softlig(a, b);
tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
softlig(a, b, minG, maxG);
tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x);
a = tmpImageorig->b(y, x);
b = tmpImagereserv->b(y, x);
softlig(a, b);
tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
softlig(a, b, minB, maxB);
tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x);
}
}
} else if (lp.mergecolMethod == 7) { //hard light overlay (float &b, float &a)
@ -12216,16 +12255,16 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int x = 0; x < bfw; x++) {
float a = tmpImageorig->r(y, x);
float b = tmpImagereserv->r(y, x);
overlay(b, a);
tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
overlay(b, a, minR, maxR);
tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x);
a = tmpImageorig->g(y, x);
b = tmpImagereserv->g(y, x);
overlay(b, a);
tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
overlay(b, a, minG, maxG);
tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x);
a = tmpImageorig->b(y, x);
b = tmpImagereserv->b(y, x);
overlay(b, a);
tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
overlay(b, a, minB, maxB);
tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x);
}
}
} else if (lp.mergecolMethod == 8) { //overlay overlay(float &a, float &b)
@ -12237,16 +12276,16 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int x = 0; x < bfw; x++) {
float a = tmpImageorig->r(y, x);
float b = tmpImagereserv->r(y, x);
overlay(a, b);
tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
overlay(a, b, minR, maxR);
tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x);
a = tmpImageorig->g(y, x);
b = tmpImagereserv->g(y, x);
overlay(a, b);
tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
overlay(a, b, minG, maxG);
tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x);
a = tmpImageorig->b(y, x);
b = tmpImagereserv->b(y, x);
overlay(a, b);
tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
overlay(a, b, minB, maxB);
tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x);
}
}
} else if (lp.mergecolMethod == 9) { //screen screen (float &a, float &b)
@ -12258,16 +12297,16 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int x = 0; x < bfw; x++) {
float a = tmpImageorig->r(y, x);
float b = tmpImagereserv->r(y, x);
screen(a, b);
tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
screen(a, b, maxR);
tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x);
a = tmpImageorig->g(y, x);
b = tmpImagereserv->g(y, x);
screen(a, b);
tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
screen(a, b, maxG);
tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x);
a = tmpImageorig->b(y, x);
b = tmpImagereserv->b(y, x);
screen(a, b);
tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
screen(a, b, maxB);
tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x);
}
}
} else if (lp.mergecolMethod == 10) { //darken only
@ -12304,15 +12343,15 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float a = tmpImageorig->r(y, x);
float b = tmpImagereserv->r(y, x);
exclusion(a, b);
tmpImageorig->r(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->r(y, x);
tmpImageorig->r(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->r(y, x);
a = tmpImageorig->g(y, x);
b = tmpImagereserv->g(y, x);
exclusion(a, b);
tmpImageorig->g(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->g(y, x);
tmpImageorig->g(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->g(y, x);
a = tmpImageorig->b(y, x);
b = tmpImagereserv->b(y, x);
exclusion(a, b);
tmpImageorig->b(y, x) = lp.opacol * LIM(a, 0.f, 2.f) + (1.f - lp.opacol) * tmpImageorig->b(y, x);
tmpImageorig->b(y, x) = lp.opacol * a + (1.f - lp.opacol) * tmpImageorig->b(y, x);
}
}
}

View File

@ -819,13 +819,14 @@ enum ProcEventCode {
EvlocallabsloSH = 793,
Evlocallabsavrest = 794,
Evlocallabrecurs = 795,
EvLocallabSpotmergeMethod = 796,
EvLocallabmergecolMethod = 797,
Evlocallabopacol = 798,
Evlocallabrgbshape = 799,
EvLocallabtoneMethod = 800,
EvLocallabspecial = 801,
Evlocallabconthrcol = 802,
// EvLocallabSpotmergeMethod = 796,
EvLocallabmergecolMethod = 796,
Evlocallabopacol = 797,
Evlocallabrgbshape = 798,
EvLocallabtoneMethod = 799,
EvLocallabspecial = 800,
Evlocallabconthrcol = 801,
EvLocallabmerMethod = 802,
NUMOFEVENTS
};

View File

@ -2418,7 +2418,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
isvisible(true),
shape("ELI"),
spotMethod("norm"),
mergeMethod("none"),
// mergeMethod("none"),
sensiexclu(12),
structexclu(0),
struc(4.0),
@ -2468,6 +2468,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
lapmaskcol(0.0),
qualitycurveMethod("none"),
gridMethod("one"),
merMethod("mone"),
toneMethod("fou"),
mergecolMethod("one"),
llcurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0},
@ -2734,7 +2735,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& isvisible == other.isvisible
&& shape == other.shape
&& spotMethod == other.spotMethod
&& mergeMethod == other.mergeMethod
// && mergeMethod == other.mergeMethod
&& sensiexclu == other.sensiexclu
&& structexclu == other.structexclu
&& struc == other.struc
@ -2783,6 +2784,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& lapmaskcol == other.lapmaskcol
&& qualitycurveMethod == other.qualitycurveMethod
&& gridMethod == other.gridMethod
&& merMethod == other.merMethod
&& toneMethod == other.toneMethod
&& mergecolMethod == other.mergecolMethod
&& llcurve == other.llcurve
@ -4045,7 +4047,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).isvisible, "Locallab", "Isvisible_" + std::to_string(i), spot.isvisible, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).shape, "Locallab", "Shape_" + std::to_string(i), spot.shape, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).spotMethod, "Locallab", "SpotMethod_" + std::to_string(i), spot.spotMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).mergeMethod, "Locallab", "MergeMethod_" + std::to_string(i), spot.mergeMethod, keyFile);
// saveToKeyfile(!pedited || pedited->locallab.spots.at(i).mergeMethod, "Locallab", "MergeMethod_" + std::to_string(i), spot.mergeMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensiexclu, "Locallab", "SensiExclu_" + std::to_string(i), spot.sensiexclu, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).structexclu, "Locallab", "StructExclu_" + std::to_string(i), spot.structexclu, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).struc, "Locallab", "Struc_" + std::to_string(i), spot.struc, keyFile);
@ -4095,6 +4097,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).lapmaskcol, "Locallab", "Lapmaskcol_" + std::to_string(i), spot.lapmaskcol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).qualitycurveMethod, "Locallab", "QualityCurveMethod_" + std::to_string(i), spot.qualitycurveMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gridMethod, "Locallab", "gridMethod_" + std::to_string(i), spot.gridMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).merMethod, "Locallab", "Merg_Method_" + std::to_string(i), spot.merMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).toneMethod, "Locallab", "ToneMethod_" + std::to_string(i), spot.toneMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).mergecolMethod, "Locallab", "mergecolMethod_" + std::to_string(i), spot.mergecolMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).llcurve, "Locallab", "LLCurve_" + std::to_string(i), spot.llcurve, keyFile);
@ -5464,7 +5467,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Isvisible_" + std::to_string(i), pedited, spot.isvisible, spotEdited.isvisible);
assignFromKeyfile(keyFile, "Locallab", "Shape_" + std::to_string(i), pedited, spot.shape, spotEdited.shape);
assignFromKeyfile(keyFile, "Locallab", "SpotMethod_" + std::to_string(i), pedited, spot.spotMethod, spotEdited.spotMethod);
assignFromKeyfile(keyFile, "Locallab", "MergeMethod_" + std::to_string(i), pedited, spot.mergeMethod, spotEdited.mergeMethod);
// assignFromKeyfile(keyFile, "Locallab", "MergeMethod_" + std::to_string(i), pedited, spot.mergeMethod, spotEdited.mergeMethod);
assignFromKeyfile(keyFile, "Locallab", "ShapeMethod_" + std::to_string(i), pedited, spot.shapeMethod, spotEdited.shapeMethod);
assignFromKeyfile(keyFile, "Locallab", "SensiExclu_" + std::to_string(i), pedited, spot.sensiexclu, spotEdited.sensiexclu);
assignFromKeyfile(keyFile, "Locallab", "StructExclu_" + std::to_string(i), pedited, spot.structexclu, spotEdited.structexclu);
@ -5514,6 +5517,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Lapmaskcol_" + std::to_string(i), pedited, spot.lapmaskcol, spotEdited.lapmaskcol);
assignFromKeyfile(keyFile, "Locallab", "QualityCurveMethod_" + std::to_string(i), pedited, spot.qualitycurveMethod, spotEdited.qualitycurveMethod);
assignFromKeyfile(keyFile, "Locallab", "gridMethod_" + std::to_string(i), pedited, spot.gridMethod, spotEdited.gridMethod);
assignFromKeyfile(keyFile, "Locallab", "Merge_Method_" + std::to_string(i), pedited, spot.merMethod, spotEdited.merMethod);
assignFromKeyfile(keyFile, "Locallab", "ToneMethod_" + std::to_string(i), pedited, spot.toneMethod, spotEdited.toneMethod);
assignFromKeyfile(keyFile, "Locallab", "mergecolMethod_" + std::to_string(i), pedited, spot.mergecolMethod, spotEdited.mergecolMethod);
assignFromKeyfile(keyFile, "Locallab", "LLCurve_" + std::to_string(i), pedited, spot.llcurve, spotEdited.llcurve);

View File

@ -961,7 +961,7 @@ struct LocallabParams {
bool isvisible;
Glib::ustring shape; // ELI, RECT
Glib::ustring spotMethod; // norm, exc
Glib::ustring mergeMethod; // none, short, orig
// Glib::ustring mergeMethod; // none, short, orig
int sensiexclu;
int structexclu;
double struc;
@ -1011,6 +1011,7 @@ struct LocallabParams {
double lapmaskcol;
Glib::ustring qualitycurveMethod;
Glib::ustring gridMethod;
Glib::ustring merMethod;
Glib::ustring toneMethod;
Glib::ustring mergecolMethod;
std::vector<double> llcurve;

View File

@ -823,13 +823,14 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, //EvlocallabsloSH
LUMINANCECURVE, //Evlocallabsavrest
LUMINANCECURVE, //Evlocallabrecurs
LUMINANCECURVE, // EvLocallabSpotmergeMethod
// LUMINANCECURVE, // EvLocallabSpotmergeMethod
LUMINANCECURVE, //EvLocallabmergecolMethod
LUMINANCECURVE, //EvLocallabopacol
LUMINANCECURVE, //Evlocallabrgbshape
LUMINANCECURVE, //EvLocallabtoneMethod
LUMINANCECURVE, // EvLocallabspecial
LUMINANCECURVE //EvLocallabconthrcol
LUMINANCECURVE, //EvLocallabconthrcol
LUMINANCECURVE //EvLocallabmerMethod
};
namespace rtengine

View File

@ -51,11 +51,11 @@ ControlSpotPanel::ControlSpotPanel():
spotMethod_(Gtk::manage(new MyComboBoxText())),
shapeMethod_(Gtk::manage(new MyComboBoxText())),
qualityMethod_(Gtk::manage(new MyComboBoxText())),
mergeMethod_(Gtk::manage(new MyComboBoxText())),
// mergeMethod_(Gtk::manage(new MyComboBoxText())),
sensiexclu_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIEXCLU"), 0, 100, 1, 12))),
structexclu_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))),
struc_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRES"), 1.0, 12.0, 0.1, 4.0))),
locX_(Gtk::manage(new Adjuster(M("TP_LOCAL_WIDTH"), 2, 3000, 1, 150))),
locXL_(Gtk::manage(new Adjuster(M("TP_LOCAL_WIDTH_L"), 2, 3000, 1, 150))),
@ -96,7 +96,7 @@ ControlSpotPanel::ControlSpotPanel():
buttondeleteconn_ = button_delete_->signal_clicked().connect(
sigc::mem_fun(*this, &ControlSpotPanel::on_button_delete));
buttonduplicateconn_ = button_duplicate_->signal_clicked().connect(
sigc::mem_fun(*this, &ControlSpotPanel::on_button_duplicate));
sigc::mem_fun(*this, &ControlSpotPanel::on_button_duplicate));
hbox1_->pack_start(*button_add_);
hbox1_->pack_start(*button_delete_);
hbox1_->pack_start(*button_duplicate_);
@ -107,7 +107,11 @@ ControlSpotPanel::ControlSpotPanel():
sigc::mem_fun(*this, &ControlSpotPanel::on_button_rename));
buttonvisibilityconn_ = button_visibility_->signal_button_release_event().connect(
sigc::mem_fun(*this, &ControlSpotPanel::on_button_visibility));
if(showtooltip) button_visibility_->set_tooltip_markup(M("TP_LOCALLAB_VIS_TOOLTIP"));
if (showtooltip) {
button_visibility_->set_tooltip_markup(M("TP_LOCALLAB_VIS_TOOLTIP"));
}
hbox2_->pack_start(*button_rename_);
hbox2_->pack_start(*button_visibility_);
pack_start(*hbox2_);
@ -122,8 +126,8 @@ ControlSpotPanel::ControlSpotPanel():
// Disable search to prevent hijacking keyboard shortcuts #5265
treeview_->set_enable_search(false);
treeview_->signal_key_press_event().connect(
sigc::mem_fun(
*this, &ControlSpotPanel::blockTreeviewSearch), false);
sigc::mem_fun(
*this, &ControlSpotPanel::blockTreeviewSearch), false);
auto cell = Gtk::manage(new Gtk::CellRendererText());
int cols_count = treeview_->append_column("ID", *cell);
@ -175,7 +179,11 @@ ControlSpotPanel::ControlSpotPanel():
Gtk::HBox* const ctboxspotmethod = Gtk::manage(new Gtk::HBox());
Gtk::Label* const labelspotmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_EXCLUTYPE") + ":"));
ctboxspotmethod->pack_start(*labelspotmethod, Gtk::PACK_SHRINK, 4);
if(showtooltip) ctboxspotmethod->set_tooltip_markup(M("TP_LOCALLAB_EXCLUTYPE_TOOLTIP"));
if (showtooltip) {
ctboxspotmethod->set_tooltip_markup(M("TP_LOCALLAB_EXCLUTYPE_TOOLTIP"));
}
spotMethod_->append(M("TP_LOCALLAB_EXNORM"));
spotMethod_->append(M("TP_LOCALLAB_EXECLU"));
spotMethod_->set_active(0);
@ -186,9 +194,17 @@ ControlSpotPanel::ControlSpotPanel():
pack_start(*ctboxspotmethod);
excluFrame->set_label_align(0.025, 0.5);
if(showtooltip) excluFrame->set_tooltip_text(M("TP_LOCALLAB_EXCLUF_TOOLTIP"));
if (showtooltip) {
excluFrame->set_tooltip_text(M("TP_LOCALLAB_EXCLUF_TOOLTIP"));
}
ToolParamBlock* const excluBox = Gtk::manage(new ToolParamBlock());
if(showtooltip) sensiexclu_->set_tooltip_text(M("TP_LOCALLAB_SENSIEXCLU_TOOLTIP"));
if (showtooltip) {
sensiexclu_->set_tooltip_text(M("TP_LOCALLAB_SENSIEXCLU_TOOLTIP"));
}
sensiexclu_->setAdjusterListener(this);
structexclu_->setAdjusterListener(this);
excluBox->pack_start(*sensiexclu_);
@ -199,7 +215,11 @@ ControlSpotPanel::ControlSpotPanel():
Gtk::HBox* const ctboxshapemethod = Gtk::manage(new Gtk::HBox());
Gtk::Label* const labelshapemethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_STYPE") + ":"));
ctboxshapemethod->pack_start(*labelshapemethod, Gtk::PACK_SHRINK, 4);
if(showtooltip) ctboxshapemethod->set_tooltip_markup(M("TP_LOCALLAB_STYPE_TOOLTIP"));
if (showtooltip) {
ctboxshapemethod->set_tooltip_markup(M("TP_LOCALLAB_STYPE_TOOLTIP"));
}
shapeMethod_->append(M("TP_LOCALLAB_IND"));
shapeMethod_->append(M("TP_LOCALLAB_SYM"));
shapeMethod_->append(M("TP_LOCALLAB_INDSL"));
@ -235,7 +255,11 @@ ControlSpotPanel::ControlSpotPanel():
Gtk::HBox* const ctboxqualitymethod = Gtk::manage(new Gtk::HBox());
Gtk::Label* const labelqualitymethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_QUAL_METHOD") + ":"));
ctboxqualitymethod->pack_start(*labelqualitymethod, Gtk::PACK_SHRINK, 4);
if(showtooltip) ctboxqualitymethod->set_tooltip_markup(M("TP_LOCALLAB_METHOD_TOOLTIP"));
if (showtooltip) {
ctboxqualitymethod->set_tooltip_markup(M("TP_LOCALLAB_METHOD_TOOLTIP"));
}
qualityMethod_->append(M("TP_LOCALLAB_ENH"));
qualityMethod_->append(M("TP_LOCALLAB_ENHDEN"));
qualityMethod_->set_active(1);
@ -247,15 +271,38 @@ ControlSpotPanel::ControlSpotPanel():
Gtk::Frame* const transitFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TRANSIT")));
transitFrame->set_label_align(0.025, 0.5);
if(showtooltip) transitFrame->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP"));
if (showtooltip) {
transitFrame->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP"));
}
ToolParamBlock* const transitBox = Gtk::manage(new ToolParamBlock());
if(showtooltip) transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP"));
if(showtooltip) transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP"));
if(showtooltip) transitgrad_->set_tooltip_text(M("TP_LOCALLAB_TRANSITGRAD_TOOLTIP"));
if(showtooltip) scopemask_->set_tooltip_text(M("TP_LOCALLAB_SCOPEMASK_TOOLTIP"));
if (showtooltip) {
transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP"));
}
if (showtooltip) {
transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP"));
}
if (showtooltip) {
transitgrad_->set_tooltip_text(M("TP_LOCALLAB_TRANSITGRAD_TOOLTIP"));
}
if (showtooltip) {
scopemask_->set_tooltip_text(M("TP_LOCALLAB_SCOPEMASK_TOOLTIP"));
}
// if(showtooltip) lumask_->set_tooltip_text(M("TP_LOCALLAB_LUMASK_TOOLTIP"));
if(showtooltip) shortc_->set_tooltip_text(M("TP_LOCALLAB_SHORTCMASK_TOOLTIP"));
if(showtooltip) savrest_->set_tooltip_text(M("TP_LOCALLAB_SAVREST_TOOLTIP"));
if (showtooltip) {
shortc_->set_tooltip_text(M("TP_LOCALLAB_SHORTCMASK_TOOLTIP"));
}
if (showtooltip) {
savrest_->set_tooltip_text(M("TP_LOCALLAB_SAVREST_TOOLTIP"));
}
transit_->setAdjusterListener(this);
transitweak_->setAdjusterListener(this);
transitgrad_->setAdjusterListener(this);
@ -267,10 +314,14 @@ ControlSpotPanel::ControlSpotPanel():
transitBox->pack_start(*transitgrad_);
transitFrame->add(*transitBox);
pack_start(*transitFrame);
Gtk::Frame* const artifFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_ARTIF")));
artifFrame->set_label_align(0.025, 0.5);
if(showtooltip) artifFrame->set_tooltip_text(M("TP_LOCALLAB_ARTIF_TOOLTIP"));
if (showtooltip) {
artifFrame->set_tooltip_text(M("TP_LOCALLAB_ARTIF_TOOLTIP"));
}
ToolParamBlock* const artifBox = Gtk::manage(new ToolParamBlock());
thresh_->setAdjusterListener(this);
struc_->setAdjusterListener(this);
@ -282,51 +333,58 @@ ControlSpotPanel::ControlSpotPanel():
balan_->setAdjusterListener(this);
artifFrame->add(*artifBox);
pack_start(*artifFrame);
Gtk::HBox* const ctboxmergemethod = Gtk::manage(new Gtk::HBox());
Gtk::Label* const labelmergemethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MERGETYPE") + ":"));
ctboxmergemethod->pack_start(*labelmergemethod, Gtk::PACK_SHRINK, 4);
if(showtooltip) ctboxmergemethod->set_tooltip_markup(M("TP_LOCALLAB_MERGETYPE_TOOLTIP"));
mergeMethod_->append(M("TP_LOCALLAB_MERGENONE"));
mergeMethod_->append(M("TP_LOCALLAB_MERGEONE"));
mergeMethod_->append(M("TP_LOCALLAB_MERGETWO"));
mergeMethod_->append(M("TP_LOCALLAB_MERGETHR"));
mergeMethod_->append(M("TP_LOCALLAB_MERGEFOU"));
mergeMethod_->append(M("TP_LOCALLAB_MERGEFIV"));
mergeMethod_->set_active(0);
mergeMethodconn_ = mergeMethod_->signal_changed().connect(
sigc::mem_fun(
*this, &ControlSpotPanel::mergeMethodChanged));
ctboxmergemethod->pack_start(*mergeMethod_);
/*
Gtk::HBox* const ctboxmergemethod = Gtk::manage(new Gtk::HBox());
Gtk::Label* const labelmergemethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_MERGETYPE") + ":"));
ctboxmergemethod->pack_start(*labelmergemethod, Gtk::PACK_SHRINK, 4);
if(showtooltip) ctboxmergemethod->set_tooltip_markup(M("TP_LOCALLAB_MERGETYPE_TOOLTIP"));
mergeMethod_->append(M("TP_LOCALLAB_MERGENONE"));
mergeMethod_->append(M("TP_LOCALLAB_MERGEONE"));
mergeMethod_->append(M("TP_LOCALLAB_MERGETWO"));
mergeMethod_->append(M("TP_LOCALLAB_MERGETHR"));
mergeMethod_->append(M("TP_LOCALLAB_MERGEFOU"));
mergeMethod_->append(M("TP_LOCALLAB_MERGEFIV"));
mergeMethod_->set_active(0);
mergeMethodconn_ = mergeMethod_->signal_changed().connect(
sigc::mem_fun(
*this, &ControlSpotPanel::mergeMethodChanged));
// ctboxmergemethod->pack_start(*mergeMethod_);
*/
avoidConn_ = avoid_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::avoidChanged));
sigc::mem_fun(*this, &ControlSpotPanel::avoidChanged));
pack_start(*avoid_);
recursConn_ = recurs_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::recursChanged));
sigc::mem_fun(*this, &ControlSpotPanel::recursChanged));
pack_start(*recurs_);
if(showtooltip) recurs_->set_tooltip_text(M("TP_LOCALLAB_RECURS_TOOLTIP"));
if (showtooltip) {
recurs_->set_tooltip_text(M("TP_LOCALLAB_RECURS_TOOLTIP"));
}
Gtk::Frame* const maskFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_MASFRAME")));
maskFrame->set_label_align(0.025, 0.5);
if(showtooltip) maskFrame->set_tooltip_text(M("TP_LOCALLAB_MASFRAME_TOOLTIP"));
if (showtooltip) {
maskFrame->set_tooltip_text(M("TP_LOCALLAB_MASFRAME_TOOLTIP"));
}
ToolParamBlock* const maskBox = Gtk::manage(new ToolParamBlock());
maskBox->pack_start(*laplac_);
laplacConn_ = laplac_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::laplacChanged));
sigc::mem_fun(*this, &ControlSpotPanel::laplacChanged));
deltaeConn_ = deltae_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::deltaeChanged));
sigc::mem_fun(*this, &ControlSpotPanel::deltaeChanged));
shortcConn_ = shortc_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::shortcChanged));
sigc::mem_fun(*this, &ControlSpotPanel::shortcChanged));
savrestConn_ = savrest_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::savrestChanged));
sigc::mem_fun(*this, &ControlSpotPanel::savrestChanged));
maskBox->pack_start(*deltae_);
maskBox->pack_start(*scopemask_);
// maskBox->pack_start(*shortc_);
Gtk::HSeparator *separator = Gtk::manage(new Gtk::HSeparator());
maskBox->pack_start(*separator, Gtk::PACK_SHRINK, 2);
maskBox->pack_start(*ctboxmergemethod);
// maskBox->pack_start(*ctboxmergemethod);
Gtk::HSeparator *separator1 = Gtk::manage(new Gtk::HSeparator());
maskBox->pack_start(*separator1, Gtk::PACK_SHRINK, 2);
@ -349,7 +407,7 @@ ControlSpotPanel::ControlSpotPanel():
colorMouseovertext.set_green(100. / 255.);
colorMouseovertext.set_blue(0.);
colorMouseovertext.set_alpha(0.5);
// Nominal spot (transparent black)
colorNominal.set_red(0.);
colorNominal.set_green(0.);
@ -473,16 +531,18 @@ void ControlSpotPanel::on_button_duplicate()
// Raise event
const int selId = getSelectedSpot();
if (selId == 0) { // No selected spot to duplicate
return;
}
nbSpotChanged_ = true;
selSpotChanged_ = true;
eventType = SpotDuplication;
const int newId = getNewId();
listener->panelChanged(EvLocallabSpotCreated, "ID#" + std::to_string(newId)
+ " (" + M("TP_LOCALLAB_EV_DUPL") + " ID#"
+ std::to_string(selId) + ")");
+ " (" + M("TP_LOCALLAB_EV_DUPL") + " ID#"
+ std::to_string(selId) + ")");
}
void ControlSpotPanel::on_button_rename()
@ -512,6 +572,7 @@ void ControlSpotPanel::on_button_rename()
// Update actual name and raise event
if (status == RenameDialog::OkButton) {
const Glib::ustring newname = d.get_new_name();
if (newname != actualname) { // Event is only raised if name is updated
nameChanged_ = true;
row[spots_.name] = newname;
@ -620,7 +681,7 @@ void ControlSpotPanel::load_ControlSpot_param()
// Load param in selected control spot
shape_->set_active(row[spots_.shape]);
spotMethod_->set_active(row[spots_.spotMethod]);
mergeMethod_->set_active(row[spots_.mergeMethod]);
// mergeMethod_->set_active(row[spots_.mergeMethod]);
sensiexclu_->setValue((double)row[spots_.sensiexclu]);
structexclu_->setValue((double)row[spots_.structexclu]);
struc_->setValue((double)row[spots_.struc]);
@ -717,7 +778,7 @@ void ControlSpotPanel::spotMethodChanged()
listener->panelChanged(EvLocallabSpotSpotMethod, spotMethod_->get_active_text());
}
}
/*
void ControlSpotPanel::mergeMethodChanged()
{
// printf("mergeMethodChanged\n");
@ -733,22 +794,12 @@ void ControlSpotPanel::mergeMethodChanged()
Gtk::TreeModel::Row row = *iter;
row[spots_.mergeMethod] = mergeMethod_->get_active_row_number();
/*
// Update Control Spot GUI according to spotMethod_ combobox state (to be compliant with updateParamVisibility function)
if (multiImage && mergeMethod_->get_active_text() == M("GENERAL_UNCHANGED")) {
excluFrame->show();
} else if (spotMethod_->get_active_row_number() == 0) { // Normal case
excluFrame->hide();
} else { // Excluding case
excluFrame->show();
}
*/
// Raise event
if (listener) {
listener->panelChanged(EvLocallabSpotmergeMethod, mergeMethod_->get_active_text());
}
}
*/
void ControlSpotPanel::shapeMethodChanged()
{
@ -858,6 +909,7 @@ void ControlSpotPanel::updateParamVisibility()
// Update Control Spot GUI according to shapeMethod_ combobox state (to be compliant with shapeMethodChanged function)
const int method = shapeMethod_->get_active_row_number();
if (!batchMode) {
if (method == 1 || method == 3) { // Symmetrical cases
locXL_->hide();
@ -960,7 +1012,7 @@ void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval)
listener->panelChanged(Evlocallabstructexlu, structexclu_->getTextValue());
}
}
if (a == struc_) {
row[spots_.struc] = struc_->getValue();
@ -1348,7 +1400,7 @@ void ControlSpotPanel::disableParamlistener(bool cond)
buttonvisibilityconn_.block(cond);
shapeconn_.block(cond);
spotMethodconn_.block(cond);
mergeMethodconn_.block(cond);
// mergeMethodconn_.block(cond);
sensiexclu_->block(cond);
structexclu_->block(cond);
struc_->block(cond);
@ -1383,7 +1435,7 @@ void ControlSpotPanel::setParamEditable(bool cond)
shape_->set_sensitive(cond);
spotMethod_->set_sensitive(cond);
mergeMethod_->set_sensitive(cond);
// mergeMethod_->set_sensitive(cond);
sensiexclu_->set_sensitive(cond);
structexclu_->set_sensitive(cond);
struc_->set_sensitive(cond);
@ -1689,9 +1741,10 @@ CursorShape ControlSpotPanel::getCursor(int objectID) const
// When there is no control spot (i.e. no selected row), objectID can unexpectedly be different from -1 and produced not desired behavior
const auto s = treeview_->get_selection();
if (!s->count_selected_rows()) {
return CSHandOpen;
}
return CSHandOpen;
}
const int rem_ = objectID % 7;
@ -1765,6 +1818,7 @@ bool ControlSpotPanel::mouseOver(int modifierKey)
for (auto iter = children.begin(); iter != children.end(); iter++) {
Gtk::TreeModel::Row row = *iter;
if (row[spots_.curveid] == curveId_ && *row != *selRow) {
row[spots_.mouseover] = true;
} else {
@ -1867,7 +1921,7 @@ bool ControlSpotPanel::button1Pressed(int modifierKey)
}
lastCoord_.set(provider->posImage.x + provider->deltaImage.x, provider->posImage.y + provider->deltaImage.y);
EditSubscriber::action = EditSubscriber::Action::DRAGGING;
EditSubscriber::action = EditSubscriber::Action::DRAGGING;
return true;
}
@ -2024,7 +2078,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int id)
r->isvisible = row[spots_.isvisible];
r->shape = row[spots_.shape];
r->spotMethod = row[spots_.spotMethod];
r->mergeMethod = row[spots_.mergeMethod];
// r->mergeMethod = row[spots_.mergeMethod];
r->sensiexclu = row[spots_.sensiexclu];
r->structexclu = row[spots_.structexclu];
r->struc = row[spots_.struc];
@ -2158,7 +2212,7 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot)
row[spots_.curveid] = 0; // No associated curve
row[spots_.shape] = newSpot->shape;
row[spots_.spotMethod] = newSpot->spotMethod;
row[spots_.mergeMethod] = newSpot->mergeMethod;
// row[spots_.mergeMethod] = newSpot->mergeMethod;
row[spots_.sensiexclu] = newSpot->sensiexclu;
row[spots_.structexclu] = newSpot->structexclu;
row[spots_.struc] = newSpot->struc;
@ -2211,7 +2265,7 @@ int ControlSpotPanel::updateControlSpot(SpotRow* spot)
row[spots_.isvisible] = spot->isvisible;
row[spots_.shape] = spot->shape;
row[spots_.spotMethod] = spot->spotMethod;
row[spots_.mergeMethod] = spot->mergeMethod;
// row[spots_.mergeMethod] = spot->mergeMethod;
row[spots_.sensiexclu] = spot->sensiexclu;
row[spots_.structexclu] = spot->structexclu;
row[spots_.struc] = spot->struc;
@ -2310,7 +2364,7 @@ ControlSpotPanel::SpotEdited* ControlSpotPanel::getEditedStates()
se->shape = shape_->get_active_text() != M("GENERAL_UNCHANGED");
se->spotMethod = spotMethod_->get_active_text() != M("GENERAL_UNCHANGED");
se->mergeMethod = mergeMethod_->get_active_text() != M("GENERAL_UNCHANGED");
// se->mergeMethod = mergeMethod_->get_active_text() != M("GENERAL_UNCHANGED");
se->sensiexclu = sensiexclu_->getEditedState();
se->structexclu = structexclu_->getEditedState();
se->struc = struc_->getEditedState();
@ -2379,10 +2433,11 @@ void ControlSpotPanel::setEditedStates(SpotEdited* se)
spotMethod_->set_active_text(M("GENERAL_UNCHANGED"));
}
if (!se->mergeMethod) {
mergeMethod_->set_active_text(M("GENERAL_UNCHANGED"));
}
/*
if (!se->mergeMethod) {
mergeMethod_->set_active_text(M("GENERAL_UNCHANGED"));
}
*/
sensiexclu_->setEditedState(se->sensiexclu ? Edited : UnEdited);
structexclu_->setEditedState(se->structexclu ? Edited : UnEdited);
struc_->setEditedState(se->struc ? Edited : UnEdited);
@ -2539,7 +2594,7 @@ void ControlSpotPanel::setBatchMode(bool batchMode)
// Set batch mode for comboBoxText
shape_->append(M("GENERAL_UNCHANGED"));
spotMethod_->append(M("GENERAL_UNCHANGED"));
mergeMethod_->append(M("GENERAL_UNCHANGED"));
// mergeMethod_->append(M("GENERAL_UNCHANGED"));
shapeMethod_->append(M("GENERAL_UNCHANGED"));
qualityMethod_->append(M("GENERAL_UNCHANGED"));
}
@ -2583,7 +2638,7 @@ ControlSpotPanel::ControlSpots::ControlSpots()
add(deltae);
add(shortc);
add(savrest);
add(mergeMethod);
// add(mergeMethod);
}
//-----------------------------------------------------------------------------

View File

@ -73,7 +73,7 @@ public:
bool deltae;
bool shortc;
bool savrest;
int mergeMethod; // 0 = None, 1 = short circuit, 2 = original
// int mergeMethod; // 0 = None, 1 = short circuit, 2 = original
};
/**
@ -112,7 +112,7 @@ public:
bool deltae;
bool shortc;
bool savrest;
bool mergeMethod;
// bool mergeMethod;
};
/**
@ -269,7 +269,7 @@ private:
void shapeChanged();
void spotMethodChanged();
void shapeMethodChanged();
void mergeMethodChanged();
// void mergeMethodChanged();
void qualityMethodChanged();
void updateParamVisibility();
void adjusterChanged(Adjuster* a, double newval);
@ -339,7 +339,7 @@ private:
Gtk::TreeModelColumn<bool> deltae;
Gtk::TreeModelColumn<bool> shortc;
Gtk::TreeModelColumn<bool> savrest;
Gtk::TreeModelColumn<int> mergeMethod; // 0 = None, 1 = short cir, 2 = original
// Gtk::TreeModelColumn<int> mergeMethod; // 0 = None, 1 = short cir, 2 = original
};
class RenameDialog:
@ -386,8 +386,8 @@ private:
sigc::connection shapeMethodconn_;
MyComboBoxText* const qualityMethod_;
sigc::connection qualityMethodconn_;
MyComboBoxText* const mergeMethod_;
sigc::connection mergeMethodconn_;
// MyComboBoxText* const mergeMethod_;
// sigc::connection mergeMethodconn_;
Adjuster* const sensiexclu_;
Adjuster* const structexclu_;

File diff suppressed because it is too large Load Diff

View File

@ -63,6 +63,7 @@ private:
MyExpander* const expcbdl;
MyExpander* const expdenoi;
MyExpander* const expmaskcol;
MyExpander* const expmaskcol1;
MyExpander* const expmaskexp;
MyExpander* const expmasksh;
MyExpander* const expmaskcb;
@ -399,6 +400,8 @@ private:
sigc::connection qualitycurveMethodConn;
MyComboBoxText* const gridMethod;
sigc::connection gridMethodConn;
MyComboBoxText* const merMethod;
sigc::connection merMethodConn;
// MyComboBoxText* const toneMethod;
sigc::connection toneMethodConn;
MyComboBoxText* const showmaskcolMethod;
@ -481,6 +484,7 @@ private:
Gtk::Frame* const grainFrame;
ToolParamBlock* const retiBox;
ToolParamBlock* const maskretiBox;
ToolParamBlock* const mask7;
LabGrid* const labgrid;
Gtk::Label* const mMLabels;
Gtk::Label* const transLabels;
@ -559,6 +563,7 @@ private:
// Color & Light
void qualitycurveMethodChanged();
void gridMethodChanged();
void merMethodChanged();
void toneMethodChanged();
void showmaskcolMethodChanged();
void showmaskcolMethodChangedinv();

View File

@ -954,7 +954,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).isvisible = locallab.spots.at(j).isvisible && pSpot.isvisible == otherSpot.isvisible;
locallab.spots.at(j).shape = locallab.spots.at(j).shape && pSpot.shape == otherSpot.shape;
locallab.spots.at(j).spotMethod = locallab.spots.at(j).spotMethod && pSpot.spotMethod == otherSpot.spotMethod;
locallab.spots.at(j).mergeMethod = locallab.spots.at(j).mergeMethod && pSpot.mergeMethod == otherSpot.mergeMethod;
// locallab.spots.at(j).mergeMethod = locallab.spots.at(j).mergeMethod && pSpot.mergeMethod == otherSpot.mergeMethod;
locallab.spots.at(j).sensiexclu = locallab.spots.at(j).sensiexclu && pSpot.sensiexclu == otherSpot.sensiexclu;
locallab.spots.at(j).structexclu = locallab.spots.at(j).structexclu && pSpot.structexclu == otherSpot.structexclu;
locallab.spots.at(j).struc = locallab.spots.at(j).struc && pSpot.struc == otherSpot.struc;
@ -1004,6 +1004,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).lapmaskcol = locallab.spots.at(j).lapmaskcol && pSpot.lapmaskcol == otherSpot.lapmaskcol;
locallab.spots.at(j).qualitycurveMethod = locallab.spots.at(j).qualitycurveMethod && pSpot.qualitycurveMethod == otherSpot.qualitycurveMethod;
locallab.spots.at(j).gridMethod = locallab.spots.at(j).gridMethod && pSpot.gridMethod == otherSpot.gridMethod;
locallab.spots.at(j).merMethod = locallab.spots.at(j).merMethod && pSpot.merMethod == otherSpot.merMethod;
locallab.spots.at(j).toneMethod = locallab.spots.at(j).toneMethod && pSpot.toneMethod == otherSpot.toneMethod;
locallab.spots.at(j).mergecolMethod = locallab.spots.at(j).mergecolMethod && pSpot.mergecolMethod == otherSpot.mergecolMethod;
locallab.spots.at(j).llcurve = locallab.spots.at(j).llcurve && pSpot.llcurve == otherSpot.llcurve;
@ -2741,11 +2742,11 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
if (locallab.spots.at(i).spotMethod) {
toEdit.locallab.spots.at(i).spotMethod = mods.locallab.spots.at(i).spotMethod;
}
/*
if (locallab.spots.at(i).mergeMethod) {
toEdit.locallab.spots.at(i).mergeMethod = mods.locallab.spots.at(i).mergeMethod;
}
*/
if (locallab.spots.at(i).sensiexclu) {
toEdit.locallab.spots.at(i).sensiexclu = mods.locallab.spots.at(i).sensiexclu;
}
@ -2940,6 +2941,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).gridMethod = mods.locallab.spots.at(i).gridMethod;
}
if (locallab.spots.at(i).merMethod) {
toEdit.locallab.spots.at(i).merMethod = mods.locallab.spots.at(i).merMethod;
}
if (locallab.spots.at(i).toneMethod) {
toEdit.locallab.spots.at(i).toneMethod = mods.locallab.spots.at(i).toneMethod;
}
@ -4896,7 +4901,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
isvisible(v),
shape(v),
spotMethod(v),
mergeMethod(v),
// mergeMethod(v),
sensiexclu(v),
structexclu(v),
struc(v),
@ -4946,6 +4951,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
lapmaskcol(v),
qualitycurveMethod(v),
gridMethod(v),
merMethod(v),
toneMethod(v),
mergecolMethod(v),
llcurve(v),
@ -5209,7 +5215,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
isvisible = v;
shape = v;
spotMethod = v;
mergeMethod = v;
// mergeMethod = v;
sensiexclu = v;
structexclu = v;
struc = v;
@ -5259,6 +5265,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
lapmaskcol = v;
qualitycurveMethod = v;
gridMethod = v;
merMethod = v;
toneMethod = v;
mergecolMethod = v;
llcurve = v;

View File

@ -384,7 +384,7 @@ public:
bool isvisible;
bool shape;
bool spotMethod;
bool mergeMethod;
// bool mergeMethod;
bool sensiexclu;
bool structexclu;
bool struc;
@ -434,6 +434,7 @@ public:
bool lapmaskcol;
bool qualitycurveMethod;
bool gridMethod;
bool merMethod;
bool toneMethod;
bool mergecolMethod;
bool llcurve;