Merge with dev
This commit is contained in:
commit
a806d00268
@ -567,10 +567,10 @@ HISTORY_MSG_314;W - Gamut - Reduce artifacts
|
||||
HISTORY_MSG_315;W - Residual - Contrast
|
||||
HISTORY_MSG_316;W - Gamut - Skin tar/prot
|
||||
HISTORY_MSG_317;W - Gamut - Skin hue
|
||||
HISTORY_MSG_318;W - Contrast - Highlight levels
|
||||
HISTORY_MSG_319;W - Contrast - Highlight range
|
||||
HISTORY_MSG_320;W - Contrast - Shadow range
|
||||
HISTORY_MSG_321;W - Contrast - Shadow levels
|
||||
HISTORY_MSG_318;W - Contrast - Fine levels
|
||||
HISTORY_MSG_319;W - Contrast - Fine range
|
||||
HISTORY_MSG_320;W - Contrast - Coarse range
|
||||
HISTORY_MSG_321;W - Contrast - Coarse levels
|
||||
HISTORY_MSG_322;W - Gamut - Avoid color shift
|
||||
HISTORY_MSG_323;W - ES - Local contrast
|
||||
HISTORY_MSG_324;W - Chroma - Pastel
|
||||
@ -1251,6 +1251,12 @@ HISTORY_MSG_WAVBL;Blur levels
|
||||
HISTORY_MSG_BLURWAV;Blur luminance
|
||||
HISTORY_MSG_BLURCWAV;Blur chroma
|
||||
HISTORY_MSG_EDGEFFECT;Edge Damper
|
||||
HISTORY_MSG_SIGMAFIN;Final contrast Damper
|
||||
HISTORY_MSG_SIGMATON;Toning Damper
|
||||
HISTORY_MSG_SIGMACOL;Chroma Damper
|
||||
HISTORY_MSG_SIGMADIR;Dir Damper
|
||||
HISTORY_MSG_RANGEAB;Range ab
|
||||
HISTORY_MSG_PROTAB;Protection
|
||||
HISTORY_NEWSNAPSHOT;Add
|
||||
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b>
|
||||
HISTORY_SNAPSHOT;Snapshot
|
||||
@ -3126,6 +3132,7 @@ TP_WAVELET_CONTEDIT;'After' contrast curve
|
||||
TP_WAVELET_CONTFRAME;Contrast - Compression
|
||||
TP_WAVELET_CONTR;Gamut
|
||||
TP_WAVELET_CONTRA;Contrast
|
||||
TP_WAVELET_CONTRASTEDIT;Finer - Coarser levels
|
||||
TP_WAVELET_CONTRAST_MINUS;Contrast -
|
||||
TP_WAVELET_CONTRAST_PLUS;Contrast +
|
||||
TP_WAVELET_CONTRA_TOOLTIP;Changes contrast of the residual image.
|
||||
@ -3146,6 +3153,7 @@ TP_WAVELET_DAUB6;D6 - standard plus
|
||||
TP_WAVELET_DAUB10;D10 - medium
|
||||
TP_WAVELET_DAUB14;D14 - high
|
||||
TP_WAVELET_DAUB_TOOLTIP;Changes Daubechies coefficients:\nD4 = Standard,\nD14 = Often best performance, 10% more time-intensive.\n\nAffects edge detection as well as the general quality of the firsts levels. However the quality is not strictly related to this coefficient and can vary with images and uses.
|
||||
TP_WAVELET_DIRFRAME;Directional contrast
|
||||
TP_WAVELET_DONE;Vertical
|
||||
TP_WAVELET_DTHR;Diagonal
|
||||
TP_WAVELET_DTWO;Horizontal
|
||||
@ -3171,10 +3179,12 @@ TP_WAVELET_EDSL;Threshold Sliders
|
||||
TP_WAVELET_EDTYPE;Local contrast method
|
||||
TP_WAVELET_EDVAL;Strength
|
||||
TP_WAVELET_FINAL;Final Touchup
|
||||
TP_WAVELET_FINCFRAME;Final Local Contrast
|
||||
TP_WAVELET_FINEST;Finest
|
||||
TP_WAVELET_HIGHLIGHT;Highlight luminance range
|
||||
TP_WAVELET_HIGHLIGHT;Finer levels luminance range
|
||||
TP_WAVELET_FINCOAR_TOOLTIP;The left (positive) part of the curve acts on the finer levels (increase).\nThe 2 points on the abscissa represent the respective action limits of finer and coarser levels 5 and 6 (default).\nThe right (negative) part of the curve acts on the coarser levels (increase).\nAvoid moving the left part of the curve with negative values. Avoid moving the right part of the curve with positives values
|
||||
TP_WAVELET_HS1;Whole luminance range
|
||||
TP_WAVELET_HS2;Shadows/Highlights
|
||||
TP_WAVELET_HS2;Selective luminance range
|
||||
TP_WAVELET_HUESKIN;Skin hue
|
||||
TP_WAVELET_HUESKIN_TOOLTIP;The bottom points set the beginning of the transition zone, and the upper points the end of it, where the effect is at its maximum.\n\nIf you need to move the area significantly, or if there are artifacts, then the <b>white balance is incorrect</b>.
|
||||
TP_WAVELET_HUESKY;Sky hue
|
||||
@ -3184,8 +3194,8 @@ TP_WAVELET_ITER_TOOLTIP;Left: increase low levels and reduce high levels,\nRight
|
||||
TP_WAVELET_LABEL;Wavelet Levels
|
||||
TP_WAVELET_LARGEST;Coarsest
|
||||
TP_WAVELET_LEVCH;Chroma
|
||||
TP_WAVELET_LEVDIR_ALL;All levels in all directions
|
||||
TP_WAVELET_LEVDIR_INF;Below or equal the level
|
||||
TP_WAVELET_LEVDIR_ALL;All levels, in all directions
|
||||
TP_WAVELET_LEVDIR_INF;Finer details levels, with selected level
|
||||
TP_WAVELET_LEVDIR_ONE;One level
|
||||
TP_WAVELET_LEVDIR_SUP;Above the level
|
||||
TP_WAVELET_LEVELS;Wavelet levels
|
||||
@ -3198,7 +3208,7 @@ TP_WAVELET_LEVTWO;Level 3
|
||||
TP_WAVELET_LEVZERO;Level 1
|
||||
TP_WAVELET_LINKEDG;Link with Edge Sharpness' Strength
|
||||
TP_WAVELET_LIPST;Enhanced algoritm
|
||||
TP_WAVELET_LOWLIGHT;Shadow luminance range
|
||||
TP_WAVELET_LOWLIGHT;Coarser levels luminance range
|
||||
TP_WAVELET_LOWTHR_TOOLTIP;Prevents amplification of fine textures and noise
|
||||
TP_WAVELET_MEDGREINF;First level
|
||||
TP_WAVELET_MEDI;Reduce artifacts in blue sky
|
||||
@ -3209,6 +3219,7 @@ TP_WAVELET_MERGEL;Merge Luma
|
||||
TP_WAVELET_NEUTRAL;Neutral
|
||||
TP_WAVELET_NOIS;Denoise
|
||||
TP_WAVELET_NOISE;Denoise and Refine
|
||||
TP_WAVELET_NOISE_TOOLTIP;If level 4 luminance denoise superior to 20, mode Agressive is used.\nIf chrominance coarse superior to 20, mode Agressive is used.
|
||||
TP_WAVELET_NPHIGH;High
|
||||
TP_WAVELET_NPLOW;Low
|
||||
TP_WAVELET_NPNONE;None
|
||||
@ -3217,16 +3228,19 @@ TP_WAVELET_NPTYPE_TOOLTIP;This algorithm uses the proximity of a pixel and eight
|
||||
TP_WAVELET_OLDSH;Algorithm using negatives values
|
||||
TP_WAVELET_OPACITY;Opacity Blue-Yellow
|
||||
TP_WAVELET_OPACITYW;Contrast balance d/v-h curve
|
||||
TP_WAVELET_OPACITYWL;Final local contrast
|
||||
TP_WAVELET_OPACITYWL;Local contrast
|
||||
TP_WAVELET_OPACITYWL_TOOLTIP;Modify the final local contrast at the end of the wavelet treatment.\n\nThe left side represents the smallest local contrast, progressing to the largest local contrast on the right.
|
||||
TP_WAVELET_PASTEL;Pastel chroma
|
||||
TP_WAVELET_PROC;Process
|
||||
TP_WAVELET_PROTAB;Protection
|
||||
TP_WAVELET_RADIUS;Radius Shadows - Highlight
|
||||
TP_WAVELET_RANGEAB;Range a and b %
|
||||
TP_WAVELET_RE1;Reinforced
|
||||
TP_WAVELET_RE2;Unchanged
|
||||
TP_WAVELET_RE3;Reduced
|
||||
TP_WAVELET_RESBLUR;Blur Luminance
|
||||
TP_WAVELET_RESBLURC;Blur Chroma
|
||||
TP_WAVELET_RESBLUR_TOOLTIP;Disabled if zoom > about 500%
|
||||
TP_WAVELET_RESCHRO;Intensity
|
||||
TP_WAVELET_RESCON;Shadows
|
||||
TP_WAVELET_RESCONH;Highlights
|
||||
@ -3237,6 +3251,7 @@ TP_WAVELET_SHA;Sharp mask
|
||||
TP_WAVELET_SHFRAME;Shadows/Highlights
|
||||
TP_WAVELET_SHOWMASK;Show wavelet 'mask'
|
||||
TP_WAVELET_SIGMA;Damper
|
||||
TP_WAVELET_SIGMAFIN;Damper
|
||||
TP_WAVELET_SIGMA_TOOLTIP;The effect of the contrast sliders is stronger in medium contrast details, and weaker in high and low contrast details.\n With this slider you can control how quickly the effect dampens towards the extreme contrasts.\n The higher the slider is set, the wider the range of contrasts which will get a strong change, and the higher the risk to generate artifacts.\n The lower it is, the more pinpoint will the effect be applied to a narrow range of contrast values.
|
||||
TP_WAVELET_SKIN;Skin targetting/protection
|
||||
TP_WAVELET_SKIN_TOOLTIP;At -100 skin-tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 skin-tones are protected while all other tones are affected.
|
||||
@ -3247,10 +3262,10 @@ TP_WAVELET_STREN;Strength
|
||||
TP_WAVELET_STRENGTH;Strength
|
||||
TP_WAVELET_SUPE;Extra
|
||||
TP_WAVELET_THR;Shadows threshold
|
||||
TP_WAVELET_THRESHOLD;Highlight levels
|
||||
TP_WAVELET_THRESHOLD2;Shadow levels
|
||||
TP_WAVELET_THRESHOLD2_TOOLTIP;Only levels between 9 and 9 minus the value will be affected by the shadow luminance range. Other levels will be fully treated. The highest level possible is limited by the highlight level value (9 minus highlight level value).
|
||||
TP_WAVELET_THRESHOLD_TOOLTIP;Only levels beyond the chosen value will be affected by the highlight luminance range. Other levels will be fully treated. The chosen value here limits the highest possible value of the shadow levels.
|
||||
TP_WAVELET_THRESHOLD;Finer levels
|
||||
TP_WAVELET_THRESHOLD2;Coarser levels
|
||||
TP_WAVELET_THRESHOLD_TOOLTIP;Only levels beyond the chosen value will be affected by the highlight luminance range. Other levels will be fully treated. The chosen value here limits the highest possible value of the shadow levels. : All levels from level 1 up to the chosen value will only be affected within the Finer levels luminance range.\nAll other levels will have the whole range of luminances affected, unless the Coarser levels setting limits it.\nThe chosen value in this slider becomes the minimum possible value of the Coarser levels.
|
||||
TP_WAVELET_THRESHOLD2_TOOLTIP;Only levels between 9 and 9 minus the value will be affected by the shadow luminance range. Other levels will be fully treated. The highest level possible is limited by the highlight level value (9 minus highlight level value). : Only levels between the chosen value and level 9/Extra will be affected by the Coarser levels luminance range.\nAll other levels will have the whole range of luminances affected, unless the Finer levels setting limits it.\nThe lower level possible that will be considered by the algorithm is limited by the Finer levels value.
|
||||
TP_WAVELET_THRESWAV;Balance Threshold
|
||||
TP_WAVELET_THRH;Highlights threshold
|
||||
TP_WAVELET_TILESBIG;Tiles
|
||||
@ -3265,6 +3280,7 @@ TP_WAVELET_TMSTRENGTH;Compression strength
|
||||
TP_WAVELET_TMSTRENGTH_TOOLTIP;Control the strength of tone mapping or contrast compression of the residual image.
|
||||
TP_WAVELET_TMEDGS;Edge stopping
|
||||
TP_WAVELET_TON;Toning
|
||||
TP_WAVELET_TONFRAME;Excluded Colors
|
||||
TP_WAVELET_TMTYPE;Compression method
|
||||
TP_WAVELET_USH;None
|
||||
TP_WAVELET_USHARP;Clarity method
|
||||
|
@ -549,7 +549,7 @@ BENCHFUN
|
||||
const float noisevarL = (useNoiseLCurve && (denoiseMethodRgb || !isRAW)) ? SQR(((noiseluma + 1.f) / 125.f) * (10.f + (noiseluma + 1.f) / 25.f)) : SQR((noiseluma / 125.f) * (1.f + noiseluma / 25.f));
|
||||
const bool denoiseLuminance = (noisevarL > 0.00001f);
|
||||
|
||||
//printf("NL=%f \n",noisevarL);
|
||||
// printf("NL=%f \n",noisevarL);
|
||||
if (useNoiseLCurve || useNoiseCCurve) {
|
||||
int hei = calclum->getHeight();
|
||||
int wid = calclum->getWidth();
|
||||
|
@ -3152,6 +3152,43 @@ void WavOpacityCurveRG::Set(const std::vector<double> &curvePoints)
|
||||
|
||||
}
|
||||
|
||||
WavOpacityCurveSH::WavOpacityCurveSH() {}
|
||||
|
||||
void WavOpacityCurveSH::Reset()
|
||||
{
|
||||
lutOpacityCurveSH.reset();
|
||||
}
|
||||
|
||||
void WavOpacityCurveSH::Set(const Curve &pCurve)
|
||||
{
|
||||
if (pCurve.isIdentity()) {
|
||||
Reset(); // raise this value if the quality suffers from this number of samples
|
||||
return;
|
||||
}
|
||||
|
||||
lutOpacityCurveSH(501); // raise this value if the quality suffers from this number of samples
|
||||
|
||||
for (int i = 0; i < 501; i++) {
|
||||
lutOpacityCurveSH[i] = pCurve.getVal(double(i) / 500.);
|
||||
}
|
||||
}
|
||||
|
||||
void WavOpacityCurveSH::Set(const std::vector<double> &curvePoints)
|
||||
{
|
||||
if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) {
|
||||
FlatCurve tcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2);
|
||||
tcurve.setIdentityValue(0.);
|
||||
Set(tcurve);
|
||||
} else {
|
||||
Reset();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
WavOpacityCurveBY::WavOpacityCurveBY() {}
|
||||
|
||||
void WavOpacityCurveBY::Reset()
|
||||
|
@ -1475,6 +1475,32 @@ public:
|
||||
return lutOpacityCurveRG;
|
||||
}
|
||||
};
|
||||
|
||||
class WavOpacityCurveSH
|
||||
{
|
||||
private:
|
||||
LUTf lutOpacityCurveSH; // 0xffff range
|
||||
void Set(const Curve &pCurve);
|
||||
public:
|
||||
virtual ~WavOpacityCurveSH() {};
|
||||
WavOpacityCurveSH();
|
||||
|
||||
void Reset();
|
||||
// void Set(const std::vector<double> &curvePoints, bool &opautili);
|
||||
void Set(const std::vector<double> &curvePoints);
|
||||
float operator[](float index) const
|
||||
{
|
||||
return lutOpacityCurveSH[index];
|
||||
}
|
||||
|
||||
operator bool (void) const
|
||||
{
|
||||
return lutOpacityCurveSH;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class WavOpacityCurveBY
|
||||
{
|
||||
private:
|
||||
|
@ -1351,13 +1351,14 @@ void Crop::update(int todo)
|
||||
WavCurve wavCLVCurve;
|
||||
Wavblcurve wavblcurve;
|
||||
WavOpacityCurveRG waOpacityCurveRG;
|
||||
WavOpacityCurveSH waOpacityCurveSH;
|
||||
WavOpacityCurveBY waOpacityCurveBY;
|
||||
WavOpacityCurveW waOpacityCurveW;
|
||||
WavOpacityCurveWL waOpacityCurveWL;
|
||||
|
||||
LUTf wavclCurve;
|
||||
|
||||
params.wavelet.getCurves(wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
|
||||
params.wavelet.getCurves(wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
|
||||
LabImage *unshar = nullptr;
|
||||
Glib::ustring provis;
|
||||
LabImage *provradius = nullptr;
|
||||
@ -1386,7 +1387,7 @@ void Crop::update(int todo)
|
||||
unshar = new LabImage(labnCrop->W, labnCrop->H);
|
||||
provis = params.wavelet.CLmethod;
|
||||
params.wavelet.CLmethod = "all";
|
||||
parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, skip);
|
||||
parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, skip);
|
||||
unshar->CopyFrom(labnCrop);
|
||||
|
||||
params.wavelet.CLmethod = provis;
|
||||
@ -1401,8 +1402,9 @@ void Crop::update(int todo)
|
||||
|
||||
parent->ipf.softLight(labnCrop, params.softlight);
|
||||
|
||||
parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, skip);
|
||||
// parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, skip);
|
||||
|
||||
parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, skip);
|
||||
|
||||
if ((WaveParams.ushamethod == "sharp" || WaveParams.ushamethod == "clari") && WaveParams.expclari && WaveParams.CLmethod != "all") {
|
||||
WaveParams.expcontrast = procont;
|
||||
|
@ -1455,7 +1455,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
|
||||
if ((params->wavelet.enabled)) {
|
||||
WaveletParams WaveParams = params->wavelet;
|
||||
WaveParams.getCurves(wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
|
||||
WaveParams.getCurves(wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
|
||||
int kall = 0;
|
||||
LabImage *unshar = nullptr;
|
||||
Glib::ustring provis;
|
||||
@ -1484,7 +1484,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
unshar = new LabImage(pW, pH);
|
||||
provis = params->wavelet.CLmethod;
|
||||
params->wavelet.CLmethod = "all";
|
||||
ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, scale);
|
||||
ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, scale);
|
||||
|
||||
unshar->CopyFrom(nprevl);
|
||||
|
||||
@ -1498,7 +1498,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
WaveParams.expnoise = false;
|
||||
}
|
||||
|
||||
ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, scale);
|
||||
ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, scale);
|
||||
|
||||
|
||||
if ((WaveParams.ushamethod == "sharp" || WaveParams.ushamethod == "clari") && WaveParams.expclari && WaveParams.CLmethod != "all") {
|
||||
|
@ -141,6 +141,7 @@ protected:
|
||||
WavCurve wavCLVCurve;
|
||||
Wavblcurve wavblcurve;
|
||||
WavOpacityCurveRG waOpacityCurveRG;
|
||||
WavOpacityCurveSH waOpacityCurveSH;
|
||||
WavOpacityCurveBY waOpacityCurveBY;
|
||||
WavOpacityCurveW waOpacityCurveW;
|
||||
WavOpacityCurveWL waOpacityCurveWL;
|
||||
|
@ -68,6 +68,7 @@ class ToneCurve;
|
||||
class WavCurve;
|
||||
class Wavblcurve;
|
||||
class WavOpacityCurveBY;
|
||||
class WavOpacityCurveSH;
|
||||
class WavOpacityCurveRG;
|
||||
class WavOpacityCurveW;
|
||||
class WavOpacityCurveWL;
|
||||
@ -220,7 +221,6 @@ public:
|
||||
void EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0);
|
||||
void CompressDR(float *Source, int W_L, int H_L, float Compression, float DetailBoost);
|
||||
void Compresslevels(float **Source, int W_L, int H_L, float compression, float detailattenuator, float thres, float mean, float maxp, float meanN, float maxN, float madL);
|
||||
void Compresslevels2(float **Source, int W_L, int H_L, float compression, float detailattenuator, float thres, float mean, float maxp, float meanN, float maxN, float madL);
|
||||
void ContrastResid(float * WavCoeffs_L0, struct cont_params &cp, int W_L, int H_L, float max0, float min0);
|
||||
|
||||
void EPDToneMap(LabImage *lab, unsigned int Iterates = 0, int skip = 1);
|
||||
@ -233,7 +233,7 @@ public:
|
||||
int pitch, int scale, const int luma, int chroma);
|
||||
void idirpyr(LabImage* data_coarse, LabImage* data_fine, int level, LUTf &rangefn_L, LUTf & nrwt_l, LUTf & nrwt_ab,
|
||||
int pitch, int scale, const int luma, const int chroma/*, LUTf & Lcurve, LUTf & abcurve*/);
|
||||
//locallab
|
||||
//locallab Local adjustments
|
||||
void maskcalccol(int call, bool invmask, bool pde, int bfw, int bfh, int xstart, int ystart, int sk, int cx, int cy, LabImage* bufcolorig, LabImage* bufmaskblurcol, LabImage* originalmaskcol, LabImage* original, LabImage* reserved, int inv, struct local_params & lp,
|
||||
float strumask, bool astool,
|
||||
const LocCCmaskCurve & locccmasCurve, bool & lcmasutili,
|
||||
@ -364,40 +364,35 @@ public:
|
||||
void InverseColorLight_Local(bool tonequ, bool tonecurv, int sp, int senstype, struct local_params& lp, LabImage * originalmask, LUTf & lightCurveloc, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, LUTf & exlocalcurve, LUTf & cclocalcurve, float adjustr, bool localcutili, LUTf & lllocalcurve, bool locallutili, LabImage* original, LabImage* transformed, int cx, int cy, const float hueref, const float chromaref, const float lumaref, int sk);
|
||||
void Sharp_Local(int call, float **loctemp, int senstype, const float hueref, const float chromaref, const float lumaref, local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
|
||||
|
||||
// void Sharp_Local(int call, float **loctemp, int senstype, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, int sk);
|
||||
void InverseSharp_Local(float **loctemp, const float hueref, const float lumaref, const float chromaref, local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, int sk);
|
||||
|
||||
|
||||
//Wavelet and denoise
|
||||
void Tile_calc(int tilesize, int overlap, int kall, int imwidth, int imheight, int &numtiles_W, int &numtiles_H, int &tilewidth, int &tileheight, int &tileWskip, int &tileHskip);
|
||||
void ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const Wavblcurve & wavblcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, const LUTf &wavclCurve, int skip);
|
||||
void ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const Wavblcurve & wavblcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveSH & waOpacityCurveSH, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, const LUTf &wavclCurve, int skip);
|
||||
|
||||
void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_L, const Wavblcurve & wavblcurve,
|
||||
struct cont_params &cp, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili);
|
||||
struct cont_params &cp, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveSH & waOpacityCurveSH, FlatCurve* ChCurve, bool Chutili);
|
||||
void WaveletcontAllLfinal(const wavelet_decomposition &WaveletCoeffs_L, const cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
|
||||
void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_a, const Wavblcurve & wavblcurve, const WavOpacityCurveW & waOpacityCurveW,
|
||||
struct cont_params &cp, const bool useChannelA, int skip, float *meanab, float *sigmaab);
|
||||
struct cont_params &cp, const bool useChannelA, int skip, float *meanab, float *sigmaab);
|
||||
void WaveletAandBAllAB(const wavelet_decomposition &WaveletCoeffs_a, const wavelet_decomposition &WaveletCoeffs_b,
|
||||
const cont_params &cp, FlatCurve* hhcurve, bool hhutili);
|
||||
const cont_params &cp, FlatCurve* hhcurve, bool hhutili);
|
||||
void ContAllL(float **koeLi, float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * lab, float **varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
|
||||
int W_L, int H_L, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili);
|
||||
void finalContAllL(float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, const cont_params &cp,
|
||||
int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
|
||||
int W_L, int H_L, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveSH & waOpacityCurveSH, FlatCurve* ChCurve, bool Chutili);
|
||||
void finalContAllL(float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, const cont_params &cp,
|
||||
int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
|
||||
void ContAllAB(LabImage * lab, int maxlvl, float **varhue, float **varchrom, float ** WavCoeffs_a, float * WavCoeffs_a0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp,
|
||||
int W_ab, int H_ab, const bool useChannelA);
|
||||
int W_ab, int H_ab, const bool useChannelA, float *meanab, float *sigmaab);
|
||||
void Evaluate2(const wavelet_decomposition &WaveletCoeffs_L,
|
||||
float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
|
||||
float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
|
||||
void Eval2(float ** WavCoeffs_L, int level,
|
||||
int W_L, int H_L, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
|
||||
int W_L, int H_L, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
|
||||
|
||||
void calceffect(int level, float *mean, float *sigma, float *mea, float effect, float offs);
|
||||
|
||||
void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min);
|
||||
void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg);
|
||||
// void calckoe(float ** WavCoeffs_LL, const cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr);
|
||||
// void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr);
|
||||
void calckoe(float ** WavCoeffs_LL, float gradw, float tloww, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr);
|
||||
void softproc2(const LabImage* bufcolorig, const LabImage* bufcolfin, float rad, int bfh, int bfw, double epsilmax, double epsilmin, float thres, int sk, bool multiThread, int flag);
|
||||
|
||||
|
||||
void Median_Denoise(float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr);
|
||||
void Median_Denoise(float **src, float **dst, float upperBound, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2156,6 +2156,10 @@ bool ColorManagementParams::operator !=(const ColorManagementParams& other) cons
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
const double WaveletParams::LABGRID_CORR_MAX = 12800.f;
|
||||
const double WaveletParams::LABGRID_CORR_SCALE = 3.276f;
|
||||
const double WaveletParams::LABGRIDL_DIRECT_SCALE = 41950.;
|
||||
|
||||
WaveletParams::WaveletParams() :
|
||||
ccwcurve{
|
||||
static_cast<double>(FCT_MinMaxCPoints),
|
||||
@ -2174,12 +2178,12 @@ WaveletParams::WaveletParams() :
|
||||
},
|
||||
blcurve{
|
||||
static_cast<double>(FCT_MinMaxCPoints),
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.35,
|
||||
0.5,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.35,
|
||||
0.5,
|
||||
0.,
|
||||
0.35,
|
||||
0.35,
|
||||
1.0,
|
||||
@ -2188,12 +2192,11 @@ WaveletParams::WaveletParams() :
|
||||
0.35
|
||||
/*
|
||||
0.0,
|
||||
0.75,
|
||||
0.35,
|
||||
0.35,
|
||||
1.0,
|
||||
0.75,
|
||||
0.35,
|
||||
0.35,
|
||||
0.35,
|
||||
1.0,
|
||||
0.0,
|
||||
0.35,
|
||||
0.35
|
||||
*/
|
||||
},
|
||||
@ -2208,6 +2211,25 @@ WaveletParams::WaveletParams() :
|
||||
0.35,
|
||||
0.35
|
||||
},
|
||||
opacityCurveSH{
|
||||
static_cast<double>(FCT_MinMaxCPoints),
|
||||
0.0,
|
||||
1.,
|
||||
0.35,
|
||||
0.35,
|
||||
0.4,
|
||||
0.5,
|
||||
0.35,
|
||||
0.35,
|
||||
0.5,
|
||||
0.5,
|
||||
0.35,
|
||||
0.35,
|
||||
1.,
|
||||
0.,
|
||||
0.35,
|
||||
0.35
|
||||
},
|
||||
opacityCurveBY{
|
||||
static_cast<double>(FCT_MinMaxCPoints),
|
||||
0.0,
|
||||
@ -2284,6 +2306,12 @@ WaveletParams::WaveletParams() :
|
||||
tmr(false),
|
||||
strength(100),
|
||||
balance(0),
|
||||
sigmafin(1.0),
|
||||
sigmaton(1.0),
|
||||
sigmacol(1.0),
|
||||
sigmadir(1.0),
|
||||
rangeab(20.0),
|
||||
protab(0.0),
|
||||
iter(0),
|
||||
expcontrast(false),
|
||||
expchroma(false),
|
||||
@ -2296,6 +2324,10 @@ WaveletParams::WaveletParams() :
|
||||
exptoning(false),
|
||||
expnoise(false),
|
||||
expclari(false),
|
||||
labgridALow(0.0),
|
||||
labgridBLow(0.0),
|
||||
labgridAHigh(0.0),
|
||||
labgridBHigh(0.0),
|
||||
Lmethod(4),
|
||||
CLmethod("all"),
|
||||
Backmethod("grey"),
|
||||
@ -2329,7 +2361,7 @@ WaveletParams::WaveletParams() :
|
||||
chroma(5),
|
||||
chro(0),
|
||||
threshold(5),
|
||||
threshold2(4),
|
||||
threshold2(5),
|
||||
edgedetect(90),
|
||||
edgedetectthr(20),
|
||||
edgedetectthr2(0),
|
||||
@ -2366,6 +2398,7 @@ bool WaveletParams::operator ==(const WaveletParams& other) const
|
||||
ccwcurve == other.ccwcurve
|
||||
&& blcurve == other.blcurve
|
||||
&& opacityCurveRG == other.opacityCurveRG
|
||||
&& opacityCurveSH == other.opacityCurveSH
|
||||
&& opacityCurveBY == other.opacityCurveBY
|
||||
&& opacityCurveW == other.opacityCurveW
|
||||
&& opacityCurveWL == other.opacityCurveWL
|
||||
@ -2398,7 +2431,17 @@ bool WaveletParams::operator ==(const WaveletParams& other) const
|
||||
&& tmr == other.tmr
|
||||
&& strength == other.strength
|
||||
&& balance == other.balance
|
||||
&& sigmafin == other.sigmafin
|
||||
&& sigmaton == other.sigmaton
|
||||
&& sigmacol == other.sigmacol
|
||||
&& sigmadir == other.sigmadir
|
||||
&& rangeab == other.rangeab
|
||||
&& protab == other.protab
|
||||
&& iter == other.iter
|
||||
&& labgridALow == other.labgridALow
|
||||
&& labgridBLow == other.labgridBLow
|
||||
&& labgridAHigh == other.labgridAHigh
|
||||
&& labgridBHigh == other.labgridBHigh
|
||||
&& expcontrast == other.expcontrast
|
||||
&& expchroma == other.expchroma
|
||||
&& [this, &other]() -> bool
|
||||
@ -2489,6 +2532,7 @@ void WaveletParams::getCurves(
|
||||
WavCurve& cCurve,
|
||||
Wavblcurve& tCurve,
|
||||
WavOpacityCurveRG& opacityCurveLUTRG,
|
||||
WavOpacityCurveSH& opacityCurveLUTSH,
|
||||
WavOpacityCurveBY& opacityCurveLUTBY,
|
||||
WavOpacityCurveW& opacityCurveLUTW,
|
||||
WavOpacityCurveWL& opacityCurveLUTWL
|
||||
@ -2497,6 +2541,7 @@ void WaveletParams::getCurves(
|
||||
cCurve.Set(this->ccwcurve);
|
||||
tCurve.Set(this->blcurve);
|
||||
opacityCurveLUTRG.Set(this->opacityCurveRG);
|
||||
opacityCurveLUTSH.Set(this->opacityCurveSH);
|
||||
opacityCurveLUTBY.Set(this->opacityCurveBY);
|
||||
opacityCurveLUTW.Set(this->opacityCurveW);
|
||||
opacityCurveLUTWL.Set(this->opacityCurveWL);
|
||||
@ -5635,6 +5680,12 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
||||
saveToKeyfile(!pedited || pedited->wavelet.enabled, "Wavelet", "Enabled", wavelet.enabled, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.strength, "Wavelet", "Strength", wavelet.strength, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.balance, "Wavelet", "Balance", wavelet.balance, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.sigmafin, "Wavelet", "Sigmafin", wavelet.sigmafin, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.sigmaton, "Wavelet", "Sigmaton", wavelet.sigmaton, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.sigmacol, "Wavelet", "Sigmacol", wavelet.sigmacol, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.sigmadir, "Wavelet", "Sigmadir", wavelet.sigmadir, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.rangeab, "Wavelet", "Rangeab", wavelet.rangeab, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.protab, "Wavelet", "Protab", wavelet.protab, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.iter, "Wavelet", "Iter", wavelet.iter, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.thres, "Wavelet", "MaxLev", wavelet.thres, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.Tilesmethod, "Wavelet", "TilesMethod", wavelet.Tilesmethod, keyFile);
|
||||
@ -5666,6 +5717,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
||||
saveToKeyfile(!pedited || pedited->wavelet.exptoning, "Wavelet", "Exptoning", wavelet.exptoning, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.expnoise, "Wavelet", "Expnoise", wavelet.expnoise, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.expclari, "Wavelet", "Expclari", wavelet.expclari, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.labgridALow, "Wavelet", "LabGridALow", wavelet.labgridALow, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.labgridBLow, "Wavelet", "LabGridBLow", wavelet.labgridBLow, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.labgridAHigh, "Wavelet", "LabGridAHigh", wavelet.labgridAHigh, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.labgridBHigh, "Wavelet", "LabGridBHigh", wavelet.labgridBHigh, keyFile);
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
std::stringstream ss;
|
||||
@ -5712,6 +5767,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
||||
saveToKeyfile(!pedited || pedited->wavelet.pastlev, "Wavelet", "Pastlev", wavelet.pastlev.toVector(), keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.satlev, "Wavelet", "Satlev", wavelet.satlev.toVector(), keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.opacityCurveRG, "Wavelet", "OpacityCurveRG", wavelet.opacityCurveRG, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.opacityCurveSH, "Wavelet", "Levalshc", wavelet.opacityCurveSH, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.opacityCurveBY, "Wavelet", "OpacityCurveBY", wavelet.opacityCurveBY, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.opacityCurveW, "Wavelet", "OpacityCurveW", wavelet.opacityCurveW, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->wavelet.opacityCurveWL, "Wavelet", "OpacityCurveWL", wavelet.opacityCurveWL, keyFile);
|
||||
@ -7391,6 +7447,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Enabled", pedited, wavelet.enabled, pedited->wavelet.enabled);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Strength", pedited, wavelet.strength, pedited->wavelet.strength);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Balance", pedited, wavelet.balance, pedited->wavelet.balance);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Sigmafin", pedited, wavelet.sigmafin, pedited->wavelet.sigmafin);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Sigmaton", pedited, wavelet.sigmaton, pedited->wavelet.sigmaton);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Sigmacol", pedited, wavelet.sigmacol, pedited->wavelet.sigmacol);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Sigmadir", pedited, wavelet.sigmadir, pedited->wavelet.sigmadir);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Rangeab", pedited, wavelet.rangeab, pedited->wavelet.rangeab);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Protab", pedited, wavelet.protab, pedited->wavelet.protab);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Iter", pedited, wavelet.iter, pedited->wavelet.iter);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Median", pedited, wavelet.median, pedited->wavelet.median);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Medianlev", pedited, wavelet.medianlev, pedited->wavelet.medianlev);
|
||||
@ -7415,6 +7477,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Showmask", pedited, wavelet.showmask, pedited->wavelet.showmask);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Oldsh", pedited, wavelet.oldsh, pedited->wavelet.oldsh);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "TMr", pedited, wavelet.tmr, pedited->wavelet.tmr);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "LabGridALow", pedited, wavelet.labgridALow, pedited->wavelet.labgridALow);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "LabGridBLow", pedited, wavelet.labgridBLow, pedited->wavelet.labgridBLow);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "LabGridAHigh", pedited, wavelet.labgridAHigh, pedited->wavelet.labgridAHigh);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "LabGridBHigh", pedited, wavelet.labgridBHigh, pedited->wavelet.labgridBHigh);
|
||||
|
||||
if (ppVersion < 331) { // wavelet.Lmethod was a string before version 331
|
||||
Glib::ustring temp;
|
||||
@ -7477,6 +7543,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
assignFromKeyfile(keyFile, "Wavelet", "ContrastCurve", pedited, wavelet.ccwcurve, pedited->wavelet.ccwcurve);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "blcurve", pedited, wavelet.blcurve, pedited->wavelet.blcurve);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "OpacityCurveRG", pedited, wavelet.opacityCurveRG, pedited->wavelet.opacityCurveRG);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "Levelshc", pedited, wavelet.opacityCurveSH, pedited->wavelet.opacityCurveSH);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "OpacityCurveBY", pedited, wavelet.opacityCurveBY, pedited->wavelet.opacityCurveBY);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "OpacityCurveW", pedited, wavelet.opacityCurveW, pedited->wavelet.opacityCurveW);
|
||||
assignFromKeyfile(keyFile, "Wavelet", "OpacityCurveWL", pedited, wavelet.opacityCurveWL, pedited->wavelet.opacityCurveWL);
|
||||
|
@ -42,6 +42,7 @@ class RetinextransmissionCurve;
|
||||
class WavCurve;
|
||||
class Wavblcurve;
|
||||
class WavOpacityCurveBY;
|
||||
class WavOpacityCurveSH;
|
||||
class WavOpacityCurveRG;
|
||||
class WavOpacityCurveW;
|
||||
class WavOpacityCurveWL;
|
||||
@ -1676,7 +1677,9 @@ private:
|
||||
struct WaveletParams {
|
||||
std::vector<double> ccwcurve;
|
||||
std::vector<double> blcurve;
|
||||
std::vector<double> levelshc;
|
||||
std::vector<double> opacityCurveRG;
|
||||
std::vector<double> opacityCurveSH;
|
||||
std::vector<double> opacityCurveBY;
|
||||
std::vector<double> opacityCurveW;
|
||||
std::vector<double> opacityCurveWL;
|
||||
@ -1710,6 +1713,12 @@ struct WaveletParams {
|
||||
bool tmr;
|
||||
int strength;
|
||||
int balance;
|
||||
double sigmafin;
|
||||
double sigmaton;
|
||||
double sigmacol;
|
||||
double sigmadir;
|
||||
double rangeab;
|
||||
double protab;
|
||||
int iter;
|
||||
bool expcontrast;
|
||||
bool expchroma;
|
||||
@ -1722,7 +1731,13 @@ struct WaveletParams {
|
||||
bool exptoning;
|
||||
bool expnoise;
|
||||
bool expclari;
|
||||
|
||||
double labgridALow;
|
||||
double labgridBLow;
|
||||
double labgridAHigh;
|
||||
double labgridBHigh;
|
||||
static const double LABGRID_CORR_MAX;
|
||||
static const double LABGRID_CORR_SCALE;
|
||||
static const double LABGRIDL_DIRECT_SCALE;
|
||||
int Lmethod;
|
||||
Glib::ustring CLmethod;
|
||||
Glib::ustring Backmethod;
|
||||
@ -1793,8 +1808,8 @@ struct WaveletParams {
|
||||
void getCurves(
|
||||
WavCurve& cCurve,
|
||||
Wavblcurve& tCurve,
|
||||
WavOpacityCurveRG&
|
||||
opacityCurveLUTRG,
|
||||
WavOpacityCurveRG& opacityCurveLUTRG,
|
||||
WavOpacityCurveSH& opacityCurveLUTSH,
|
||||
WavOpacityCurveBY& opacityCurveLUTBY,
|
||||
WavOpacityCurveW& opacityCurveLUTW,
|
||||
WavOpacityCurveWL& opacityCurveLUTWL
|
||||
|
@ -1446,6 +1446,7 @@ private:
|
||||
WavCurve wavCLVCurve;
|
||||
Wavblcurve wavblcurve;
|
||||
WavOpacityCurveRG waOpacityCurveRG;
|
||||
WavOpacityCurveSH waOpacityCurveSH;
|
||||
WavOpacityCurveBY waOpacityCurveBY;
|
||||
WavOpacityCurveW waOpacityCurveW;
|
||||
WavOpacityCurveWL waOpacityCurveWL;
|
||||
@ -1468,7 +1469,7 @@ private:
|
||||
provradius->CopyFrom(labView);
|
||||
}
|
||||
|
||||
params.wavelet.getCurves(wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
|
||||
params.wavelet.getCurves(wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
|
||||
|
||||
CurveFactory::curveWavContL(wavcontlutili, params.wavelet.wavclCurve, wavclCurve,/* hist16C, dummy,*/ 1);
|
||||
|
||||
@ -1476,7 +1477,7 @@ private:
|
||||
unshar = new LabImage(fw, fh);
|
||||
provis = params.wavelet.CLmethod;
|
||||
params.wavelet.CLmethod = "all";
|
||||
ipf.ip_wavelet(labView, labView, 2, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, 1);
|
||||
ipf.ip_wavelet(labView, labView, 2, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, 1);
|
||||
unshar->CopyFrom(labView);
|
||||
params.wavelet.CLmethod = provis;
|
||||
|
||||
@ -1488,7 +1489,7 @@ private:
|
||||
WaveParams.expnoise = false;
|
||||
}
|
||||
|
||||
ipf.ip_wavelet(labView, labView, 2, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, 1);
|
||||
ipf.ip_wavelet(labView, labView, 2, WaveParams, wavCLVCurve, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, 1);
|
||||
|
||||
if ((WaveParams.ushamethod == "sharp" || WaveParams.ushamethod == "clari") && WaveParams.expclari && WaveParams.CLmethod != "all") {
|
||||
WaveParams.expcontrast = procont;
|
||||
|
@ -483,6 +483,12 @@ void ParamsEdited::set(bool v)
|
||||
wavelet.strength = v;
|
||||
wavelet.balance = v;
|
||||
wavelet.iter = v;
|
||||
wavelet.sigmafin = v;
|
||||
wavelet.sigmaton = v;
|
||||
wavelet.sigmacol = v;
|
||||
wavelet.sigmadir = v;
|
||||
wavelet.rangeab = v;
|
||||
wavelet.protab = v;
|
||||
wavelet.median = v;
|
||||
wavelet.medianlev = v;
|
||||
wavelet.linkedg = v;
|
||||
@ -567,6 +573,7 @@ void ParamsEdited::set(bool v)
|
||||
wavelet.level3noise = v;
|
||||
wavelet.ccwcurve = v;
|
||||
wavelet.blcurve = v;
|
||||
wavelet.opacityCurveSH = v;
|
||||
wavelet.opacityCurveRG = v;
|
||||
wavelet.opacityCurveBY = v;
|
||||
wavelet.opacityCurveW = v;
|
||||
@ -590,6 +597,10 @@ void ParamsEdited::set(bool v)
|
||||
wavelet.expresid = v;
|
||||
wavelet.exptoning = v;
|
||||
wavelet.expnoise = v;
|
||||
wavelet.labgridALow = v;
|
||||
wavelet.labgridBLow = v;
|
||||
wavelet.labgridAHigh = v;
|
||||
wavelet.labgridBHigh = v;
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
wavelet.c[i] = v;
|
||||
@ -1572,6 +1583,12 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
||||
wavelet.strength = wavelet.strength && p.wavelet.strength == other.wavelet.strength;
|
||||
wavelet.balance = wavelet.balance && p.wavelet.balance == other.wavelet.balance;
|
||||
wavelet.iter = wavelet.iter && p.wavelet.iter == other.wavelet.iter;
|
||||
wavelet.sigmafin = wavelet.sigmafin && p.wavelet.sigmafin == other.wavelet.sigmafin;
|
||||
wavelet.sigmaton = wavelet.sigmaton && p.wavelet.sigmaton == other.wavelet.sigmaton;
|
||||
wavelet.sigmacol = wavelet.sigmacol && p.wavelet.sigmacol == other.wavelet.sigmacol;
|
||||
wavelet.sigmadir = wavelet.sigmadir && p.wavelet.sigmadir == other.wavelet.sigmadir;
|
||||
wavelet.rangeab = wavelet.rangeab && p.wavelet.rangeab == other.wavelet.rangeab;
|
||||
wavelet.protab = wavelet.protab && p.wavelet.protab == other.wavelet.protab;
|
||||
wavelet.median = wavelet.median && p.wavelet.median == other.wavelet.median;
|
||||
wavelet.medianlev = wavelet.medianlev && p.wavelet.medianlev == other.wavelet.medianlev;
|
||||
wavelet.linkedg = wavelet.linkedg && p.wavelet.linkedg == other.wavelet.linkedg;
|
||||
@ -1657,6 +1674,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
||||
wavelet.satlev = wavelet.satlev && p.wavelet.satlev == other.wavelet.satlev;
|
||||
wavelet.ccwcurve = wavelet.ccwcurve && p.wavelet.ccwcurve == other.wavelet.ccwcurve;
|
||||
wavelet.blcurve = wavelet.blcurve && p.wavelet.blcurve == other.wavelet.blcurve;
|
||||
wavelet.opacityCurveSH = wavelet.opacityCurveSH && p.wavelet.opacityCurveSH == other.wavelet.opacityCurveSH;
|
||||
wavelet.opacityCurveRG = wavelet.opacityCurveRG && p.wavelet.opacityCurveRG == other.wavelet.opacityCurveRG;
|
||||
wavelet.opacityCurveBY = wavelet.opacityCurveBY && p.wavelet.opacityCurveBY == other.wavelet.opacityCurveBY;
|
||||
wavelet.opacityCurveW = wavelet.opacityCurveW && p.wavelet.opacityCurveW == other.wavelet.opacityCurveW;
|
||||
@ -1675,6 +1693,10 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
||||
wavelet.exptoning = wavelet.exptoning && p.wavelet.exptoning == other.wavelet.exptoning;
|
||||
wavelet.expnoise = wavelet.expnoise && p.wavelet.expnoise == other.wavelet.expnoise;
|
||||
wavelet.expclari = wavelet.expclari && p.wavelet.expclari == other.wavelet.expclari;
|
||||
wavelet.labgridALow = wavelet.labgridALow && p.wavelet.labgridALow == other.wavelet.labgridALow;
|
||||
wavelet.labgridBLow = wavelet.labgridBLow && p.wavelet.labgridBLow == other.wavelet.labgridBLow;
|
||||
wavelet.labgridAHigh = wavelet.labgridAHigh && p.wavelet.labgridAHigh == other.wavelet.labgridAHigh;
|
||||
wavelet.labgridBHigh = wavelet.labgridBHigh && p.wavelet.labgridBHigh == other.wavelet.labgridBHigh;
|
||||
|
||||
for (int level = 0; level < 9; ++level) {
|
||||
wavelet.c[level] = wavelet.c[level] && p.wavelet.c[level] == other.wavelet.c[level];
|
||||
@ -5136,6 +5158,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
||||
toEdit.wavelet.enabled = mods.wavelet.enabled;
|
||||
}
|
||||
|
||||
if (wavelet.labgridALow) {
|
||||
toEdit.wavelet.labgridALow = mods.wavelet.labgridALow;
|
||||
}
|
||||
|
||||
if (wavelet.labgridBLow) {
|
||||
toEdit.wavelet.labgridBLow = mods.wavelet.labgridBLow;
|
||||
}
|
||||
|
||||
if (wavelet.labgridAHigh) {
|
||||
toEdit.wavelet.labgridAHigh = mods.wavelet.labgridAHigh;
|
||||
}
|
||||
|
||||
if (wavelet.labgridBHigh) {
|
||||
toEdit.wavelet.labgridBHigh = mods.wavelet.labgridBHigh;
|
||||
}
|
||||
|
||||
if (wavelet.strength) {
|
||||
toEdit.wavelet.strength = mods.wavelet.strength;
|
||||
}
|
||||
@ -5144,6 +5182,30 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
||||
toEdit.wavelet.balance = mods.wavelet.balance;
|
||||
}
|
||||
|
||||
if (wavelet.sigmafin) {
|
||||
toEdit.wavelet.sigmafin = mods.wavelet.sigmafin;
|
||||
}
|
||||
|
||||
if (wavelet.sigmaton) {
|
||||
toEdit.wavelet.sigmaton = mods.wavelet.sigmaton;
|
||||
}
|
||||
|
||||
if (wavelet.sigmacol) {
|
||||
toEdit.wavelet.sigmacol = mods.wavelet.sigmacol;
|
||||
}
|
||||
|
||||
if (wavelet.sigmadir) {
|
||||
toEdit.wavelet.sigmadir = mods.wavelet.sigmadir;
|
||||
}
|
||||
|
||||
if (wavelet.rangeab) {
|
||||
toEdit.wavelet.rangeab = mods.wavelet.rangeab;
|
||||
}
|
||||
|
||||
if (wavelet.protab) {
|
||||
toEdit.wavelet.protab = mods.wavelet.protab;
|
||||
}
|
||||
|
||||
if (wavelet.iter) {
|
||||
toEdit.wavelet.iter = mods.wavelet.iter;
|
||||
}
|
||||
@ -5376,6 +5438,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
||||
toEdit.wavelet.blcurve = mods.wavelet.blcurve;
|
||||
}
|
||||
|
||||
if (wavelet.opacityCurveSH) {
|
||||
toEdit.wavelet.opacityCurveSH = mods.wavelet.opacityCurveSH;
|
||||
}
|
||||
|
||||
if (wavelet.opacityCurveRG) {
|
||||
toEdit.wavelet.opacityCurveRG = mods.wavelet.opacityCurveRG;
|
||||
}
|
||||
|
@ -962,6 +962,12 @@ struct WaveletParamsEdited {
|
||||
bool strength;
|
||||
bool balance;
|
||||
bool iter;
|
||||
bool sigmafin;
|
||||
bool sigmaton;
|
||||
bool sigmacol;
|
||||
bool sigmadir;
|
||||
bool rangeab;
|
||||
bool protab;
|
||||
bool median;
|
||||
bool medianlev;
|
||||
bool linkedg;
|
||||
@ -1034,6 +1040,7 @@ struct WaveletParamsEdited {
|
||||
bool level3noise;
|
||||
bool ccwcurve;
|
||||
bool blcurve;
|
||||
bool opacityCurveSH;
|
||||
bool opacityCurveBY;
|
||||
bool opacityCurveRG;
|
||||
bool opacityCurveW;
|
||||
@ -1066,6 +1073,11 @@ struct WaveletParamsEdited {
|
||||
bool exptoning;
|
||||
bool expnoise;
|
||||
bool expclari;
|
||||
bool labgridALow;
|
||||
bool labgridBLow;
|
||||
bool labgridAHigh;
|
||||
bool labgridBHigh;
|
||||
|
||||
};
|
||||
|
||||
struct DirPyrEqualizerParamsEdited {
|
||||
|
211
rtgui/wavelet.cc
211
rtgui/wavelet.cc
@ -27,6 +27,7 @@
|
||||
#include "rtimage.h"
|
||||
#include "options.h"
|
||||
#include "eventmapper.h"
|
||||
#include "labgrid.h"
|
||||
#include "../rtengine/color.h"
|
||||
|
||||
using namespace rtengine;
|
||||
@ -62,6 +63,7 @@ std::vector<GradientMilestone> makeWholeHueRange()
|
||||
Wavelet::Wavelet() :
|
||||
FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), true, true),
|
||||
curveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CONTEDIT"))),
|
||||
curveEditorC(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CONTRASTEDIT"))),
|
||||
CCWcurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CCURVE"))),
|
||||
curveEditorbl(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_BLCURVE"))),
|
||||
curveEditorRES(new CurveEditorGroup(options.lastWaveletCurvesDir)),
|
||||
@ -112,6 +114,12 @@ Wavelet::Wavelet() :
|
||||
strength(Gtk::manage(new Adjuster(M("TP_WAVELET_STRENGTH"), 0, 100, 1, 100))),
|
||||
balance(Gtk::manage(new Adjuster(M("TP_WAVELET_BALANCE"), -30, 100, 1, 0))),
|
||||
iter(Gtk::manage(new Adjuster(M("TP_WAVELET_ITER"), -3, 3, 1, 0))),
|
||||
sigmafin(Gtk::manage(new Adjuster(M("TP_WAVELET_SIGMAFIN"), 0.025, 2.5, 0.01, 1.))),
|
||||
sigmaton(Gtk::manage(new Adjuster(M("TP_WAVELET_SIGMAFIN"), 0.025, 2.5, 0.01, 1.))),
|
||||
sigmacol(Gtk::manage(new Adjuster(M("TP_WAVELET_SIGMAFIN"), 0.025, 2.5, 0.01, 1.))),
|
||||
sigmadir(Gtk::manage(new Adjuster(M("TP_WAVELET_SIGMAFIN"), 0.025, 2.5, 0.01, 1.))),
|
||||
rangeab(Gtk::manage(new Adjuster(M("TP_WAVELET_RANGEAB"), 0., 100., 0.1, 20.))),
|
||||
protab(Gtk::manage(new Adjuster(M("TP_WAVELET_PROTAB"), 0., 100., 0.5, 0.))),
|
||||
hueskin(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_HUESKIN"), -314., 314., -5., 25., 170., 120., 0, false))),
|
||||
hueskin2(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_HUESKY"), -314., 314., -260., -250, -130., -140., 0, false))),
|
||||
hllev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_HIGHLIGHT"), 0., 100., 50., 75., 100., 98., 0, false))),
|
||||
@ -124,7 +132,8 @@ Wavelet::Wavelet() :
|
||||
level2noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))),
|
||||
level3noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))),
|
||||
threshold(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD"), 1, 9, 1, 5))),
|
||||
threshold2(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD2"), 1, 9, 1, 4))),
|
||||
// threshold2(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD2"), 1, 9, 1, 4))),
|
||||
threshold2(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD2"), 1, 9, 1, 5))),
|
||||
edgedetect(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECT"), 0, 100, 1, 90))),
|
||||
edgedetectthr(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECTTHR"), 0, 100, 1, 20))),
|
||||
edgedetectthr2(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECTTHR2"), -10, 100, 1, 0))),
|
||||
@ -162,6 +171,9 @@ Wavelet::Wavelet() :
|
||||
blurFrame(Gtk::manage(new Gtk::Frame(M("TP_WAVELET_BLURFRAME")))),
|
||||
chromaFrame(Gtk::manage(new Gtk::Frame(M("TP_WAVELET_CHROMAFRAME")))),
|
||||
chroFrame(Gtk::manage(new Gtk::Frame(M("TP_WAVELET_CHROFRAME")))),
|
||||
fincFrame(Gtk::manage(new Gtk::Frame(M("TP_WAVELET_FINCFRAME")))),
|
||||
dirFrame(Gtk::manage(new Gtk::Frame(M("TP_WAVELET_DIRFRAME")))),
|
||||
tonFrame(Gtk::manage(new Gtk::Frame(M("TP_WAVELET_TONFRAME")))),
|
||||
wavLabels(Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER))),
|
||||
labmC(Gtk::manage(new Gtk::Label(M("TP_WAVELET_CTYPE") + ":"))),
|
||||
labmNP(Gtk::manage(new Gtk::Label(M("TP_WAVELET_NPTYPE") + ":"))),
|
||||
@ -207,6 +219,17 @@ Wavelet::Wavelet() :
|
||||
EvWavresblur = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_BLURWAV");
|
||||
EvWavresblurc = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_BLURCWAV");
|
||||
EvWavedgeffect = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_EDGEFFECT");
|
||||
EvWavsigmafin = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_SIGMAFIN");
|
||||
EvWavsigmaton = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_SIGMATON");
|
||||
EvWavsigmacol = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_SIGMACOL");
|
||||
EvWavsigmadir = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_SIGMADIR");
|
||||
EvWavLabGridValue = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_WAVLABGRID_VALUE");
|
||||
EvWavrangeab = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_RANGEAB");
|
||||
EvWavprotab = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_PROTAB");
|
||||
EvWavlevelshc = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_LEVELSHC");
|
||||
|
||||
labgrid = Gtk::manage(new LabGrid(EvWavLabGridValue, M("TP_WAVELET_LABGRID_VALUES")));
|
||||
|
||||
expsettings->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Wavelet::foldAllButMe), expsettings));
|
||||
|
||||
expcontrast->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Wavelet::foldAllButMe), expcontrast));
|
||||
@ -402,11 +425,25 @@ Wavelet::Wavelet() :
|
||||
threshold2->setAdjusterListener(this);
|
||||
threshold2->set_tooltip_text(M("TP_WAVELET_THRESHOLD2_TOOLTIP"));
|
||||
|
||||
const WaveletParams default_params;
|
||||
|
||||
curveEditorC->setCurveListener(this);
|
||||
curveEditorC->set_tooltip_text(M("TP_WAVELET_FINCOAR_TOOLTIP"));
|
||||
|
||||
|
||||
opacityShapeSH = static_cast<FlatCurveEditor*>(curveEditorC->addCurve(CT_Flat, "", nullptr, false, false));
|
||||
opacityShapeSH->setIdentityValue(0.);
|
||||
opacityShapeSH->setResetCurve(FlatCurveType(default_params.opacityCurveSH.at(0)), default_params.opacityCurveSH);
|
||||
|
||||
curveEditorC->curveListComplete();
|
||||
curveEditorC->show();
|
||||
|
||||
contrastSHVBox->pack_start(*HSmethod);
|
||||
contrastSHVBox->pack_start(*hllev);
|
||||
contrastSHVBox->pack_start(*threshold);
|
||||
// contrastSHVBox->pack_start(*threshold);
|
||||
contrastSHVBox->pack_start(*bllev);
|
||||
contrastSHVBox->pack_start(*threshold2);
|
||||
// contrastSHVBox->pack_start(*threshold2);
|
||||
contrastSHVBox->pack_start(*curveEditorC);
|
||||
Gtk::Frame* const contrastSHFrame = Gtk::manage(new Gtk::Frame(M("TP_WAVELET_APPLYTO")));
|
||||
contrastSHFrame->add(*contrastSHVBox);
|
||||
levBox->pack_start(*contrastSHFrame);
|
||||
@ -450,8 +487,10 @@ Wavelet::Wavelet() :
|
||||
chBox->pack_start(*satlev);
|
||||
|
||||
chro->set_tooltip_text(M("TP_WAVELET_CHR_TOOLTIP"));
|
||||
chBox->pack_start(*chro);
|
||||
chro->setAdjusterListener(this);
|
||||
sigmacol->setAdjusterListener(this);
|
||||
chBox->pack_start(*chro);
|
||||
chBox->pack_start(*sigmacol);
|
||||
|
||||
Gtk::HBox* const buttonchBox = Gtk::manage(new Gtk::HBox(true, 10));
|
||||
neutralchPressedConn = neutralchButton->signal_pressed().connect(sigc::mem_fun(*this, &Wavelet::neutralchPressed));
|
||||
@ -483,17 +522,35 @@ Wavelet::Wavelet() :
|
||||
|
||||
// Toning
|
||||
ToolParamBlock* const tonBox = Gtk::manage(new ToolParamBlock());
|
||||
sigmaton->setAdjusterListener(this);
|
||||
rangeab->setAdjusterListener(this);
|
||||
protab->setAdjusterListener(this);
|
||||
|
||||
opaCurveEditorG->setCurveListener(this);
|
||||
|
||||
const WaveletParams default_params;
|
||||
// const WaveletParams default_params;
|
||||
|
||||
opacityShapeRG = static_cast<FlatCurveEditor*>(opaCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
|
||||
opacityShapeRG->setIdentityValue(0.);
|
||||
opacityShapeRG->setResetCurve(FlatCurveType(default_params.opacityCurveRG.at(0)), default_params.opacityCurveRG);
|
||||
//from green to magenta
|
||||
std::vector<GradientMilestone> mileston = {
|
||||
GradientMilestone(0., 0., 1., 0.),
|
||||
GradientMilestone(1., 1., 0., 1.)
|
||||
};
|
||||
opacityShapeRG->setLeftBarBgGradient(mileston);
|
||||
|
||||
opaCurveEditorG->curveListComplete();
|
||||
opaCurveEditorG->show();
|
||||
tonBox->pack_start(*sigmaton);
|
||||
|
||||
tonFrame->set_label_align(0.025, 0.5);
|
||||
ToolParamBlock* const ton2Box = Gtk::manage(new ToolParamBlock());
|
||||
ton2Box->pack_start(*labgrid, Gtk::PACK_EXPAND_WIDGET, 2);
|
||||
ton2Box->pack_start(*rangeab);
|
||||
ton2Box->pack_start(*protab);
|
||||
tonFrame->add(*ton2Box);
|
||||
tonBox->pack_start(*tonFrame);
|
||||
|
||||
tonBox->pack_start(*opaCurveEditorG, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
@ -502,6 +559,12 @@ Wavelet::Wavelet() :
|
||||
opacityShapeBY = static_cast<FlatCurveEditor*>(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false));
|
||||
opacityShapeBY->setIdentityValue(0.);
|
||||
opacityShapeBY->setResetCurve(FlatCurveType(default_params.opacityCurveBY.at(0)), default_params.opacityCurveBY);
|
||||
//from blue to yellow
|
||||
mileston = {
|
||||
GradientMilestone(0., 0., 0., 1.),
|
||||
GradientMilestone(1., 1., 1., 0.)
|
||||
};
|
||||
opacityShapeBY->setLeftBarBgGradient(mileston);
|
||||
|
||||
opacityCurveEditorG->curveListComplete();
|
||||
opacityCurveEditorG->show();
|
||||
@ -545,6 +608,7 @@ Wavelet::Wavelet() :
|
||||
chroBox->pack_start(*chromco);
|
||||
chroFrame->add(*chroBox);
|
||||
noiseBox->pack_start(*chroFrame);
|
||||
noiseBox->set_tooltip_text(M("TP_WAVELET_NOISE_TOOLTIP"));
|
||||
|
||||
|
||||
//Clarity
|
||||
@ -571,13 +635,13 @@ Wavelet::Wavelet() :
|
||||
|
||||
// Edge Sharpness
|
||||
ToolParamBlock* const edgBox = Gtk::manage(new ToolParamBlock());
|
||||
edgeffect->setAdjusterListener(this);
|
||||
edgBox->pack_start(*edgeffect);
|
||||
edgeffect->set_tooltip_markup(M("TP_WAVELET_EDEFFECT_TOOLTIP"));
|
||||
|
||||
edgval->setAdjusterListener(this);
|
||||
edgBox->pack_start(*edgval);
|
||||
|
||||
edgeffect->setAdjusterListener(this);
|
||||
edgBox->pack_start(*edgeffect);
|
||||
edgeffect->set_tooltip_markup(M("TP_WAVELET_EDEFFECT_TOOLTIP"));
|
||||
|
||||
edgrad->setAdjusterListener(this);
|
||||
edgBox->pack_start(*edgrad);
|
||||
@ -800,6 +864,8 @@ Wavelet::Wavelet() :
|
||||
blurBox->pack_start(*resblur);
|
||||
blurBox->pack_start(*resblurc);
|
||||
blurFrame->add(*blurBox);
|
||||
resblur->set_tooltip_text(M("TP_WAVELET_RESBLUR_TOOLTIP"));
|
||||
resblurc->set_tooltip_text(M("TP_WAVELET_RESBLUR_TOOLTIP"));
|
||||
|
||||
chromaFrame->set_label_align(0.025, 0.5);
|
||||
ToolParamBlock* const chromaBox = Gtk::manage(new ToolParamBlock());
|
||||
@ -975,8 +1041,9 @@ Wavelet::Wavelet() :
|
||||
|
||||
iter->setAdjusterListener(this);
|
||||
iter->set_tooltip_text(M("TP_WAVELET_ITER_TOOLTIP"));
|
||||
sigmadir->setAdjusterListener(this);
|
||||
|
||||
Gtk::HSeparator* const separatorbalend = Gtk::manage(new Gtk::HSeparator());
|
||||
// Gtk::HSeparator* const separatorbalend = Gtk::manage(new Gtk::HSeparator());
|
||||
|
||||
opacityCurveEditorWL->setCurveListener(this);
|
||||
|
||||
@ -984,6 +1051,8 @@ Wavelet::Wavelet() :
|
||||
opacityShapeWL->setIdentityValue(0.);
|
||||
opacityShapeWL->setResetCurve(FlatCurveType(default_params.opacityCurveWL.at(0)), default_params.opacityCurveWL);
|
||||
opacityShapeWL->setTooltip(M("TP_WAVELET_OPACITYWL_TOOLTIP"));
|
||||
opacityShapeWL->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}});
|
||||
sigmafin->setAdjusterListener(this);
|
||||
|
||||
// This will add the reset button at the end of the curveType buttons
|
||||
opacityCurveEditorWL->curveListComplete();
|
||||
@ -1002,19 +1071,26 @@ Wavelet::Wavelet() :
|
||||
tmr->set_tooltip_text(M("TP_WAVELET_BALCHRO_TOOLTIP"));
|
||||
tmrConn = tmr->signal_toggled().connect(sigc::mem_fun(*this, &Wavelet::tmrToggled));
|
||||
|
||||
fincFrame->set_label_align(0.025, 0.5);
|
||||
ToolParamBlock* const fincBox = Gtk::manage(new ToolParamBlock());
|
||||
fincBox->pack_start(*opacityCurveEditorWL, Gtk::PACK_SHRINK, 2);
|
||||
fincBox->pack_start(*sigmafin);
|
||||
fincFrame->add(*fincBox);
|
||||
|
||||
dirFrame->set_label_align(0.025, 0.5);
|
||||
ToolParamBlock* const dirBox = Gtk::manage(new ToolParamBlock());
|
||||
dirBox->pack_start(*ctboxBA);
|
||||
dirBox->pack_start(*balance);
|
||||
dirBox->pack_start(*opacityCurveEditorW, Gtk::PACK_SHRINK, 2);
|
||||
dirBox->pack_start(*iter);
|
||||
dirBox->pack_start(*sigmadir);
|
||||
dirBox->pack_start(*tmr);
|
||||
dirFrame->add(*dirBox);
|
||||
|
||||
ToolParamBlock* const finalBox = Gtk::manage(new ToolParamBlock());
|
||||
finalBox->pack_start(*dirFrame);
|
||||
|
||||
finalBox->pack_start(*ctboxBA);
|
||||
finalBox->pack_start(*balance);
|
||||
|
||||
finalBox->pack_start(*opacityCurveEditorW, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
finalBox->pack_start(*iter);
|
||||
|
||||
finalBox->pack_start(*tmr);
|
||||
finalBox->pack_start(*separatorbalend, Gtk::PACK_SHRINK, 2);
|
||||
finalBox->pack_start(*opacityCurveEditorWL, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
finalBox->pack_start(*fincFrame);
|
||||
finalBox->pack_start(*curveEditorG, Gtk::PACK_SHRINK, 4);
|
||||
finalBox->pack_start(*softradend);
|
||||
|
||||
@ -1073,6 +1149,7 @@ Wavelet::~Wavelet()
|
||||
idle_register.destroy();
|
||||
|
||||
delete opaCurveEditorG;
|
||||
delete curveEditorC;
|
||||
delete opacityCurveEditorG;
|
||||
delete curveEditorbl;
|
||||
delete CCWcurveEditorG;
|
||||
@ -1120,6 +1197,13 @@ void Wavelet::neutral_pressed()
|
||||
}
|
||||
}
|
||||
|
||||
void Wavelet::setListener(ToolPanelListener *tpl)
|
||||
{
|
||||
ToolPanel::setListener(tpl);
|
||||
labgrid->setListener(tpl);
|
||||
}
|
||||
|
||||
|
||||
void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
@ -1295,6 +1379,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
ccshape->setCurve(pp->wavelet.ccwcurve);
|
||||
blshape->setCurve(pp->wavelet.blcurve);
|
||||
opacityShapeRG->setCurve(pp->wavelet.opacityCurveRG);
|
||||
opacityShapeSH->setCurve(pp->wavelet.opacityCurveSH);
|
||||
opacityShapeBY->setCurve(pp->wavelet.opacityCurveBY);
|
||||
opacityShape->setCurve(pp->wavelet.opacityCurveW);
|
||||
opacityShapeWL->setCurve(pp->wavelet.opacityCurveWL);
|
||||
@ -1406,6 +1491,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
mergeC->setValue(pp->wavelet.mergeC);
|
||||
softrad->setValue(pp->wavelet.softrad);
|
||||
softradend->setValue(pp->wavelet.softradend);
|
||||
labgrid->setParams(pp->wavelet.labgridALow / WaveletParams::LABGRID_CORR_MAX, pp->wavelet.labgridBLow / WaveletParams::LABGRID_CORR_MAX, pp->wavelet.labgridAHigh / WaveletParams::LABGRID_CORR_MAX, pp->wavelet.labgridBHigh / WaveletParams::LABGRID_CORR_MAX, false);
|
||||
|
||||
ballum->setValue(pp->wavelet.ballum);
|
||||
balchrom->setValue(pp->wavelet.balchrom);
|
||||
@ -1418,6 +1504,12 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
strength->setValue(pp->wavelet.strength);
|
||||
balance->setValue(pp->wavelet.balance);
|
||||
iter->setValue(pp->wavelet.iter);
|
||||
sigmafin->setValue(pp->wavelet.sigmafin);
|
||||
sigmaton->setValue(pp->wavelet.sigmaton);
|
||||
sigmacol->setValue(pp->wavelet.sigmacol);
|
||||
sigmadir->setValue(pp->wavelet.sigmadir);
|
||||
rangeab->setValue(pp->wavelet.rangeab);
|
||||
protab->setValue(pp->wavelet.protab);
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
correction[i]->setValue(pp->wavelet.c[i]);
|
||||
@ -1493,6 +1585,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
if (!pedited->wavelet.ushamethod) {
|
||||
ushamethod->set_active_text(M("GENERAL_UNCHANGED"));
|
||||
}
|
||||
labgrid->setEdited(pedited->wavelet.labgridALow || pedited->wavelet.labgridBLow || pedited->wavelet.labgridAHigh || pedited->wavelet.labgridBHigh);
|
||||
|
||||
set_inconsistent(multiImage && !pedited->wavelet.enabled);
|
||||
ccshape->setUnChanged(!pedited->wavelet.ccwcurve);
|
||||
@ -1507,6 +1600,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
exptoning->set_inconsistent(!pedited->wavelet.exptoning);
|
||||
expnoise->set_inconsistent(!pedited->wavelet.expnoise);
|
||||
opacityShapeRG->setCurve(pp->wavelet.opacityCurveRG);
|
||||
opacityShapeSH->setCurve(pp->wavelet.opacityCurveSH);
|
||||
opacityShapeBY->setCurve(pp->wavelet.opacityCurveBY);
|
||||
opacityShape->setCurve(pp->wavelet.opacityCurveW);
|
||||
opacityShapeWL->setCurve(pp->wavelet.opacityCurveWL);
|
||||
@ -1535,6 +1629,12 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
thres->setEditedState(pedited->wavelet.thres ? Edited : UnEdited);
|
||||
balance->setEditedState(pedited->wavelet.balance ? Edited : UnEdited);
|
||||
iter->setEditedState(pedited->wavelet.iter ? Edited : UnEdited);
|
||||
sigmafin->setEditedState(pedited->wavelet.sigmafin ? Edited : UnEdited);
|
||||
sigmaton->setEditedState(pedited->wavelet.sigmaton ? Edited : UnEdited);
|
||||
sigmacol->setEditedState(pedited->wavelet.sigmacol ? Edited : UnEdited);
|
||||
sigmadir->setEditedState(pedited->wavelet.sigmadir ? Edited : UnEdited);
|
||||
rangeab->setEditedState(pedited->wavelet.rangeab ? Edited : UnEdited);
|
||||
protab->setEditedState(pedited->wavelet.protab ? Edited : UnEdited);
|
||||
threshold->setEditedState(pedited->wavelet.threshold ? Edited : UnEdited);
|
||||
threshold2->setEditedState(pedited->wavelet.threshold2 ? Edited : UnEdited);
|
||||
edgedetect->setEditedState(pedited->wavelet.edgedetect ? Edited : UnEdited);
|
||||
@ -1693,6 +1793,7 @@ void Wavelet::setEditProvider(EditDataProvider *provider)
|
||||
ccshape->setEditProvider(provider);
|
||||
blshape->setEditProvider(provider);
|
||||
opacityShapeRG->setEditProvider(provider);
|
||||
opacityShapeSH->setEditProvider(provider);
|
||||
opacityShapeBY->setEditProvider(provider);
|
||||
opacityShape->setEditProvider(provider);
|
||||
opacityShapeWL->setEditProvider(provider);
|
||||
@ -1770,6 +1871,7 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->wavelet.ccwcurve = ccshape->getCurve();
|
||||
pp->wavelet.blcurve = blshape->getCurve();
|
||||
pp->wavelet.opacityCurveRG = opacityShapeRG->getCurve();
|
||||
pp->wavelet.opacityCurveSH = opacityShapeSH->getCurve();
|
||||
pp->wavelet.opacityCurveBY = opacityShapeBY->getCurve();
|
||||
pp->wavelet.opacityCurveW = opacityShape->getCurve();
|
||||
pp->wavelet.opacityCurveWL = opacityShapeWL->getCurve();
|
||||
@ -1783,6 +1885,11 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->wavelet.ballum = ballum->getValue();
|
||||
pp->wavelet.chromfi = chromfi->getValue();
|
||||
pp->wavelet.chromco = chromco->getValue();
|
||||
labgrid->getParams(pp->wavelet.labgridALow, pp->wavelet.labgridBLow, pp->wavelet.labgridAHigh, pp->wavelet.labgridBHigh);
|
||||
pp->wavelet.labgridALow *= WaveletParams::LABGRID_CORR_MAX;
|
||||
pp->wavelet.labgridAHigh *= WaveletParams::LABGRID_CORR_MAX;
|
||||
pp->wavelet.labgridBLow *= WaveletParams::LABGRID_CORR_MAX;
|
||||
pp->wavelet.labgridBHigh *= WaveletParams::LABGRID_CORR_MAX;
|
||||
|
||||
pp->wavelet.greenlow = greenlow->getValue();
|
||||
pp->wavelet.bluelow = bluelow->getValue();
|
||||
@ -1806,6 +1913,12 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
|
||||
pp->wavelet.iter = (int) iter->getValue();
|
||||
pp->wavelet.wavclCurve = clshape->getCurve();
|
||||
pp->wavelet.sigmafin = sigmafin->getValue();
|
||||
pp->wavelet.sigmaton = sigmaton->getValue();
|
||||
pp->wavelet.sigmacol = sigmacol->getValue();
|
||||
pp->wavelet.sigmadir = sigmadir->getValue();
|
||||
pp->wavelet.rangeab = rangeab->getValue();
|
||||
pp->wavelet.protab = protab->getValue();
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
pp->wavelet.c[i] = (int) correction[i]->getValue();
|
||||
@ -1887,6 +2000,7 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pedited->wavelet.level2noise = level2noise->getEditedState();
|
||||
pedited->wavelet.level3noise = level3noise->getEditedState();
|
||||
pedited->wavelet.opacityCurveRG = !opacityShapeRG->isUnChanged();
|
||||
pedited->wavelet.opacityCurveSH = !opacityShapeSH->isUnChanged();
|
||||
pedited->wavelet.opacityCurveBY = !opacityShapeBY->isUnChanged();
|
||||
pedited->wavelet.opacityCurveW = !opacityShape->isUnChanged();
|
||||
pedited->wavelet.opacityCurveWL = !opacityShapeWL->isUnChanged();
|
||||
@ -1912,6 +2026,12 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pedited->wavelet.softradend = softradend->getEditedState();
|
||||
pedited->wavelet.balance = balance->getEditedState();
|
||||
pedited->wavelet.iter = iter->getEditedState();
|
||||
pedited->wavelet.sigmafin = sigmafin->getEditedState();
|
||||
pedited->wavelet.sigmaton = sigmaton->getEditedState();
|
||||
pedited->wavelet.sigmacol = sigmacol->getEditedState();
|
||||
pedited->wavelet.sigmadir = sigmadir->getEditedState();
|
||||
pedited->wavelet.rangeab = rangeab->getEditedState();
|
||||
pedited->wavelet.protab = protab->getEditedState();
|
||||
pedited->wavelet.wavclCurve = !clshape->isUnChanged();
|
||||
pedited->wavelet.expcontrast = !expcontrast->get_inconsistent();
|
||||
pedited->wavelet.expchroma = !expchroma->get_inconsistent();
|
||||
@ -1922,6 +2042,7 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pedited->wavelet.exptoning = !exptoning->get_inconsistent();
|
||||
pedited->wavelet.expnoise = !expnoise->get_inconsistent();
|
||||
pedited->wavelet.expclari = !expclari->get_inconsistent();
|
||||
pedited->wavelet.labgridALow = pedited->wavelet.labgridBLow = pedited->wavelet.labgridAHigh = pedited->wavelet.labgridBHigh = labgrid->getEdited();
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
pedited->wavelet.c[i] = correction[i]->getEditedState();
|
||||
@ -2062,6 +2183,8 @@ void Wavelet::curveChanged(CurveEditor* ce)
|
||||
listener->panelChanged(EvWavblshape, M("HISTORY_CUSTOMCURVE"));
|
||||
} else if (ce == opacityShapeRG) {
|
||||
listener->panelChanged(EvWavColor, M("HISTORY_CUSTOMCURVE"));
|
||||
} else if (ce == opacityShapeSH) {
|
||||
listener->panelChanged(EvWavlevelshc, M("HISTORY_CUSTOMCURVE"));
|
||||
} else if (ce == opacityShapeBY) {
|
||||
listener->panelChanged(EvWavOpac, M("HISTORY_CUSTOMCURVE"));
|
||||
} else if (ce == opacityShape) {
|
||||
@ -2092,7 +2215,13 @@ void Wavelet::setDefaults(const ProcParams* defParams, const ParamsEdited* pedit
|
||||
strength->setDefault(defParams->wavelet.strength);
|
||||
balance->setDefault(defParams->wavelet.balance);
|
||||
iter->setDefault(defParams->wavelet.iter);
|
||||
sigmafin->setDefault(defParams->wavelet.sigmafin);
|
||||
sigmaton->setDefault(defParams->wavelet.sigmaton);
|
||||
sigmacol->setDefault(defParams->wavelet.sigmacol);
|
||||
sigmadir->setDefault(defParams->wavelet.sigmadir);
|
||||
sigma->setDefault(defParams->wavelet.sigma);
|
||||
rangeab->setDefault(defParams->wavelet.rangeab);
|
||||
protab->setDefault(defParams->wavelet.protab);
|
||||
offset->setDefault(defParams->wavelet.offset);
|
||||
lowthr->setDefault(defParams->wavelet.lowthr);
|
||||
rescon->setDefault(defParams->wavelet.rescon);
|
||||
@ -2141,6 +2270,7 @@ void Wavelet::setDefaults(const ProcParams* defParams, const ParamsEdited* pedit
|
||||
balchrom->setDefault(defParams->wavelet.balchrom);
|
||||
chromfi->setDefault(defParams->wavelet.chromfi);
|
||||
chromco->setDefault(defParams->wavelet.chromco);
|
||||
labgrid->setDefault(defParams->wavelet.labgridALow / WaveletParams::LABGRID_CORR_MAX, defParams->wavelet.labgridBLow / WaveletParams::LABGRID_CORR_MAX, defParams->wavelet.labgridAHigh / WaveletParams::LABGRID_CORR_MAX, defParams->wavelet.labgridBHigh / WaveletParams::LABGRID_CORR_MAX);
|
||||
|
||||
greenlow->setDefault(defParams->wavelet.greenlow);
|
||||
bluelow->setDefault(defParams->wavelet.bluelow);
|
||||
@ -2168,6 +2298,7 @@ void Wavelet::setDefaults(const ProcParams* defParams, const ParamsEdited* pedit
|
||||
balchrom->setDefaultEditedState(pedited->wavelet.balchrom ? Edited : UnEdited);
|
||||
chromfi->setDefaultEditedState(pedited->wavelet.chromfi ? Edited : UnEdited);
|
||||
chromco->setDefaultEditedState(pedited->wavelet.chromco ? Edited : UnEdited);
|
||||
labgrid->setEdited((pedited->wavelet.labgridALow || pedited->wavelet.labgridBLow || pedited->wavelet.labgridAHigh || pedited->wavelet.labgridBHigh) ? Edited : UnEdited);
|
||||
|
||||
sigma->setDefault(defParams->wavelet.sigma);
|
||||
offset->setDefault(defParams->wavelet.offset);
|
||||
@ -2214,6 +2345,12 @@ void Wavelet::setDefaults(const ProcParams* defParams, const ParamsEdited* pedit
|
||||
strength->setDefaultEditedState(pedited->wavelet.strength ? Edited : UnEdited);
|
||||
balance->setDefaultEditedState(pedited->wavelet.balance ? Edited : UnEdited);
|
||||
iter->setDefaultEditedState(pedited->wavelet.iter ? Edited : UnEdited);
|
||||
sigmafin->setDefaultEditedState(pedited->wavelet.sigmafin ? Edited : UnEdited);
|
||||
sigmaton->setDefaultEditedState(pedited->wavelet.sigmaton ? Edited : UnEdited);
|
||||
sigmacol->setDefaultEditedState(pedited->wavelet.sigmacol ? Edited : UnEdited);
|
||||
sigmadir->setDefaultEditedState(pedited->wavelet.sigmadir ? Edited : UnEdited);
|
||||
rangeab->setDefaultEditedState(pedited->wavelet.rangeab ? Edited : UnEdited);
|
||||
protab->setDefaultEditedState(pedited->wavelet.protab ? Edited : UnEdited);
|
||||
level0noise->setDefaultEditedState(pedited->wavelet.level0noise ? Edited : UnEdited);
|
||||
level1noise->setDefaultEditedState(pedited->wavelet.level1noise ? Edited : UnEdited);
|
||||
level2noise->setDefaultEditedState(pedited->wavelet.level2noise ? Edited : UnEdited);
|
||||
@ -2276,6 +2413,13 @@ void Wavelet::setDefaults(const ProcParams* defParams, const ParamsEdited* pedit
|
||||
strength->setDefaultEditedState(Irrelevant);
|
||||
balance->setDefaultEditedState(Irrelevant);
|
||||
iter->setDefaultEditedState(Irrelevant);
|
||||
sigmafin->setDefaultEditedState(Irrelevant);
|
||||
sigmaton->setDefaultEditedState(Irrelevant);
|
||||
sigmacol->setDefaultEditedState(Irrelevant);
|
||||
sigmadir->setDefaultEditedState(Irrelevant);
|
||||
rangeab->setDefaultEditedState(Irrelevant);
|
||||
protab->setDefaultEditedState(Irrelevant);
|
||||
labgrid->setEdited(Edited);
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
correction[i]->setDefaultEditedState(Irrelevant);
|
||||
@ -2348,11 +2492,13 @@ void Wavelet::HSmethodUpdateUI()
|
||||
bllev->hide();
|
||||
threshold->hide();
|
||||
threshold2->hide();
|
||||
curveEditorC->hide();
|
||||
} else { //with
|
||||
hllev->show();
|
||||
bllev->show();
|
||||
threshold->show();
|
||||
threshold2->show();
|
||||
curveEditorC->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2371,6 +2517,7 @@ void Wavelet::CHmethodUpdateUI()
|
||||
if (!batchMode) {
|
||||
if (CHmethod->get_active_row_number() == 0) {
|
||||
CHSLmethod->show();
|
||||
// sigmacol->show();
|
||||
pastlev->hide();
|
||||
satlev->hide();
|
||||
chroma->hide();
|
||||
@ -2390,6 +2537,7 @@ void Wavelet::CHmethodUpdateUI()
|
||||
}
|
||||
} else if (CHmethod->get_active_row_number() == 1) {
|
||||
CHSLmethod->show();
|
||||
// sigmacol->show();
|
||||
pastlev->show();
|
||||
satlev->show();
|
||||
chroma->show();
|
||||
@ -2409,6 +2557,7 @@ void Wavelet::CHmethodUpdateUI()
|
||||
}
|
||||
} else {
|
||||
chro->show();
|
||||
// sigmacol->hide();
|
||||
pastlev->hide();
|
||||
satlev->hide();
|
||||
chroma->hide();
|
||||
@ -2510,15 +2659,18 @@ void Wavelet::BAmethodUpdateUI()
|
||||
balance->hide();
|
||||
opacityCurveEditorW->hide();
|
||||
iter->hide();
|
||||
tmr->hide();
|
||||
|
||||
} else if (BAmethod->get_active_row_number() == 1) { //sli
|
||||
opacityCurveEditorW->hide();
|
||||
balance->show();
|
||||
iter->show();
|
||||
tmr->show();
|
||||
} else if (BAmethod->get_active_row_number() == 2) { //CU
|
||||
opacityCurveEditorW->show();
|
||||
balance->hide();
|
||||
iter->show();
|
||||
tmr->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2757,6 +2909,7 @@ void Wavelet::setBatchMode(bool batchMode)
|
||||
Dirmethod->append(M("GENERAL_UNCHANGED"));
|
||||
CCWcurveEditorG->setBatchMode(batchMode);
|
||||
opaCurveEditorG->setBatchMode(batchMode);
|
||||
curveEditorC->setBatchMode(batchMode);
|
||||
opacityCurveEditorG->setBatchMode(batchMode);
|
||||
opacityCurveEditorW->setBatchMode(batchMode);
|
||||
opacityCurveEditorWL->setBatchMode(batchMode);
|
||||
@ -2808,6 +2961,12 @@ void Wavelet::setBatchMode(bool batchMode)
|
||||
strength->showEditedCB();
|
||||
balance->showEditedCB();
|
||||
iter->showEditedCB();
|
||||
sigmafin->showEditedCB();
|
||||
sigmaton->showEditedCB();
|
||||
sigmacol->showEditedCB();
|
||||
sigmadir->showEditedCB();
|
||||
rangeab->showEditedCB();
|
||||
protab->showEditedCB();
|
||||
level0noise->showEditedCB();
|
||||
level1noise->showEditedCB();
|
||||
level2noise->showEditedCB();
|
||||
@ -2957,6 +3116,18 @@ void Wavelet::adjusterChanged(Adjuster* a, double newval)
|
||||
listener->panelChanged(EvWavbalance, balance->getTextValue());
|
||||
} else if (a == iter) {
|
||||
listener->panelChanged(EvWaviter, iter->getTextValue());
|
||||
} else if (a == sigmafin) {
|
||||
listener->panelChanged(EvWavsigmafin, sigmafin->getTextValue());
|
||||
} else if (a == sigmaton) {
|
||||
listener->panelChanged(EvWavsigmaton, sigmaton->getTextValue());
|
||||
} else if (a == rangeab) {
|
||||
listener->panelChanged(EvWavrangeab, rangeab->getTextValue());
|
||||
} else if (a == protab) {
|
||||
listener->panelChanged(EvWavprotab, protab->getTextValue());
|
||||
} else if (a == sigmacol) {
|
||||
listener->panelChanged(EvWavsigmacol, sigmacol->getTextValue());
|
||||
} else if (a == sigmadir) {
|
||||
listener->panelChanged(EvWavsigmadir, sigmadir->getTextValue());
|
||||
} else if (a == greenhigh) {
|
||||
listener->panelChanged(EvWavgreenhigh, greenhigh->getTextValue());
|
||||
} else if (a == bluehigh) {
|
||||
|
@ -33,6 +33,7 @@ class CurveEditorGroup;
|
||||
class DiagonalCurveEditor;
|
||||
class EditDataProvider;
|
||||
class FlatCurveEditor;
|
||||
class LabGrid;
|
||||
|
||||
class Wavelet final :
|
||||
public ToolParamBlock,
|
||||
@ -93,8 +94,19 @@ private:
|
||||
rtengine::ProcEvent EvWavresblur;
|
||||
rtengine::ProcEvent EvWavresblurc;
|
||||
rtengine::ProcEvent EvWavedgeffect;
|
||||
rtengine::ProcEvent EvWavsigmafin;
|
||||
rtengine::ProcEvent EvWavsigmaton;
|
||||
rtengine::ProcEvent EvWavsigmacol;
|
||||
rtengine::ProcEvent EvWavsigmadir;
|
||||
rtengine::ProcEvent EvWavLabGridValue;
|
||||
rtengine::ProcEvent EvWavrangeab;
|
||||
rtengine::ProcEvent EvWavprotab;
|
||||
rtengine::ProcEvent EvWavlevelshc;
|
||||
|
||||
LabGrid *labgrid;
|
||||
|
||||
void foldAllButMe(GdkEventButton* event, MyExpander *expander);
|
||||
void setListener(ToolPanelListener *tpl) override;
|
||||
|
||||
void colorForValue(double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller) override;
|
||||
void BAmethodChanged();
|
||||
@ -153,6 +165,8 @@ private:
|
||||
void enableToggled(MyExpander* expander);
|
||||
|
||||
CurveEditorGroup* const curveEditorG;
|
||||
CurveEditorGroup* const curveEditorC;
|
||||
FlatCurveEditor* opacityShapeSH;
|
||||
|
||||
CurveEditorGroup* const CCWcurveEditorG;
|
||||
CurveEditorGroup* const curveEditorbl;
|
||||
@ -218,7 +232,13 @@ private:
|
||||
Adjuster* const strength;
|
||||
Adjuster* const balance;
|
||||
Adjuster* const iter;
|
||||
|
||||
Adjuster* const sigmafin;
|
||||
Adjuster* const sigmaton;
|
||||
Adjuster* const sigmacol;
|
||||
Adjuster* const sigmadir;
|
||||
Adjuster* const rangeab;
|
||||
Adjuster* const protab;
|
||||
|
||||
Adjuster* greenlow;
|
||||
Adjuster* bluelow;
|
||||
Adjuster* greenmed;
|
||||
@ -294,6 +314,9 @@ private:
|
||||
Gtk::Frame* const blurFrame;
|
||||
Gtk::Frame* const chromaFrame;
|
||||
Gtk::Frame* const chroFrame;
|
||||
Gtk::Frame* const fincFrame;
|
||||
Gtk::Frame* const dirFrame;
|
||||
Gtk::Frame* const tonFrame;
|
||||
|
||||
Gtk::Label* const wavLabels;
|
||||
Gtk::Label* const labmC;
|
||||
|
Loading…
x
Reference in New Issue
Block a user