Add background to merge file

This commit is contained in:
Desmis 2019-11-18 18:05:29 +01:00
parent a7cc1d2feb
commit bb9673db68
10 changed files with 257 additions and 17 deletions

View File

@ -1057,6 +1057,9 @@ HISTORY_MSG_817;Local - Vib mask gamma
HISTORY_MSG_818;Local - Vib mask slope
HISTORY_MSG_819;Local - Vib mask laplacian
HISTORY_MSG_820;Local - Vib mask contrast curve
HISTORY_MSG_821;Local - color grid background
HISTORY_MSG_822;Local - color background merge
HISTORY_MSG_823;Local - color background luminance
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@ -2179,6 +2182,11 @@ TP_LOCALLAB_MRONE;None
TP_LOCALLAB_MRTWO;Short Curves 'L' Mask
TP_LOCALLAB_MRTHR;Original Image
TP_LOCALLAB_MRFOU;Previous Spot
TP_LOCALLAB_MRFIV;Background
TP_LOCALLAB_LABGRIDMERG;Background
TP_LOCALLAB_MERDCOL;Merge background (deltaE)
TP_LOCALLAB_GRIDFRAME_TOOLTIP;It is desirable that the spot is in a flat area.\n\nOnly mode NORMAL and eventually Hue, Saturation, Color, Luminosity are concerned by Merge background
TP_LOCALLAB_MERLUCOL;Luminance
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 8, blend current image with original
TP_LOCALLAB_MERGENONE;None
@ -2187,7 +2195,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 or Previous
TP_LOCALLAB_MERGE1COLFRA;Merge with Original or Previous or Background
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

View File

