Generalized Hyperbolic Stretch in Selective Editing (#7210)
* GHS GUI first step * GHS GUI first step * GUI step 3 * Hide show ghsmethod * Siril functions for ghs * Init ghs in iplocallab * ghs step 2 * ghs step 4 * Comment copyright Pixlnsight 2021 * Smooth highlights and tooltips * Enabled saturation and luminance ghs mode * First tooltip * Ghs tooltips * Remove wrong packstart inverssh * Change labels and tooltips * Disabled mask in global and other improvments * Comment code * appimage and windows yml ghs * Change tooltip * Ghsmethod hue and change tolltips * Change tooltip * Inverse Stretch step 1 * Inverse GHS * GHS tooltips * Change tooltips * Change tooltip * Linear black point * Small change to blackpoint * Change tooltip * Clean and comment code * forgotten GHS highlight attenuation msg in history * Comment code with Transformation equations * Change tooltip * Wrong default value balck point * Comment code iplocallab * Ghs curve step 1 * GHS curve step 2 * Show GHS setting in a Curve Box * Tooltip for ghs S curve * Disabled warning in compilation simpleprocess * Simplified code part 1 * Simplified code GHS graph part 2 * Improve black point with negatives values * Improve BP and tooltip * Listener enable only with GHS * White point for GHS * Change label and tooltip * Improve behavior white point and black point * Link sliders ghs_SP ghs_LP ghs_HP and change code to avoid balck screen * hide unused button in diagonal curve GHS * prevents the GHS representation in S from displaying artifacts if ghs-d=0 * Change tooltips * Improvment and tooltips * Forgotten tooltip * Improve GUI GHS S curve - change tooltips * Set transition gray areas in S curve GHS with values of the RT-spot * Change label GHS * setlogscale blackpoint and symmetry * Set recursive reference enable by default in controlspotpanel * Change lastlocalCurvesDir Dirghs in locallabtools and options - change labels * Added in converttonormal ghsMode.. not sure if this is useful * DIY to make GHS curve work without the choices * Change RGB calculation with luminance function working profile * 5 modes GHS method * Label to show datas clipped Black point and White point * Various change white point tooltips * Bad behavior wp bp labels * Small change to improccordinator call to ghschanged ghsbwchanged * Set log scale ghs_D * Hide Graduated filter if GHS enable * Luminance Lab in ghsmethod * Lab slope factor step 1 * Slope and Chromaticity GHS improvments * Fixed bad sqrt line 17477 iplocallab * Workaround linear GHS - re-enable Graduated filer GHS * Change limits slope lab factor * Ghs chromaticity Lab (Lch) * Improve ghs chromaticity * Change labels and tooltips Lab chroma * Slope Lab to 100 * Noise and saturation RGB * Saturation RGB standard and labels * Change histogram and navigator panel without gamma when using working profile * Remove gray in GHS curve * Local contrast a minima * Regularization stretch * Improve Graduated Filter in all cases GHS Color and Light etc. * Improves nlmeans to reduce noise after GHS * Change to GF - tooltip Nlmeans * Added oW oH tW tH etc. * Added call GF * tX tY for previewProps * Comment code GF * Improve local contrast ghs * Change norm to norm2 * Improve GUI mode complexity and Lab GHS * Show values BP WP in GUI * Labgrid ghs step 1 * Labgrid for simulation GHS - step 2 * More points for Labgrid ghs * Clean and comment code * Fixed crash in inverse GHS white point - set to 10 points for GSH simulation * Change to black point in inverse GHS * Intilialize simulation with nothing if new spot * Remove curve GHS - optimize code simulation - improve GUI * set ghs default - fixed crash is case HP SP LP * Fixed crash - I hope in inverse GHS * Simplify WP and BP limits to avoid crash in inverse GHS * Clean code with ghscurve - ghsshape * Change tooltips * Change to D - GUI - comment code * Simulation with 4 more points * Best simulation with point 0.05 and 0.95 * Clean code - change for crsah in Inverse GHS * Show values WP and BP
This commit is contained in:
parent
bc2fbfad66
commit
16db6186dd
2
.github/workflows/appimage.yml
vendored
2
.github/workflows/appimage.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
publish_pre_dev_labels: '[]'
|
||||
publish_pre_dev_labels: '["Beep6581:ghs"]'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
publish_pre_dev_labels: '[]'
|
||||
publish_pre_dev_labels: '["Beep6581:ghs"]'
|
||||
|
||||
|
||||
jobs:
|
||||
|
@ -1522,11 +1522,25 @@ HISTORY_MSG_LOCAL_FEATHERSH;Local - SH Gradient feather
|
||||
HISTORY_MSG_LOCAL_FEATHERVIB;Local - Vib Gradient feather
|
||||
HISTORY_MSG_LOCAL_FEATHERWAV;Local - Wav Gradient feather
|
||||
HISTORY_MSG_LOCAL_GAMUTMUNSEL;Local - SC - Avoid Color Shift
|
||||
HISTORY_MSG_LOCAL_GHSMETHOD;Local - GHS - Method
|
||||
HISTORY_MSG_LOCAL_GHS_D;Local - GHS - Strech factor
|
||||
HISTORY_MSG_LOCAL_GHS_SLOPE;Local - GHS - Lab slope factor
|
||||
HISTORY_MSG_LOCAL_GHS_CHRO;Local - GHS - Lab chromaticity factor
|
||||
HISTORY_MSG_LOCAL_GHS_B;Local - GHS - Local intensity
|
||||
HISTORY_MSG_LOCAL_GHS_SP;Local - GHS - Symmetry point
|
||||
HISTORY_MSG_LOCAL_GHS_LP;Local - GHS - Protect shadows
|
||||
HISTORY_MSG_LOCAL_GHS_HP;Local - GHS - Protect highlights
|
||||
HISTORY_MSG_LOCAL_GHS_LC;Local - GHS - Local Contrast
|
||||
HISTORY_MSG_LOCAL_GHS_BLP;Local - GHS - Black point
|
||||
HISTORY_MSG_LOCAL_GHS_HLP;Local - GHS - White point
|
||||
HISTORY_MSG_LOCAL_GHS_INV;Local - GHS - Inverse
|
||||
HISTORY_MSG_LOCAL_GHS_SMOOTH;Local - GHS - Highlight Attenuation
|
||||
HISTORY_MSG_LOCAL_LOG_BLACKS;Local - Log Blacks distribution
|
||||
HISTORY_MSG_LOCAL_LOG_COMPR;Local - Log Compress brightness
|
||||
HISTORY_MSG_LOCAL_LOG_SAT;Local - Log Saturation control
|
||||
HISTORY_MSG_LOCAL_LOG_WHITES;Local - Log Whites distribution
|
||||
HISTORY_MSG_LOCAL_TMO_SATUR;Local Exp Fattal Saturation
|
||||
HISTORY_MSG_LOCAL_NLITER;Local - Nlmeans - Iterations
|
||||
HISTORY_MSG_METADATA_MODE;Metadata copy mode
|
||||
HISTORY_MSG_MICROCONTRAST_CONTRAST;Microcontrast - Contrast threshold
|
||||
HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold
|
||||
@ -3133,6 +3147,49 @@ TP_LOCALLAB_GAMUTNON;None
|
||||
TP_LOCALLAB_GAMUTXYZABSO;XYZ Absolute
|
||||
TP_LOCALLAB_GAMUTXYZRELA;XYZ Relative
|
||||
TP_LOCALLAB_GAMW;Gamma (wavelet pyramids)
|
||||
TP_LOCALLAB_GHSBPWP;Clipped Black point=%1 White point=%2
|
||||
TP_LOCALLAB_GHSBPWPVALUE;Value Black point=%1 White point=%2
|
||||
TP_LOCALLAB_GHS_GHSDIAG;GHS Simulation
|
||||
TP_LOCALLAB_GHS_SIMUL_TOOLTIP;Gives a simplified representation of the GHS function - it only uses 7 points for the sake of code simplification.
|
||||
TP_LOCALLAB_GHSRGBLUM;RGB Luminance
|
||||
TP_LOCALLAB_GHSRGBSTD;RGB Standard
|
||||
TP_LOCALLAB_GHSLAB;Luminance & chromaticity (Lab)
|
||||
TP_LOCALLAB_GHSHUE;Hue (HSL)
|
||||
TP_LOCALLAB_GHSLUM;Luminance (HSL)
|
||||
TP_LOCALLAB_GHSSAT;Saturation (HSL)
|
||||
TP_LOCALLAB_GHSFRA;Stretch settings
|
||||
TP_LOCALLAB_GHS_D;Stretch factor (D)
|
||||
TP_LOCALLAB_GHS_B;Local intensity (b)
|
||||
TP_LOCALLAB_GHS_SP;Symmetry point (SP)
|
||||
TP_LOCALLAB_GHS_LP;Protect shadows (LP)
|
||||
TP_LOCALLAB_GHS_HP;Protect highlights (HP)
|
||||
TP_LOCALLAB_GHS_LC;Value (LC)
|
||||
TP_LOCALLAB_GHS_LC_FRAME;Stetch Regularization
|
||||
TP_LOCALLAB_GHS_LC_TOOLTIP;Slightly increases local contrast that was weakened by stretching.\nCan be completed by other tools specific to local contrast (wavelets,...).
|
||||
TP_LOCALLAB_GHS_BLACKPOINT_FRAME;Black point/White point/Highlights
|
||||
TP_LOCALLAB_GHS_BPFRAME_TOOLTIP;Sets the Black point, White point and Highlight for a linear stretch of the image.
|
||||
TP_LOCALLAB_GHS_BLP;Black point (BP linear)
|
||||
TP_LOCALLAB_GHS_BLP_TOOLTIP;Sets the Black point for a linear stretch of the image.\n For positive slider values, in GHS ‘normal’, shadows are raised linearly to avoid excessive noise build-up and facilitate GHS work.\n For negative slider values, the histogram is shifted to the left. For Raw images you can also use Raw-Tab > Raw Black Points – Dehaze, which is more precise. Contrast gained by performing the linear stretch will be evenly distributed over the image.\n\nYou can adjust a linear black point offset either:\n -to account for noise in the dark parts.\n -adjust the histogram.\n\n It is recommended to act on this sliders before implementing the GHS algorithm to avoid clipping data.\n The label 'Clipped Black point=x White point=y' shows you the number of pixels that would be clipped without action on the 2 sliders.\n\nIn ‘Inverse GHS’ mode the trends are differents and there are possible interactions with the White point.
|
||||
TP_LOCALLAB_GHS_HLP;White point (WP linear)
|
||||
TP_LOCALLAB_GHS_METHOD_TOOLTIP;The Generalized Hyperbolic Stretch (GHS) process allows you to transform the values of pixels in your image to improve the representation of the underlying data for human visualisation. \nThe generalised hyperbolic equations used in the GHS process have five defining parameters. This allows significant flexibility in designing the "shape" of the transformation.\n\nTypical uses of pixel intensity transformations include:\n * Initial stretch of pixel data from linear state.\n * Addition of contrast to key areas of the image.\n * Overall brightening or darkening of the image.\n * Adjustment of the dynamic range of the image.\n * Adjustment of pixel data in RGB Luminance, RGB standard, Luminance - chromaticity (Lab/Lch), Luminance (hsv), Saturation (hsv), Hue (hsv), channels.\n\nFor a better treatment, you can proceed in several steps, creating 2 or more RT-spots each superimposed with the GHS tool. For each of the RT-Spots, the Symmetry point (SP) base value will be different. Use the peak marker on the histogram to position the SP value.\n For example, you can start the system in RGB mode (1st Spot), then the 2nd Spot in RGB mode with a different SP, and the 3rd in Saturation or Hue mode.\n You can mix RT-spots in 'Normal' mode and 'Inverse' mode to restore contrast balance.\n Full Image allows you to differentiate the action according to the color based on the deltaE.
|
||||
TP_LOCALLAB_GHS_HLP_TOOLTIP;Sets the White point for a linear stretch of the image. Any pixel with value greater than the White point input will be clipped and the data lost.\n Contrast gained by performing the linear stretch will be evenly distributed over the image, which will be brightened. Pixels with values greater than the Whitepoint will appear white and have a value of 1.0.\n Setting this parameter to a value greater than 1 will extend the dynamic range at the high end.\n It is recommended to act on this slider before implementing the GHS algorithm to avoid clipping data.\n The label 'Clipped Black point=x White point=y' shows you the number of pixels that would be clipped without action on the 2 sliders.\n\nIn ‘Inverse GHS’ mode the trends are reversed and there are possible interactions with the Black point.
|
||||
TP_LOCALLAB_GHS_MODELIN;Linear
|
||||
TP_LOCALLAB_GHS_MODECUR;GHS
|
||||
TP_LOCALLAB_GHS_D_TOOLTIP;This parameter controls the amount of stretch. If the Stretch factor is set to zero there is no stretch, ie the transformation is the identity transformation.
|
||||
TP_LOCALLAB_GHS_B_TOOLTIP;This parameter controls how tightly focused the stretch is around the Symmetry point (SP) by changing the form of the transform itself:\n * For concentrated stretches (such as initial stretches on linear images) a large 'b' factor should be employed to focus a stretch within a histogram peak while de-focusing the stretch away from the histogram peak.\n * For adjustment of non-linear images, lower 'b' parameters should be employed to distribute contrast and brightness more evenly.\n * Large positive values of 'b' can be thought of as a histogram widener, ie spreading the histogram wider about the focus point, SP.\n * By contrast, lower values of 'b' tend to shift the histogram to a brighter (or dimmer) position without affecting its width too greatly.\n * As a general rule, the level of 'b' employed will decrease as a stretch sequence nears completion, although larger 'b' values can still be employed for precise placement of additional contrast.
|
||||
TP_LOCALLAB_GHS_SLOPE;Slope Lab factor (S)
|
||||
TP_LOCALLAB_GHS_SLOPE_TOOLTIP;Changes the slope of the Lab transform to improve shadow rendering.
|
||||
TP_LOCALLAB_GHS_CHRO;Chromaticity Lab factor (C)
|
||||
TP_LOCALLAB_GHS_CHRO_TOOLTIP;GHS chromaticity - compensate large stretches
|
||||
TP_LOCALLAB_GHSLABFRA;Lab settings
|
||||
TP_LOCALLAB_GHS_SP_TOOLTIP;Default 0.03 to avoid the zero value which can never be suitable. For exposure balanced images, a value of 0.18 will likely be suitable.\n This is the key balance value of the GHS system.\nSets the focus point around which the stretch is applied - contrast will be distributed symmetrically about SP.\n While 'b' provides the degree of focus of the stretch, SP determines where that focus is applied.\n SP should generally be placed within a histogram peak so that the stretch will widen and lower the peak by adding the most contrast in the stretch at that point. Pixel values will move away from the SP location.
|
||||
TP_LOCALLAB_GHS_LP_TOOLTIP;Sets a value below which the stretch is modified to preserve contrast in the shadows/lowlights. This is done by performing a linear stretch of the data below the 'LP' level by reserving contrast from the rest of the image. Moving the LP level towards the current setting of SP changes both the scope (range) and the amount of this contrast reservation, the net effect is to push the overal stretch to higher brightness levels while keeping the contrast and definition in the background. The amount of contrast reserved for the lowlights is such that the continuity of the stretch is preserved.\n This parameter must be greater than or equal to 0 and not greater than the Symmetry point.\n The GUI - and the code - takes into account the value of the Symmetry Point (SP) to set the maximum value.
|
||||
TP_LOCALLAB_GHS_HP_TOOLTIP;Sets a value above which the stretch is modified to preserve contrast in the highlights/stars. This is done by performing a linear stretch of the data above the 'HP' level by reserving contrast from the rest of the image. Moving the HP level towards the current setting of SP increases both the scope (range) and the amount of this contrast reservation, the net effect is to push the overal stretch to lower brightness levels while keeping the contrast and definition in the highlights. The amount of contrast reserved for the highlights is such that the continuity of the stretch is preserved.\n This parameter must be less than or equal to 1 and not less than the Symmetry point.\n The GUI - and the code - takes into account the value of the Symmetry Point (SP) to set the minimum value.
|
||||
TP_LOCALLAB_GHS_SMOOTH_TOOLTIP;Smooth and soften highlight areas. Amplifies 'Protect highlights (HP)' action.
|
||||
TP_LOCALLAB_GHS_SMOOTH;Highlight Attenuation
|
||||
TP_LOCALLAB_GHS_CURVE_TOOLTIP;Shows the 'S' curve generated by GHS calculations. Mainly for educational purposes.\n\n * You cannot modify this 'GHS curve' via the GUI (mouse,..).
|
||||
TP_LOCALLAB_GHS_INV;Inverse GHS
|
||||
TP_LOCALLAB_GHS_INV_TOOLTIP;The inverse GHS is useful for working in negative space. Inverted transform add contrast on the far right and left histogram, brighten the dims, dim the brights and squeez the histogram to the middle.\n\nThe Generalised Hyperbolic inverse transformation allows you to recover your original image subject to mathematical precision. But you can use it for its own features.\n\nIn 'Inverse GHS' mode, the White Point and Black point values will probably need to be changed - often lowered for White Point. There is interaction between the two settings.
|
||||
TP_LOCALLAB_GRADANG;Gradient angle
|
||||
TP_LOCALLAB_GRADANG_TOOLTIP;Rotation angle in degrees: -180 0 +180.
|
||||
TP_LOCALLAB_GRADFRA;Graduated Filter Mask
|
||||
@ -3394,6 +3451,7 @@ TP_LOCALLAB_MRONE;None
|
||||
TP_LOCALLAB_MRTHR;Original Image
|
||||
TP_LOCALLAB_MULTIPL_TOOLTIP;Wide-range tone adjustment: -18EV to +4EV. The first slider acts on very dark tones between -18EV and -6EV. The last slider acts on light tones up to 4EV.
|
||||
TP_LOCALLAB_NEIGH;Radius
|
||||
TP_LOCALLAB_NLDENOISENLITER_TOOLTIP;Run multiple iterations of Nlmeans. Results are often better with multiple iterations and low Strength.
|
||||
TP_LOCALLAB_NLDENOISENLGAM_TOOLTIP;Lower values preserve details and texture, higher values increase denoise.\nIf gamma = 3.0 Luminance 'linear' is used.
|
||||
TP_LOCALLAB_NLDENOISENLPAT_TOOLTIP;Use this slider to adapt the amount of denoise to the size of the objects to be processed.
|
||||
TP_LOCALLAB_NLDENOISENLRAD_TOOLTIP;Higher values increase denoise at the expense of processing time.
|
||||
@ -3402,6 +3460,7 @@ TP_LOCALLAB_NLDET;Detail recovery
|
||||
TP_LOCALLAB_NLFRA;Non-local Means: Luminance
|
||||
TP_LOCALLAB_NLFRAME_TOOLTIP;Non-local means denoising takes a mean of all pixels in the image, weighted by how similar they are to the target pixel.\nReduces loss of detail compared with local mean algorithms.\nOnly luminance noise is taken into account. Chrominance noise is best processed using wavelets and Fourier transforms (DCT).\nCan be used in conjunction with 'Luminance denoise by level' or on its own.
|
||||
TP_LOCALLAB_NLGAM;Gamma
|
||||
TP_LOCALLAB_NLITER;Iterations
|
||||
TP_LOCALLAB_NLLUM;Strength
|
||||
TP_LOCALLAB_NLPAT;Maximum patch size
|
||||
TP_LOCALLAB_NLRAD;Maximum radius size
|
||||
@ -3503,9 +3562,10 @@ TP_LOCALLAB_SENSI_TOOLTIP;Adjusts the scope of the action:\nSmall values limit t
|
||||
TP_LOCALLAB_SETTINGS;Settings
|
||||
TP_LOCALLAB_SH1;Shadows Highlights
|
||||
TP_LOCALLAB_SH2;Equalizer
|
||||
TP_LOCALLAB_SH3;Generalized Hyperbolic Stretch
|
||||
TP_LOCALLAB_SHADEX;Shadows
|
||||
TP_LOCALLAB_SHADEXCOMP;Shadow compression
|
||||
TP_LOCALLAB_SHADHIGH;Shadows/Highlights & Tone Equalizer
|
||||
TP_LOCALLAB_SHADHIGH;Shadows/Highlights, Equalizer & GHS
|
||||
TP_LOCALLAB_SHADHMASK_TOOLTIP;Lowers the highlights of the mask in the same way as the shadows/highlights algorithm.
|
||||
TP_LOCALLAB_SHADMASK_TOOLTIP;Lifts the shadows of the mask in the same way as the shadows/highlights algorithm.
|
||||
TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP;Adjust shadows and highlights either with shadows & highlights sliders or with a tone equalizer.\nCan be used instead of, or in conjunction with the Exposure module.\nCan also be used as a graduated filter.
|
||||
@ -3553,7 +3613,7 @@ TP_LOCALLAB_SHOWT;Mask and modifications
|
||||
TP_LOCALLAB_SHOWVI;Mask and modifications
|
||||
TP_LOCALLAB_SHRESFRA;Shadows/Highlights & TRC
|
||||
TP_LOCALLAB_SHTRC_TOOLTIP;Based on 'working profile' (only those provided), modifies the tones of the image by acting on a TRC (Tone Response Curve).\nGamma acts mainly on light tones.\nSlope acts mainly on dark tones.\nIt is recommended that the TRC of both devices (monitor and output profile) be sRGB (default).
|
||||
TP_LOCALLAB_SH_TOOLNAME;Shadows/Highlights & Tone Equalizer
|
||||
TP_LOCALLAB_SH_TOOLNAME;Shadows/Highlights & Equalizer & GHS
|
||||
TP_LOCALLAB_SIGBLACKSSCIE;Blacks distribution
|
||||
TP_LOCALLAB_SIGCIE;Sigmoid
|
||||
TP_LOCALLAB_SIGFRA;Sigmoid Q
|
||||
|
@ -855,6 +855,7 @@ void Crop::update(int todo)
|
||||
//I made a little change here. Rather than have luminanceCurve (and others) use in/out lab images, we can do more if we copy right here.
|
||||
parent->ipf.rgb2lab(*baseCrop, *laboCrop, params.icm.workingProfile);
|
||||
|
||||
PreviewProps pp(trafx, trafy, trafw * skip, trafh * skip, skip);
|
||||
|
||||
labnCrop->CopyFrom(laboCrop);
|
||||
|
||||
@ -871,6 +872,7 @@ void Crop::update(int todo)
|
||||
auto& lmasklocalcurve2 = parent->lmasklocalcurve;
|
||||
auto& lmaskexplocalcurve2 = parent->lmaskexplocalcurve;
|
||||
auto& lmaskSHlocalcurve2 = parent->lmaskSHlocalcurve;
|
||||
// auto& ghslocalcurve2 = parent->ghslocalcurve;
|
||||
auto& lmaskviblocalcurve2 = parent->lmaskviblocalcurve;
|
||||
auto& lmasktmlocalcurve2 = parent->lmasktmlocalcurve;
|
||||
auto& lmaskretilocalcurve2 = parent->lmaskretilocalcurve;
|
||||
@ -1022,6 +1024,7 @@ void Crop::update(int todo)
|
||||
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve2, skip);
|
||||
const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve2, skip);
|
||||
const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve2, skip);
|
||||
// const bool localghsutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).ghscurve, ghslocalcurve2, skip);
|
||||
const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve2, skip);
|
||||
const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve2, skip);
|
||||
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve2, skip);
|
||||
@ -1087,8 +1090,11 @@ void Crop::update(int todo)
|
||||
float Lhighresi46 = 0.f;
|
||||
float Lnresi46 = 0.f;
|
||||
float contsig = params.locallab.spots.at(sp).contsigqcie;
|
||||
|
||||
float lightsig = params.locallab.spots.at(sp).lightsigqcie;
|
||||
float ghscur[24];//20 +4 12 11
|
||||
int ghsbpwp[2];
|
||||
float ghsbpwpvalue[2];
|
||||
|
||||
/* huerefp[sp] = huere;
|
||||
chromarefp[sp] = chromare;
|
||||
lumarefp[sp] = lumare;
|
||||
@ -1102,7 +1108,7 @@ void Crop::update(int todo)
|
||||
|
||||
if (sp == params.locallab.selspot) {
|
||||
|
||||
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), savenormtmCrop.get(), savenormretiCrop.get(), lastorigCrop.get(), fw, fh, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve,
|
||||
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), savenormtmCrop.get(), savenormretiCrop.get(), lastorigCrop.get(), fw, fh, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), trafx, trafy, trafw, trafh , skip, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve2,locallutili,
|
||||
cllocalcurve2, localclutili,
|
||||
lclocalcurve2, locallcutili,
|
||||
@ -1112,6 +1118,7 @@ void Crop::update(int todo)
|
||||
lmasklocalcurve2, localmaskutili,
|
||||
lmaskexplocalcurve2, localmaskexputili,
|
||||
lmaskSHlocalcurve2, localmaskSHutili,
|
||||
// ghslocalcurve2, localghsutili,
|
||||
lmaskviblocalcurve2, localmaskvibutili,
|
||||
lmasktmlocalcurve2, localmasktmutili,
|
||||
lmaskretilocalcurve2, localmaskretiutili,
|
||||
@ -1159,7 +1166,9 @@ void Crop::update(int todo)
|
||||
parent->previewDeltaE, parent->locallColorMask, parent->locallColorMaskinv, parent->locallExpMask, parent->locallExpMaskinv, parent->locallSHMask, parent->locallSHMaskinv, parent->locallvibMask, parent->localllcMask, parent->locallsharMask, parent->locallcbMask, parent->locallretiMask, parent->locallsoftMask, parent->localltmMask, parent->locallblMask,
|
||||
parent->localllogMask, parent->locall_Mask, parent->locallcieMask, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie, fab, maxicam,rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, prim, ill, contsig, lightsig,
|
||||
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46);
|
||||
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46,
|
||||
ghscur, ghsbpwp, ghsbpwpvalue
|
||||
);
|
||||
|
||||
LocallabListener::locallabDenoiseLC denoiselc;
|
||||
denoiselc.highres = highresi;
|
||||
@ -1217,7 +1226,7 @@ void Crop::update(int todo)
|
||||
}
|
||||
|
||||
} else {
|
||||
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), savenormtmCrop.get(), savenormretiCrop.get(), lastorigCrop.get(), fw, fh, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve,
|
||||
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), savenormtmCrop.get(), savenormretiCrop.get(), lastorigCrop.get(), fw, fh, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), trafx, trafy, trafw , trafh, skip, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve2,locallutili,
|
||||
cllocalcurve2, localclutili,
|
||||
lclocalcurve2, locallcutili,
|
||||
@ -1226,6 +1235,7 @@ void Crop::update(int todo)
|
||||
lmasklocalcurve2, localmaskutili,
|
||||
lmaskexplocalcurve2, localmaskexputili,
|
||||
lmaskSHlocalcurve2, localmaskSHutili,
|
||||
// ghslocalcurve2, localghsutili,
|
||||
lmaskviblocalcurve2, localmaskvibutili,
|
||||
lmasktmlocalcurve2, localmasktmutili,
|
||||
lmaskretilocalcurve2, localmaskretiutili,
|
||||
@ -1272,7 +1282,9 @@ void Crop::update(int todo)
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie, fab, maxicam, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, prim, ill, contsig, lightsig,
|
||||
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46);
|
||||
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46,
|
||||
ghscur, ghsbpwp, ghsbpwpvalue
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -211,6 +211,7 @@ ImProcCoordinator::ImProcCoordinator() :
|
||||
lmasklocalcurve(65536, LUT_CLIP_OFF),
|
||||
lmaskexplocalcurve(65536, LUT_CLIP_OFF),
|
||||
lmaskSHlocalcurve(65536, LUT_CLIP_OFF),
|
||||
ghslocalcurve(65536, LUT_CLIP_OFF),
|
||||
lmaskviblocalcurve(65536, LUT_CLIP_OFF),
|
||||
lmasktmlocalcurve(65536, LUT_CLIP_OFF),
|
||||
lmaskretilocalcurve(65536, LUT_CLIP_OFF),
|
||||
@ -1147,6 +1148,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
//std::vector<LocallabListener::locallabRef> locallref;
|
||||
std::vector<LocallabListener::locallabRetiMinMax> locallretiminmax;
|
||||
std::vector<LocallabListener::locallabcieLC> locallcielc;
|
||||
std::vector<LocallabListener::locallabshGHS> locallshgsh;
|
||||
std::vector<LocallabListener::locallabshGHSbw> locallshgshbw;
|
||||
std::vector<LocallabListener::locallabsetLC> locallsetlc;
|
||||
std::vector<LocallabListener::locallabcieSIG> locallciesig;
|
||||
huerefs.resize(params->locallab.spots.size());
|
||||
@ -1261,6 +1264,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, sca);
|
||||
const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve, sca);
|
||||
const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve, sca);
|
||||
// const bool localghsutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).ghscurve, ghslocalcurve, sca);
|
||||
const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve, sca);
|
||||
const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, sca);
|
||||
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, sca);
|
||||
@ -1394,12 +1398,21 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
float Lnresi = 0.f;
|
||||
float Lhighresi46 = 0.f;
|
||||
float Lnresi46 = 0.f;
|
||||
float ghscur[24];//42 +4 12 11
|
||||
int ghsbpwp[2];
|
||||
ghsbpwp[0] = 0;
|
||||
ghsbpwp[1] = 0;
|
||||
float ghsbpwpvalue[2];
|
||||
ghsbpwpvalue[0] = 0.f;
|
||||
ghsbpwpvalue[1] = 1.f;;
|
||||
|
||||
|
||||
Glib::ustring prof = params->icm.workingProfile;
|
||||
if(params->locallab.spots.at(sp).complexcie == 2) {
|
||||
params->locallab.spots.at(sp).primMethod = prof;//in Basic mode set to Working profile
|
||||
}
|
||||
|
||||
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv.get(), savenormtm.get(), savenormreti.get(), lastorigimp.get(), fw, fh, 0, 0, pW, pH, scale, locRETgainCurve, locRETtransCurve,
|
||||
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv.get(), savenormtm.get(), savenormreti.get(), lastorigimp.get(), fw, fh, 0, 0, pW, pH, pW, pH, pW, pH, scale, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve, locallutili,
|
||||
cllocalcurve, localclutili,
|
||||
lclocalcurve, locallcutili,
|
||||
@ -1408,6 +1421,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
lmasklocalcurve, localmaskutili,
|
||||
lmaskexplocalcurve, localmaskexputili,
|
||||
lmaskSHlocalcurve, localmaskSHutili,
|
||||
// ghslocalcurve, localghsutili,
|
||||
lmaskviblocalcurve, localmaskvibutili,
|
||||
lmasktmlocalcurve, localmasktmutili,
|
||||
lmaskretilocalcurve, localmaskretiutili,
|
||||
@ -1454,7 +1468,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantm, stdtm, meanreti, stdreti, fab, maxicam, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, prim, ill, contsig, lightsig,
|
||||
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46);
|
||||
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46,
|
||||
ghscur, ghsbpwp, ghsbpwpvalue
|
||||
);
|
||||
|
||||
|
||||
fabrefp[sp] = fab;
|
||||
@ -1563,6 +1579,33 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
locciesig.contsigq = contsig;
|
||||
locciesig.lightsigq = lightsig;
|
||||
locallciesig.push_back(locciesig);
|
||||
/*
|
||||
int reset = 0;
|
||||
if(params->locallab.spots.at(sp).ghsMode == "lin") {
|
||||
reset = 0;
|
||||
} else {
|
||||
reset = 1;
|
||||
}
|
||||
*/
|
||||
LocallabListener::locallabshGHS locshghs;//ghs S curve 42 or labgrid 12
|
||||
for(int j = 0; j < 24; j++) {//+4 12 11
|
||||
locshghs.ghsc[j] = ghscur[j];
|
||||
}
|
||||
// locshghs.licur = reset;
|
||||
/*
|
||||
printf("ghsc0=%f ghsc1=%f\n", (double) locshghs.ghsc[0], (double) locshghs.ghsc[1]);
|
||||
printf("ghsc20=%f ghsc21=%f\n", (double) locshghs.ghsc[20], (double) locshghs.ghsc[21]);
|
||||
printf("ghsc40=%f ghsc41=%f\n", (double) locshghs.ghsc[40], (double) locshghs.ghsc[41]);
|
||||
printf("OK 2 impro\n");
|
||||
*/
|
||||
locallshgsh.push_back(locshghs);
|
||||
|
||||
LocallabListener::locallabshGHSbw locshghsbw;//ghs S curve
|
||||
for(int j = 0; j < 2; j++) {
|
||||
locshghsbw.ghsbw[j] = ghsbpwp[j];
|
||||
locshghsbw.ghsbwvalue[j] = ghsbpwpvalue[j];
|
||||
}
|
||||
locallshgshbw.push_back(locshghsbw);
|
||||
|
||||
|
||||
// Recalculate references after
|
||||
@ -1633,6 +1676,11 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
locallListener->cieChanged(locallcielc,params->locallab.selspot);
|
||||
}
|
||||
locallListener->sigChanged(locallciesig,params->locallab.selspot);
|
||||
if (params->locallab.spots.at(sp).expshadhigh && params->locallab.spots.at(sp).shMethod == "ghs") {
|
||||
locallListener->ghsChanged(locallshgsh,params->locallab.selspot);//curve
|
||||
locallListener->ghsbwChanged(locallshgshbw,params->locallab.selspot);//Black and White point
|
||||
}
|
||||
|
||||
/*
|
||||
if(params->locallab.spots.at(sp).colorscope != 0) {//compatibility with old method in controlspotpanel
|
||||
locallListener->scopeChangedcol(scopefp[sp], params->locallab.selspot, iscolor);
|
||||
|
@ -279,6 +279,7 @@ protected:
|
||||
LUTf lmasklocalcurve;
|
||||
LUTf lmaskexplocalcurve;
|
||||
LUTf lmaskSHlocalcurve;
|
||||
LUTf ghslocalcurve;
|
||||
LUTf lmaskviblocalcurve;
|
||||
LUTf lmasktmlocalcurve;
|
||||
LUTf lmaskretilocalcurve;
|
||||
|
@ -251,7 +251,7 @@ enum class BlurType {
|
||||
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 Local adjustments
|
||||
void maskcalccol(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,
|
||||
void maskcalccol(int call, bool invmask, bool pde, int bfw, int bfh, int oW, int oH, int tX, int tY, int tW, int tH, int xstart, int ystart, int xend, int yend, 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,
|
||||
const LocLLmaskCurve & locllmasCurve, bool llmasutili,
|
||||
@ -260,7 +260,7 @@ enum class BlurType {
|
||||
const LUTf& lmasklocalcurve, bool localmaskutili,
|
||||
const LocwavCurve & loclmasCurvecolwav, bool lmasutilicolwav, int level_bl, int level_hl, int level_br, int level_hr,
|
||||
int shortcu, bool delt, const float hueref, const float chromaref, const float lumaref,
|
||||
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, bool fftt, float blu_ma, float cont_ma, int indic, float &fab);
|
||||
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, bool fftt, float blu_ma, float cont_ma, int indic, float &fab, int fw, int fh);
|
||||
|
||||
void avoidcolshi(const struct local_params& lp, int sp, LabImage *transformed, LabImage *reserved, int cy, int cx, int sk);
|
||||
|
||||
@ -310,7 +310,7 @@ enum class BlurType {
|
||||
void calc_ref(int sp, LabImage* original, LabImage* transformed, int cx, int cy, int oW, int oH, int sk, double &huerefblur, double &chromarefblur, double &lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, float &avg, const LocwavCurve & locwavCurveden, bool locwavdenutili);
|
||||
void copy_ref(LabImage* spotbuffer, LabImage* original, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp, double &huerefspot, double &chromarefspot, double &lumarefspot);
|
||||
void paste_ref(LabImage* spotbuffer, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp);
|
||||
void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, LabImage * savenormtm, LabImage * savenormreti, LabImage* lastorig, int fw, int fh, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve& locRETgainCcurve, const LocretitransCurve &locRETtransCcurve,
|
||||
void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, LabImage * savenormtm, LabImage * savenormreti, LabImage* lastorig, int fw, int fh, int cx, int cy, int oW, int oH, int tX, int tY, int tW, int tH, int sk, const LocretigainCurve& locRETgainCcurve, const LocretitransCurve &locRETtransCcurve,
|
||||
const LUTf& lllocalcurve, bool locallutili,
|
||||
const LUTf& cllocalcurve, bool localclutili,
|
||||
const LUTf& lclocalcurve, bool locallcutili,
|
||||
@ -319,6 +319,7 @@ enum class BlurType {
|
||||
const LUTf& lmasklocalcurve, bool localmaskutili,
|
||||
const LUTf& lmaskexplocalcurve, bool localmaskexputili,
|
||||
const LUTf& lmaskSHlocalcurve, bool localmaskSHutili,
|
||||
// const LUTf& ghslocalcurve, bool localghsutili,
|
||||
const LUTf& lmaskviblocalcurve, bool localmaskvibutili,
|
||||
const LUTf& lmasktmlocalcurve, bool localmasktmutili,
|
||||
LUTf& lmaskretilocalcurve, bool localmaskretiutili,
|
||||
@ -367,7 +368,9 @@ enum class BlurType {
|
||||
bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int lllogMask, int ll_Mask, int llcieMask,
|
||||
float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax,
|
||||
float& meantm, float& stdtm, float& meanreti, float& stdreti, float &fab, float &maxicam, float &rdx, float &rdy, float &grx, float &gry, float &blx, float &bly, float &meanx, float &meany, float &meanxe, float &meanye, int &prim, int &ill, float &contsig, float &lightsig,
|
||||
float &highresi, float &nresi, float &highresi46, float &nresi46, float &Lhighresi, float &Lnresi, float &Lhighresi46, float &Lnresi46);
|
||||
float &highresi, float &nresi, float &highresi46, float &nresi46, float &Lhighresi, float &Lnresi, float &Lhighresi46, float &Lnresi46,
|
||||
float *ghscur, int *ghsbpwp, float *ghsbpwpvalue
|
||||
);
|
||||
|
||||
void tone_eqcam2(ImProcFunctions *ipf, Imagefloat *rgb, int whits, int blacks, const Glib::ustring &workingProfile, double scale, bool multithread);
|
||||
void tone_eqdehaz(ImProcFunctions *ipf, Imagefloat *rgb, int whits, int blacks, const Glib::ustring &workingProfile, double scale, bool multithread);
|
||||
@ -381,13 +384,13 @@ enum class BlurType {
|
||||
static void strcurv_data(std::string retistr, int *s_datc, int &siz);
|
||||
void blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, array2D<float> & blend2, int sk, bool multiThread);
|
||||
|
||||
void wavcontrast4(struct local_params& lp, float ** tmp, float ** tmpa, float ** tmpb, float contrast, float radblur, float radlevblur, int bfw, int bfh, int level_bl, int level_hl, int level_br, int level_hr, int sk, int numThreads, const LocwavCurve & locwavCurve, bool locwavutili, bool wavcurve,
|
||||
void wavcontrast4(int call, struct local_params& lp, float ** tmp, float ** tmpa, float ** tmpb, float contrast, float radblur, float radlevblur, int bfw, int bfh, int oW, int oH, int tX, int tY, int tW, int tH, int level_bl, int level_hl, int level_br, int level_hr, int sk, int numThreads, const LocwavCurve & locwavCurve, bool locwavutili, bool wavcurve,
|
||||
const LocwavCurve & loclevwavCurve, bool loclevwavutili, bool wavcurvelev,
|
||||
const LocwavCurve & locconwavCurve, bool locconwavutili, bool wavcurvecon,
|
||||
const LocwavCurve & loccompwavCurve, bool loccompwavutili, bool wavcurvecomp,
|
||||
const LocwavCurve & loccomprewavCurve, bool loccomprewavutili, bool wavcurvecompre,
|
||||
const LocwavCurve & locedgwavCurve, bool locedgwavutili,
|
||||
float sigm, float offs,int & maxlvl, float sigmadc, float deltad, float chromalev, float chromablu, bool blurlc, bool blurena, bool levelena, bool comprena, bool compreena, float compress, float thres);
|
||||
float sigm, float offs,int & maxlvl, float sigmadc, float deltad, float chromalev, float chromablu, bool blurlc, bool blurena, bool levelena, bool comprena, bool compreena, float compress, float thres, int fw, int fh);
|
||||
|
||||
void wavcont(const struct local_params& lp, float ** tmp, wavelet_decomposition &wdspot, int level_bl, int maxlvl,
|
||||
const LocwavCurve & loclevwavCurve, bool loclevwavutili,
|
||||
|
@ -45,7 +45,7 @@ inline void copyAndClampLine(const float *src, unsigned char *dst, const int W)
|
||||
}
|
||||
|
||||
|
||||
inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double rgb_xyz[3][3], bool multiThread)
|
||||
inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double rgb_xyz[3][3], bool multiThread, int pro)//int pro to switch to Working Profile histogram mode without gamma
|
||||
{
|
||||
const int W = src->W;
|
||||
const int H = src->H;
|
||||
@ -89,9 +89,15 @@ inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double r
|
||||
vfloat x_, y_, z_;
|
||||
Color::Lab2XYZ(LVFU(rL[j]), LVFU(ra[j]), LVFU(rb[j]), x_, y_, z_);
|
||||
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzv);
|
||||
if(pro == 0) {
|
||||
STVF(rbuffer[j], Color::gamma2curve[R]);
|
||||
STVF(gbuffer[j], Color::gamma2curve[G]);
|
||||
STVF(bbuffer[j], Color::gamma2curve[B]);
|
||||
} else {//Working profile and gamma=1
|
||||
STVF(rbuffer[j], R);
|
||||
STVF(gbuffer[j], G);
|
||||
STVF(bbuffer[j], B);
|
||||
}
|
||||
}
|
||||
|
||||
for (; j < W; ++j) {
|
||||
@ -99,9 +105,15 @@ inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double r
|
||||
float x_, y_, z_;
|
||||
Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_);
|
||||
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf);
|
||||
if(pro == 0) {
|
||||
rbuffer[j] = Color::gamma2curve[R];
|
||||
gbuffer[j] = Color::gamma2curve[G];
|
||||
bbuffer[j] = Color::gamma2curve[B];
|
||||
} else {//Working profile and gamma=1
|
||||
rbuffer[j] = R;
|
||||
gbuffer[j] = G;
|
||||
bbuffer[j] = B;
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < W; ++j) {
|
||||
@ -117,10 +129,15 @@ inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double r
|
||||
float x_, y_, z_;
|
||||
Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_);
|
||||
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf);
|
||||
|
||||
if(pro == 0) {
|
||||
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[R]);
|
||||
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[G]);
|
||||
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[B]);
|
||||
} else {//Working profile and gamma=1
|
||||
dst[ix++] = uint16ToUint8Rounded(R);
|
||||
dst[ix++] = uint16ToUint8Rounded(G);
|
||||
dst[ix++] = uint16ToUint8Rounded(B);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -204,7 +221,7 @@ void ImProcFunctions::lab2monitorRgb(LabImage* lab, Image8* image)
|
||||
}
|
||||
} // End of parallelization
|
||||
} else {
|
||||
copyAndClamp(lab, image->data, sRGB_xyz, multiThread);
|
||||
copyAndClamp(lab, image->data, sRGB_xyz, multiThread, 0);//int pro = 0 always sent 'normal' to monitor
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,12 +256,13 @@ Image8* ImProcFunctions::lab2rgb(LabImage* lab, int cx, int cy, int cw, int ch,
|
||||
Glib::ustring profile;
|
||||
|
||||
cmsHPROFILE oprof = nullptr;
|
||||
|
||||
int pro = 0;//int pro to switch to Working Profile histogram mode without gamma
|
||||
if (settings->HistogramWorking && consider_histogram_settings) {
|
||||
profile = icm.workingProfile;
|
||||
pro = 1;//no gamma for histogram and navigator panel and Lockable color picker
|
||||
} else {
|
||||
profile = icm.outputProfile;
|
||||
|
||||
//pro = 0 histogram and navigator panel and Lockable color picker with gamma
|
||||
if (icm.outputProfile.empty() || icm.outputProfile == ColorManagementParams::NoICMString) {
|
||||
profile = "sRGB";
|
||||
}
|
||||
@ -300,7 +318,7 @@ Image8* ImProcFunctions::lab2rgb(LabImage* lab, int cx, int cy, int cw, int ch,
|
||||
|
||||
} else {
|
||||
const auto xyz_rgb = ICCStore::getInstance()->workingSpaceInverseMatrix(profile);
|
||||
copyAndClamp(lab, image->data, xyz_rgb, multiThread);
|
||||
copyAndClamp(lab, image->data, xyz_rgb, multiThread, pro);//int pro = 1 to switch to Working Profile for histogram and navigator panel and Lockable color picker whitout gamma
|
||||
}
|
||||
|
||||
return image;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3388,7 +3388,43 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
||||
visishadhigh(false),
|
||||
expshadhigh(false),
|
||||
complexshadhigh(0),
|
||||
shMethod("tone"),
|
||||
shMethod("ghs"),
|
||||
ghsMethod("rgb"),
|
||||
ghsMode("ghs"),
|
||||
ghs_D(0.),
|
||||
ghs_slope(9.03296),
|
||||
ghs_chro(0.0),
|
||||
ghs_B(0.),
|
||||
ghs_SP(0.015),//initialized with a low value to avoid zero
|
||||
ghs_LP(0.),
|
||||
ghs_HP(1.),
|
||||
ghs_LC(30.),
|
||||
ghs_BLP(0.),
|
||||
ghs_HLP(1.0001),
|
||||
ghs_smooth(false),
|
||||
ghs_inv(false),
|
||||
ghsx1(0.05),
|
||||
ghsy1(0.05),
|
||||
ghsx2(0.1),
|
||||
ghsy2(0.1),
|
||||
ghsx3(0.2),
|
||||
ghsy3(0.2),
|
||||
ghsx4(0.3),
|
||||
ghsy4(0.3),
|
||||
ghsx5(0.4),
|
||||
ghsy5(0.4),
|
||||
ghsx6(0.5),
|
||||
ghsy6(0.5),
|
||||
ghsx7(0.6),
|
||||
ghsy7(0.6),
|
||||
ghsx8(0.7),
|
||||
ghsy8(0.7),
|
||||
ghsx9(0.8),
|
||||
ghsy9(0.8),
|
||||
ghsx10(0.9),
|
||||
ghsy10(0.9),
|
||||
ghsx11(0.95),
|
||||
ghsy11(0.95),
|
||||
multsh{0, 0, 0, 0, 0, 0},
|
||||
highlights(0),
|
||||
h_tonalwidth(70),
|
||||
@ -3616,6 +3652,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
||||
nlpat(2),
|
||||
nlrad(5),
|
||||
nlgam(3.),
|
||||
nliter(1),
|
||||
sensiden(60),
|
||||
reparden(100.),
|
||||
detailthr(50),
|
||||
@ -4656,16 +4693,6 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
||||
refi(0.),
|
||||
shiftxl(0.),
|
||||
shiftyl(0.),
|
||||
labgridcieALow(0.51763),//Prophoto red = (0.7347+0.1) * 1.81818 - 1
|
||||
labgridcieBLow(-0.33582),
|
||||
labgridcieAHigh(-0.75163),//Prophoto blue
|
||||
labgridcieBHigh(-0.8180),
|
||||
labgridcieGx(-0.528),//Prophoto green 0.1596
|
||||
labgridcieGy(0.7096),//0.84
|
||||
labgridcieWx(-0.18964),//D50 0.3457, 0.3585,
|
||||
labgridcieWy(-0.16636),//
|
||||
labgridcieMx(0.),
|
||||
labgridcieMy(0.),//
|
||||
whitescie(0),
|
||||
blackscie(0),
|
||||
illMethod("d50"),
|
||||
@ -5032,6 +5059,44 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
|
||||
&& expshadhigh == other.expshadhigh
|
||||
&& complexshadhigh == other.complexshadhigh
|
||||
&& shMethod == other.shMethod
|
||||
&& ghsMethod == other.ghsMethod
|
||||
&& ghsMode == other.ghsMode
|
||||
&& ghs_D == other.ghs_D
|
||||
&& ghs_slope == other.ghs_slope
|
||||
&& ghs_chro == other.ghs_chro
|
||||
&& ghs_B == other.ghs_B
|
||||
&& ghs_SP == other.ghs_SP
|
||||
&& ghs_LP == other.ghs_LP
|
||||
&& ghs_HP == other.ghs_HP
|
||||
&& ghs_LC == other.ghs_LC
|
||||
&& ghs_BLP == other.ghs_BLP
|
||||
&& ghs_HLP == other.ghs_HLP
|
||||
&& ghs_smooth == other.ghs_smooth
|
||||
&& ghs_inv == other.ghs_inv
|
||||
&& ghsx1 == other.ghsx1
|
||||
&& ghsy1 == other.ghsy1
|
||||
&& ghsx2 == other.ghsx2
|
||||
&& ghsy2 == other.ghsy2
|
||||
&& ghsx3 == other.ghsx3
|
||||
&& ghsy3 == other.ghsy3
|
||||
&& ghsx4 == other.ghsx4
|
||||
&& ghsy4 == other.ghsy4
|
||||
&& ghsx5 == other.ghsx5
|
||||
&& ghsy5 == other.ghsy5
|
||||
&& ghsx6 == other.ghsx6
|
||||
&& ghsy6 == other.ghsy6
|
||||
&& ghsx7 == other.ghsx7
|
||||
&& ghsy7 == other.ghsy7
|
||||
&& ghsx8 == other.ghsx8
|
||||
&& ghsy8 == other.ghsy8
|
||||
&& ghsx9 == other.ghsx9
|
||||
&& ghsy9 == other.ghsy9
|
||||
&& ghsx10 == other.ghsx10
|
||||
&& ghsy10 == other.ghsy10
|
||||
&& ghsx11 == other.ghsx11
|
||||
&& ghsy11 == other.ghsy11
|
||||
|
||||
|
||||
&& [this, &other]() -> bool
|
||||
{
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
@ -5169,6 +5234,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
|
||||
&& nlpat == other.nlpat
|
||||
&& nlrad == other.nlrad
|
||||
&& nlgam == other.nlgam
|
||||
&& nliter == other.nliter
|
||||
&& sensiden == other.sensiden
|
||||
&& reparden == other.reparden
|
||||
&& detailthr == other.detailthr
|
||||
@ -6994,6 +7060,43 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
||||
saveToKeyfile(!pedited || spot_edited->expshadhigh, "Locallab", "Expshadhigh_" + index_str, spot.expshadhigh, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->complexshadhigh, "Locallab", "Complexshadhigh_" + index_str, spot.complexshadhigh, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->shMethod, "Locallab", "ShMethod_" + index_str, spot.shMethod, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsMethod, "Locallab", "GhsMethod_" + index_str, spot.ghsMethod, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsMode, "Locallab", "GhsMode_" + index_str, spot.ghsMode, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_D, "Locallab", "Ghs_D_" + index_str, spot.ghs_D, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_slope, "Locallab", "Ghs_slope_" + index_str, spot.ghs_slope, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_chro, "Locallab", "Ghs_chro_" + index_str, spot.ghs_chro, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_B, "Locallab", "Ghs_B_" + index_str, spot.ghs_B, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_SP, "Locallab", "Ghs_SP_" + index_str, spot.ghs_SP, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_LP, "Locallab", "Ghs_LP_" + index_str, spot.ghs_LP, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_HP, "Locallab", "Ghs_HP_" + index_str, spot.ghs_HP, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_LC, "Locallab", "Ghs_LC_" + index_str, spot.ghs_LC, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_BLP, "Locallab", "Ghs_BLP_" + index_str, spot.ghs_BLP, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_HLP, "Locallab", "Ghs_HLP_" + index_str, spot.ghs_HLP, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_smooth, "Locallab", "Ghs_smooth_" + index_str, spot.ghs_smooth, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghs_inv, "Locallab", "Ghs_inv_" + index_str, spot.ghs_inv, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx1, "Locallab", "Ghsx1_" + index_str, spot.ghsx1, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy1, "Locallab", "Ghsy1_" + index_str, spot.ghsy1, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx2, "Locallab", "Ghsx2_" + index_str, spot.ghsx2, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy2, "Locallab", "Ghsy2_" + index_str, spot.ghsy2, keyFile);
|
||||
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx3, "Locallab", "Ghsx3_" + index_str, spot.ghsx3, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy3, "Locallab", "Ghsy3_" + index_str, spot.ghsy3, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx4, "Locallab", "Ghsx4_" + index_str, spot.ghsx4, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy4, "Locallab", "Ghsy4_" + index_str, spot.ghsy4, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx5, "Locallab", "Ghsx5_" + index_str, spot.ghsx5, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy5, "Locallab", "Ghsy5_" + index_str, spot.ghsy5, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx6, "Locallab", "Ghsx6_" + index_str, spot.ghsx6, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy6, "Locallab", "Ghsy6_" + index_str, spot.ghsy6, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx7, "Locallab", "Ghsx7_" + index_str, spot.ghsx7, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy7, "Locallab", "Ghsy7_" + index_str, spot.ghsy7, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx8, "Locallab", "Ghsx8_" + index_str, spot.ghsx8, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy8, "Locallab", "Ghsy8_" + index_str, spot.ghsy8, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx9, "Locallab", "Ghsx9_" + index_str, spot.ghsx9, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy9, "Locallab", "Ghsy9_" + index_str, spot.ghsy9, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx10, "Locallab", "Ghsx10_" + index_str, spot.ghsx10, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy10, "Locallab", "Ghsy10_" + index_str, spot.ghsy10, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsx11, "Locallab", "Ghsx11_" + index_str, spot.ghsx11, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->ghsy11, "Locallab", "Ghsy11_" + index_str, spot.ghsy11, keyFile);
|
||||
|
||||
for (int j = 0; j < 6; j++) {
|
||||
saveToKeyfile(!pedited || spot_edited->multsh[j], "Locallab", "Multsh" + std::to_string(j) + "_" + index_str, spot.multsh[j], keyFile);
|
||||
@ -7129,6 +7232,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
||||
saveToKeyfile(!pedited || spot_edited->nlpat, "Locallab", "Nlpat_" + index_str, spot.nlpat, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->nlrad, "Locallab", "Nlrad_" + index_str, spot.nlrad, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->nlgam, "Locallab", "Nlgam_" + index_str, spot.nlgam, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->nliter, "Locallab", "Nliter_" + index_str, spot.nliter, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->sensiden, "Locallab", "Sensiden_" + index_str, spot.sensiden, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->reparden, "Locallab", "Reparden_" + index_str, spot.reparden, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->detailthr, "Locallab", "Detailthr_" + index_str, spot.detailthr, keyFile);
|
||||
@ -9326,6 +9430,44 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
|
||||
assignFromKeyfile(keyFile, "Locallab", "Complexshadhigh_" + index_str, spot.complexshadhigh, spotEdited.complexshadhigh);
|
||||
assignFromKeyfile(keyFile, "Locallab", "ShMethod_" + index_str, spot.shMethod, spotEdited.shMethod);
|
||||
assignFromKeyfile(keyFile, "Locallab", "GhsMethod_" + index_str, spot.ghsMethod, spotEdited.ghsMethod);
|
||||
assignFromKeyfile(keyFile, "Locallab", "GhsMode_" + index_str, spot.ghsMode, spotEdited.ghsMode);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_D_" + index_str, spot.ghs_D, spotEdited.ghs_D);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_slope_" + index_str, spot.ghs_slope, spotEdited.ghs_slope);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_chro_" + index_str, spot.ghs_chro, spotEdited.ghs_chro);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_B_" + index_str, spot.ghs_B, spotEdited.ghs_B);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_SP_" + index_str, spot.ghs_SP, spotEdited.ghs_SP);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_LP_" + index_str, spot.ghs_LP, spotEdited.ghs_LP);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_HP_" + index_str, spot.ghs_HP, spotEdited.ghs_HP);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_LC_" + index_str, spot.ghs_LC, spotEdited.ghs_LC);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_BLP_" + index_str, spot.ghs_BLP, spotEdited.ghs_BLP);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_HLP_" + index_str, spot.ghs_HLP, spotEdited.ghs_HLP);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_smooth_" + index_str, spot.ghs_smooth, spotEdited.ghs_smooth);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghs_inv_" + index_str, spot.ghs_inv, spotEdited.ghs_inv);
|
||||
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx1_" + index_str, spot.ghsx1, spotEdited.ghsx1);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy1_" + index_str, spot.ghsy1, spotEdited.ghsy1);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx2_" + index_str, spot.ghsx2, spotEdited.ghsx2);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy2_" + index_str, spot.ghsy2, spotEdited.ghsy2);
|
||||
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx3_" + index_str, spot.ghsx3, spotEdited.ghsx3);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy3_" + index_str, spot.ghsy3, spotEdited.ghsy3);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx4_" + index_str, spot.ghsx4, spotEdited.ghsx4);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy4_" + index_str, spot.ghsy4, spotEdited.ghsy4);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx5_" + index_str, spot.ghsx5, spotEdited.ghsx5);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy5_" + index_str, spot.ghsy5, spotEdited.ghsy5);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx6_" + index_str, spot.ghsx6, spotEdited.ghsx6);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy6_" + index_str, spot.ghsy6, spotEdited.ghsy6);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx7_" + index_str, spot.ghsx7, spotEdited.ghsx7);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy7_" + index_str, spot.ghsy7, spotEdited.ghsy7);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx8_" + index_str, spot.ghsx8, spotEdited.ghsx8);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy8_" + index_str, spot.ghsy8, spotEdited.ghsy8);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx9_" + index_str, spot.ghsx9, spotEdited.ghsx9);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy9_" + index_str, spot.ghsy9, spotEdited.ghsy9);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx10_" + index_str, spot.ghsx10, spotEdited.ghsx10);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy10_" + index_str, spot.ghsy10, spotEdited.ghsy10);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsx11_" + index_str, spot.ghsx11, spotEdited.ghsx11);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Ghsy11_" + index_str, spot.ghsy11, spotEdited.ghsy11);
|
||||
|
||||
for (int j = 0; j < 6; j ++) {
|
||||
assignFromKeyfile(keyFile, "Locallab", "Multsh" + std::to_string(j) + "_" + index_str, spot.multsh[j], spotEdited.multsh[j]);
|
||||
@ -9512,6 +9654,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
assignFromKeyfile(keyFile, "Locallab", "Nlpat_" + index_str, spot.nlpat, spotEdited.nlpat);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Nlrad_" + index_str, spot.nlrad, spotEdited.nlrad);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Nlgam_" + index_str, spot.nlgam, spotEdited.nlgam);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Nliter_" + index_str, spot.nliter, spotEdited.nliter);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Sensiden_" + index_str, spot.sensiden, spotEdited.sensiden);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Reparden_" + index_str, spot.reparden, spotEdited.reparden);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Detailthr_" + index_str, spot.detailthr, spotEdited.detailthr);
|
||||
|
@ -1233,6 +1233,42 @@ struct LocallabParams {
|
||||
bool expshadhigh;
|
||||
int complexshadhigh;
|
||||
Glib::ustring shMethod; // std, tone
|
||||
Glib::ustring ghsMethod; // rgb, lum, sat
|
||||
Glib::ustring ghsMode; // lin, ghs
|
||||
double ghs_D;
|
||||
double ghs_slope;
|
||||
double ghs_chro;
|
||||
double ghs_B;
|
||||
double ghs_SP;
|
||||
double ghs_LP;
|
||||
double ghs_HP;
|
||||
double ghs_LC;
|
||||
double ghs_BLP;
|
||||
double ghs_HLP;
|
||||
bool ghs_smooth;
|
||||
bool ghs_inv;
|
||||
double ghsx1;
|
||||
double ghsy1;
|
||||
double ghsx2;
|
||||
double ghsy2;
|
||||
double ghsx3;
|
||||
double ghsy3;
|
||||
double ghsx4;
|
||||
double ghsy4;
|
||||
double ghsx5;
|
||||
double ghsy5;
|
||||
double ghsx6;
|
||||
double ghsy6;
|
||||
double ghsx7;
|
||||
double ghsy7;
|
||||
double ghsx8;
|
||||
double ghsy8;
|
||||
double ghsx9;
|
||||
double ghsy9;
|
||||
double ghsx10;
|
||||
double ghsy10;
|
||||
double ghsx11;
|
||||
double ghsy11;
|
||||
int multsh[6];
|
||||
int highlights;
|
||||
int h_tonalwidth;
|
||||
@ -1362,6 +1398,7 @@ struct LocallabParams {
|
||||
int nlpat;
|
||||
int nlrad;
|
||||
double nlgam;
|
||||
int nliter;
|
||||
int sensiden;
|
||||
double reparden;
|
||||
int detailthr;
|
||||
|
@ -475,6 +475,16 @@ public:
|
||||
int primlc;
|
||||
};
|
||||
|
||||
struct locallabshGHS {//To draw GHS S curve
|
||||
double ghsc[24];//+4 12 11
|
||||
};
|
||||
|
||||
|
||||
struct locallabshGHSbw {//To draw GHS S curve
|
||||
int ghsbw[2];
|
||||
double ghsbwvalue[2];
|
||||
};
|
||||
|
||||
//select spot settings
|
||||
struct locallabsetLC {
|
||||
int mainf;
|
||||
@ -504,6 +514,8 @@ public:
|
||||
virtual void minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int selspot) = 0;
|
||||
virtual void denChanged(const std::vector<locallabDenoiseLC> &denlc, int selspot) = 0;
|
||||
virtual void cieChanged(const std::vector<locallabcieLC> &cielc, int selspot) = 0;
|
||||
virtual void ghsChanged(const std::vector<locallabshGHS> &shghs, int selspot) = 0;
|
||||
virtual void ghsbwChanged(const std::vector<locallabshGHSbw> &shghsbw, int selspot) = 0;
|
||||
virtual void maiChanged(const std::vector<locallabsetLC> &csetlc, int selspot) = 0;
|
||||
virtual void sigChanged(const std::vector<locallabcieSIG> &ciesig, int selspot) = 0;
|
||||
virtual void ciebefChanged(const std::vector<locallabcieBEF> &ciebef, int selspot) = 0;
|
||||
|
@ -1120,6 +1120,7 @@ private:
|
||||
LUTf lmasklocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskexplocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskSHlocalcurve(65536, LUT_CLIP_OFF);
|
||||
// LUTf ghslocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskviblocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmasktmlocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskretilocalcurve(65536, LUT_CLIP_OFF);
|
||||
@ -1217,6 +1218,7 @@ private:
|
||||
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, 1);
|
||||
const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve, 1);
|
||||
const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve, 1);
|
||||
// const bool localghsutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).ghscurve, ghslocalcurve, 1);
|
||||
const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve, 1);
|
||||
const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, 1);
|
||||
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, 1);
|
||||
@ -1289,9 +1291,16 @@ private:
|
||||
float Lnresi = 0.f;
|
||||
float Lhighresi46 = 0.f;
|
||||
float Lnresi46 = 0.f;
|
||||
float ghscur[24];//+4 12 11
|
||||
int ghsbpwp[2];
|
||||
ghsbpwp[0] = 0;
|
||||
ghsbpwp[1] = 0;
|
||||
float ghsbpwpvalue[2];
|
||||
ghsbpwpvalue[0] = 0.f;
|
||||
ghsbpwpvalue[1] = 1.f;
|
||||
|
||||
// No Locallab mask is shown in exported picture
|
||||
ipf.Lab_Local(2, sp, shbuffer, labView, labView, reservView.get(), savenormtmView.get(), savenormretiView.get(), lastorigView.get(), fw, fh, 0, 0, fw, fh, 1, locRETgainCurve, locRETtransCurve,
|
||||
ipf.Lab_Local(2, sp, shbuffer, labView, labView, reservView.get(), savenormtmView.get(), savenormretiView.get(), lastorigView.get(), fw, fh, 0, 0, fw, fh, fw, fh, fw, fh, 1, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve, locallutili,
|
||||
cllocalcurve, localclutili,
|
||||
lclocalcurve, locallcutili,
|
||||
@ -1300,6 +1309,7 @@ private:
|
||||
lmasklocalcurve, localmaskutili,
|
||||
lmaskexplocalcurve, localmaskexputili,
|
||||
lmaskSHlocalcurve, localmaskSHutili,
|
||||
// ghslocalcurve, localghsutili,
|
||||
lmaskviblocalcurve, localmaskvibutili,
|
||||
lmasktmlocalcurve, localmasktmutili,
|
||||
lmaskretilocalcurve, localmaskretiutili,
|
||||
@ -1345,7 +1355,8 @@ private:
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie, fab, maxicam, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, prim, ill, contsig, lightsig,
|
||||
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46
|
||||
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46,
|
||||
ghscur, ghsbpwp, ghsbpwpvalue
|
||||
);
|
||||
|
||||
if (sp + 1u < params.locallab.spots.size()) {
|
||||
|
@ -647,7 +647,8 @@ void ColorToning::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
|
||||
lastLumamode = pp->colorToning.lumamode;
|
||||
|
||||
labgrid->setParams(pp->colorToning.labgridALow / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridBLow / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridAHigh / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridBHigh / ColorToningParams::LABGRID_CORR_MAX, 0, 0, 0, 0, 0, 0,false);
|
||||
labgrid->setParams(pp->colorToning.labgridALow / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridBLow / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridAHigh / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridBHigh / ColorToningParams::LABGRID_CORR_MAX,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false);//+4 12 11
|
||||
|
||||
if (pedited && !pedited->colorToning.method) {
|
||||
method->set_active (7);
|
||||
@ -719,7 +720,8 @@ void ColorToning::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
double zerox = 0.;
|
||||
double zeroy = 0.;
|
||||
|
||||
labgrid->getParams(pp->colorToning.labgridALow, pp->colorToning.labgridBLow, pp->colorToning.labgridAHigh, pp->colorToning.labgridBHigh, zerox, zeroy, zerox, zeroy, zerox, zeroy);
|
||||
labgrid->getParams(pp->colorToning.labgridALow, pp->colorToning.labgridBLow, pp->colorToning.labgridAHigh, pp->colorToning.labgridBHigh,
|
||||
zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy);//+4 12 11
|
||||
pp->colorToning.labgridALow *= ColorToningParams::LABGRID_CORR_MAX;
|
||||
pp->colorToning.labgridAHigh *= ColorToningParams::LABGRID_CORR_MAX;
|
||||
pp->colorToning.labgridBLow *= ColorToningParams::LABGRID_CORR_MAX;
|
||||
@ -835,7 +837,8 @@ void ColorToning::setDefaults (const ProcParams* defParams, const ParamsEdited*
|
||||
hlColSat->setDefault<int> (defParams->colorToning.hlColSat);
|
||||
shadowsColSat->setDefault<int> (defParams->colorToning.shadowsColSat);
|
||||
strength->setDefault (defParams->colorToning.strength);
|
||||
labgrid->setDefault(defParams->colorToning.labgridALow / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridBLow / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridAHigh / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridBHigh / ColorToningParams::LABGRID_CORR_MAX, 0, 0, 0, 0, 0, 0);
|
||||
labgrid->setDefault(defParams->colorToning.labgridALow / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridBLow / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridAHigh / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridBHigh / ColorToningParams::LABGRID_CORR_MAX,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);//+4 12 11
|
||||
|
||||
|
||||
if (pedited) {
|
||||
@ -1435,7 +1438,7 @@ void ColorToning::labRegionGet(int idx)
|
||||
double la, lb;
|
||||
double zerox = 0.;
|
||||
double zeroy = 0.;
|
||||
labRegionAB->getParams(la, lb, r.a, r.b, zerox, zeroy, zerox, zeroy, zerox, zeroy);
|
||||
labRegionAB->getParams(la, lb, r.a, r.b, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy);//+4 12 11
|
||||
r.saturation = labRegionSaturation->getValue();
|
||||
r.slope = labRegionSlope->getValue();
|
||||
r.offset = labRegionOffset->getValue();
|
||||
@ -1573,7 +1576,7 @@ void ColorToning::labRegionShow(int idx, bool list_only)
|
||||
rtengine::procparams::ColorToningParams::LabCorrectionRegion dflt;
|
||||
auto &r = labRegionData[idx];
|
||||
if (!list_only) {
|
||||
labRegionAB->setParams(0, 0, r.a, r.b,0, 0, 0, 0, 0, 0, false);
|
||||
labRegionAB->setParams(0, 0, r.a, r.b,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false);//+4 12 11
|
||||
labRegionSaturation->setValue(r.saturation);
|
||||
labRegionSlope->setValue(r.slope);
|
||||
labRegionOffset->setValue(r.offset);
|
||||
|
@ -72,15 +72,23 @@ bool CurveEditor::reset()
|
||||
return subGroup->curveReset(this);
|
||||
}
|
||||
|
||||
DiagonalCurveEditor::DiagonalCurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEditorSubGroup* ceSubGroup) : CurveEditor::CurveEditor(text, static_cast<CurveEditorGroup*>(ceGroup), ceSubGroup)
|
||||
DiagonalCurveEditor::DiagonalCurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEditorSubGroup* ceSubGroup, int typ) : CurveEditor::CurveEditor(text, static_cast<CurveEditorGroup*>(ceGroup), ceSubGroup)
|
||||
{
|
||||
|
||||
if(typ == 0) {
|
||||
curveType->addEntry("curve-linear-small", M("CURVEEDITOR_LINEAR")); // 0 Linear
|
||||
curveType->addEntry("curve-spline-small", M("CURVEEDITOR_CUSTOM")); // 1 Spline
|
||||
curveType->addEntry("curve-catmullrom-small", M("CURVEEDITOR_CATMULLROM")); // 4 CatmullRom
|
||||
curveType->addEntry("curve-parametric-small", M("CURVEEDITOR_PARAMETRIC")); // 2 Parametric
|
||||
curveType->addEntry("curve-nurbs-small", M("CURVEEDITOR_NURBS")); // 3 NURBS
|
||||
} else if(typ == 1) {
|
||||
curveType->addEntry("curve-nurbs-small", M("CURVEEDITOR_NURBS")); // 3 NURBS
|
||||
}
|
||||
if(typ == 0) {
|
||||
static_cast<CurveTypePopUpButton *>(curveType)->setPosIndexMap({ 0, 1, 4, 2, 3 });
|
||||
} else if (typ == 1) {
|
||||
static_cast<CurveTypePopUpButton *>(curveType)->setPosIndexMap({3});
|
||||
}
|
||||
curveType->setSelected(DCT_Linear);
|
||||
|
||||
curveType->show();
|
||||
|
@ -163,7 +163,7 @@ protected:
|
||||
double rangeMilestones[3];
|
||||
|
||||
public:
|
||||
DiagonalCurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEditorSubGroup* ceSubGroup);
|
||||
DiagonalCurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEditorSubGroup* ceSubGroup, int type = 0);
|
||||
std::vector<double> getCurve () override;
|
||||
void setRangeLabels(Glib::ustring r1, Glib::ustring r2, Glib::ustring r3, Glib::ustring r4);
|
||||
void getRangeLabels(Glib::ustring &r1, Glib::ustring &r2, Glib::ustring &r3, Glib::ustring &r4);
|
||||
|
@ -84,16 +84,16 @@ void CurveEditorGroup::hideCurrentCurve()
|
||||
* periodic: for FlatCurve only, ask the curve to be periodic (default: True)
|
||||
*
|
||||
*/
|
||||
CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget, bool expandRelatedWidget, bool periodic)
|
||||
CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget, bool expandRelatedWidget, bool periodic, int typ)
|
||||
{
|
||||
switch (cType) {
|
||||
case (CT_Diagonal): {
|
||||
if (!diagonalSubGroup) {
|
||||
diagonalSubGroup = new DiagonalCurveEditorSubGroup(this, curveDir);
|
||||
diagonalSubGroup = new DiagonalCurveEditorSubGroup(this, curveDir, typ);
|
||||
}
|
||||
|
||||
// We add it to the curve editor list
|
||||
DiagonalCurveEditor* newCE = diagonalSubGroup->addCurve(curveLabel);
|
||||
DiagonalCurveEditor* newCE = diagonalSubGroup->addCurve(curveLabel, typ);
|
||||
newCE->relatedWidget = relatedWidget;
|
||||
newCE->expandRelatedWidget = expandRelatedWidget;
|
||||
curveEditors.push_back(newCE);
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
return displayedCurve;
|
||||
}
|
||||
//void on_realize ();
|
||||
CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool expandRelatedWidget = true, bool periodic = true);
|
||||
CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool expandRelatedWidget = true, bool periodic = true, int typ = 0);
|
||||
void attachCurve (Gtk::Grid* curve);
|
||||
|
||||
protected:
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
#include "../rtengine/curves.h"
|
||||
|
||||
DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, Glib::ustring& curveDir) : CurveEditorSubGroup(curveDir)
|
||||
DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, Glib::ustring& curveDir, int typ) : CurveEditorSubGroup(curveDir)
|
||||
{
|
||||
|
||||
editedAdjuster = nullptr;
|
||||
@ -125,7 +125,6 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
|
||||
customCurveGrid->attach_next_to(*custombbox, *customCurveBox, Gtk::POS_LEFT, 1, 1);
|
||||
customCurveGrid->attach_next_to(*customCoordAdjuster, *custombbox, Gtk::POS_BOTTOM, 2, 1);
|
||||
}
|
||||
|
||||
customCurveGrid->show_all ();
|
||||
customCoordAdjuster->hide();
|
||||
|
||||
@ -219,6 +218,21 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
|
||||
}
|
||||
|
||||
NURBSCurveGrid->show_all ();
|
||||
if(typ == 1) {//for GHS curve... not a curve !
|
||||
editPointNURBS->hide();
|
||||
editNURBS->hide();
|
||||
copyNURBS->hide();
|
||||
pasteNURBS->hide();
|
||||
loadNURBS->hide();
|
||||
saveNURBS->hide();
|
||||
} else if(typ ==0) {
|
||||
editPointNURBS->show();
|
||||
editNURBS->show();
|
||||
copyNURBS->show();
|
||||
pasteNURBS->show();
|
||||
loadNURBS->show();
|
||||
saveNURBS->show();
|
||||
}
|
||||
NURBSCoordAdjuster->hide();
|
||||
|
||||
saveNURBS->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::savePressed) );
|
||||
@ -387,15 +401,17 @@ DiagonalCurveEditorSubGroup::~DiagonalCurveEditorSubGroup()
|
||||
/*
|
||||
* Add a new curve to the curves list
|
||||
*/
|
||||
DiagonalCurveEditor* DiagonalCurveEditorSubGroup::addCurve(Glib::ustring curveLabel)
|
||||
DiagonalCurveEditor* DiagonalCurveEditorSubGroup::addCurve(Glib::ustring curveLabel, int typ)
|
||||
{
|
||||
DiagonalCurveEditor* newCE = new DiagonalCurveEditor(curveLabel, parent, this);
|
||||
DiagonalCurveEditor* newCE = new DiagonalCurveEditor(curveLabel, parent, this, typ);
|
||||
|
||||
// Initialization of the new curve
|
||||
|
||||
storeCurveValues(newCE, getCurveFromGUI(DCT_Spline));
|
||||
storeCurveValues(newCE, getCurveFromGUI(DCT_Parametric));
|
||||
storeCurveValues(newCE, getCurveFromGUI(DCT_NURBS));
|
||||
storeCurveValues(newCE, getCurveFromGUI(DCT_CatumullRom));
|
||||
|
||||
return newCE;
|
||||
}
|
||||
|
||||
|
@ -81,10 +81,10 @@ protected:
|
||||
int activeParamControl;
|
||||
|
||||
public:
|
||||
DiagonalCurveEditorSubGroup(CurveEditorGroup* prt, Glib::ustring& curveDir);
|
||||
DiagonalCurveEditorSubGroup(CurveEditorGroup* prt, Glib::ustring& curveDir, int typ = 0);
|
||||
~DiagonalCurveEditorSubGroup() override;
|
||||
|
||||
DiagonalCurveEditor* addCurve(Glib::ustring curveLabel = "");
|
||||
DiagonalCurveEditor* addCurve(Glib::ustring curveLabel = "", int typ = 0);
|
||||
void updateBackgroundHistogram (CurveEditor* ce) override;
|
||||
void switchGUI() override;
|
||||
void refresh(CurveEditor *curveToRefresh) override;
|
||||
|
@ -78,7 +78,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
|
||||
ipDialog = Gtk::manage(new MyFileChooserButton(M("TP_ICM_INPUTDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
|
||||
ipDialog->set_tooltip_text(M("TP_ICM_INPUTCUSTOM_TOOLTIP"));
|
||||
bindCurrentFolder(*ipDialog, options.lastIccDir);
|
||||
labgridcie = Gtk::manage(new LabGrid(EvICMLabGridciexy, M("TP_ICM_LABGRID_CIEXY"), true, true, true));
|
||||
labgridcie = Gtk::manage(new LabGrid(EvICMLabGridciexy, M("TP_ICM_LABGRID_CIEXY"), true, true, false, true));
|
||||
|
||||
|
||||
// ------------------------------- Input profile
|
||||
@ -701,7 +701,7 @@ void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g
|
||||
[this]() -> bool
|
||||
{
|
||||
disableListener();
|
||||
labgridcie->setParams(nextrx, nextry, nextbx, nextby, nextgx, nextgy, nextwx, nextwy, nextmx, nextmy, false);
|
||||
labgridcie->setParams(nextrx, nextry, nextbx, nextby, nextgx, nextgy, nextwx, nextwy, nextmx, nextmy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false);//+4 12 11
|
||||
enableListener();
|
||||
return false;
|
||||
}
|
||||
@ -963,7 +963,8 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
shiftx->setValue(pp->icm.shiftx);
|
||||
shifty->setValue(pp->icm.shifty);
|
||||
preser->setValue(pp->icm.preser);
|
||||
labgridcie->setParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, pp->icm.labgridcieMx, pp->icm.labgridcieMy, false);
|
||||
labgridcie->setParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, pp->icm.labgridcieMx,
|
||||
pp->icm.labgridcieMy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false);//+4 12 11
|
||||
|
||||
if (pedited) {
|
||||
iunchanged->set_active(!pedited->icm.inputProfile);
|
||||
@ -1298,7 +1299,11 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
|
||||
pp->icm.workingProfile = wProfNames->get_active_text();
|
||||
pp->icm.dcpIlluminant = rtengine::max<int>(dcpIll->get_active_row_number(), 0);
|
||||
labgridcie->getParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, pp->icm.labgridcieMx, pp->icm.labgridcieMy);
|
||||
double zerox = 0.;
|
||||
double zeroy = 0.;
|
||||
|
||||
labgridcie->getParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, pp->icm.labgridcieMx, pp->icm.labgridcieMy,
|
||||
zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy);//+4 12 11
|
||||
|
||||
if (oProfNames->get_active_text() == M("TP_ICM_NOICM")) {
|
||||
pp->icm.outputProfile = ColorManagementParams::NoICMString;
|
||||
@ -1395,7 +1400,11 @@ void ICMPanel::setDefaults(const ProcParams* defParams, const ParamsEdited* pedi
|
||||
shiftx->setDefault(defParams->icm.shiftx);
|
||||
shifty->setDefault(defParams->icm.shifty);
|
||||
preser->setDefault(defParams->icm.preser);
|
||||
labgridcie->setDefault(defParams->icm.labgridcieALow, defParams->icm.labgridcieBLow , defParams->icm.labgridcieAHigh, defParams->icm.labgridcieBHigh, defParams->icm.labgridcieGx, defParams->icm.labgridcieGy, defParams->icm.labgridcieWx, defParams->icm.labgridcieWy, defParams->icm.labgridcieMx, defParams->icm.labgridcieMy);
|
||||
double zerox = 0.;
|
||||
double zeroy = 0.;
|
||||
|
||||
labgridcie->setDefault(defParams->icm.labgridcieALow, defParams->icm.labgridcieBLow , defParams->icm.labgridcieAHigh, defParams->icm.labgridcieBHigh, defParams->icm.labgridcieGx, defParams->icm.labgridcieGy, defParams->icm.labgridcieWx, defParams->icm.labgridcieWy, defParams->icm.labgridcieMx, defParams->icm.labgridcieMy,
|
||||
zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy);//+4 12 11
|
||||
|
||||
if (pedited) {
|
||||
wGamma->setDefaultEditedState(pedited->icm.workingTRCGamma ? Edited : UnEdited);
|
||||
|
212
rtgui/labgrid.cc
212
rtgui/labgrid.cc
@ -60,9 +60,9 @@ bool LabGridArea::notifyListener()
|
||||
{
|
||||
return int(v * 1000) / 1000.f;
|
||||
};
|
||||
if (! ciexy_enabled){
|
||||
if (! ciexy_enabled && !ghs_enabled){
|
||||
listener->panelChanged(evt, Glib::ustring::compose(evtMsg, round(high_a), round(high_b), round(low_a), round(low_b)));
|
||||
} else {
|
||||
} else if (ciexy_enabled) {
|
||||
float high_a1 = 0.55f * (high_a + 1.f) - 0.1f;
|
||||
float high_b1 = 0.55f * (high_b + 1.f) - 0.1f;
|
||||
float low_a1 = 0.55f * (low_a + 1.f) - 0.1f;
|
||||
@ -76,17 +76,20 @@ bool LabGridArea::notifyListener()
|
||||
}
|
||||
|
||||
|
||||
LabGridArea::LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low, bool ciexy, bool mous):
|
||||
LabGridArea::LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low, bool ciexy, bool ghs, bool mous):
|
||||
Gtk::DrawingArea(),
|
||||
evt(evt), evtMsg(msg),
|
||||
litPoint(NONE),
|
||||
low_a(0.f), high_a(0.f), low_b(0.f), high_b(0.f), gre_x(0.f), gre_y(0.f), whi_x(0.f), whi_y(0.f), me_x(0.f), me_y(0.f),//these variables are used as xy in Ciexy - no change labels
|
||||
low_a(0.f), high_a(0.f), low_b(0.f), high_b(0.f), gre_x(0.f), gre_y(0.f), whi_x(0.f), whi_y(0.f), me_x(0.f), me_y(0.f),ghs_x6(0.f), ghs_y6(0.f), ghs_x7(0.f), ghs_y7(0.f),
|
||||
ghs_x8(0.f), ghs_y8(0.f), ghs_x9(0.f), ghs_y9(0.f), ghs_x10(0.f), ghs_y10(0.f), ghs_x11(0.f), ghs_y11(0.f), //these variables are used as xy in Ciexy - no change labels +4 12 11
|
||||
defaultLow_a(0.f), defaultHigh_a(0.f), defaultLow_b(0.f), defaultHigh_b(0.f), defaultgre_x(0.f), defaultgre_y(0.f), defaultwhi_x(0.f), defaultwhi_y(0.f), defaultme_x(0.f), defaultme_y(0.f),
|
||||
default_gsx6(0.f), default_gsy6(0.f), default_gsx7(0.f), default_gsy7(0.f), default_gsx8(0.f), default_gsy8(0.f), default_gsx9(0.f), default_gsy9(0.f), default_gsx10(0.f), default_gsy10(0.f), default_gsx11(0.f), default_gsy11(0.f),//+4 12 11
|
||||
listener(nullptr),
|
||||
edited(false),
|
||||
isDragged(false),
|
||||
low_enabled(enable_low),
|
||||
ciexy_enabled(ciexy),
|
||||
ghs_enabled(ghs),
|
||||
mous_enabled(mous)
|
||||
|
||||
|
||||
@ -97,7 +100,8 @@ LabGridArea::LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool
|
||||
get_style_context()->add_class("drawingarea");
|
||||
}
|
||||
|
||||
void LabGridArea::getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &my) const
|
||||
void LabGridArea::getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &my,
|
||||
double &gx6, double &gy6, double &gx7, double &gy7, double &gx8, double &gy8, double &gx9, double &gy9, double &gx10, double &gy10, double &gx11, double &gy11) const
|
||||
{
|
||||
la = low_a;
|
||||
ha = high_a;
|
||||
@ -109,11 +113,25 @@ void LabGridArea::getParams(double &la, double &lb, double &ha, double &hb, doub
|
||||
wy = whi_y;
|
||||
mx = me_x;
|
||||
my = me_y;
|
||||
gx6 = ghs_x6;
|
||||
gy6 = ghs_y6;
|
||||
gx7 = ghs_x7;
|
||||
gy7 = ghs_y7;
|
||||
gx8 = ghs_x8;
|
||||
gy8 = ghs_y8;
|
||||
gx9 = ghs_x9;
|
||||
gy9 = ghs_y9;
|
||||
gx10 = ghs_x10;//+4 12 11
|
||||
gy10 = ghs_y10;
|
||||
gx11 = ghs_x11;
|
||||
gy11 = ghs_y11;
|
||||
|
||||
// printf("la=%f ha=%f lb=%f hb=%f gx=%f gy=%f\n", la, ha, lb, hb, gx, gy);
|
||||
}
|
||||
|
||||
|
||||
void LabGridArea::setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, bool notify)
|
||||
void LabGridArea::setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my,
|
||||
double gx6, double gy6, double gx7, double gy7, double gx8, double gy8, double gx9, double gy9, double gx10, double gy10, double gx11, double gy11, bool notify)
|
||||
{
|
||||
const double lo = -1.0;
|
||||
const double hi = 1.0;
|
||||
@ -127,6 +145,19 @@ void LabGridArea::setParams(double la, double lb, double ha, double hb, double g
|
||||
whi_y = rtengine::LIM(wy, lo, hi);
|
||||
me_x = rtengine::LIM(mx, lo, hi);
|
||||
me_y = rtengine::LIM(my, lo, hi);
|
||||
ghs_x6 = rtengine::LIM(gx6, lo, hi);
|
||||
ghs_y6 = rtengine::LIM(gy6, lo, hi);
|
||||
ghs_x7 = rtengine::LIM(gx7, lo, hi);
|
||||
ghs_y7 = rtengine::LIM(gy7, lo, hi);
|
||||
ghs_x8 = rtengine::LIM(gx8, lo, hi);
|
||||
ghs_y8 = rtengine::LIM(gy8, lo, hi);
|
||||
ghs_x9 = rtengine::LIM(gx9, lo, hi);
|
||||
ghs_y9 = rtengine::LIM(gy9, lo, hi);
|
||||
ghs_x10 = rtengine::LIM(gx10, lo, hi);//+4 12 11
|
||||
ghs_y10 = rtengine::LIM(gy10, lo, hi);
|
||||
ghs_x11 = rtengine::LIM(gx11, lo, hi);
|
||||
ghs_y11 = rtengine::LIM(gy11, lo, hi);
|
||||
|
||||
|
||||
queue_draw();
|
||||
if (notify) {
|
||||
@ -134,7 +165,8 @@ void LabGridArea::setParams(double la, double lb, double ha, double hb, double g
|
||||
}
|
||||
}
|
||||
|
||||
void LabGridArea::setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my)
|
||||
void LabGridArea::setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my,
|
||||
double gx6, double gy6, double gx7, double gy7, double gx8, double gy8, double gx9, double gy9, double gx10, double gy10, double gx11, double gy11)
|
||||
{
|
||||
defaultLow_a = la;
|
||||
defaultLow_b = lb;
|
||||
@ -146,16 +178,30 @@ void LabGridArea::setDefault (double la, double lb, double ha, double hb, double
|
||||
defaultwhi_y = wy;
|
||||
defaultme_x = mx;
|
||||
defaultme_y = my;
|
||||
default_gsx6 = gx6;
|
||||
default_gsy6= gy6;
|
||||
default_gsx7 = gx7;
|
||||
default_gsy7= gy7;
|
||||
default_gsx8 = gx8;
|
||||
default_gsy8= gy8;
|
||||
default_gsx9 = gx9;
|
||||
default_gsy9= gy9;
|
||||
default_gsx10 = gx10;
|
||||
default_gsy10= gy10;
|
||||
default_gsx11 = gx11;
|
||||
default_gsy11= gy11;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void LabGridArea::reset(bool toInitial)
|
||||
{
|
||||
if (toInitial) {
|
||||
setParams(defaultLow_a, defaultLow_b, defaultHigh_a, defaultHigh_b, defaultgre_x, defaultgre_y, defaultwhi_x, defaultwhi_y, defaultme_x, defaultme_y, true);
|
||||
setParams(defaultLow_a, defaultLow_b, defaultHigh_a, defaultHigh_b, defaultgre_x, defaultgre_y, defaultwhi_x, defaultwhi_y, defaultme_x, defaultme_y,
|
||||
default_gsx6, default_gsy6, default_gsx7, default_gsy7, default_gsx8, default_gsy8, default_gsx9, default_gsy9, default_gsx10, default_gsy10, default_gsx11, default_gsy11, true);//+4 12 11
|
||||
} else {
|
||||
// printf("RESET \n");
|
||||
setParams(0., 0., 0., 0., 0., 0., 0., 0., 0., 0., true);
|
||||
setParams(0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., true);//+4 12 11
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,7 +270,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
|
||||
cr->translate(0., static_cast<double>(height));
|
||||
cr->scale(1., -1.);
|
||||
|
||||
if (! ciexy_enabled) {//draw cells for Labgrid
|
||||
if (! ciexy_enabled && !ghs_enabled) {//draw cells for general Labgrid
|
||||
const int cells = 8;
|
||||
const float step = 12000.f / static_cast<float>(cells/2);
|
||||
const double cellW = static_cast<double>(width) / static_cast<double>(cells);
|
||||
@ -257,7 +303,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
|
||||
cellYMin = cellYMax;
|
||||
cellYMax = std::floor(cellH * static_cast<double>(j+2) + 0.01);
|
||||
}
|
||||
} else {//cells for CIE xy
|
||||
} else if (ciexy_enabled) {//cells for CIE xy in SE and Abstract profile
|
||||
const int cells = 600;
|
||||
const float step = 1.f / static_cast<float>(cells);
|
||||
const double cellW = static_cast<double>(width) / static_cast<double>(cells);
|
||||
@ -326,36 +372,134 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
|
||||
cellYMin = cellYMax;
|
||||
cellYMax = std::floor(cellH * static_cast<double>(j+2) + 0.001);
|
||||
}
|
||||
} else if (ghs_enabled) {//cells for GHS and simulation GHS
|
||||
const int cells = 600;
|
||||
const double cellW = static_cast<double>(width) / static_cast<double>(cells);
|
||||
const double cellH = static_cast<double>(height) / static_cast<double>(cells);
|
||||
double cellYMin = 0.;
|
||||
double cellYMax = std::floor(cellH);
|
||||
|
||||
for (int j = 0; j < cells; j++) {
|
||||
double cellXMin = 0.;
|
||||
double cellXMax = std::floor(cellW);
|
||||
for (int i = 0; i < cells; i++) {
|
||||
float R, G, B;
|
||||
R = 0.7f; G = 0.7f; B = 0.7f;
|
||||
cr->set_source_rgb(R , G , B);
|
||||
cr->rectangle(
|
||||
cellXMin,
|
||||
cellYMin,
|
||||
cellXMax - cellXMin,
|
||||
cellYMax - cellYMin);
|
||||
cellXMin = cellXMax;
|
||||
cellXMax = std::floor(cellW * static_cast<double>(i+2) + 0.001);
|
||||
cr->fill();
|
||||
}
|
||||
cellYMin = cellYMax;
|
||||
cellYMax = std::floor(cellH * static_cast<double>(j+2) + 0.001);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Drawing the connection line
|
||||
cr->set_antialias(Cairo::ANTIALIAS_DEFAULT);
|
||||
// float loa, hia, lob, hib, grx, gry, whx, why, mex, mey;
|
||||
const double loa = .5 * (static_cast<double>(width) + static_cast<double>(width) * low_a);
|
||||
const double hia = .5 * (static_cast<double>(width) + static_cast<double>(width) * high_a);
|
||||
const double lob = .5 * (static_cast<double>(height) + static_cast<double>(height) * low_b);
|
||||
const double hib = .5 * (static_cast<double>(height) + static_cast<double>(height) * high_b);
|
||||
const double grx = .5 * (static_cast<double>(width) + static_cast<double>(width) * gre_x);
|
||||
const double gry = .5 * (static_cast<double>(height) + static_cast<double>(height) * gre_y);
|
||||
const double whx = .5 * (static_cast<double>(width) + static_cast<double>(width) * whi_x);
|
||||
const double why = .5 * (static_cast<double>(height) + static_cast<double>(height) * whi_y);
|
||||
double loa = .5 * (static_cast<double>(width) + static_cast<double>(width) * low_a);
|
||||
double hia = .5 * (static_cast<double>(width) + static_cast<double>(width) * high_a);
|
||||
double lob = .5 * (static_cast<double>(height) + static_cast<double>(height) * low_b);
|
||||
double hib = .5 * (static_cast<double>(height) + static_cast<double>(height) * high_b);
|
||||
double grx = .5 * (static_cast<double>(width) + static_cast<double>(width) * gre_x);
|
||||
double gry = .5 * (static_cast<double>(height) + static_cast<double>(height) * gre_y);
|
||||
double whx = .5 * (static_cast<double>(width) + static_cast<double>(width) * whi_x);
|
||||
double why = .5 * (static_cast<double>(height) + static_cast<double>(height) * whi_y);
|
||||
double mex = .5 * (static_cast<double>(width) + static_cast<double>(width) * me_x);
|
||||
double mey = .5 * (static_cast<double>(height) + static_cast<double>(height) * me_y);
|
||||
cr->set_line_width(1.5);
|
||||
if (ciexy_enabled) {
|
||||
mex = .5 * (width + width * me_x);
|
||||
mey = .5 * (height + height * me_y);
|
||||
}
|
||||
cr->set_source_rgb(0.6, 0.6, 0.6);
|
||||
if (!ghs_enabled) {
|
||||
cr->move_to(loa, lob);
|
||||
cr->line_to(hia, hib);
|
||||
}
|
||||
if (ciexy_enabled) {
|
||||
cr->move_to(loa, lob);
|
||||
cr->line_to(grx, gry);
|
||||
cr->move_to(grx, gry);
|
||||
cr->line_to(hia, hib);
|
||||
} else if (ghs_enabled) {
|
||||
cr->set_line_width(3.);
|
||||
cr->set_source_rgb(0.2, 0.2, 0.2);
|
||||
|
||||
loa = (static_cast<double>(width) * low_a);
|
||||
hia = (static_cast<double>(width) * high_a);
|
||||
lob = (static_cast<double>(height) * low_b);
|
||||
hib = (static_cast<double>(height) * high_b);
|
||||
grx = (static_cast<double>(width) * gre_x);
|
||||
gry = (static_cast<double>(height) * gre_y);
|
||||
whx = (static_cast<double>(width) * whi_x);
|
||||
why = (static_cast<double>(height) * whi_y);
|
||||
mex = (static_cast<double>(width) * me_x);
|
||||
mey = (static_cast<double>(height) * me_y);
|
||||
double gx6 = (static_cast<double>(width) * ghs_x6);
|
||||
double gy6 = (static_cast<double>(height) * ghs_y6);
|
||||
double gx7 = (static_cast<double>(width) * ghs_x7);
|
||||
double gy7 = (static_cast<double>(height) * ghs_y7);
|
||||
double gx8 = (static_cast<double>(width) * ghs_x8);
|
||||
double gy8 = (static_cast<double>(height) * ghs_y8);
|
||||
double gx9 = (static_cast<double>(width) * ghs_x9);
|
||||
double gy9 = (static_cast<double>(height) * ghs_y9);
|
||||
double gx10 = (static_cast<double>(width) * ghs_x10);
|
||||
double gy10 = (static_cast<double>(height) * ghs_y10);
|
||||
double gx11 = (static_cast<double>(width) * ghs_x11);
|
||||
double gy11 = (static_cast<double>(height) * ghs_y11);
|
||||
|
||||
double onex = (static_cast<double>(width) * 1.);
|
||||
double oney = (static_cast<double>(height) * 1.);
|
||||
cr->move_to(0., 0.);
|
||||
cr->line_to(loa, lob);
|
||||
cr->move_to(loa, lob);
|
||||
cr->line_to(hia, hib);
|
||||
cr->move_to(hia, hib);
|
||||
cr->line_to(grx, gry);
|
||||
cr->move_to(grx, gry);
|
||||
cr->line_to(whx, why);
|
||||
cr->move_to(whx, why);
|
||||
cr->line_to(mex, mey);
|
||||
cr->move_to(mex, mey);
|
||||
cr->line_to(gx6, gy6);
|
||||
cr->move_to(gx6, gy6);
|
||||
cr->line_to(gx7, gy7);
|
||||
cr->move_to(gx7, gy7);
|
||||
cr->line_to(gx8, gy8);
|
||||
cr->move_to(gx8, gy8);
|
||||
cr->line_to(gx9, gy9);
|
||||
cr->move_to(gx9, gy9);
|
||||
cr->line_to(gx10, gy10);
|
||||
cr->move_to(gx10, gy10);
|
||||
cr->line_to(gx11, gy11);
|
||||
cr->move_to(gx11, gy11);
|
||||
cr->line_to(onex, oney);
|
||||
}
|
||||
cr->stroke();
|
||||
if(ghs_enabled) {//only 10 * 10 squares
|
||||
cr->set_line_width(0.2);
|
||||
cr->set_source_rgb(0.1, 0.1, 0.1);
|
||||
//draw horiz and vertical lines
|
||||
for(int i = 0; i < 10; i++) {
|
||||
cr->move_to(0.1 * static_cast<double>(i * width), 0.);
|
||||
cr->line_to(0.1 * static_cast<double>(i * width), static_cast<double>(height));
|
||||
}
|
||||
for(int i = 0; i < 10; i++) {
|
||||
cr->move_to(0., 0.1 * static_cast<double>(i * height));
|
||||
cr->line_to(static_cast<double>(width), 0.1 * static_cast<double>(i * height));
|
||||
}
|
||||
|
||||
if (ciexy_enabled) {
|
||||
cr->stroke();
|
||||
|
||||
} else if (ciexy_enabled) {//for CIExy
|
||||
cr->set_line_width(0.2);
|
||||
cr->set_source_rgb(0.1, 0.1, 0.1);
|
||||
//draw horiz and vertical lines
|
||||
@ -397,7 +541,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
|
||||
|
||||
cr->stroke();
|
||||
}
|
||||
|
||||
if(!ghs_enabled) {//no points with GHS
|
||||
// Drawing points
|
||||
if (low_enabled) {
|
||||
cr->set_source_rgb(0.1, 0.1, 0.1);//black for red in Ciexy
|
||||
@ -438,6 +582,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
|
||||
cr->arc(hia, hib, 3., 0., 2. * rtengine::RT_PI);
|
||||
}
|
||||
cr->fill();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -446,7 +591,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
|
||||
bool LabGridArea::on_button_press_event(GdkEventButton *event)
|
||||
{
|
||||
if (event->button == 1 && mous_enabled) {
|
||||
if (!ciexy_enabled) {
|
||||
if (!ciexy_enabled && !ghs_enabled) {
|
||||
if (event->type == GDK_2BUTTON_PRESS) {
|
||||
switch (litPoint) {
|
||||
case NONE:
|
||||
@ -547,7 +692,7 @@ bool LabGridArea::on_motion_notify_event(GdkEventMotion *event)
|
||||
litPoint = LOW;
|
||||
} else if (disthi < thrs * thrs && disthi <= distlo) {
|
||||
litPoint = HIGH;
|
||||
} else if (ciexy_enabled && distgxy < thrs * thrs && distgxy <= distlo) {
|
||||
} else if (ciexy_enabled && !ghs_enabled && distgxy < thrs * thrs && distgxy <= distlo) {
|
||||
litPoint = GRE;
|
||||
}
|
||||
if ((oldLitPoint == NONE && litPoint != NONE) || (oldLitPoint != NONE && litPoint == NONE)) {
|
||||
@ -595,6 +740,11 @@ bool LabGridArea::ciexyEnabled() const
|
||||
return ciexy_enabled;
|
||||
}
|
||||
|
||||
bool LabGridArea::ghsEnabled() const
|
||||
{
|
||||
return ghs_enabled;
|
||||
}
|
||||
|
||||
void LabGridArea::setLowEnabled(bool yes)
|
||||
{
|
||||
if (low_enabled != yes) {
|
||||
@ -611,6 +761,14 @@ void LabGridArea::setciexyEnabled(bool yes)
|
||||
}
|
||||
}
|
||||
|
||||
void LabGridArea::setghsEnabled(bool yes)
|
||||
{
|
||||
if (ghs_enabled != yes) {
|
||||
ghs_enabled = yes;
|
||||
queue_draw();
|
||||
}
|
||||
}
|
||||
|
||||
void LabGridArea::setmousEnabled(bool yes)
|
||||
{
|
||||
if (mous_enabled != yes) {
|
||||
@ -624,12 +782,12 @@ void LabGridArea::setmousEnabled(bool yes)
|
||||
// LabGrid
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
LabGrid::LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low, bool ciexy, bool mous):
|
||||
grid(evt, msg, enable_low, ciexy, mous)
|
||||
LabGrid::LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low, bool ciexy, bool ghs, bool mous):
|
||||
grid(evt, msg, enable_low, ciexy, ghs, mous)
|
||||
{
|
||||
Gtk::Button *reset = Gtk::manage(new Gtk::Button());
|
||||
reset->set_tooltip_markup(M("ADJUSTER_RESET_TO_DEFAULT"));
|
||||
if(!ciexy) {//disabled for Cie xy
|
||||
if(!ciexy || !ghs) {//disabled for Cie xy and GHS
|
||||
reset->add(*Gtk::manage(new RTImage("undo-small", Gtk::ICON_SIZE_BUTTON)));
|
||||
}
|
||||
reset->signal_button_release_event().connect(sigc::mem_fun(*this, &LabGrid::resetPressed));
|
||||
@ -641,7 +799,9 @@ LabGrid::LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_
|
||||
reset->set_size_request(-1, 20);
|
||||
|
||||
pack_start(grid, true, true, true);
|
||||
if(!ghs) {//disable reset when GHS
|
||||
pack_start(*reset, false, false);
|
||||
}
|
||||
show_all_children();
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,18 @@ private:
|
||||
double whi_y;
|
||||
double me_x;
|
||||
double me_y;
|
||||
double ghs_x6;
|
||||
double ghs_y6;
|
||||
double ghs_x7;
|
||||
double ghs_y7;
|
||||
double ghs_x8;
|
||||
double ghs_y8;
|
||||
double ghs_x9;
|
||||
double ghs_y9;
|
||||
double ghs_x10;
|
||||
double ghs_y10;
|
||||
double ghs_x11;
|
||||
double ghs_y11;//+4 12 11
|
||||
double defaultLow_a;
|
||||
double defaultHigh_a;
|
||||
double defaultLow_b;
|
||||
@ -70,6 +82,18 @@ private:
|
||||
double defaultwhi_y;
|
||||
double defaultme_x;
|
||||
double defaultme_y;
|
||||
double default_gsx6;//added for GHS
|
||||
double default_gsy6;
|
||||
double default_gsx7;
|
||||
double default_gsy7;
|
||||
double default_gsx8;
|
||||
double default_gsy8;
|
||||
double default_gsx9;
|
||||
double default_gsy9;
|
||||
double default_gsx10;//+4 12 11
|
||||
double default_gsy10;
|
||||
double default_gsx11;
|
||||
double default_gsy11;
|
||||
|
||||
ToolPanelListener *listener;
|
||||
bool edited;
|
||||
@ -79,17 +103,19 @@ private:
|
||||
|
||||
bool low_enabled;
|
||||
bool ciexy_enabled;
|
||||
bool ghs_enabled;
|
||||
bool mous_enabled;
|
||||
|
||||
bool notifyListener();
|
||||
void getLitPoint();
|
||||
|
||||
public:
|
||||
LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low=true, bool ciexy=false, bool mous=false);
|
||||
LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low=true, bool ciexy=false, bool ghs=false, bool mous=false);
|
||||
|
||||
void getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &my) const;
|
||||
void setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, bool notify);
|
||||
void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my);
|
||||
void getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &my,
|
||||
double &gx6, double &gy6, double &gx7, double &gy7, double &gx8, double &gy8, double &gx9, double &gy9, double &gx10, double &gy10, double &gx11, double &gy11) const;//+4 12 11
|
||||
void setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, double gx6, double gy6, double gx7, double gy7, double gx8, double gy8, double gx9, double gy9, double gx10, double gy10, double gx11, double gy11, bool notify);//+4 12 11
|
||||
void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, double gx6, double gy6, double gx7, double gy7, double gx8, double gy8, double gx9, double gy9, double gx10, double gy10, double gx11, double gy11);//+4 12 11
|
||||
void setEdited(bool yes);
|
||||
bool getEdited() const;
|
||||
void reset(bool toInitial);
|
||||
@ -99,6 +125,8 @@ public:
|
||||
void setLowEnabled(bool yes);
|
||||
bool ciexyEnabled() const;
|
||||
void setciexyEnabled(bool yes);
|
||||
bool ghsEnabled() const;
|
||||
void setghsEnabled(bool yes);
|
||||
bool mousEnabled() const;
|
||||
void setmousEnabled(bool yes);
|
||||
|
||||
@ -120,11 +148,14 @@ private:
|
||||
bool resetPressed(GdkEventButton *event);
|
||||
|
||||
public:
|
||||
LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low=true, bool ciexy=false, bool mous=true);
|
||||
LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low=true, bool ciexy=false, bool ghs=false, bool mous=true);
|
||||
|
||||
void getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &my) const { return grid.getParams(la, lb, ha, hb, gx, gy, wx, wy, mx, my); }
|
||||
void setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, bool notify) { grid.setParams(la, lb, ha, hb, gx, gy, wx, wy, mx, my, notify); }
|
||||
void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my) { grid.setDefault(la, lb, ha, hb, gx, gy, wx, wy, mx, my); }
|
||||
void getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &my, double &gx6, double &gy6, double &gx7, double &gy7, double &gx8, double &gy8, double &gx9, double &gy9, double &gx10, double &gy10, double &gx11, double &gy11)
|
||||
const { return grid.getParams(la, lb, ha, hb, gx, gy, wx, wy, mx, my, gx6, gy6, gx7, gy7, gx8, gy8, gx9, gy9, gx10, gy10, gx11, gy11); }//+4 12 11
|
||||
void setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, double gx6, double gy6, double gx7, double gy7, double gx8, double gy8, double gx9, double gy9, double gx10, double gy10, double gx11, double gy11, bool notify)
|
||||
{ grid.setParams(la, lb, ha, hb, gx, gy, wx, wy, mx, my, gx6, gy6, gx7, gy7, gx8, gy8, gx9, gy9, gx10, gy10, gx11, gy11, notify); }//+4 12 11
|
||||
void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, double gx6, double gy6, double gx7, double gy7, double gx8, double gy8, double gx9, double gy9, double gx10, double gy10, double gx11, double gy11)
|
||||
{ grid.setDefault(la, lb, ha, hb, gx, gy, wx, wy, mx, my, gx6, gy6, gx7, gy7, gx8, gy8, gx9, gy9, gx10, gy10, gx11, gy11); }//+4 12 11
|
||||
void setEdited(bool yes) { grid.setEdited(yes); }
|
||||
bool getEdited() const { return grid.getEdited(); }
|
||||
void reset(bool toInitial) { grid.reset(toInitial); }
|
||||
@ -133,6 +164,8 @@ public:
|
||||
void setLowEnabled(bool yes) { grid.setLowEnabled(yes); }
|
||||
bool ciexyEnabled() const { return grid.ciexyEnabled(); }
|
||||
void setciexyEnabled(bool yes) { grid.setciexyEnabled(yes); }
|
||||
bool ghsEnabled() const { return grid.ghsEnabled(); }
|
||||
void setghsEnabled(bool yes) { grid.setghsEnabled(yes); }
|
||||
bool mousEnabled() const { return grid.mousEnabled(); }
|
||||
void setmousEnabled(bool yes) { grid.setmousEnabled(yes); }
|
||||
|
||||
|
@ -1379,11 +1379,46 @@ void Locallab::maiChanged(const std::vector<locallabsetLC> &setlc, int selspot)
|
||||
}
|
||||
}
|
||||
|
||||
//Draw Simulation for GHS - with 9 points
|
||||
void Locallab::ghsChanged(const std::vector<locallabshGHS> &shghs, int selspot)
|
||||
{
|
||||
sh_ghs = shghs;
|
||||
double gx[22];//not the 2 last values 1 1
|
||||
if (selspot < (int) sh_ghs.size()) {
|
||||
for(int i=0; i < 22; i++) {
|
||||
gx[i] = sh_ghs.at(selspot).ghsc[i];
|
||||
// printf("i=%i gx=%f\n", i, (double) gx[i]);
|
||||
}
|
||||
expshadhigh.updateghs(gx);
|
||||
}
|
||||
}
|
||||
|
||||
void Locallab::ghsbwChanged(const std::vector<locallabshGHSbw> &shghsbw, int selspot)
|
||||
{
|
||||
sh_ghsbw = shghsbw;
|
||||
int bw[2];
|
||||
bw[0] = 0;
|
||||
bw[1] = 1;
|
||||
double bwvalue[2];
|
||||
bwvalue[0] = 0.;
|
||||
bwvalue[1] = 1.;
|
||||
|
||||
if (selspot < (int) sh_ghsbw.size()) {
|
||||
for(int i=0; i < 2; i++) {
|
||||
bw[i] = sh_ghsbw.at(selspot).ghsbw[i];
|
||||
bwvalue[i] = sh_ghsbw.at(selspot).ghsbwvalue[i];
|
||||
}
|
||||
|
||||
expshadhigh.updateghsbw(bw[0], bw[1], bwvalue[0], bwvalue[1]);
|
||||
}
|
||||
|
||||
}
|
||||
void Locallab::cieChanged(const std::vector<locallabcieLC> &cielc, int selspot)
|
||||
{
|
||||
// Saving transmitted min/max data
|
||||
cie_lc = cielc;
|
||||
|
||||
|
||||
//Update Locallab Denoise tool lum chro
|
||||
if (selspot < (int) cie_lc.size()) {
|
||||
const double r1 = cie_lc.at(selspot).redxlc;
|
||||
|
@ -134,6 +134,10 @@ private:
|
||||
|
||||
std::vector<locallabcieLC> cie_lc;
|
||||
|
||||
std::vector<locallabshGHS> sh_ghs;
|
||||
|
||||
std::vector<locallabshGHSbw> sh_ghsbw;
|
||||
|
||||
std::vector<locallabsetLC> set_lc;
|
||||
|
||||
std::vector<locallabcieSIG> cie_sig;
|
||||
@ -176,6 +180,12 @@ public:
|
||||
// Locallab CIE tool primaries function
|
||||
void cieChanged(const std::vector<locallabcieLC> &cielc, int selspot) override;
|
||||
|
||||
// Locallab SH GHS tool Curve S GHS function
|
||||
void ghsChanged(const std::vector<locallabshGHS> &shghs, int selspot) override;
|
||||
|
||||
// Locallab SH GHS tool Black point & White point GHS function
|
||||
void ghsbwChanged(const std::vector<locallabshGHSbw> &shghsbw, int selspot) override;
|
||||
|
||||
// Locallab Log Encoding and Cam16 autocompute function
|
||||
void ciebefChanged(const std::vector<locallabcieBEF> &ciebef, int selspot) override;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -111,6 +111,7 @@ protected:
|
||||
rtengine::ProcEvent Evlocallabbluxl;
|
||||
rtengine::ProcEvent Evlocallabbluyl;
|
||||
rtengine::ProcEvent EvlocallabGridciexy;
|
||||
rtengine::ProcEvent EvlocallabGridghs;
|
||||
rtengine::ProcEvent Evlocallabgamutcie;
|
||||
rtengine::ProcEvent Evlocallabbwcie;
|
||||
rtengine::ProcEvent Evlocallabexpprecam;
|
||||
@ -566,6 +567,31 @@ private:
|
||||
Gtk::Frame* const gamFrame;
|
||||
Adjuster* const gamSH;
|
||||
Adjuster* const sloSH;
|
||||
|
||||
MyComboBoxText* const ghsMethod;
|
||||
Gtk::Frame* const gridFrameghs;
|
||||
LabGrid* const labgridghs;
|
||||
|
||||
Gtk::Frame* const ghsFrame;
|
||||
Adjuster* const ghs_D;
|
||||
Gtk::Frame* const Lab_Frame;
|
||||
Adjuster* const ghs_slope;
|
||||
Adjuster* const ghs_chro;
|
||||
Adjuster* const ghs_B;
|
||||
Adjuster* const ghs_SP;
|
||||
Adjuster* const ghs_LP;
|
||||
Adjuster* const ghs_HP;
|
||||
Gtk::Frame* const LC_Frame;
|
||||
Adjuster* const ghs_LC;
|
||||
Gtk::Frame* const BP_Frame;
|
||||
Adjuster* const ghs_BLP;
|
||||
Adjuster* const ghs_HLP;
|
||||
Gtk::Label* const ghsbpwpLabels;
|
||||
Gtk::Label* const ghsbpwpvalueLabels;
|
||||
|
||||
Gtk::CheckButton* const ghs_smooth;
|
||||
Gtk::CheckButton* const ghs_inv;
|
||||
|
||||
MyExpander* const expgradsh;
|
||||
Adjuster* const strSH;
|
||||
Adjuster* const angSH;
|
||||
@ -592,8 +618,21 @@ private:
|
||||
Adjuster* const fatanchorSH;
|
||||
|
||||
rtengine::ProcEvent EvlocallabTePivot;
|
||||
rtengine::ProcEvent EvlocallabghsMethod;
|
||||
rtengine::ProcEvent Evlocallabghs_D;
|
||||
rtengine::ProcEvent Evlocallabghs_slope;
|
||||
rtengine::ProcEvent Evlocallabghs_chro;
|
||||
rtengine::ProcEvent Evlocallabghs_B;
|
||||
rtengine::ProcEvent Evlocallabghs_SP;
|
||||
rtengine::ProcEvent Evlocallabghs_LP;
|
||||
rtengine::ProcEvent Evlocallabghs_HP;
|
||||
rtengine::ProcEvent Evlocallabghs_LC;
|
||||
rtengine::ProcEvent Evlocallabghs_BLP;
|
||||
rtengine::ProcEvent Evlocallabghs_HLP;
|
||||
rtengine::ProcEvent Evlocallabghs_smooth;
|
||||
rtengine::ProcEvent Evlocallabghs_inv;
|
||||
|
||||
sigc::connection shMethodConn, previewshConn, inversshConn, showmaskSHMethodConn, showmaskSHMethodConninv, enaSHMaskConn;
|
||||
sigc::connection shMethodConn, ghsMethodConn, previewshConn, inversshConn, ghs_smoothConn, ghs_invConn, showmaskSHMethodConn, showmaskSHMethodConninv, enaSHMaskConn;
|
||||
|
||||
public:
|
||||
LocallabShadow();
|
||||
@ -610,6 +649,9 @@ public:
|
||||
void updateguishad(int spottype);
|
||||
void updateguiscopesahd(int scope);
|
||||
|
||||
void updateghs(double *gx);
|
||||
|
||||
void updateghsbw(int bp, int wp, double minbp, double maxwp);
|
||||
void setDefaultExpanderVisibility() override;
|
||||
void disableListener() override;
|
||||
void enableListener() override;
|
||||
@ -629,13 +671,18 @@ private:
|
||||
void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer, const double normHuerjz) override;
|
||||
|
||||
void shMethodChanged();
|
||||
void ghsMethodChanged();
|
||||
void inversshChanged();
|
||||
void ghs_smoothChanged();
|
||||
void ghs_invChanged();
|
||||
void showmaskSHMethodChanged();
|
||||
void showmaskSHMethodChangedinv();
|
||||
void enaSHMaskChanged();
|
||||
|
||||
void updateShadowGUI1();
|
||||
void updateShadowGUI2();
|
||||
void updateShadowGUI3();
|
||||
|
||||
};
|
||||
|
||||
/* ==== LocallabVibrance ==== */
|
||||
@ -879,9 +926,12 @@ private:
|
||||
Adjuster* const nlpat;
|
||||
Adjuster* const nlrad;
|
||||
Adjuster* const nlgam;
|
||||
Adjuster* const nliter;
|
||||
Adjuster* const bilateral;
|
||||
Adjuster* const sensiden;
|
||||
|
||||
rtengine::ProcEvent Evlocallabnliter;
|
||||
|
||||
Adjuster* const reparden;
|
||||
Gtk::Button* neutral;
|
||||
MyExpander* const expmaskbl;
|
||||
|
@ -8103,7 +8103,7 @@ Locallabcie::Locallabcie():
|
||||
refi(Gtk::manage(new Adjuster(M("TC_PRIM_REFI"), -0.5, 1., 0.0001, 0.))),
|
||||
|
||||
gridFramecie(Gtk::manage(new Gtk::Frame(M("TP_ICM_WORKING_CIEDIAG")))),
|
||||
labgridcie(Gtk::manage(new LabGrid(EvlocallabGridciexy, M("TP_ICM_LABGRID_CIEXY"), true, true, false))),
|
||||
labgridcie(Gtk::manage(new LabGrid(EvlocallabGridciexy, M("TP_ICM_LABGRID_CIEXY"), true, true, false, false))),
|
||||
colorFramecie(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COLORFRAME")))),
|
||||
|
||||
catBox(Gtk::manage(new Gtk::Box())),
|
||||
@ -9981,6 +9981,9 @@ void Locallabcie::read(const rtengine::procparams::ProcParams* pp, const ParamsE
|
||||
spot.labgridcieWy,
|
||||
spot.labgridcieMx,
|
||||
spot.labgridcieMy,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0, //+4 12 11
|
||||
false);
|
||||
|
||||
strgradcie->setValue((double)spot.strgradcie);
|
||||
@ -10080,6 +10083,8 @@ void Locallabcie::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedi
|
||||
spot.refi = refi->getValue();
|
||||
spot.shiftxl = shiftxl->getValue();
|
||||
spot.shiftyl = shiftyl->getValue();
|
||||
double zerox = 0.;
|
||||
double zeroy = 0.;
|
||||
labgridcie->getParams(spot.labgridcieALow,
|
||||
spot.labgridcieBLow,
|
||||
spot.labgridcieAHigh,
|
||||
@ -10089,7 +10094,11 @@ void Locallabcie::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedi
|
||||
spot.labgridcieWx,
|
||||
spot.labgridcieWy,
|
||||
spot.labgridcieMx,
|
||||
spot.labgridcieMy);
|
||||
spot.labgridcieMy,
|
||||
zerox, zeroy, zerox, zeroy,
|
||||
zerox, zeroy, zerox, zeroy,
|
||||
zerox, zeroy, zerox, zeroy //+4 12 11
|
||||
);
|
||||
|
||||
spot.Autograycie = Autograycie->get_active();
|
||||
spot.forcejz = forcejz->get_active();
|
||||
@ -10445,7 +10454,7 @@ void Locallabcie::updateiPrimloc(const float r_x, const float r_y, const float g
|
||||
greyl->setValue(g_y);
|
||||
bluxl->setValue(b_x);
|
||||
bluyl->setValue(b_y);
|
||||
labgridcie->setParams(nextrx, nextry, nextbx, nextby, nextgx, nextgy, nextwx, nextwy, nextmx, nextmy, false);
|
||||
labgridcie->setParams(nextrx, nextry, nextbx, nextby, nextgx, nextgy, nextwx, nextwy, nextmx, nextmy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false);//+4 12 11
|
||||
enableListener();
|
||||
return false;
|
||||
}
|
||||
@ -12189,6 +12198,8 @@ void Locallabcie::setDefaults(const rtengine::procparams::ProcParams* defParams,
|
||||
shiftxl->setDefault(defSpot.shiftxl);
|
||||
shiftyl->setDefault(defSpot.shiftyl);
|
||||
refi->setDefault(defSpot.refi);
|
||||
double zerox = 0.;
|
||||
double zeroy = 0.;
|
||||
labgridcie->setDefault(defSpot.labgridcieALow,
|
||||
defSpot.labgridcieBLow,
|
||||
defSpot.labgridcieAHigh,
|
||||
@ -12198,7 +12209,11 @@ void Locallabcie::setDefaults(const rtengine::procparams::ProcParams* defParams,
|
||||
defSpot.labgridcieWx,
|
||||
defSpot.labgridcieWy,
|
||||
defSpot.labgridcieMx,
|
||||
defSpot.labgridcieMy);
|
||||
defSpot.labgridcieMy,
|
||||
zerox, zeroy, zerox, zeroy,
|
||||
zerox, zeroy, zerox, zeroy,
|
||||
zerox, zeroy, zerox, zeroy //+4 12 11
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -185,6 +185,10 @@ void Options::updatePaths()
|
||||
lastlocalCurvesDir = preferredPath;
|
||||
}
|
||||
|
||||
if (lastlocalCurvesDirghs.empty() || !Glib::file_test(lastlocalCurvesDirghs, Glib::FILE_TEST_EXISTS) || !Glib::file_test(lastlocalCurvesDirghs, Glib::FILE_TEST_IS_DIR)) {
|
||||
lastlocalCurvesDirghs = preferredPath;
|
||||
}
|
||||
|
||||
if (lastPFCurvesDir.empty() || !Glib::file_test(lastPFCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test(lastPFCurvesDir, Glib::FILE_TEST_IS_DIR)) {
|
||||
lastPFCurvesDir = preferredPath;
|
||||
}
|
||||
@ -688,6 +692,7 @@ void Options::setDefaults()
|
||||
lastDenoiseCurvesDir = "";
|
||||
lastWaveletCurvesDir = "";
|
||||
lastlocalCurvesDir = "";
|
||||
lastlocalCurvesDirghs = "";
|
||||
lastPFCurvesDir = "";
|
||||
lastHsvCurvesDir = "";
|
||||
lastToneCurvesDir = "";
|
||||
@ -2309,6 +2314,7 @@ void Options::readFromFile(Glib::ustring fname)
|
||||
safeDirGet(keyFile, "Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir);
|
||||
safeDirGet(keyFile, "Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir);
|
||||
safeDirGet(keyFile, "Dialogs", "LastlocalCurvesDir", lastlocalCurvesDir);
|
||||
safeDirGet(keyFile, "Dialogs", "LastlocalCurvesDirghs", lastlocalCurvesDirghs);
|
||||
|
||||
safeDirGet(keyFile, "Dialogs", "LastPFCurvesDir", lastPFCurvesDir);
|
||||
safeDirGet(keyFile, "Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir);
|
||||
@ -2807,6 +2813,7 @@ void Options::saveToFile(Glib::ustring fname)
|
||||
keyFile.set_string("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir);
|
||||
keyFile.set_string("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir);
|
||||
keyFile.set_string("Dialogs", "LastlocalCurvesDir", lastlocalCurvesDir);
|
||||
keyFile.set_string("Dialogs", "LastlocalCurvesDirghs", lastlocalCurvesDirghs);
|
||||
keyFile.set_string("Dialogs", "LastPFCurvesDir", lastPFCurvesDir);
|
||||
keyFile.set_string("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir);
|
||||
keyFile.set_string("Dialogs", "LastBWCurvesDir", lastBWCurvesDir);
|
||||
|
@ -487,6 +487,7 @@ public:
|
||||
Glib::ustring lastDenoiseCurvesDir;
|
||||
Glib::ustring lastWaveletCurvesDir;
|
||||
Glib::ustring lastlocalCurvesDir;
|
||||
Glib::ustring lastlocalCurvesDirghs;
|
||||
Glib::ustring lastPFCurvesDir;
|
||||
Glib::ustring lastHsvCurvesDir;
|
||||
Glib::ustring lastToneCurvesDir;
|
||||
|
@ -1296,6 +1296,43 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
||||
locallab.spots.at(j).expshadhigh = locallab.spots.at(j).expshadhigh && pSpot.expshadhigh == otherSpot.expshadhigh;
|
||||
locallab.spots.at(j).complexshadhigh = locallab.spots.at(j).complexshadhigh && pSpot.complexshadhigh == otherSpot.complexshadhigh;
|
||||
locallab.spots.at(j).shMethod = locallab.spots.at(j).shMethod && pSpot.shMethod == otherSpot.shMethod;
|
||||
locallab.spots.at(j).ghsMethod = locallab.spots.at(j).ghsMethod && pSpot.ghsMethod == otherSpot.ghsMethod;
|
||||
locallab.spots.at(j).ghsMode = locallab.spots.at(j).ghsMode && pSpot.ghsMode == otherSpot.ghsMode;
|
||||
locallab.spots.at(j).ghs_D = locallab.spots.at(j).ghs_D && pSpot.ghs_D == otherSpot.ghs_D;
|
||||
locallab.spots.at(j).ghs_slope = locallab.spots.at(j).ghs_slope && pSpot.ghs_slope == otherSpot.ghs_slope;
|
||||
locallab.spots.at(j).ghs_chro = locallab.spots.at(j).ghs_chro && pSpot.ghs_chro == otherSpot.ghs_chro;
|
||||
locallab.spots.at(j).ghs_B = locallab.spots.at(j).ghs_B && pSpot.ghs_B == otherSpot.ghs_B;
|
||||
locallab.spots.at(j).ghs_SP = locallab.spots.at(j).ghs_SP && pSpot.ghs_SP == otherSpot.ghs_SP;
|
||||
locallab.spots.at(j).ghs_LP = locallab.spots.at(j).ghs_LP && pSpot.ghs_LP == otherSpot.ghs_LP;
|
||||
locallab.spots.at(j).ghs_HP = locallab.spots.at(j).ghs_HP && pSpot.ghs_HP == otherSpot.ghs_HP;
|
||||
locallab.spots.at(j).ghs_LC = locallab.spots.at(j).ghs_LC && pSpot.ghs_LC == otherSpot.ghs_LC;
|
||||
locallab.spots.at(j).ghs_BLP = locallab.spots.at(j).ghs_BLP && pSpot.ghs_BLP == otherSpot.ghs_BLP;
|
||||
locallab.spots.at(j).ghs_HLP = locallab.spots.at(j).ghs_HLP && pSpot.ghs_HLP == otherSpot.ghs_HLP;
|
||||
locallab.spots.at(j).ghs_smooth = locallab.spots.at(j).ghs_smooth && pSpot.ghs_smooth == otherSpot.ghs_smooth;
|
||||
locallab.spots.at(j).ghs_inv = locallab.spots.at(j).ghs_inv && pSpot.ghs_inv == otherSpot.ghs_inv;
|
||||
locallab.spots.at(j).ghsx1 = locallab.spots.at(j).ghsx1 && pSpot.ghsx1 == otherSpot.ghsx1;
|
||||
locallab.spots.at(j).ghsy1 = locallab.spots.at(j).ghsy1 && pSpot.ghsy1 == otherSpot.ghsy1;
|
||||
locallab.spots.at(j).ghsx2 = locallab.spots.at(j).ghsx2 && pSpot.ghsx2 == otherSpot.ghsx2;
|
||||
locallab.spots.at(j).ghsy2 = locallab.spots.at(j).ghsy2 && pSpot.ghsy2 == otherSpot.ghsy2;
|
||||
|
||||
locallab.spots.at(j).ghsx3 = locallab.spots.at(j).ghsx3 && pSpot.ghsx3 == otherSpot.ghsx3;
|
||||
locallab.spots.at(j).ghsy3 = locallab.spots.at(j).ghsy3 && pSpot.ghsy3 == otherSpot.ghsy3;
|
||||
locallab.spots.at(j).ghsx4 = locallab.spots.at(j).ghsx4 && pSpot.ghsx4 == otherSpot.ghsx4;
|
||||
locallab.spots.at(j).ghsy4 = locallab.spots.at(j).ghsy4 && pSpot.ghsy4 == otherSpot.ghsy4;
|
||||
locallab.spots.at(j).ghsx5 = locallab.spots.at(j).ghsx5 && pSpot.ghsx5 == otherSpot.ghsx5;
|
||||
locallab.spots.at(j).ghsy5 = locallab.spots.at(j).ghsy5 && pSpot.ghsy5 == otherSpot.ghsy5;
|
||||
locallab.spots.at(j).ghsx6 = locallab.spots.at(j).ghsx6 && pSpot.ghsx6 == otherSpot.ghsx6;
|
||||
locallab.spots.at(j).ghsy6 = locallab.spots.at(j).ghsy6 && pSpot.ghsy6 == otherSpot.ghsy6;
|
||||
locallab.spots.at(j).ghsx7 = locallab.spots.at(j).ghsx7 && pSpot.ghsx7 == otherSpot.ghsx7;
|
||||
locallab.spots.at(j).ghsy7 = locallab.spots.at(j).ghsy7 && pSpot.ghsy7 == otherSpot.ghsy7;
|
||||
locallab.spots.at(j).ghsx8 = locallab.spots.at(j).ghsx8 && pSpot.ghsx8 == otherSpot.ghsx8;
|
||||
locallab.spots.at(j).ghsy8 = locallab.spots.at(j).ghsy8 && pSpot.ghsy8 == otherSpot.ghsy8;
|
||||
locallab.spots.at(j).ghsx9 = locallab.spots.at(j).ghsx9 && pSpot.ghsx9 == otherSpot.ghsx9;
|
||||
locallab.spots.at(j).ghsy9 = locallab.spots.at(j).ghsy9 && pSpot.ghsy9 == otherSpot.ghsy9;
|
||||
locallab.spots.at(j).ghsx8 = locallab.spots.at(j).ghsx10 && pSpot.ghsx10 == otherSpot.ghsx10;
|
||||
locallab.spots.at(j).ghsy8 = locallab.spots.at(j).ghsy10 && pSpot.ghsy10 == otherSpot.ghsy10;
|
||||
locallab.spots.at(j).ghsx9 = locallab.spots.at(j).ghsx11 && pSpot.ghsx11 == otherSpot.ghsx11;
|
||||
locallab.spots.at(j).ghsy9 = locallab.spots.at(j).ghsy11 && pSpot.ghsy11 == otherSpot.ghsy11;
|
||||
|
||||
for (int k = 0; k < 6; k++) {
|
||||
locallab.spots.at(j).multsh[k] = locallab.spots.at(j).multsh[k] && pSpot.multsh[k] == otherSpot.multsh[k];
|
||||
@ -1429,6 +1466,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
||||
locallab.spots.at(j).nlpat = locallab.spots.at(j).nlpat && pSpot.nlpat == otherSpot.nlpat;
|
||||
locallab.spots.at(j).nlrad = locallab.spots.at(j).nlrad && pSpot.nlrad == otherSpot.nlrad;
|
||||
locallab.spots.at(j).nlgam = locallab.spots.at(j).nlgam && pSpot.nlgam == otherSpot.nlgam;
|
||||
locallab.spots.at(j).nliter = locallab.spots.at(j).nliter && pSpot.nliter == otherSpot.nliter;
|
||||
locallab.spots.at(j).sensiden = locallab.spots.at(j).sensiden && pSpot.sensiden == otherSpot.sensiden;
|
||||
locallab.spots.at(j).reparden = locallab.spots.at(j).reparden && pSpot.reparden == otherSpot.reparden;
|
||||
locallab.spots.at(j).detailthr = locallab.spots.at(j).detailthr && pSpot.detailthr == otherSpot.detailthr;
|
||||
@ -4272,6 +4310,151 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
||||
toEdit.locallab.spots.at(i).shMethod = mods.locallab.spots.at(i).shMethod;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsMethod) {
|
||||
toEdit.locallab.spots.at(i).ghsMethod = mods.locallab.spots.at(i).ghsMethod;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx1) {
|
||||
toEdit.locallab.spots.at(i).ghsx1 = mods.locallab.spots.at(i).ghsx1;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy1) {
|
||||
toEdit.locallab.spots.at(i).ghsy1 = mods.locallab.spots.at(i).ghsy1;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx2) {
|
||||
toEdit.locallab.spots.at(i).ghsx2 = mods.locallab.spots.at(i).ghsx2;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy2) {
|
||||
toEdit.locallab.spots.at(i).ghsy2 = mods.locallab.spots.at(i).ghsy2;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx3) {
|
||||
toEdit.locallab.spots.at(i).ghsx3 = mods.locallab.spots.at(i).ghsx3;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy3) {
|
||||
toEdit.locallab.spots.at(i).ghsy3 = mods.locallab.spots.at(i).ghsy3;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx4) {
|
||||
toEdit.locallab.spots.at(i).ghsx4 = mods.locallab.spots.at(i).ghsx4;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy4) {
|
||||
toEdit.locallab.spots.at(i).ghsy4 = mods.locallab.spots.at(i).ghsy4;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx5) {
|
||||
toEdit.locallab.spots.at(i).ghsx5 = mods.locallab.spots.at(i).ghsx5;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy5) {
|
||||
toEdit.locallab.spots.at(i).ghsy5 = mods.locallab.spots.at(i).ghsy5;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx6) {
|
||||
toEdit.locallab.spots.at(i).ghsx6 = mods.locallab.spots.at(i).ghsx6;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy6) {
|
||||
toEdit.locallab.spots.at(i).ghsy6 = mods.locallab.spots.at(i).ghsy6;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx7) {
|
||||
toEdit.locallab.spots.at(i).ghsx7 = mods.locallab.spots.at(i).ghsx7;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy7) {
|
||||
toEdit.locallab.spots.at(i).ghsy7 = mods.locallab.spots.at(i).ghsy7;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx8) {
|
||||
toEdit.locallab.spots.at(i).ghsx8 = mods.locallab.spots.at(i).ghsx8;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy8) {
|
||||
toEdit.locallab.spots.at(i).ghsy8 = mods.locallab.spots.at(i).ghsy8;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx9) {
|
||||
toEdit.locallab.spots.at(i).ghsx9 = mods.locallab.spots.at(i).ghsx9;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy9) {
|
||||
toEdit.locallab.spots.at(i).ghsy9 = mods.locallab.spots.at(i).ghsy9;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx10) {
|
||||
toEdit.locallab.spots.at(i).ghsx10 = mods.locallab.spots.at(i).ghsx10;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy10) {
|
||||
toEdit.locallab.spots.at(i).ghsy10 = mods.locallab.spots.at(i).ghsy10;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsx11) {
|
||||
toEdit.locallab.spots.at(i).ghsx11 = mods.locallab.spots.at(i).ghsx11;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsy11) {
|
||||
toEdit.locallab.spots.at(i).ghsy11 = mods.locallab.spots.at(i).ghsy11;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghsMode) {
|
||||
toEdit.locallab.spots.at(i).ghsMode = mods.locallab.spots.at(i).ghsMode;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_D) {
|
||||
toEdit.locallab.spots.at(i).ghs_D = mods.locallab.spots.at(i).ghs_D;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_slope) {
|
||||
toEdit.locallab.spots.at(i).ghs_slope = mods.locallab.spots.at(i).ghs_slope;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_chro) {
|
||||
toEdit.locallab.spots.at(i).ghs_chro = mods.locallab.spots.at(i).ghs_chro;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_B) {
|
||||
toEdit.locallab.spots.at(i).ghs_B = mods.locallab.spots.at(i).ghs_B;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_SP) {
|
||||
toEdit.locallab.spots.at(i).ghs_SP = mods.locallab.spots.at(i).ghs_SP;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_LP) {
|
||||
toEdit.locallab.spots.at(i).ghs_LP = mods.locallab.spots.at(i).ghs_LP;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_HP) {
|
||||
toEdit.locallab.spots.at(i).ghs_HP = mods.locallab.spots.at(i).ghs_HP;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_LC) {
|
||||
toEdit.locallab.spots.at(i).ghs_LC = mods.locallab.spots.at(i).ghs_LC;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_BLP) {
|
||||
toEdit.locallab.spots.at(i).ghs_BLP = mods.locallab.spots.at(i).ghs_BLP;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_HLP) {
|
||||
toEdit.locallab.spots.at(i).ghs_HLP = mods.locallab.spots.at(i).ghs_HLP;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_smooth) {
|
||||
toEdit.locallab.spots.at(i).ghs_smooth = mods.locallab.spots.at(i).ghs_smooth;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).ghs_inv) {
|
||||
toEdit.locallab.spots.at(i).ghs_inv = mods.locallab.spots.at(i).ghs_inv;
|
||||
}
|
||||
|
||||
|
||||
for (int j = 0; j < 6; j++) {
|
||||
if (locallab.spots.at(i).multsh[j]) {
|
||||
toEdit.locallab.spots.at(i).multsh[j] = mods.locallab.spots.at(i).multsh[j];
|
||||
@ -4781,6 +4964,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
||||
toEdit.locallab.spots.at(i).nlgam = mods.locallab.spots.at(i).nlgam;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).nliter) {
|
||||
toEdit.locallab.spots.at(i).nliter = mods.locallab.spots.at(i).nliter;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).sensiden) {
|
||||
toEdit.locallab.spots.at(i).sensiden = mods.locallab.spots.at(i).sensiden;
|
||||
}
|
||||
@ -8111,6 +8298,43 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
|
||||
expshadhigh(v),
|
||||
complexshadhigh(v),
|
||||
shMethod(v),
|
||||
ghsMethod(v),
|
||||
ghsMode(v),
|
||||
ghs_D(v),
|
||||
ghs_slope(v),
|
||||
ghs_chro(v),
|
||||
ghs_B(v),
|
||||
ghs_SP(v),
|
||||
ghs_LP(v),
|
||||
ghs_HP(v),
|
||||
ghs_LC(v),
|
||||
ghs_BLP(v),
|
||||
ghs_HLP(v),
|
||||
ghs_smooth(v),
|
||||
ghs_inv(v),
|
||||
ghsx1(v),
|
||||
ghsy1(v),
|
||||
ghsx2(v),
|
||||
ghsy2(v),
|
||||
ghsx3(v),
|
||||
ghsy3(v),
|
||||
ghsx4(v),
|
||||
ghsy4(v),
|
||||
ghsx5(v),
|
||||
ghsy5(v),
|
||||
ghsx6(v),
|
||||
ghsy6(v),
|
||||
ghsx7(v),
|
||||
ghsy7(v),
|
||||
ghsx8(v),
|
||||
ghsy8(v),
|
||||
ghsx9(v),
|
||||
ghsy9(v),
|
||||
ghsx10(v),
|
||||
ghsy10(v),
|
||||
ghsx11(v),
|
||||
ghsy11(v),
|
||||
|
||||
multsh{v, v, v, v, v, v, v},
|
||||
highlights(v),
|
||||
h_tonalwidth(v),
|
||||
@ -8240,6 +8464,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
|
||||
nlpat(v),
|
||||
nlrad(v),
|
||||
nlgam(v),
|
||||
nliter(v),
|
||||
sensiden(v),
|
||||
reparden(v),
|
||||
detailthr(v),
|
||||
@ -8871,6 +9096,43 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
|
||||
expshadhigh = v;
|
||||
complexshadhigh = v;
|
||||
shMethod = v;
|
||||
ghsMethod = v;
|
||||
ghsMode = v;
|
||||
ghs_D = v;
|
||||
ghs_slope = v;
|
||||
ghs_chro = v;
|
||||
ghs_B = v;
|
||||
ghs_SP = v;
|
||||
ghs_LP = v;
|
||||
ghs_HP = v;
|
||||
ghs_LC = v;
|
||||
ghs_BLP = v;
|
||||
ghs_HLP = v;
|
||||
ghs_smooth = v;
|
||||
ghs_inv = v;
|
||||
ghsx1 = v;
|
||||
ghsy1 = v;
|
||||
ghsx2 = v;
|
||||
ghsy2 = v;
|
||||
ghsx3 = v;
|
||||
ghsy3 = v;
|
||||
ghsx4 = v;
|
||||
ghsy4 = v;
|
||||
ghsx5 = v;
|
||||
ghsy5 = v;
|
||||
ghsx6 = v;
|
||||
ghsy6 = v;
|
||||
ghsx7 = v;
|
||||
ghsy7 = v;
|
||||
ghsx8 = v;
|
||||
ghsy8 = v;
|
||||
ghsx9 = v;
|
||||
ghsy9 = v;
|
||||
ghsx10 = v;
|
||||
ghsy10 = v;
|
||||
ghsx11 = v;
|
||||
ghsy11 = v;
|
||||
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
multsh[i] = v;
|
||||
@ -9004,6 +9266,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
|
||||
nlpat = v;
|
||||
nlrad = v;
|
||||
nlgam = v;
|
||||
nliter = v;
|
||||
sensiden = v;
|
||||
reparden = v;
|
||||
detailthr = v;
|
||||
|
@ -582,6 +582,42 @@ public:
|
||||
bool expshadhigh;
|
||||
bool complexshadhigh;
|
||||
bool shMethod;
|
||||
bool ghsMethod;
|
||||
bool ghsMode;
|
||||
bool ghs_D;
|
||||
bool ghs_slope;
|
||||
bool ghs_chro;
|
||||
bool ghs_B;
|
||||
bool ghs_SP;
|
||||
bool ghs_LP;
|
||||
bool ghs_HP;
|
||||
bool ghs_LC;
|
||||
bool ghs_BLP;
|
||||
bool ghs_HLP;
|
||||
bool ghs_smooth;
|
||||
bool ghs_inv;
|
||||
bool ghsx1;
|
||||
bool ghsy1;
|
||||
bool ghsx2;
|
||||
bool ghsy2;
|
||||
bool ghsx3;
|
||||
bool ghsy3;
|
||||
bool ghsx4;
|
||||
bool ghsy4;
|
||||
bool ghsx5;
|
||||
bool ghsy5;
|
||||
bool ghsx6;
|
||||
bool ghsy6;
|
||||
bool ghsx7;
|
||||
bool ghsy7;
|
||||
bool ghsx8;
|
||||
bool ghsy8;
|
||||
bool ghsx9;
|
||||
bool ghsy9;
|
||||
bool ghsx10;
|
||||
bool ghsy10;
|
||||
bool ghsx11;
|
||||
bool ghsy11;
|
||||
bool multsh[7];
|
||||
bool highlights;
|
||||
bool h_tonalwidth;
|
||||
@ -711,6 +747,7 @@ public:
|
||||
bool nlpat;
|
||||
bool nlrad;
|
||||
bool nlgam;
|
||||
bool nliter;
|
||||
bool sensiden;
|
||||
bool reparden;
|
||||
bool detailthr;
|
||||
|
@ -1749,7 +1749,8 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
|
||||
strend->setValue(pp->wavelet.strend);
|
||||
detend->setValue(pp->wavelet.detend);
|
||||
thrend->setValue(pp->wavelet.thrend);
|
||||
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, 0, 0, 0, 0, 0, 0, false);
|
||||
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,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false);//+4 12 11
|
||||
|
||||
sigm->setValue(pp->wavelet.sigm);
|
||||
levden->setValue(pp->wavelet.levden);
|
||||
@ -2212,7 +2213,8 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->wavelet.chromco = chromco->getValue();
|
||||
double zerox = 0.;
|
||||
double zeroy = 0.;
|
||||
labgrid->getParams(pp->wavelet.labgridALow, pp->wavelet.labgridBLow, pp->wavelet.labgridAHigh, pp->wavelet.labgridBHigh, zerox, zeroy, zerox, zeroy, zerox, zeroy);
|
||||
labgrid->getParams(pp->wavelet.labgridALow, pp->wavelet.labgridBLow, pp->wavelet.labgridAHigh, pp->wavelet.labgridBHigh,
|
||||
zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy, zerox, zeroy);//4 12 11
|
||||
pp->wavelet.labgridALow *= WaveletParams::LABGRID_CORR_MAX;
|
||||
pp->wavelet.labgridAHigh *= WaveletParams::LABGRID_CORR_MAX;
|
||||
pp->wavelet.labgridBLow *= WaveletParams::LABGRID_CORR_MAX;
|
||||
@ -2672,7 +2674,8 @@ 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, 0, 0, 0, 0, 0, 0);
|
||||
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,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);//4 12 11
|
||||
|
||||
greenlow->setDefault(defParams->wavelet.greenlow);
|
||||
bluelow->setDefault(defParams->wavelet.bluelow);
|
||||
|
Loading…
x
Reference in New Issue
Block a user