Clean and format code
This commit is contained in:
parent
4fa494da55
commit
f53b1b4580
@ -1472,10 +1472,11 @@ void ImProcFunctions::log_encode(Imagefloat *rgb, struct local_params & lp, floa
|
|||||||
float &b = rgb->b(y, x);
|
float &b = rgb->b(y, x);
|
||||||
float t = Y[y][x];
|
float t = Y[y][x];
|
||||||
float t2;
|
float t2;
|
||||||
|
|
||||||
if (t > noise && (t2 = norm(r, g, b)) > noise) {
|
if (t > noise && (t2 = norm(r, g, b)) > noise) {
|
||||||
float c = apply(t, false);
|
float c = apply(t, false);
|
||||||
float f = c / t;
|
float f = c / t;
|
||||||
// float t2 = norm(r, g, b);
|
// float t2 = norm(r, g, b);
|
||||||
float f2 = apply(t2) / t2;
|
float f2 = apply(t2) / t2;
|
||||||
f = intp(blend, f, f2);
|
f = intp(blend, f, f2);
|
||||||
assert(std::isfinite(f));
|
assert(std::isfinite(f));
|
||||||
@ -4406,11 +4407,13 @@ void ImProcFunctions::InverseSharp_Local(float **loctemp, const float hueref, co
|
|||||||
case 0: { // outside selection and outside transition zone => full effect, no transition
|
case 0: { // outside selection and outside transition zone => full effect, no transition
|
||||||
float difL = loctemp[y][x] - original->L[y][x];
|
float difL = loctemp[y][x] - original->L[y][x];
|
||||||
transformed->L[y][x] = CLIP(original->L[y][x] + difL * reducdE);
|
transformed->L[y][x] = CLIP(original->L[y][x] + difL * reducdE);
|
||||||
if(sharshow) {
|
|
||||||
|
if (sharshow) {
|
||||||
transformed->a[y][x] = 0.f;
|
transformed->a[y][x] = 0.f;
|
||||||
transformed->b[y][x] = ampli * 5.f * difL * reducdE;
|
transformed->b[y][x] = ampli * 5.f * difL * reducdE;
|
||||||
} else if(previewshar) {
|
} else if (previewshar) {
|
||||||
float difbdisp = reducview * 10000.f * lp.colorde;
|
float difbdisp = reducview * 10000.f * lp.colorde;
|
||||||
|
|
||||||
if (transformed->L[y][x] < darklim) { //enhance dark luminance as user can see!
|
if (transformed->L[y][x] < darklim) { //enhance dark luminance as user can see!
|
||||||
float dark = transformed->L[y][x];
|
float dark = transformed->L[y][x];
|
||||||
transformed->L[y][x] = dark * aadark + bbdark;
|
transformed->L[y][x] = dark * aadark + bbdark;
|
||||||
@ -4436,11 +4439,13 @@ void ImProcFunctions::InverseSharp_Local(float **loctemp, const float hueref, co
|
|||||||
difL *= factorx;
|
difL *= factorx;
|
||||||
|
|
||||||
transformed->L[y][x] = CLIP(original->L[y][x] + difL * reducdE);
|
transformed->L[y][x] = CLIP(original->L[y][x] + difL * reducdE);
|
||||||
if(sharshow) {
|
|
||||||
|
if (sharshow) {
|
||||||
transformed->a[y][x] = 0.f;
|
transformed->a[y][x] = 0.f;
|
||||||
transformed->b[y][x] = ampli * 5.f * difL * reducdE;
|
transformed->b[y][x] = ampli * 5.f * difL * reducdE;
|
||||||
} else if(previewshar) {
|
} else if (previewshar) {
|
||||||
float difbdisp = reducview * 10000.f * lp.colorde;
|
float difbdisp = reducview * 10000.f * lp.colorde;
|
||||||
|
|
||||||
if (transformed->L[y][x] < darklim) { //enhance dark luminance as user can see!
|
if (transformed->L[y][x] < darklim) { //enhance dark luminance as user can see!
|
||||||
float dark = transformed->L[y][x];
|
float dark = transformed->L[y][x];
|
||||||
transformed->L[y][x] = dark * aadark + bbdark;
|
transformed->L[y][x] = dark * aadark + bbdark;
|
||||||
@ -4580,23 +4585,25 @@ void ImProcFunctions::Sharp_Local(int call, float **loctemp, int senstype, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
transformed->L[y][x] = CLIP(original->L[y][x] + difL * reducdE);
|
transformed->L[y][x] = CLIP(original->L[y][x] + difL * reducdE);
|
||||||
if(sharshow) {
|
|
||||||
|
if (sharshow) {
|
||||||
transformed->a[y][x] = 0.f;
|
transformed->a[y][x] = 0.f;
|
||||||
transformed->b[y][x] = ampli * 5.f * difL * reducdE;
|
transformed->b[y][x] = ampli * 5.f * difL * reducdE;
|
||||||
} else if(previewshar) {
|
} else if (previewshar) {
|
||||||
float difbdisp = reducview * 10000.f * lp.colorde;
|
float difbdisp = reducview * 10000.f * lp.colorde;
|
||||||
if (transformed->L[y][x] < darklim) { //enhance dark luminance as user can see!
|
|
||||||
float dark = transformed->L[y][x];
|
|
||||||
transformed->L[y][x] = dark * aadark + bbdark;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lp.colorde <= 0) {
|
if (transformed->L[y][x] < darklim) { //enhance dark luminance as user can see!
|
||||||
transformed->a[y][x] = 0.f;
|
float dark = transformed->L[y][x];
|
||||||
transformed->b[y][x] = difbdisp;
|
transformed->L[y][x] = dark * aadark + bbdark;
|
||||||
} else {
|
}
|
||||||
transformed->a[y][x] = -difbdisp;
|
|
||||||
transformed->b[y][x] = 0.f;
|
if (lp.colorde <= 0) {
|
||||||
}
|
transformed->a[y][x] = 0.f;
|
||||||
|
transformed->b[y][x] = difbdisp;
|
||||||
|
} else {
|
||||||
|
transformed->a[y][x] = -difbdisp;
|
||||||
|
transformed->b[y][x] = 0.f;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6604,7 +6611,7 @@ void ImProcFunctions::transit_shapedetect2(int call, int senstype, const LabImag
|
|||||||
difb = factorx * realstrbdE;
|
difb = factorx * realstrbdE;
|
||||||
float maxdifab = max(fabs(difa), fabs(difb));
|
float maxdifab = max(fabs(difa), fabs(difb));
|
||||||
|
|
||||||
if(origshow) {//original Retinex
|
if (origshow) { //original Retinex
|
||||||
transformed->a[y + ystart][x + xstart] = 0.f;
|
transformed->a[y + ystart][x + xstart] = 0.f;
|
||||||
transformed->b[y + ystart][x + xstart] = ampli * 8.f * diflc * reducdE;
|
transformed->b[y + ystart][x + xstart] = ampli * 8.f * diflc * reducdE;
|
||||||
|
|
||||||
@ -11648,15 +11655,16 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
|||||||
|
|
||||||
for (int y = 0; y < bfhr; y++) {
|
for (int y = 0; y < bfhr; y++) {
|
||||||
for (int x = 0; x < bfwr; x++) {
|
for (int x = 0; x < bfwr; x++) {
|
||||||
// datain[y * bfwr + x] = temp->L[y][x] - bufexpfin->L[y][x];
|
|
||||||
datain[y * bfwr + x] = bufexpfin->L[y][x];
|
datain[y * bfwr + x] = bufexpfin->L[y][x];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int showorig = lp.showmasksoftmet;
|
int showorig = lp.showmasksoftmet;
|
||||||
if(lp.showmasksoftmet >= 5) {
|
|
||||||
|
if (lp.showmasksoftmet >= 5) {
|
||||||
showorig = 0;
|
showorig = 0;
|
||||||
}
|
}
|
||||||
//ImProcFunctions::retinex_pde(datain, dataout, bfwr, bfhr, 8.f * lp.strng, 1.f, dE, lp.showmasksoftmet, 1, 1);
|
|
||||||
ImProcFunctions::retinex_pde(datain, dataout, bfwr, bfhr, 8.f * lp.strng, 1.f, dE, showorig, 1, 1);
|
ImProcFunctions::retinex_pde(datain, dataout, bfwr, bfhr, 8.f * lp.strng, 1.f, dE, showorig, 1, 1);
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for schedule(dynamic,16)
|
#pragma omp parallel for schedule(dynamic,16)
|
||||||
@ -12167,7 +12175,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
|||||||
|
|
||||||
|
|
||||||
transit_shapedetect2(call, 10, bufgb.get(), tmp1.get(), originalmasklc.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk);
|
transit_shapedetect2(call, 10, bufgb.get(), tmp1.get(), originalmasklc.get(), hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk);
|
||||||
// transit_shapedetect(10, tmp1.get(), nullptr, bufchro, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk);
|
|
||||||
tmp1.reset();
|
tmp1.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ static double blurSlider2radius(double sval)
|
|||||||
if (radius > MAXRAD) {
|
if (radius > MAXRAD) {
|
||||||
radius = MAXRAD;
|
radius = MAXRAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
return radius;
|
return radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1238,7 +1239,7 @@ pe(nullptr)
|
|||||||
colorBox->pack_start(*sensi);
|
colorBox->pack_start(*sensi);
|
||||||
|
|
||||||
// if (complexsoft < 2) {
|
// if (complexsoft < 2) {
|
||||||
colorBox->pack_start(*structcol);
|
colorBox->pack_start(*structcol);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (complexsoft < 2) {
|
if (complexsoft < 2) {
|
||||||
@ -1671,7 +1672,7 @@ pe(nullptr)
|
|||||||
|
|
||||||
toolBox->pack_start(*expcomp);
|
toolBox->pack_start(*expcomp);
|
||||||
// if (complexsoft < 2) {
|
// if (complexsoft < 2) {
|
||||||
toolBox->pack_start(*black);
|
toolBox->pack_start(*black);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (complexsoft < 2) {
|
if (complexsoft < 2) {
|
||||||
@ -1693,12 +1694,13 @@ pe(nullptr)
|
|||||||
exposeBox->pack_start(*sensiex);
|
exposeBox->pack_start(*sensiex);
|
||||||
|
|
||||||
// if (complexsoft < 2) {
|
// if (complexsoft < 2) {
|
||||||
exposeBox->pack_start(*structexp);
|
exposeBox->pack_start(*structexp);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (complexsoft < 2) {
|
if (complexsoft < 2) {
|
||||||
exposeBox->pack_start(*blurexpde);
|
exposeBox->pack_start(*blurexpde);
|
||||||
}
|
}
|
||||||
|
|
||||||
exposeBox->pack_start(*exptoolexp);
|
exposeBox->pack_start(*exptoolexp);
|
||||||
|
|
||||||
|
|
||||||
@ -1919,7 +1921,7 @@ pe(nullptr)
|
|||||||
ToolParamBlock* const gradSHBox = Gtk::manage(new ToolParamBlock());
|
ToolParamBlock* const gradSHBox = Gtk::manage(new ToolParamBlock());
|
||||||
gradSHBox->pack_start(*strSH);
|
gradSHBox->pack_start(*strSH);
|
||||||
gradSHBox->pack_start(*angSH);
|
gradSHBox->pack_start(*angSH);
|
||||||
// gradSHFrame->add(*gradSHBox);
|
// gradSHFrame->add(*gradSHBox);
|
||||||
|
|
||||||
setExpandAlignProperties(expgradsh, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
setExpandAlignProperties(expgradsh, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
||||||
expgradsh->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expgradsh));
|
expgradsh->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expgradsh));
|
||||||
@ -1928,11 +1930,11 @@ pe(nullptr)
|
|||||||
expgradsh->add(*gradSHBox, false);
|
expgradsh->add(*gradSHBox, false);
|
||||||
|
|
||||||
shadhighBox->pack_start(*detailSH);
|
shadhighBox->pack_start(*detailSH);
|
||||||
// shadhighBox->pack_start(*gamFrame);
|
// shadhighBox->pack_start(*gamFrame);
|
||||||
|
|
||||||
if (complexsoft < 2) {
|
if (complexsoft < 2) {
|
||||||
// shadhighBox->pack_start(*gamFrame);
|
// shadhighBox->pack_start(*gamFrame);
|
||||||
// shadhighBox->pack_start(*exptrcsh);
|
// shadhighBox->pack_start(*exptrcsh);
|
||||||
}
|
}
|
||||||
|
|
||||||
shadhighBox->pack_start(*highlights);
|
shadhighBox->pack_start(*highlights);
|
||||||
@ -1945,6 +1947,7 @@ pe(nullptr)
|
|||||||
if (complexsoft < 2) {
|
if (complexsoft < 2) {
|
||||||
shadhighBox->pack_start(*blurSHde);
|
shadhighBox->pack_start(*blurSHde);
|
||||||
}
|
}
|
||||||
|
|
||||||
shadhighBox->pack_start(*gamFrame);
|
shadhighBox->pack_start(*gamFrame);
|
||||||
|
|
||||||
// shadhighBox->pack_start(*gradSHFrame);
|
// shadhighBox->pack_start(*gradSHFrame);
|
||||||
@ -2140,7 +2143,7 @@ pe(nullptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if (complexsoft < 2) {
|
// if (complexsoft < 2) {
|
||||||
vibranceBox->pack_start(*expgradvib);
|
vibranceBox->pack_start(*expgradvib);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
enavibMaskConn = enavibMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enavibMaskChanged));
|
enavibMaskConn = enavibMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enavibMaskChanged));
|
||||||
@ -2863,6 +2866,7 @@ pe(nullptr)
|
|||||||
enablecontrastConn = expcontrast->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expcontrast));
|
enablecontrastConn = expcontrast->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expcontrast));
|
||||||
fftwlcConn = fftwlc->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::fftwlcChanged));
|
fftwlcConn = fftwlc->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::fftwlcChanged));
|
||||||
csThreshold->setAdjusterListener(this);
|
csThreshold->setAdjusterListener(this);
|
||||||
|
|
||||||
if (showtooltip) {
|
if (showtooltip) {
|
||||||
expcontrast->set_tooltip_text(M("TP_LOCALLAB_EXPCONTRAST_TOOLTIP"));
|
expcontrast->set_tooltip_text(M("TP_LOCALLAB_EXPCONTRAST_TOOLTIP"));
|
||||||
}
|
}
|
||||||
@ -2890,8 +2894,8 @@ pe(nullptr)
|
|||||||
|
|
||||||
LocalcurveEditorwav->setCurveListener(this);
|
LocalcurveEditorwav->setCurveListener(this);
|
||||||
std::vector<GradientMilestone> botMilestones;
|
std::vector<GradientMilestone> botMilestones;
|
||||||
botMilestones.push_back( GradientMilestone(0., 0., 0., 0.) );
|
botMilestones.push_back(GradientMilestone(0., 0., 0., 0.));
|
||||||
botMilestones.push_back( GradientMilestone(1., 1., 1., 1.) );
|
botMilestones.push_back(GradientMilestone(1., 1., 1., 1.));
|
||||||
|
|
||||||
wavshape->setIdentityValue(0.);
|
wavshape->setIdentityValue(0.);
|
||||||
wavshape->setResetCurve(FlatCurveType(defSpot.locwavcurve.at(0)), defSpot.locwavcurve);
|
wavshape->setResetCurve(FlatCurveType(defSpot.locwavcurve.at(0)), defSpot.locwavcurve);
|
||||||
@ -2945,6 +2949,7 @@ pe(nullptr)
|
|||||||
// wavshapecompre->setTooltip(M("TP_LOCALLAB_COMPRESS_TOOLTIP"));
|
// wavshapecompre->setTooltip(M("TP_LOCALLAB_COMPRESS_TOOLTIP"));
|
||||||
// wavshapecomp->setTooltip(M("TP_LOCALLAB_COMPRESS_TOOLTIP"));
|
// wavshapecomp->setTooltip(M("TP_LOCALLAB_COMPRESS_TOOLTIP"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showtooltip) {
|
if (showtooltip) {
|
||||||
llshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP"));
|
llshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP"));
|
||||||
}
|
}
|
||||||
@ -3016,7 +3021,7 @@ pe(nullptr)
|
|||||||
clariFrame->add(*clariBox);
|
clariFrame->add(*clariBox);
|
||||||
|
|
||||||
gradwavFrame->set_label_align(0.025, 0.5);
|
gradwavFrame->set_label_align(0.025, 0.5);
|
||||||
wavgradl->set_active (false);
|
wavgradl->set_active(false);
|
||||||
gradwavFrame->set_label_widget(*wavgradl);
|
gradwavFrame->set_label_widget(*wavgradl);
|
||||||
ToolParamBlock* const gradwavBox = Gtk::manage(new ToolParamBlock());
|
ToolParamBlock* const gradwavBox = Gtk::manage(new ToolParamBlock());
|
||||||
gradwavBox->pack_start(*strwav);
|
gradwavBox->pack_start(*strwav);
|
||||||
@ -3026,10 +3031,10 @@ pe(nullptr)
|
|||||||
Gtk::HSeparator* const separatorblu = Gtk::manage(new Gtk::HSeparator());
|
Gtk::HSeparator* const separatorblu = Gtk::manage(new Gtk::HSeparator());
|
||||||
|
|
||||||
blurlevelFrame->set_label_align(0.025, 0.5);
|
blurlevelFrame->set_label_align(0.025, 0.5);
|
||||||
Gtk::VBox *blurlevcontBox = Gtk::manage ( new Gtk::VBox());
|
Gtk::VBox *blurlevcontBox = Gtk::manage(new Gtk::VBox());
|
||||||
blurlevcontBox->set_spacing(2);
|
blurlevcontBox->set_spacing(2);
|
||||||
|
|
||||||
wavblur->set_active (true);
|
wavblur->set_active(true);
|
||||||
blurlevelFrame->set_label_widget(*wavblur);
|
blurlevelFrame->set_label_widget(*wavblur);
|
||||||
|
|
||||||
// ToolParamBlock* const blurlevcontBox = Gtk::manage(new ToolParamBlock());
|
// ToolParamBlock* const blurlevcontBox = Gtk::manage(new ToolParamBlock());
|
||||||
@ -3044,9 +3049,9 @@ pe(nullptr)
|
|||||||
|
|
||||||
contFrame->set_label_align(0.025, 0.5);
|
contFrame->set_label_align(0.025, 0.5);
|
||||||
// ToolParamBlock* const contlevBox = Gtk::manage(new ToolParamBlock());
|
// ToolParamBlock* const contlevBox = Gtk::manage(new ToolParamBlock());
|
||||||
Gtk::VBox *contlevBox = Gtk::manage ( new Gtk::VBox());
|
Gtk::VBox *contlevBox = Gtk::manage(new Gtk::VBox());
|
||||||
contlevBox->set_spacing(2);
|
contlevBox->set_spacing(2);
|
||||||
wavcont->set_active (true);
|
wavcont->set_active(true);
|
||||||
contFrame->set_label_widget(*wavcont);
|
contFrame->set_label_widget(*wavcont);
|
||||||
|
|
||||||
contlevBox->pack_start(*sigma);
|
contlevBox->pack_start(*sigma);
|
||||||
@ -3058,15 +3063,15 @@ pe(nullptr)
|
|||||||
Gtk::HSeparator* const separatorcomp = Gtk::manage(new Gtk::HSeparator());
|
Gtk::HSeparator* const separatorcomp = Gtk::manage(new Gtk::HSeparator());
|
||||||
|
|
||||||
compFrame->set_label_align(0.025, 0.5);
|
compFrame->set_label_align(0.025, 0.5);
|
||||||
Gtk::VBox *compBox = Gtk::manage ( new Gtk::VBox());
|
Gtk::VBox *compBox = Gtk::manage(new Gtk::VBox());
|
||||||
compBox->set_spacing(2);
|
compBox->set_spacing(2);
|
||||||
wavcomp->set_active (false);
|
wavcomp->set_active(false);
|
||||||
compFrame->set_label_widget(*wavcomp);
|
compFrame->set_label_widget(*wavcomp);
|
||||||
|
|
||||||
compreFrame->set_label_align(0.025, 0.5);
|
compreFrame->set_label_align(0.025, 0.5);
|
||||||
Gtk::VBox *compreBox = Gtk::manage ( new Gtk::VBox());
|
Gtk::VBox *compreBox = Gtk::manage(new Gtk::VBox());
|
||||||
compreBox->set_spacing(2);
|
compreBox->set_spacing(2);
|
||||||
wavcompre->set_active (false);
|
wavcompre->set_active(false);
|
||||||
compreFrame->set_label_widget(*wavcompre);
|
compreFrame->set_label_widget(*wavcompre);
|
||||||
compreBox->pack_start(*LocalcurveEditorwavcompre, Gtk::PACK_SHRINK, 4);
|
compreBox->pack_start(*LocalcurveEditorwavcompre, Gtk::PACK_SHRINK, 4);
|
||||||
compreBox->pack_start(*threswav);
|
compreBox->pack_start(*threswav);
|
||||||
@ -3100,12 +3105,15 @@ pe(nullptr)
|
|||||||
blurcontBox->pack_start(*gradwavFrame);
|
blurcontBox->pack_start(*gradwavFrame);
|
||||||
blurcontBox->pack_start(*contFrame);
|
blurcontBox->pack_start(*contFrame);
|
||||||
blurcontBox->pack_start(*compreFrame);
|
blurcontBox->pack_start(*compreFrame);
|
||||||
|
|
||||||
if (complexsoft < 2) {
|
if (complexsoft < 2) {
|
||||||
blurcontBox->pack_start(*compFrame);
|
blurcontBox->pack_start(*compFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
blurcontBox->pack_start(*blurlevelFrame);
|
blurcontBox->pack_start(*blurlevelFrame);
|
||||||
|
|
||||||
expcontrastpyr->add(*blurcontBox, false);
|
expcontrastpyr->add(*blurcontBox, false);
|
||||||
|
|
||||||
if (showtooltip) {
|
if (showtooltip) {
|
||||||
fatdet->set_tooltip_text(M("TP_LOCALLAB_COMPFRAME_TOOLTIP"));
|
fatdet->set_tooltip_text(M("TP_LOCALLAB_COMPFRAME_TOOLTIP"));
|
||||||
}
|
}
|
||||||
@ -3132,7 +3140,7 @@ pe(nullptr)
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// if (complexsoft < 2) {
|
// if (complexsoft < 2) {
|
||||||
contrastBox->pack_start(*residchro);
|
contrastBox->pack_start(*residchro);
|
||||||
// }
|
// }
|
||||||
contrastBox->pack_start(*sensilc);
|
contrastBox->pack_start(*sensilc);
|
||||||
|
|
||||||
@ -3146,6 +3154,7 @@ pe(nullptr)
|
|||||||
if (complexsoft < 2) {
|
if (complexsoft < 2) {
|
||||||
contrastBox->pack_start(*fftwlc);
|
contrastBox->pack_start(*fftwlc);
|
||||||
}
|
}
|
||||||
|
|
||||||
masklcCurveEditorG->setCurveListener(this);
|
masklcCurveEditorG->setCurveListener(this);
|
||||||
CCmasklcshape->setIdentityValue(0.);
|
CCmasklcshape->setIdentityValue(0.);
|
||||||
CCmasklcshape->setResetCurve(FlatCurveType(defSpot.CCmasklccurve.at(0)), defSpot.CCmasklccurve);
|
CCmasklcshape->setResetCurve(FlatCurveType(defSpot.CCmasklccurve.at(0)), defSpot.CCmasklccurve);
|
||||||
@ -3431,7 +3440,7 @@ pe(nullptr)
|
|||||||
expcbdl->setLevel(2);
|
expcbdl->setLevel(2);
|
||||||
|
|
||||||
// if (complexsoft < 2) {
|
// if (complexsoft < 2) {
|
||||||
panel->pack_start(*expcbdl, false, false);
|
panel->pack_start(*expcbdl, false, false);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Blur & Noise
|
// Blur & Noise
|
||||||
@ -3801,7 +3810,7 @@ pe(nullptr)
|
|||||||
expdenoi->setLevel(2);
|
expdenoi->setLevel(2);
|
||||||
|
|
||||||
// if (complexsoft < 2) {
|
// if (complexsoft < 2) {
|
||||||
panel->pack_start(*expdenoi, false, false);
|
panel->pack_start(*expdenoi, false, false);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// log encoding
|
// log encoding
|
||||||
@ -4407,6 +4416,7 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
|
|||||||
r->colorde = pp->locallab.spots.at(i).colorde;
|
r->colorde = pp->locallab.spots.at(i).colorde;
|
||||||
r->transitweak = pp->locallab.spots.at(i).transitweak;
|
r->transitweak = pp->locallab.spots.at(i).transitweak;
|
||||||
r->transitgrad = pp->locallab.spots.at(i).transitgrad;
|
r->transitgrad = pp->locallab.spots.at(i).transitgrad;
|
||||||
|
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
r->transitweak = 1;
|
r->transitweak = 1;
|
||||||
r->transitgrad = 0;
|
r->transitgrad = 0;
|
||||||
@ -4496,6 +4506,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
|
|||||||
r->sensiexclu = newSpot->sensiexclu;
|
r->sensiexclu = newSpot->sensiexclu;
|
||||||
r->structexclu = newSpot->structexclu;
|
r->structexclu = newSpot->structexclu;
|
||||||
r->struc = newSpot->struc;
|
r->struc = newSpot->struc;
|
||||||
|
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
r->shapeMethod = 0;
|
r->shapeMethod = 0;
|
||||||
}
|
}
|
||||||
@ -4560,10 +4571,12 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
|
|||||||
r->colorde = newSpot->colorde;
|
r->colorde = newSpot->colorde;
|
||||||
r->transitweak = newSpot->transitweak;
|
r->transitweak = newSpot->transitweak;
|
||||||
r->transitgrad = newSpot->transitgrad;
|
r->transitgrad = newSpot->transitgrad;
|
||||||
|
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
r->transitweak = 1;
|
r->transitweak = 1;
|
||||||
r->transitgrad = 0;
|
r->transitgrad = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
r->scopemask = newSpot->scopemask;
|
r->scopemask = newSpot->scopemask;
|
||||||
r->lumask = newSpot->lumask;
|
r->lumask = newSpot->lumask;
|
||||||
r->avoid = newSpot->avoid;
|
r->avoid = newSpot->avoid;
|
||||||
@ -4747,6 +4760,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
|
|||||||
} else {
|
} else {
|
||||||
r->shapeMethod = 3;
|
r->shapeMethod = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
r->shapeMethod = 0;
|
r->shapeMethod = 0;
|
||||||
}
|
}
|
||||||
@ -4801,6 +4815,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
|
|||||||
r->colorde = newSpot->colorde;
|
r->colorde = newSpot->colorde;
|
||||||
r->transitweak = newSpot->transitweak;
|
r->transitweak = newSpot->transitweak;
|
||||||
r->transitgrad = newSpot->transitgrad;
|
r->transitgrad = newSpot->transitgrad;
|
||||||
|
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
r->transitweak = 1;
|
r->transitweak = 1;
|
||||||
r->transitgrad = 0;
|
r->transitgrad = 0;
|
||||||
@ -4896,10 +4911,12 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
|
|||||||
pp->locallab.spots.at(pp->locallab.selspot).sensiexclu = r->sensiexclu;
|
pp->locallab.spots.at(pp->locallab.selspot).sensiexclu = r->sensiexclu;
|
||||||
pp->locallab.spots.at(pp->locallab.selspot).structexclu = r->structexclu;
|
pp->locallab.spots.at(pp->locallab.selspot).structexclu = r->structexclu;
|
||||||
pp->locallab.spots.at(pp->locallab.selspot).struc = r->struc;
|
pp->locallab.spots.at(pp->locallab.selspot).struc = r->struc;
|
||||||
|
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
pp->locallab.spots.at(pp->locallab.selspot).shapeMethod = "IND";
|
pp->locallab.spots.at(pp->locallab.selspot).shapeMethod = "IND";
|
||||||
r->shapeMethod = 0;
|
r->shapeMethod = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r->shapeMethod == 0) {
|
if (r->shapeMethod == 0) {
|
||||||
pp->locallab.spots.at(pp->locallab.selspot).shapeMethod = "IND";
|
pp->locallab.spots.at(pp->locallab.selspot).shapeMethod = "IND";
|
||||||
} else if (r->shapeMethod == 1) {
|
} else if (r->shapeMethod == 1) {
|
||||||
@ -4941,6 +4958,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
|
|||||||
pp->locallab.spots.at(pp->locallab.selspot).colorde = r->colorde;
|
pp->locallab.spots.at(pp->locallab.selspot).colorde = r->colorde;
|
||||||
pp->locallab.spots.at(pp->locallab.selspot).transitweak = r->transitweak;
|
pp->locallab.spots.at(pp->locallab.selspot).transitweak = r->transitweak;
|
||||||
pp->locallab.spots.at(pp->locallab.selspot).transitgrad = r->transitgrad;
|
pp->locallab.spots.at(pp->locallab.selspot).transitgrad = r->transitgrad;
|
||||||
|
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
r->transitweak = 1;
|
r->transitweak = 1;
|
||||||
r->transitgrad = 0;
|
r->transitgrad = 0;
|
||||||
@ -6818,6 +6836,7 @@ void Locallab::curveChanged(CurveEditor* ce)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//denoise
|
//denoise
|
||||||
if (getEnabled() && expdenoi->getEnabled()) {
|
if (getEnabled() && expdenoi->getEnabled()) {
|
||||||
|
|
||||||
@ -7079,7 +7098,7 @@ void Locallab::merMethodChanged()
|
|||||||
gridmerFrame->hide();
|
gridmerFrame->hide();
|
||||||
} else if (merMethod->get_active_row_number() == 2) {
|
} else if (merMethod->get_active_row_number() == 2) {
|
||||||
mask7->show();
|
mask7->show();
|
||||||
// sensi->set_sensitive(false);
|
// sensi->set_sensitive(false);
|
||||||
sensi->set_sensitive(true);
|
sensi->set_sensitive(true);
|
||||||
// structcol->set_sensitive(false);
|
// structcol->set_sensitive(false);
|
||||||
// blurcolde->set_sensitive(false);
|
// blurcolde->set_sensitive(false);
|
||||||
@ -7098,7 +7117,7 @@ void Locallab::merMethodChanged()
|
|||||||
gridmerFrame->hide();
|
gridmerFrame->hide();
|
||||||
|
|
||||||
} else if (merMethod->get_active_row_number() == 3) {
|
} else if (merMethod->get_active_row_number() == 3) {
|
||||||
// sensi->set_sensitive(false);
|
// sensi->set_sensitive(false);
|
||||||
sensi->set_sensitive(true);
|
sensi->set_sensitive(true);
|
||||||
// structcol->set_sensitive(false);
|
// structcol->set_sensitive(false);
|
||||||
// blurcolde->set_sensitive(false);
|
// blurcolde->set_sensitive(false);
|
||||||
@ -7123,7 +7142,7 @@ void Locallab::merMethodChanged()
|
|||||||
// blurcolde->set_sensitive(false);
|
// blurcolde->set_sensitive(false);
|
||||||
// blurcol->set_sensitive(false);
|
// blurcol->set_sensitive(false);
|
||||||
// contcol->set_sensitive(false);
|
// contcol->set_sensitive(false);
|
||||||
// sensi->set_sensitive(false);
|
// sensi->set_sensitive(false);
|
||||||
sensi->set_sensitive(true);
|
sensi->set_sensitive(true);
|
||||||
// structcol->set_sensitive(false);
|
// structcol->set_sensitive(false);
|
||||||
structcol->set_sensitive(true);
|
structcol->set_sensitive(true);
|
||||||
@ -7928,13 +7947,13 @@ void Locallab::fftwblChanged()
|
|||||||
{
|
{
|
||||||
// printf("fftwblChanged\n");
|
// printf("fftwblChanged\n");
|
||||||
double temp = radius->getValue();
|
double temp = radius->getValue();
|
||||||
/*
|
/*
|
||||||
if (fftwbl->get_active()) {
|
if (fftwbl->get_active()) {
|
||||||
radius->setLimits(1.5, 1000., 0.5, 1.5);
|
radius->setLimits(1.5, 1000., 0.5, 1.5);
|
||||||
} else {
|
} else {
|
||||||
radius->setLimits(1.5, 100., 0.5, 1.5);
|
radius->setLimits(1.5, 100., 0.5, 1.5);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
radius->setValue(temp);
|
radius->setValue(temp);
|
||||||
|
|
||||||
if (multiImage) {
|
if (multiImage) {
|
||||||
@ -8184,7 +8203,7 @@ void Locallab::inversChanged()
|
|||||||
showmaskcolMethod->hide();
|
showmaskcolMethod->hide();
|
||||||
showmaskcolMethodinv->show();
|
showmaskcolMethodinv->show();
|
||||||
merge1colFrame->hide();
|
merge1colFrame->hide();
|
||||||
expgradcol->hide();
|
expgradcol->hide();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
sensi->show();
|
sensi->show();
|
||||||
@ -8249,6 +8268,7 @@ void Locallab::inversexChanged()
|
|||||||
expMethod->show();
|
expMethod->show();
|
||||||
exnoiseMethod->show();
|
exnoiseMethod->show();
|
||||||
expgradexp->show();
|
expgradexp->show();
|
||||||
|
|
||||||
if (expMethod->get_active_row_number() == 0) {
|
if (expMethod->get_active_row_number() == 0) {
|
||||||
pdeFrame->hide();
|
pdeFrame->hide();
|
||||||
softradiusexp->show();
|
softradiusexp->show();
|
||||||
@ -11824,7 +11844,7 @@ void Locallab::disableListener()
|
|||||||
void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited, int index)
|
void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited, int index)
|
||||||
{
|
{
|
||||||
// printf("updateLocallabGUI\n");
|
// printf("updateLocallabGUI\n");
|
||||||
ControlSpotPanel::SpotRow* const r = new ControlSpotPanel::SpotRow();
|
ControlSpotPanel::SpotRow* const r = new ControlSpotPanel::SpotRow();
|
||||||
|
|
||||||
// Update GUI values
|
// Update GUI values
|
||||||
if (index < pp->locallab.nbspot && index < (int)pp->locallab.spots.size()) {
|
if (index < pp->locallab.nbspot && index < (int)pp->locallab.spots.size()) {
|
||||||
@ -12084,7 +12104,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
|||||||
expcomp->setValue(0);
|
expcomp->setValue(0);
|
||||||
hlcompr->setValue(0);
|
hlcompr->setValue(0);
|
||||||
hlcomprthresh->setValue(0);
|
hlcomprthresh->setValue(0);
|
||||||
// black->setValue(0);
|
// black->setValue(0);
|
||||||
shadex->setValue(0);
|
shadex->setValue(0);
|
||||||
shcompr->setValue(0);
|
shcompr->setValue(0);
|
||||||
expchroma->setValue(0);
|
expchroma->setValue(0);
|
||||||
@ -12172,8 +12192,8 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
|||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
gammaskSH->setValue(1);
|
gammaskSH->setValue(1);
|
||||||
slomaskSH->setValue(0);
|
slomaskSH->setValue(0);
|
||||||
// strSH->setValue(0);
|
// strSH->setValue(0);
|
||||||
// angSH->setValue(0);
|
// angSH->setValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (complexsoft > 0) {
|
if (complexsoft > 0) {
|
||||||
@ -12330,20 +12350,22 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
|||||||
lapmaskbl->setValue(0);
|
lapmaskbl->setValue(0);
|
||||||
LLmaskblshapewav->reset();
|
LLmaskblshapewav->reset();
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if (fftwbl->get_active()) {
|
/*
|
||||||
radius->setLimits(1.5, 1000., 0.5, 1.5);
|
if (fftwbl->get_active()) {
|
||||||
} else {
|
radius->setLimits(1.5, 1000., 0.5, 1.5);
|
||||||
radius->setLimits(1.5, 100., 0.5, 1.5);
|
} else {
|
||||||
}
|
radius->setLimits(1.5, 100., 0.5, 1.5);
|
||||||
*/
|
}
|
||||||
|
*/
|
||||||
radius->setValue(pp->locallab.spots.at(index).radius);
|
radius->setValue(pp->locallab.spots.at(index).radius);
|
||||||
/*
|
|
||||||
if (complexsoft == 2) {
|
/*
|
||||||
radius->setLimits(1.5, 100., 0.5, 1.5);
|
if (complexsoft == 2) {
|
||||||
radius->setValue(pp->locallab.spots.at(index).radius);
|
radius->setLimits(1.5, 100., 0.5, 1.5);
|
||||||
}
|
radius->setValue(pp->locallab.spots.at(index).radius);
|
||||||
*/
|
}
|
||||||
|
*/
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
fftwbl->set_active(false);
|
fftwbl->set_active(false);
|
||||||
}
|
}
|
||||||
@ -12496,14 +12518,14 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
|||||||
|
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
localcontMethod->set_active(1);
|
localcontMethod->set_active(1);
|
||||||
// claricres->setValue(0);
|
// claricres->setValue(0);
|
||||||
// clarisoft->setValue(0);
|
// clarisoft->setValue(0);
|
||||||
lcradius->setValue(80);
|
lcradius->setValue(80);
|
||||||
lcamount->setValue(0);
|
lcamount->setValue(0);
|
||||||
// residchro->setValue(0);
|
// residchro->setValue(0);
|
||||||
fftwlc->set_active(false);
|
fftwlc->set_active(false);
|
||||||
wavcomp->set_active(false);
|
wavcomp->set_active(false);
|
||||||
// blurlc->set_active(false);
|
// blurlc->set_active(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
wavshape->setCurve(pp->locallab.spots.at(index).locwavcurve);
|
wavshape->setCurve(pp->locallab.spots.at(index).locwavcurve);
|
||||||
@ -12559,13 +12581,14 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
|||||||
LLmaskcbshape->setCurve(pp->locallab.spots.at(index).LLmaskcbcurve);
|
LLmaskcbshape->setCurve(pp->locallab.spots.at(index).LLmaskcbcurve);
|
||||||
HHmaskcbshape->setCurve(pp->locallab.spots.at(index).HHmaskcbcurve);
|
HHmaskcbshape->setCurve(pp->locallab.spots.at(index).HHmaskcbcurve);
|
||||||
Lmaskcbshape->setCurve(pp->locallab.spots.at(index).Lmaskcbcurve);
|
Lmaskcbshape->setCurve(pp->locallab.spots.at(index).Lmaskcbcurve);
|
||||||
/*
|
|
||||||
if (complexsoft == 2) {
|
/*
|
||||||
for (int i = 0; i < 6; i++) {
|
if (complexsoft == 2) {
|
||||||
multiplier[i]->setValue(1.0);
|
for (int i = 0; i < 6; i++) {
|
||||||
}
|
multiplier[i]->setValue(1.0);
|
||||||
}
|
}
|
||||||
*/
|
}
|
||||||
|
*/
|
||||||
if (complexsoft > 0) {
|
if (complexsoft > 0) {
|
||||||
lapmaskcb->setValue(0);
|
lapmaskcb->setValue(0);
|
||||||
}
|
}
|
||||||
@ -12586,17 +12609,17 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
|||||||
sensiden->setValue(pp->locallab.spots.at(index).sensiden);
|
sensiden->setValue(pp->locallab.spots.at(index).sensiden);
|
||||||
detailthr->setValue(pp->locallab.spots.at(index).detailthr);
|
detailthr->setValue(pp->locallab.spots.at(index).detailthr);
|
||||||
wavshapeden->setCurve(pp->locallab.spots.at(index).locwavcurveden);
|
wavshapeden->setCurve(pp->locallab.spots.at(index).locwavcurveden);
|
||||||
/*
|
/*
|
||||||
if (complexsoft == 2) {
|
if (complexsoft == 2) {
|
||||||
noiselumf->setValue(0);
|
noiselumf->setValue(0);
|
||||||
noiselumf0->setValue(0);
|
noiselumf0->setValue(0);
|
||||||
noiselumf2->setValue(0);
|
noiselumf2->setValue(0);
|
||||||
noiselumc->setValue(0);
|
noiselumc->setValue(0);
|
||||||
noisechrof->setValue(0);
|
noisechrof->setValue(0);
|
||||||
noisechroc->setValue(0);
|
noisechroc->setValue(0);
|
||||||
bilateral->setValue(0);
|
bilateral->setValue(0);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
//log encoding
|
//log encoding
|
||||||
explog->setEnabled(pp->locallab.spots.at(index).explog);
|
explog->setEnabled(pp->locallab.spots.at(index).explog);
|
||||||
autocompute->set_active(pp->locallab.spots.at(index).autocompute);
|
autocompute->set_active(pp->locallab.spots.at(index).autocompute);
|
||||||
@ -13217,7 +13240,7 @@ void Locallab::updateSpecificGUIState()
|
|||||||
} else if (merMethod->get_active_row_number() == 3) {
|
} else if (merMethod->get_active_row_number() == 3) {
|
||||||
conthrcol->show();
|
conthrcol->show();
|
||||||
// structcol->set_sensitive(false);
|
// structcol->set_sensitive(false);
|
||||||
// sensi->set_sensitive(false);
|
// sensi->set_sensitive(false);
|
||||||
sensi->set_sensitive(true);
|
sensi->set_sensitive(true);
|
||||||
// blurcolde->set_sensitive(false);
|
// blurcolde->set_sensitive(false);
|
||||||
// blurcol->set_sensitive(false);
|
// blurcol->set_sensitive(false);
|
||||||
@ -13352,10 +13375,11 @@ void Locallab::updateSpecificGUIState()
|
|||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
multipliersh[i]->hide();
|
multipliersh[i]->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
expgradsh->hide();
|
expgradsh->hide();
|
||||||
|
|
||||||
detailSH->hide();
|
detailSH->hide();
|
||||||
// gamFrame->hide();
|
// gamFrame->hide();
|
||||||
highlights->show();
|
highlights->show();
|
||||||
h_tonalwidth->show();
|
h_tonalwidth->show();
|
||||||
shadows->show();
|
shadows->show();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user