@ -249,6 +249,7 @@ struct local_params {
float blurSH;
float ligh;
float lowA, lowB, highA, highB;
float lowBmerg, highBmerg, lowAmerg, highAmerg;
int shamo, shdamp, shiter, senssha, sensv;
float neig;
float strng;
@ -607,8 +608,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.mergemet = 2;
} else if (locallab.spots.at(sp).merMethod == "mfou") {
lp.mergemet = 3;
} else if (locallab.spots.at(sp).merMethod == "mfiv") {
lp.mergemet = 4;
}
printf("lpmermet=%i\n",lp.mergemet);
if (locallab.spots.at(sp).mergecolMethod == "one") {
lp.mergecolMethod = 0;
} else if (locallab.spots.at(sp).mergecolMethod == "two") {
@ -711,6 +714,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
float labgridBHighloc = locallab.spots.at(sp).labgridBHigh;
float labgridAHighloc = locallab.spots.at(sp).labgridAHigh;
float strengthgrid = (float) locallab.spots.at(sp).strengthgrid;
float labgridBLowlocmerg = locallab.spots.at(sp).labgridBLowmerg;
float labgridBHighlocmerg = locallab.spots.at(sp).labgridBHighmerg;
float labgridALowlocmerg = locallab.spots.at(sp).labgridALowmerg;
float labgridAHighlocmerg = locallab.spots.at(sp).labgridAHighmerg;
float structcolor = (float) locallab.spots.at(sp).structcol;
float blendmaskcolor = ((float) locallab.spots.at(sp).blendmaskcol) / 100.f ;
@ -880,6 +887,10 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.lowB = labgridBLowloc;
lp.highB = labgridBHighloc;
lp.highA = labgridAHighloc;
lp.lowBmerg = labgridBLowlocmerg;
lp.highBmerg = labgridBHighlocmerg;
lp.lowAmerg = labgridALowlocmerg;
lp.highAmerg = labgridAHighlocmerg;
lp.senssf = local_sensisf;
lp.strng = strlight;
@ -3568,7 +3579,7 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int
float** rdE = *(rdEBuffer.get());
deltaEforMask(rdE, bfw, bfh, bufcolorig, hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, iterat, limscope, scope, lp.balance);
// printf("rde1=%f rde2=%f\n", rdE[1][1], rdE[100][100]);
// printf("rde1=%f\n", rdE[1][1]);
std::unique_ptr<LabImage> delta(new LabImage(bfw, bfh));
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@ -11909,6 +11920,12 @@ 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);
float a_scalemerg = (lp.highAmerg - lp.lowAmerg) / factor / scaling;
float a_basemerg = lp.lowAmerg / scaling;
float b_scalemerg = (lp.highBmerg - lp.lowBmerg) / factor / scaling;
float b_basemerg = lp.lowBmerg / scaling;
bool ctoningmerg = (a_scalemerg != 0.f || b_scalemerg != 0.f || a_basemerg != 0.f || b_basemerg != 0.f);
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
@ -12150,6 +12167,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float strumask = 0.02f * (float) params->locallab.spots.at(sp).strumaskcol;
float conthr = 0.01f * params->locallab.spots.at(sp).conthrcol;
int tonemod = 0;
float mercol = params->locallab.spots.at(sp).mercol;
float merlucol = params->locallab.spots.at(sp).merlucol;
if (params->locallab.spots.at(sp).toneMethod == "one") {
tonemod = 0;
@ -12468,7 +12487,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (lp.mergemet >= 2) { //merge result with original
bufcolreserv.reset(new LabImage(bfw, bfh));
JaggedArray<float> lumreserv(bfw, bfh);
std::unique_ptr<LabImage> bufreser;
bufreser.reset(new LabImage(bfw, bfh));
if(lp.mergemet == 4) {
printf("4 a=%f\n", 9.f * scaledirect * a_scalemerg);
}
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -12476,15 +12499,24 @@ 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++) {
lumreserv[y][x] = 32768.f - reserved->L[y + ystart][x + xstart];
bufreser->L[y][x] = reserved->L[y + ystart][x + xstart];
bufreser->a[y][x] = reserved->a[y + ystart][x + xstart];
bufreser->b[y][x] = reserved->b[y + ystart][x + xstart];
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];
} else {
} else if (lp.mergemet == 3) {
bufcolreserv->L[y][x] = lastorig->L[y + ystart][x + xstart];
bufcolreserv->a[y][x] = lastorig->a[y + ystart][x + xstart];
bufcolreserv->b[y][x] = lastorig->b[y + ystart][x + xstart];
} else if (lp.mergemet == 4) {
if(ctoningmerg) {
bufcolreserv->L[y][x] = merlucol * 327.68f;
bufcolreserv->a[y][x] = 9.f * scaledirect * a_scalemerg;
bufcolreserv->b[y][x] = 9.f * scaledirect * b_scalemerg;
}
}
}
}
@ -12497,6 +12529,10 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float **mb = blend;
gaussianBlur(mb, mb, bfw, bfh, rm);
}
std::unique_ptr<JaggedArray<float>> rdEBuffer(new JaggedArray<float>(bfw, bfh));
float** rdE = *(rdEBuffer.get());
deltaEforMask(rdE, bfw, bfh, bufreser.get(), hueref, chromaref, lumaref, maxdE, mindE, maxdElim, mindElim, 0.2f * lp.iterat, limscope, mercol, lp.balance);
if (lp.mergecolMethod == 0) { //normal
@ -12510,21 +12546,27 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bufcolfin->L[y][x] = lp.opacol * bufcolfin->L[y][x] + (1.f - lp.opacol) * bufcolreserv->L[y][x];
bufcolfin->a[y][x] = lp.opacol * bufcolfin->a[y][x] + (1.f - lp.opacol) * bufcolreserv->a[y][x];
bufcolfin->b[y][x] = lp.opacol * bufcolfin->b[y][x] + (1.f - lp.opacol) * bufcolreserv->b[y][x];
bufcolfin->L[y][x] = (1.f - rdE[y][x]) * bufcolfin->L[y][x] + (rdE[y][x]) * bufcolreserv->L[y][x];
bufcolfin->a[y][x] = (1.f - rdE[y][x]) * bufcolfin->a[y][x] + (rdE[y][x]) * bufcolreserv->a[y][x];
bufcolfin->b[y][x] = (1.f - rdE[y][x]) * bufcolfin->b[y][x] + (rdE[y][x]) * bufcolreserv->b[y][x];
}
}
if (conthr > 0.f) {
if (conthr > 0.f && lp.mergemet != 4) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
for (int y = 0; y < bfh ; y++) {
for (int x = 0; x < bfw; x++) {
bufcolfin->L[y][x] = intp((blend[y][x]), bufcolfin->L[y][x], bufcolreserv->L[y][x]);
bufcolfin->a[y][x] = intp((blend[y][x]), bufcolfin->a[y][x], bufcolreserv->a[y][x]);
bufcolfin->b[y][x] = intp((blend[y][x]), bufcolfin->b[y][x], bufcolreserv->b[y][x]);
bufcolfin->L[y][x] = intp((blend[y][x]), bufcolfin->L[y][x], bufreser->L[y][x]);
bufcolfin->a[y][x] = intp((blend[y][x]), bufcolfin->a[y][x], bufreser->a[y][x]);
bufcolfin->b[y][x] = intp((blend[y][x]), bufcolfin->b[y][x], bufreser->b[y][x]);
}
}
}
@ -12573,10 +12615,15 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bufcolfin->L[y][x] = lp.opacol * buftemp->L[y][x] + (1.f - lp.opacol) * bufcolreserv->L[y][x];
bufcolfin->a[y][x] = lp.opacol * buftemp->a[y][x] + (1.f - lp.opacol) * bufcolreserv->a[y][x];
bufcolfin->b[y][x] = lp.opacol * buftemp->b[y][x] + (1.f - lp.opacol) * bufcolreserv->b[y][x];
bufcolfin->L[y][x] = (1.f - rdE[y][x]) * bufcolfin->L[y][x] + (rdE[y][x]) * bufcolreserv->L[y][x];
bufcolfin->a[y][x] = (1.f - rdE[y][x]) * bufcolfin->a[y][x] + (rdE[y][x]) * bufcolreserv->a[y][x];
bufcolfin->b[y][x] = (1.f - rdE[y][x]) * bufcolfin->b[y][x] + (rdE[y][x]) * bufcolreserv->b[y][x];
}
}
if (conthr > 0.f) {
if (conthr > 0.f && lp.mergemet != 4) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -13014,9 +13061,11 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int ir = 0; ir < bfh; ir++)
for (int jr = 0; jr < bfw; jr++) {
bufchro[ir][jr] = sqrt(SQR(bufcolfin->a[ir][jr] - bufcolorig->a[ir][jr]) + SQR(bufcolfin->b[ir][jr] - bufcolorig->b[ir][jr])) / 328.f;
buf_a[ir][jr] = ((bufcolfin->a[ir][jr] - bufcolorig->a[ir][jr]) / 328.f);
buf_b[ir][jr] = ((bufcolfin->b[ir][jr] - bufcolorig->b[ir][jr]) / 328.f);
if(lp.mergemet != 4) {
bufchro[ir][jr] = sqrt(SQR(bufcolfin->a[ir][jr] - bufcolorig->a[ir][jr]) + SQR(bufcolfin->b[ir][jr] - bufcolorig->b[ir][jr])) / 328.f;
buf_a[ir][jr] = ((bufcolfin->a[ir][jr] - bufcolorig->a[ir][jr]) / 328.f);
buf_b[ir][jr] = ((bufcolfin->b[ir][jr] - bufcolorig->b[ir][jr]) / 328.f);
}
}
}

View File

@ -844,6 +844,9 @@ enum ProcEventCode {
Evlocallabslomaskvib = 817,
Evlocallablapmaskvib = 818,
EvlocallabLmaskvibshape = 819,
EvLocallabLabGridmergValue = 820,
Evlocallabmercol = 821,
Evlocallabmerlucol = 822,
NUMOFEVENTS
};

View File

@ -2455,6 +2455,10 @@ LocallabParams::LocallabSpot::LocallabSpot() :
labgridBLow(0.0),
labgridAHigh(0.0),
labgridBHigh(0.0),
labgridALowmerg(0.0),
labgridBLowmerg(0.0),
labgridAHighmerg(-3500.0),
labgridBHighmerg(-4600.0),
strengthgrid(30),
sensi(15),
structcol(0),
@ -2487,7 +2491,9 @@ LocallabParams::LocallabSpot::LocallabSpot() :
// HHhmaskcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.00, 1.0, 0.35, 0.35 },
HHhmaskcurve{(double)FCT_MinMaxCPoints, 0.0, 0.5, 0.35, 0.35, 0.50, 0.5, 0.35, 0.35, 1.00, 0.5, 0.35, 0.35 },
softradiuscol(0.0),
opacol(40.0),
opacol(100.0),
mercol(18.0),
merlucol(32.0),
conthrcol(20.0),
Lmaskcurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0},
LLmaskcolcurvewav{(double)FCT_MinMaxCPoints, 0.0, 0.5, 0.35, 0.35, 1., 0.5, 0.35, 0.35},
@ -2789,6 +2795,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& labgridBLow == other.labgridBLow
&& labgridAHigh == other.labgridAHigh
&& labgridBHigh == other.labgridBHigh
&& labgridALowmerg == other.labgridALowmerg
&& labgridBLowmerg == other.labgridBLowmerg
&& labgridAHighmerg == other.labgridAHighmerg
&& labgridBHighmerg == other.labgridBHighmerg
&& strengthgrid == other.strengthgrid
&& sensi == other.sensi
&& structcol == other.structcol
@ -2821,6 +2831,8 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& blurcolde == other.blurcolde
&& softradiuscol == other.softradiuscol
&& opacol == other.opacol
&& mercol == other.mercol
&& merlucol == other.merlucol
&& conthrcol == other.conthrcol
&& Lmaskcurve == other.Lmaskcurve
&& LLmaskcolcurvewav == other.LLmaskcolcurvewav
@ -4117,6 +4129,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).labgridBLow, "Locallab", "labgridBLow_" + std::to_string(i), spot.labgridBLow, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).labgridAHigh, "Locallab", "labgridAHigh_" + std::to_string(i), spot.labgridAHigh, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).labgridBHigh, "Locallab", "labgridBHigh_" + std::to_string(i), spot.labgridBHigh, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).labgridALowmerg, "Locallab", "labgridALowmerg_" + std::to_string(i), spot.labgridALowmerg, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).labgridBLowmerg, "Locallab", "labgridBLowmerg_" + std::to_string(i), spot.labgridBLowmerg, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).labgridAHighmerg, "Locallab", "labgridAHighmerg_" + std::to_string(i), spot.labgridAHighmerg, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).labgridBHighmerg, "Locallab", "labgridBHighmerg_" + std::to_string(i), spot.labgridBHighmerg, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strengthgrid, "Locallab", "Strengthgrid_" + std::to_string(i), spot.strengthgrid, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sensi, "Locallab", "Sensi_" + std::to_string(i), spot.sensi, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).structcol, "Locallab", "Structcol_" + std::to_string(i), spot.structcol, keyFile);
@ -4149,6 +4165,8 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHhmaskcurve, "Locallab", "HHhmaskCurve_" + std::to_string(i), spot.HHhmaskcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiuscol, "Locallab", "Softradiuscol_" + std::to_string(i), spot.softradiuscol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).opacol, "Locallab", "Opacol_" + std::to_string(i), spot.opacol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).mercol, "Locallab", "Mercol_" + std::to_string(i), spot.mercol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).merlucol, "Locallab", "Merlucol_" + std::to_string(i), spot.merlucol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).conthrcol, "Locallab", "Conthrcol_" + std::to_string(i), spot.conthrcol, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).Lmaskcurve, "Locallab", "LmaskCurve_" + std::to_string(i), spot.Lmaskcurve, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LLmaskcolcurvewav, "Locallab", "LLmaskcolCurvewav_" + std::to_string(i), spot.LLmaskcolcurvewav, keyFile);
@ -5553,6 +5571,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "labgridBLow_" + std::to_string(i), pedited, spot.labgridBLow, spotEdited.labgridBLow);
assignFromKeyfile(keyFile, "Locallab", "labgridAHigh_" + std::to_string(i), pedited, spot.labgridAHigh, spotEdited.labgridAHigh);
assignFromKeyfile(keyFile, "Locallab", "labgridBHigh_" + std::to_string(i), pedited, spot.labgridBHigh, spotEdited.labgridBHigh);
assignFromKeyfile(keyFile, "Locallab", "labgridALowmerg_" + std::to_string(i), pedited, spot.labgridALowmerg, spotEdited.labgridALowmerg);
assignFromKeyfile(keyFile, "Locallab", "labgridBLowmerg_" + std::to_string(i), pedited, spot.labgridBLowmerg, spotEdited.labgridBLowmerg);
assignFromKeyfile(keyFile, "Locallab", "labgridAHighmerg_" + std::to_string(i), pedited, spot.labgridAHighmerg, spotEdited.labgridAHighmerg);
assignFromKeyfile(keyFile, "Locallab", "labgridBHighmerg_" + std::to_string(i), pedited, spot.labgridBHighmerg, spotEdited.labgridBHighmerg);
assignFromKeyfile(keyFile, "Locallab", "Strengthgrid_" + std::to_string(i), pedited, spot.strengthgrid, spotEdited.strengthgrid);
assignFromKeyfile(keyFile, "Locallab", "Sensi_" + std::to_string(i), pedited, spot.sensi, spotEdited.sensi);
assignFromKeyfile(keyFile, "Locallab", "Structcol_" + std::to_string(i), pedited, spot.structcol, spotEdited.structcol);
@ -5585,6 +5607,8 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "HHhmaskCurve_" + std::to_string(i), pedited, spot.HHhmaskcurve, spotEdited.HHhmaskcurve);
assignFromKeyfile(keyFile, "Locallab", "Softradiuscol_" + std::to_string(i), pedited, spot.softradiuscol, spotEdited.softradiuscol);
assignFromKeyfile(keyFile, "Locallab", "Opacol_" + std::to_string(i), pedited, spot.opacol, spotEdited.opacol);
assignFromKeyfile(keyFile, "Locallab", "Mercol_" + std::to_string(i), pedited, spot.mercol, spotEdited.mercol);
assignFromKeyfile(keyFile, "Locallab", "Merlucol_" + std::to_string(i), pedited, spot.merlucol, spotEdited.merlucol);
assignFromKeyfile(keyFile, "Locallab", "Conthrcol_" + std::to_string(i), pedited, spot.conthrcol, spotEdited.conthrcol);
assignFromKeyfile(keyFile, "Locallab", "LmaskCurve_" + std::to_string(i), pedited, spot.Lmaskcurve, spotEdited.Lmaskcurve);
assignFromKeyfile(keyFile, "Locallab", "LLmaskcolCurvewav_" + std::to_string(i), pedited, spot.LLmaskcolcurvewav, spotEdited.LLmaskcolcurvewav);

View File

@ -998,6 +998,10 @@ struct LocallabParams {
double labgridBLow;
double labgridAHigh;
double labgridBHigh;
double labgridALowmerg;
double labgridBLowmerg;
double labgridAHighmerg;
double labgridBHighmerg;
int strengthgrid;
int sensi;
int structcol;
@ -1030,6 +1034,8 @@ struct LocallabParams {
std::vector<double> HHhmaskcurve;
double softradiuscol;
double opacol;
double mercol;
double merlucol;
double conthrcol;
std::vector<double> Lmaskcurve;
std::vector<double> LLmaskcolcurvewav;

View File

@ -847,7 +847,11 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, //Evlocallabgammaskvib
LUMINANCECURVE, //Evlocallabslomaskvib
LUMINANCECURVE, //Evlocallablapmaskvib
LUMINANCECURVE //EvlocallabLmaskvibshape
LUMINANCECURVE, //EvlocallabLmaskvibshape
LUMINANCECURVE, //EvLocallabLabGridmergValue
LUMINANCECURVE, //EvLocallabmercol
LUMINANCECURVE //EvLocallabmerlucol
};
namespace rtengine

View File

@ -273,9 +273,11 @@ Locallab::Locallab():
lapmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))),
shadmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHAMASKCOL"), 0, 100, 1, 0))),
softradiuscol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))),
opacol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_OPACOL"), 0.0, 100.0, 0.5, 40.))),
opacol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_OPACOL"), 0.0, 100.0, 0.5, 100.))),
conthrcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTTHR"), 0.0, 100.0, 0.5, 20.))),
strumaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUMASKCOL"), 0., 200., 0.1, 0.))),
mercol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MERDCOL"), 0.0, 100.0, 0.5, 18.))),
merlucol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MERLUCOL"), 0.0, 100.0, 0.5, 32.,Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))),
// Exposure
expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), -2.0, 3.0, 0.05, 0.0))),
hlcompr(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0))),
@ -577,6 +579,7 @@ lumacontrastMinusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACO
lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))),
lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))),
gridFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRID")))),
gridmerFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRIDMERG")))),
toolcolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK")))),
toolblFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK")))),
mergecolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_MERGECOLFRA")))),
@ -596,6 +599,8 @@ retiBox(Gtk::manage(new ToolParamBlock())),
maskretiBox(Gtk::manage(new ToolParamBlock())),
mask7(Gtk::manage(new ToolParamBlock())),
labgrid(Gtk::manage(new LabGrid(EvLocallabLabGridValue, M("TP_LOCALLAB_LABGRID_VALUES")))),
labgridmerg(Gtk::manage(new LabGrid(EvLocallabLabGridmergValue, M("TP_LOCALLAB_LABGRID_VALUES"), false))),
mMLabels(Gtk::manage(new Gtk::Label("---"))),
transLabels(Gtk::manage(new Gtk::Label("---"))),
transLabels2(Gtk::manage(new Gtk::Label("---"))),
@ -675,6 +680,8 @@ pe(nullptr)
opacol->setAdjusterListener(this);
conthrcol->setAdjusterListener(this);
lapmaskcol->setAdjusterListener(this);
mercol->setAdjusterListener(this);
merlucol->setAdjusterListener(this);
if (showtooltip) {
radmaskcol->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP"));
@ -701,6 +708,7 @@ pe(nullptr)
merMethod->append(M("TP_LOCALLAB_MRTWO"));
merMethod->append(M("TP_LOCALLAB_MRTHR"));
merMethod->append(M("TP_LOCALLAB_MRFOU"));
merMethod->append(M("TP_LOCALLAB_MRFIV"));
merMethod->set_active(0);
merMethodConn = merMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::merMethodChanged));
@ -974,8 +982,16 @@ pe(nullptr)
colorBox->pack_start(*special);
colorBox->pack_start(*invers);
Gtk::HSeparator* const separatormer = Gtk::manage(new Gtk::HSeparator());
if (showtooltip) {
gridmerFrame->set_tooltip_text(M("TP_LOCALLAB_GRIDFRAME_TOOLTIP"));
}
ToolParamBlock* const gridmerBox = Gtk::manage(new ToolParamBlock());
gridmerFrame->set_label_align(0.025, 0.5);
gridmerBox->pack_start(*labgridmerg);
gridmerBox->pack_start(*merlucol);
gridmerBox->pack_start(*mercol);
gridmerFrame->add(*gridmerBox);
mergecolFrame->set_label_align(0.025, 0.5);
merge1colFrame->set_label_align(0.025, 0.5);
@ -984,6 +1000,8 @@ pe(nullptr)
mergecolBox->pack_start(*mergecolMethod);
mergecolBox->pack_start(*opacol);
mergecolBox->pack_start(*conthrcol);
mergecolBox->pack_start(*gridmerFrame);
merge1colFrame->add(*mergecolBox);
Gtk::HSeparator* const separatorstru = Gtk::manage(new Gtk::HSeparator());
@ -3784,11 +3802,16 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pp->locallab.spots.at(pp->locallab.selspot).contrast = contrast->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).chroma = chroma->getIntValue();
labgrid->getParams(pp->locallab.spots.at(pp->locallab.selspot).labgridALow, pp->locallab.spots.at(pp->locallab.selspot).labgridBLow, pp->locallab.spots.at(pp->locallab.selspot).labgridAHigh, pp->locallab.spots.at(pp->locallab.selspot).labgridBHigh);
labgridmerg->getParams(pp->locallab.spots.at(pp->locallab.selspot).labgridALowmerg, pp->locallab.spots.at(pp->locallab.selspot).labgridBLowmerg, pp->locallab.spots.at(pp->locallab.selspot).labgridAHighmerg, pp->locallab.spots.at(pp->locallab.selspot).labgridBHighmerg);
pp->locallab.spots.at(pp->locallab.selspot).strengthgrid = strengthgrid->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).labgridALow *= rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX;
pp->locallab.spots.at(pp->locallab.selspot).labgridAHigh *= rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX;
pp->locallab.spots.at(pp->locallab.selspot).labgridBLow *= rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX;
pp->locallab.spots.at(pp->locallab.selspot).labgridBHigh *= rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX;
pp->locallab.spots.at(pp->locallab.selspot).labgridALowmerg *= rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX;
pp->locallab.spots.at(pp->locallab.selspot).labgridAHighmerg *= rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX;
pp->locallab.spots.at(pp->locallab.selspot).labgridBLowmerg *= rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX;
pp->locallab.spots.at(pp->locallab.selspot).labgridBHighmerg *= rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX;
pp->locallab.spots.at(pp->locallab.selspot).sensi = sensi->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).structcol = structcol->getIntValue();
pp->locallab.spots.at(pp->locallab.selspot).blurcolde = blurcolde->getIntValue();
@ -3813,6 +3836,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pp->locallab.spots.at(pp->locallab.selspot).merMethod = "mthr";
} else if (merMethod->get_active_row_number() == 3) {
pp->locallab.spots.at(pp->locallab.selspot).merMethod = "mfou";
} else if (merMethod->get_active_row_number() == 4) {
pp->locallab.spots.at(pp->locallab.selspot).merMethod = "mfiv";
}
if (toneMethod->get_active_row_number() == 0) {
@ -3892,6 +3917,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pp->locallab.spots.at(pp->locallab.selspot).lapmaskcol = lapmaskcol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).softradiuscol = softradiuscol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).opacol = opacol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).mercol = mercol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).merlucol = merlucol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).conthrcol = conthrcol->getValue();
pp->locallab.spots.at(pp->locallab.selspot).Lmaskcurve = Lmaskshape->getCurve();
pp->locallab.spots.at(pp->locallab.selspot).LLmaskcolcurvewav = LLmaskcolshapewav->getCurve();
@ -4270,6 +4297,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pe->locallab.spots.at(pp->locallab.selspot).lightness = pe->locallab.spots.at(pp->locallab.selspot).lightness || lightness->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).contrast = pe->locallab.spots.at(pp->locallab.selspot).contrast || contrast->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).labgridALow = pe->locallab.spots.at(pp->locallab.selspot).labgridBLow = pe->locallab.spots.at(pp->locallab.selspot).labgridAHigh = pe->locallab.spots.at(pp->locallab.selspot).labgridBHigh = labgrid->getEdited();
pe->locallab.spots.at(pp->locallab.selspot).labgridALowmerg = pe->locallab.spots.at(pp->locallab.selspot).labgridBLowmerg = pe->locallab.spots.at(pp->locallab.selspot).labgridAHighmerg = pe->locallab.spots.at(pp->locallab.selspot).labgridBHighmerg = labgridmerg->getEdited();
pe->locallab.spots.at(pp->locallab.selspot).strengthgrid = pe->locallab.spots.at(pp->locallab.selspot).strengthgrid || strengthgrid->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).chroma = pe->locallab.spots.at(pp->locallab.selspot).chroma || chroma->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).sensi = pe->locallab.spots.at(pp->locallab.selspot).sensi || sensi->getEditedState();
@ -4303,6 +4331,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pe->locallab.spots.at(pp->locallab.selspot).lapmaskcol = pe->locallab.spots.at(pp->locallab.selspot).lapmaskcol || lapmaskcol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).softradiuscol = pe->locallab.spots.at(pp->locallab.selspot).softradiuscol || softradiuscol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).opacol = pe->locallab.spots.at(pp->locallab.selspot).opacol || opacol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).mercol = pe->locallab.spots.at(pp->locallab.selspot).mercol || mercol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).merlucol = pe->locallab.spots.at(pp->locallab.selspot).merlucol || merlucol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).conthrcol = pe->locallab.spots.at(pp->locallab.selspot).conthrcol || conthrcol->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).Lmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).Lmaskcurve || !Lmaskshape->isUnChanged();
pe->locallab.spots.at(pp->locallab.selspot).LLmaskcolcurvewav = pe->locallab.spots.at(pp->locallab.selspot).LLmaskcolcurvewav || !LLmaskcolshapewav->isUnChanged();
@ -4645,6 +4675,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
pedited->locallab.spots.at(pp->locallab.selspot).lapmaskcol = pedited->locallab.spots.at(pp->locallab.selspot).lapmaskcol || lapmaskcol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).softradiuscol = pedited->locallab.spots.at(pp->locallab.selspot).softradiuscol || softradiuscol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).opacol = pedited->locallab.spots.at(pp->locallab.selspot).opacol || opacol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).mercol = pedited->locallab.spots.at(pp->locallab.selspot).mercol || mercol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).merlucol = pedited->locallab.spots.at(pp->locallab.selspot).merlucol || merlucol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).conthrcol = pedited->locallab.spots.at(pp->locallab.selspot).conthrcol || conthrcol->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).Lmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).Lmaskcurve || !Lmaskshape->isUnChanged();
pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcolcurvewav = pedited->locallab.spots.at(pp->locallab.selspot).LLmaskcolcurvewav || !LLmaskcolshapewav->isUnChanged();
@ -5498,12 +5530,25 @@ void Locallab::merMethodChanged()
{
if (merMethod->get_active_row_number() == 0) {
mask7->hide();
conthrcol->show();
gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 1) {
mask7->hide();
conthrcol->show();
gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 2) {
mask7->show();
conthrcol->show();
conthrcol->show();
gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 3) {
mask7->show();
conthrcol->show();
gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 4) {
mask7->show();
conthrcol->hide();
gridmerFrame->show();
}
if (getEnabled() && expcolor->getEnabled()) {
@ -6897,6 +6942,7 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c
contrast->setDefault((double)defSpot->contrast);
chroma->setDefault((double)defSpot->chroma);
labgrid->setDefault(defSpot->labgridALow / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, defSpot->labgridBLow / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, defSpot->labgridAHigh / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, defSpot->labgridBHigh / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX);
labgridmerg->setDefault(defSpot->labgridALowmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, defSpot->labgridBLowmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, defSpot->labgridAHighmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, defSpot->labgridBHighmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX);
sensi->setDefault((double)defSpot->sensi);
structcol->setDefault((double)defSpot->structcol);
blurcolde->setDefault((double)defSpot->blurcolde);
@ -6910,6 +6956,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c
lapmaskcol->setDefault(defSpot->lapmaskcol);
softradiuscol->setDefault(defSpot->softradiuscol);
opacol->setDefault(defSpot->opacol);
mercol->setDefault(defSpot->mercol);
merlucol->setDefault(defSpot->merlucol);
conthrcol->setDefault(defSpot->conthrcol);
csThresholdcol->setDefault<int>(defSpot->csthresholdcol);
// Exposure
@ -7098,6 +7146,7 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c
contrast->setDefaultEditedState(Irrelevant);
chroma->setDefaultEditedState(Irrelevant);
labgrid->setEdited(Edited);
labgridmerg->setEdited(Edited);
sensi->setDefaultEditedState(Irrelevant);
structcol->setDefaultEditedState(Irrelevant);
strengthgrid->setDefault((double)defSpot->strengthgrid);
@ -7112,6 +7161,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c
lapmaskcol->setDefaultEditedState(Irrelevant);
softradiuscol->setDefaultEditedState(Irrelevant);
opacol->setDefaultEditedState(Irrelevant);
mercol->setDefaultEditedState(Irrelevant);
merlucol->setDefaultEditedState(Irrelevant);
conthrcol->setDefaultEditedState(Irrelevant);
csThresholdcol->setDefaultEditedState(Irrelevant);
// Exposure
@ -7304,6 +7355,7 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c
contrast->setDefaultEditedState(defSpotState->contrast ? Edited : UnEdited);
chroma->setDefaultEditedState(defSpotState->chroma ? Edited : UnEdited);
labgrid->setEdited((defSpotState->labgridALow || defSpotState->labgridBLow || defSpotState->labgridAHigh || defSpotState->labgridBHigh) ? Edited : UnEdited);
labgridmerg->setEdited((defSpotState->labgridALowmerg || defSpotState->labgridBLowmerg || defSpotState->labgridAHighmerg || defSpotState->labgridBHighmerg) ? Edited : UnEdited);
sensi->setDefaultEditedState(defSpotState->sensi ? Edited : UnEdited);
structcol->setDefaultEditedState(defSpotState->structcol ? Edited : UnEdited);
strengthgrid->setDefaultEditedState(defSpotState->strengthgrid ? Edited : UnEdited);
@ -7318,6 +7370,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c
lapmaskcol->setDefaultEditedState(defSpotState->lapmaskcol ? Edited : UnEdited);
softradiuscol->setDefaultEditedState(defSpotState->softradiuscol ? Edited : UnEdited);
opacol->setDefaultEditedState(defSpotState->opacol ? Edited : UnEdited);
mercol->setDefaultEditedState(defSpotState->mercol ? Edited : UnEdited);
merlucol->setDefaultEditedState(defSpotState->merlucol ? Edited : UnEdited);
conthrcol->setDefaultEditedState(defSpotState->conthrcol ? Edited : UnEdited);
csThresholdcol->setDefaultEditedState(defSpotState->csthresholdcol ? Edited : UnEdited);
// Exposure
@ -7662,6 +7716,18 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
}
}
if (a == mercol) {
if (listener) {
listener->panelChanged(Evlocallabmercol, mercol->getTextValue());
}
}
if (a == merlucol) {
if (listener) {
listener->panelChanged(Evlocallabmerlucol, merlucol->getTextValue());
}
}
if (a == conthrcol) {
if (listener) {
listener->panelChanged(Evlocallabconthrcol, conthrcol->getTextValue());
@ -8746,6 +8812,8 @@ void Locallab::setBatchMode(bool batchMode)
lapmaskcol->showEditedCB();
softradiuscol->showEditedCB();
opacol->showEditedCB();
mercol->showEditedCB();
merlucol->showEditedCB();
conthrcol->showEditedCB();
csThresholdcol->showEditedCB();
// Exposure
@ -9087,6 +9155,7 @@ void Locallab::setListener(ToolPanelListener* tpl)
{
this->listener = tpl;
labgrid->setListener(tpl);
labgridmerg->setListener(tpl);
expsettings->setListener(tpl);
}
@ -9279,6 +9348,8 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
contrast->setValue(pp->locallab.spots.at(index).contrast);
chroma->setValue(pp->locallab.spots.at(index).chroma);
labgrid->setParams(pp->locallab.spots.at(index).labgridALow / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, pp->locallab.spots.at(index).labgridBLow / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, pp->locallab.spots.at(index).labgridAHigh / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, pp->locallab.spots.at(index).labgridBHigh / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, false);
//labgridmerg->setParams(pp->locallab.spots.at(index).labgridALowmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, pp->locallab.spots.at(index).labgridBLowmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, pp->locallab.spots.at(index).labgridAHighmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, pp->locallab.spots.at(index).labgridBHighmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, false);
labgridmerg->setParams(0, 0, pp->locallab.spots.at(index).labgridAHighmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, pp->locallab.spots.at(index).labgridBHighmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, false);
strengthgrid->setValue(pp->locallab.spots.at(index).strengthgrid);
sensi->setValue(pp->locallab.spots.at(index).sensi);
structcol->setValue(pp->locallab.spots.at(index).structcol);
@ -9303,6 +9374,8 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
merMethod->set_active(2);
} else if (pp->locallab.spots.at(index).merMethod == "mfou") {
merMethod->set_active(3);
} else if (pp->locallab.spots.at(index).merMethod == "mfiv") {
merMethod->set_active(4);
}
if (pp->locallab.spots.at(index).toneMethod == "one") {
@ -9397,6 +9470,8 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
lapmaskcol->setValue(pp->locallab.spots.at(index).lapmaskcol);
softradiuscol->setValue(pp->locallab.spots.at(index).softradiuscol);
opacol->setValue(pp->locallab.spots.at(index).opacol);
mercol->setValue(pp->locallab.spots.at(index).mercol);
merlucol->setValue(pp->locallab.spots.at(index).merlucol);
conthrcol->setValue(pp->locallab.spots.at(index).conthrcol);
Lmaskshape->setCurve(pp->locallab.spots.at(index).Lmaskcurve);
LLmaskcolshapewav->setCurve(pp->locallab.spots.at(index).LLmaskcolcurvewav);
@ -9795,6 +9870,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
sensi->setEditedState(spotState->sensi ? Edited : UnEdited);
structcol->setEditedState(spotState->structcol ? Edited : UnEdited);
labgrid->setEdited(spotState->labgridALow || spotState->labgridBLow || spotState->labgridAHigh || spotState->labgridBHigh);
labgridmerg->setEdited(spotState->labgridALowmerg || spotState->labgridBLowmerg || spotState->labgridAHighmerg || spotState->labgridBHighmerg);
strengthgrid->setEditedState(spotState->strengthgrid ? Edited : UnEdited);
if (!spotState->qualitycurveMethod) {
@ -9841,6 +9917,8 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
lapmaskcol->setEditedState(spotState->lapmaskcol ? Edited : UnEdited);
softradiuscol->setEditedState(spotState->softradiuscol ? Edited : UnEdited);
opacol->setEditedState(spotState->opacol ? Edited : UnEdited);
mercol->setEditedState(spotState->mercol ? Edited : UnEdited);
merlucol->setEditedState(spotState->merlucol ? Edited : UnEdited);
conthrcol->setEditedState(spotState->conthrcol ? Edited : UnEdited);
Lmaskshape->setUnChanged(!spotState->Lmaskcurve);
LLmaskcolshapewav->setUnChanged(!spotState->LLmaskcolcurvewav);
@ -10201,12 +10279,24 @@ void Locallab::updateSpecificGUIState()
if (merMethod->get_active_row_number() == 0) {
mask7->hide();
conthrcol->show();
gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 1) {
mask7->hide();
conthrcol->show();
gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 2) {
mask7->show();
conthrcol->show();
gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 3) {
conthrcol->show();
mask7->show();
gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 3) {
mask7->show();
conthrcol->hide();
gridmerFrame->show();
}
// Update Exposure GUI according to black adjuster state (to be compliant with adjusterChanged function)

View File

@ -179,6 +179,8 @@ private:
Adjuster* const opacol;
Adjuster* const conthrcol;
Adjuster* const strumaskcol;
Adjuster* const mercol;
Adjuster* const merlucol;
// Exposure
Adjuster* const expcomp;
Adjuster* const hlcompr;
@ -497,6 +499,7 @@ private:
Gtk::Button* const lumacontrastPlusButton;
sigc::connection lumacontrastMinusPressedConn, lumaneutralPressedConn, lumacontrastPlusPressedConn;
Gtk::Frame* const gridFrame;
Gtk::Frame* const gridmerFrame;
Gtk::Frame* const toolcolFrame;
Gtk::Frame* const toolblFrame;
Gtk::Frame* const mergecolFrame;
@ -515,6 +518,7 @@ private:
ToolParamBlock* const maskretiBox;
ToolParamBlock* const mask7;
LabGrid* const labgrid;
LabGrid* const labgridmerg;
Gtk::Label* const mMLabels;
Gtk::Label* const transLabels;
Gtk::Label* const transLabels2;

View File

@ -991,6 +991,10 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).labgridBLow = locallab.spots.at(j).labgridBLow && pSpot.labgridBLow == otherSpot.labgridBLow;
locallab.spots.at(j).labgridAHigh = locallab.spots.at(j).labgridAHigh && pSpot.labgridAHigh == otherSpot.labgridAHigh;
locallab.spots.at(j).labgridBHigh = locallab.spots.at(j).labgridBHigh && pSpot.labgridBHigh == otherSpot.labgridBHigh;
locallab.spots.at(j).labgridALowmerg = locallab.spots.at(j).labgridALowmerg && pSpot.labgridALowmerg == otherSpot.labgridALowmerg;
locallab.spots.at(j).labgridBLowmerg = locallab.spots.at(j).labgridBLowmerg && pSpot.labgridBLowmerg == otherSpot.labgridBLowmerg;
locallab.spots.at(j).labgridAHighmerg = locallab.spots.at(j).labgridAHighmerg && pSpot.labgridAHighmerg == otherSpot.labgridAHighmerg;
locallab.spots.at(j).labgridBHighmerg = locallab.spots.at(j).labgridBHighmerg && pSpot.labgridBHighmerg == otherSpot.labgridBHighmerg;
locallab.spots.at(j).strengthgrid = locallab.spots.at(j).strengthgrid && pSpot.strengthgrid == otherSpot.strengthgrid;
locallab.spots.at(j).sensi = locallab.spots.at(j).sensi && pSpot.sensi == otherSpot.sensi;
locallab.spots.at(j).structcol = locallab.spots.at(j).structcol && pSpot.structcol == otherSpot.structcol;
@ -1023,6 +1027,8 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).HHhmaskcurve = locallab.spots.at(j).HHhmaskcurve && pSpot.HHhmaskcurve == otherSpot.HHhmaskcurve;
locallab.spots.at(j).softradiuscol = locallab.spots.at(j).softradiuscol && pSpot.softradiuscol == otherSpot.softradiuscol;
locallab.spots.at(j).opacol = locallab.spots.at(j).opacol && pSpot.opacol == otherSpot.opacol;
locallab.spots.at(j).mercol = locallab.spots.at(j).mercol && pSpot.mercol == otherSpot.mercol;
locallab.spots.at(j).merlucol = locallab.spots.at(j).merlucol && pSpot.merlucol == otherSpot.merlucol;
locallab.spots.at(j).conthrcol = locallab.spots.at(j).conthrcol && pSpot.conthrcol == otherSpot.conthrcol;
locallab.spots.at(j).Lmaskcurve = locallab.spots.at(j).Lmaskcurve && pSpot.Lmaskcurve == otherSpot.Lmaskcurve;
locallab.spots.at(j).LLmaskcolcurvewav = locallab.spots.at(j).LLmaskcolcurvewav && pSpot.LLmaskcolcurvewav == otherSpot.LLmaskcolcurvewav;
@ -2905,6 +2911,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).labgridBHigh = mods.locallab.spots.at(i).labgridBHigh;
}
if (locallab.spots.at(i).labgridALowmerg) {
toEdit.locallab.spots.at(i).labgridALowmerg = mods.locallab.spots.at(i).labgridALowmerg;
}
if (locallab.spots.at(i).labgridBLowmerg) {
toEdit.locallab.spots.at(i).labgridBLowmerg = mods.locallab.spots.at(i).labgridBLowmerg;
}
if (locallab.spots.at(i).labgridAHighmerg) {
toEdit.locallab.spots.at(i).labgridAHighmerg = mods.locallab.spots.at(i).labgridAHighmerg;
}
if (locallab.spots.at(i).labgridBHighmerg) {
toEdit.locallab.spots.at(i).labgridBHighmerg = mods.locallab.spots.at(i).labgridBHighmerg;
}
if (locallab.spots.at(i).strengthgrid) {
toEdit.locallab.spots.at(i).strengthgrid = mods.locallab.spots.at(i).strengthgrid;
}
@ -3033,6 +3055,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).opacol = mods.locallab.spots.at(i).opacol;
}
if (locallab.spots.at(i).mercol) {
toEdit.locallab.spots.at(i).mercol = mods.locallab.spots.at(i).mercol;
}
if (locallab.spots.at(i).merlucol) {
toEdit.locallab.spots.at(i).merlucol = mods.locallab.spots.at(i).merlucol;
}
if (locallab.spots.at(i).conthrcol) {
toEdit.locallab.spots.at(i).conthrcol = mods.locallab.spots.at(i).conthrcol;
}
@ -5019,6 +5049,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
labgridBLow(v),
labgridAHigh(v),
labgridBHigh(v),
labgridALowmerg(v),
labgridBLowmerg(v),
labgridAHighmerg(v),
labgridBHighmerg(v),
strengthgrid(v),
sensi(v),
structcol(v),
@ -5051,6 +5085,8 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
HHhmaskcurve(v),
softradiuscol(v),
opacol(v),
mercol(v),
merlucol(v),
conthrcol(v),
Lmaskcurve(v),
LLmaskcolcurvewav(v),
@ -5349,6 +5385,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
labgridBLow = v;
labgridAHigh = v;
labgridBHigh = v;
labgridALowmerg = v;
labgridBLowmerg = v;
labgridAHighmerg = v;
labgridBHighmerg = v;
strengthgrid = v;
sensi = v;
structcol = v;
@ -5381,6 +5421,8 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
HHhmaskcurve = v;
softradiuscol = v;
opacol = v;
mercol = v;
merlucol = v;
conthrcol = v;
Lmaskcurve = v;
LLmaskcolcurvewav = v;

View File

@ -169,6 +169,10 @@ struct ColorToningEdited {
bool labgridBLow;
bool labgridAHigh;
bool labgridBHigh;
bool labgridALowmerg;
bool labgridBLowmerg;
bool labgridAHighmerg;
bool labgridBHighmerg;
bool labregions;
bool labregionsShowMask;
};
@ -421,6 +425,10 @@ public:
bool labgridBLow;
bool labgridAHigh;
bool labgridBHigh;
bool labgridALowmerg;
bool labgridBLowmerg;
bool labgridAHighmerg;
bool labgridBHighmerg;
bool strengthgrid;
bool sensi;
bool structcol;
@ -453,6 +461,8 @@ public:
bool HHhmaskcurve;
bool softradiuscol;
bool opacol;
bool mercol;
bool merlucol;
bool conthrcol;
bool Lmaskcurve;
bool LLmaskcolcurvewav;