Re-open Generalized Hyperbolic Stretch (#7251)

* 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

* Change tooltips

* Midtones after GHS

* Modification code WP BP

* Tests changes in settings for transition and Shape detection - see Preferences

* Change order labels luma chroma hue

* Fixed bad behavior localllistener denchanged in dcrop.cc

* Save work

* Work on graduated filter

* Improve a little graduated filter SH and others...

* 3 configurations tests graduated filter SH plain image - color more sk - exposure normal

* Forgotten code ...

* Change improccordinator parameter

* Save work printf parameters GF

* New test for GF

* Hide plain image calculation GF

* Small chnages and comment code

* Change tooltip exp graduated filter

* Change tooltip exp graduated filter

* Save work

* Change GF for some tools only in Global and Fullimage - test for GF SH mode plain image

* Fixed crash and GUI part 1

* Others change GF

* Change label - allow GF plain image in SH

* Change GF with cx cy sk

* Adapt locallabtool and locallabtools2 to GF

* Clean code

* GF wavelet only in fullimage and global

* GF - Empirical correction to cx and cy in function of sk

* Change label GHS and position in GUI

* Fixed Black point bad behavior history - an oversight may be age

* Change real strength of GF - to look like GF main

* Include ksk - Skip correction in all code GF

* Passed other parameters to try

* New parameter for GF

* Change position graph-curv ghs and labels black and white point

* Change behavior and default value white point

* Save provisory work

* Save provisory work

* Curve GHS with 21 points including 0 and 1

* Two prameters added to change behavior GF - rationalize their using

* Change Black point direction

* Change range black-point for negatives values - chnage tooltips

* Change tooltips

* Various change to avoid crash and settings defaults

* Disabled showmùaskmethod - set max white point to 5

* Fixed bad behavior when change fullimage to global for mask

* Clean comment code

* Fixed - I hope - bad behavior when we go from Fullimage to Global and vice versa

* Fixed crash in output tif and show time to calculate WP and BP

* Change tooltip BP and WP

* Change tooltips BP WP

* move GF after GHS so as not to influence BP and WP

* Clean code

* Disable all mask and modifications in Global but remain active in fullimage and normal

* Change tooltip graduated filter

* Restore GF in normal mode - and increases GF strength as before

* Clean code locallabtools 1 2

* Comment in calclocalGradientParams in iplocallab for changes in Graduated F

* Change convention labels - tooltips

* Change tooltips

* improves (I hope) the readability of the tooltips

* Remove with comment change complexity in Settings

* Improve settings BP WP - improve tooltips

* Refactor GHS curve and increase resolution

Simplify how the curve parameters are passed to the drawing area.

Use up to 400 line segments to draw the curve.

* Update GHS curve tooltip

Remove statement regarding the number of points used because it is no
longer accurate.

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Change Luma with Lightness

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Update rtdata/languages/default

Co-authored-by: Lawrence37 <45837045+Lawrence37@users.noreply.github.com>

* Remove warnings in icmpanel

* Changes suggested by Lawrence37

* GHS - Hide inverse always show in some cases - improve tooltip BP WP

* Change tooltip

* Change tooltip

* Small changes

* Change tootip suggested by Lawrence37 - set midtones and LC set_sensitive in function of D

* Add tooltip as suggest by Lawrence37 for LC and midtones

* Remove tooltip on Frame LC and Midtones

* Remove all traces toottips frame LD and Midtones

* set sensitive BLP and HLP to false if stretch = 0

* Change Beep6581 to Rawtherapee in appimage.yml and Windows.yml

* Hide LC and midtones when Stretch = 0

* Clean up Generalized Hyperbolic Stretch code

Convert some ints into enum classes.

Replace new/delete with std::unique_ptr for image.

Remove unused GHS parameters in ProcParams and ParamsEdited which were
used to draw the curve.

Revert changes to the curve editors because they are not needed.

Simplify the drawing of the curve background for efficiency.

Restore the const-ness of some variables.

* Change appimage.yml and windows.yml

---------

Co-authored-by: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com>
This commit is contained in:
Desmis 2025-03-29 18:07:58 +01:00 committed by GitHub
parent 75c04bdd1d
commit 82129b304d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 2700 additions and 496 deletions

View File

@ -887,7 +887,7 @@ HISTORY_MSG_641;Local - Use SH mask
HISTORY_MSG_642;Local - radius SH HISTORY_MSG_642;Local - radius SH
HISTORY_MSG_643;Local - Blur SH HISTORY_MSG_643;Local - Blur SH
HISTORY_MSG_644;Local - inverse SH HISTORY_MSG_644;Local - inverse SH
HISTORY_MSG_645;Local - SD - ab-L balance HISTORY_MSG_645;Local - SD - Lightness-chroma balance
HISTORY_MSG_646;Local - Exp mask chroma HISTORY_MSG_646;Local - Exp mask chroma
HISTORY_MSG_647;Local - Exp mask gamma HISTORY_MSG_647;Local - Exp mask gamma
HISTORY_MSG_648;Local - Exp mask slope HISTORY_MSG_648;Local - Exp mask slope
@ -1101,7 +1101,7 @@ HISTORY_MSG_863;Local - Wavelet merge original image
HISTORY_MSG_864;Local - Wavelet dir contrast attenuation HISTORY_MSG_864;Local - Wavelet dir contrast attenuation
HISTORY_MSG_865;Local - Wavelet dir contrast delta HISTORY_MSG_865;Local - Wavelet dir contrast delta
HISTORY_MSG_866;Local - Wavelet dir compression HISTORY_MSG_866;Local - Wavelet dir compression
HISTORY_MSG_868;Local - SD - C-H balance HISTORY_MSG_868;Local - SD - Hue-Chroma balance
HISTORY_MSG_869;Local - Denoise by level HISTORY_MSG_869;Local - Denoise by level
HISTORY_MSG_870;Local - Wavelet mask curve H HISTORY_MSG_870;Local - Wavelet mask curve H
HISTORY_MSG_871;Local - Wavelet mask curve C HISTORY_MSG_871;Local - Wavelet mask curve C
@ -1568,12 +1568,27 @@ HISTORY_MSG_LOCAL_FEATHERVIB;Local - Vib Gradient feather
HISTORY_MSG_LOCAL_FEATHERWAV;Local - Wav Gradient feather HISTORY_MSG_LOCAL_FEATHERWAV;Local - Wav Gradient feather
HISTORY_MSG_LOCAL_GAMUTMUNSEL;Local - SC - Avoid Color Shift HISTORY_MSG_LOCAL_GAMUTMUNSEL;Local - SC - Avoid Color Shift
HISTORY_MSG_LOCAL_LOGCIE12;Local - CIECAM - Log encoding HISTORY_MSG_LOCAL_LOGCIE12;Local - CIECAM - Log encoding
HISTORY_MSG_LOCAL_GHSMETHOD;Local - GHS - Method
HISTORY_MSG_LOCAL_GHS_D;Local - GHS - Stretch 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_MID;Local - GHS - Midtones
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_BLACKS;Local - Log Blacks distribution
HISTORY_MSG_LOCAL_LOG_COMPR;Local - Log Compress brightness HISTORY_MSG_LOCAL_LOG_COMPR;Local - Log Compress brightness
HISTORY_MSG_LOCAL_LOG_SAT;Local - Log Saturation control HISTORY_MSG_LOCAL_LOG_SAT;Local - Log Saturation control
HISTORY_MSG_LOCAL_LOG_WHITES;Local - Log Whites distribution HISTORY_MSG_LOCAL_LOG_WHITES;Local - Log Whites distribution
HISTORY_MSG_LOCAL_OFFSETWAV;Local Wav offset HISTORY_MSG_LOCAL_OFFSETWAV;Local Wav offset
HISTORY_MSG_LOCAL_PROCESSWAV;Local - Wavelets - Show modifications HISTORY_MSG_LOCAL_PROCESSWAV;Local - Wavelets - Show modifications
HISTORY_MSG_LOCAL_NLITER;Local - Nlmeans - Iterations
HISTORY_MSG_LOCAL_QJMETHOD;Local - CIECAM Tone mapping operator Q and J HISTORY_MSG_LOCAL_QJMETHOD;Local - CIECAM Tone mapping operator Q and J
HISTORY_MSG_LOCAL_SIGBLCIE;Local - CIECAM Blend 5.11 HISTORY_MSG_LOCAL_SIGBLCIE;Local - CIECAM Blend 5.11
HISTORY_MSG_LOCAL_SIGDACIE;Local - CIECAM Contrast 5.11 HISTORY_MSG_LOCAL_SIGDACIE;Local - CIECAM Contrast 5.11
@ -2989,7 +3004,7 @@ TP_LOCALLAB_ACTIV;Luminance only
TP_LOCALLAB_ACTIVSPOT;Enable Spot TP_LOCALLAB_ACTIVSPOT;Enable Spot
TP_LOCALLAB_ADJ;Equalizer Color TP_LOCALLAB_ADJ;Equalizer Color
TP_LOCALLAB_AMOUNT;Amount TP_LOCALLAB_AMOUNT;Amount
TP_LOCALLAB_ARTIF;Shape detection TP_LOCALLAB_ARTIF;ΔE Shape detection
TP_LOCALLAB_ARTIF_TOOLTIP;ΔE scope threshold increases the range of ΔE scope. High values are for very wide gamut images.\nIncreasing ΔE decay can improve shape detection, but can also reduce the scope. TP_LOCALLAB_ARTIF_TOOLTIP;ΔE scope threshold increases the range of ΔE scope. High values are for very wide gamut images.\nIncreasing ΔE decay can improve shape detection, but can also reduce the scope.
TP_LOCALLAB_AUTOGRAY;Auto mean luminance (Yb%) TP_LOCALLAB_AUTOGRAY;Auto mean luminance (Yb%)
TP_LOCALLAB_AUTOGRAYCIE;Automatic TP_LOCALLAB_AUTOGRAYCIE;Automatic
@ -2999,9 +3014,9 @@ TP_LOCALLAB_AVOIDMUN;Munsell correction only
TP_LOCALLAB_AVOIDMUN_TOOLTIP;Munsell correction always disabled when Jz or CAM16 is used. TP_LOCALLAB_AVOIDMUN_TOOLTIP;Munsell correction always disabled when Jz or CAM16 is used.
TP_LOCALLAB_AVOIDNEG;Pre-filter zero and negative values TP_LOCALLAB_AVOIDNEG;Pre-filter zero and negative values
TP_LOCALLAB_AVOIDRAD;Soft radius TP_LOCALLAB_AVOIDRAD;Soft radius
TP_LOCALLAB_BALAN;ab-L balance (ΔE) TP_LOCALLAB_BALAN;Lightness-Chroma balance
TP_LOCALLAB_BALANEXP;Laplacian balance TP_LOCALLAB_BALANEXP;Laplacian balance
TP_LOCALLAB_BALANH;C-H balance (ΔE) TP_LOCALLAB_BALANH;Hue-Chroma balance
TP_LOCALLAB_BALAN_TOOLTIP;Changes the ΔE algorithm parameters.\nTakes into account more or less a*b* or L*, or more or less C or H.\nNot for Denoise. TP_LOCALLAB_BALAN_TOOLTIP;Changes the ΔE algorithm parameters.\nTakes into account more or less a*b* or L*, or more or less C or H.\nNot for Denoise.
TP_LOCALLAB_BASELOG;Shadows range (logarithm base) TP_LOCALLAB_BASELOG;Shadows range (logarithm base)
TP_LOCALLAB_BILATERAL;Bilateral filter TP_LOCALLAB_BILATERAL;Bilateral filter
@ -3209,12 +3224,12 @@ TP_LOCALLAB_EXPCHROMA_TOOLTIP;Use in association with 'Exposure compensation f'
TP_LOCALLAB_EXPCOLOR_TOOLTIP;Adjust color, lightness, contrast and correct small defects such as red-eye, sensor dust etc. TP_LOCALLAB_EXPCOLOR_TOOLTIP;Adjust color, lightness, contrast and correct small defects such as red-eye, sensor dust etc.
TP_LOCALLAB_EXPCOMP;Exposure compensation ƒ TP_LOCALLAB_EXPCOMP;Exposure compensation ƒ
TP_LOCALLAB_EXPCOMPINV;Exposure compensation TP_LOCALLAB_EXPCOMPINV;Exposure compensation
TP_LOCALLAB_EXPCOMP_TOOLTIP;For portraits or images with a low color gradient. You can change 'Shape detection' in 'Settings':\n\nIncrease 'ΔE scope threshold'\nReduce 'ΔE decay'\nIncrease 'ab-L balance (ΔE)' TP_LOCALLAB_EXPCOMP_TOOLTIP;For portraits or images with a low color gradient. You can change 'Shape detection' in 'Settings':\n\nIncrease 'ΔE scope threshold'\nReduce 'ΔE decay'\nIncrease 'Lightness-chroma balance (ΔE)'
TP_LOCALLAB_EXPCONTRASTPYR_TOOLTIP;See the documentation for Wavelet Levels.\nThere are some differences in the Selective Editing version, which has more tools and more possibilities for working on individual detail levels.\nE.g. wavelet-level tone mapping. TP_LOCALLAB_EXPCONTRASTPYR_TOOLTIP;See the documentation for Wavelet Levels.\nThere are some differences in the Selective Editing version, which has more tools and more possibilities for working on individual detail levels.\nE.g. wavelet-level tone mapping.
TP_LOCALLAB_EXPCONTRAST_TOOLTIP;Avoid spots that are too small ( < 32x32 pixels).\nUse low 'Transition value' and high 'Transition decay' and 'Scope' to simulate small spots and deal with defects.\nUse 'Clarity and Sharp mask and Blend and Soften Images' if necessary by adjusting 'Soft radius' to reduce artifacts. TP_LOCALLAB_EXPCONTRAST_TOOLTIP;Avoid spots that are too small ( < 32x32 pixels).\nUse low 'Transition value' and high 'Transition decay' and 'Scope' to simulate small spots and deal with defects.\nUse 'Clarity and Sharp mask and Blend and Soften Images' if necessary by adjusting 'Soft radius' to reduce artifacts.
TP_LOCALLAB_EXPCURV;Curves TP_LOCALLAB_EXPCURV;Curves
TP_LOCALLAB_EXPGRAD;Graduated Filter TP_LOCALLAB_EXPGRAD;Graduated Filter
TP_LOCALLAB_EXPGRADCOL_TOOLTIP;A graduated filter is available in Color and Light (luminance, chrominance &amp; hue gradients, and 'Merge file'), Exposure (luminance grad.), Exposure Mask (luminance grad.), Shadows/Highlights (luminance grad.), Vibrance (luminance, chrominance &amp; hue gradients), Local contrast &amp; wavelet pyramid (local contrast grad.).\nFeather is located in Settings. TP_LOCALLAB_EXPGRADCOL_TOOLTIP;A graduated filter is available in Color & Light (luminance, chrominance & hue gradients, and 'Merge file'), Exposure (luminance gradient), Exposure Mask (luminance gradient), Shadows/Highlights (luminance gradient), Vibrance (luminance, chrominance & hue gradients), Local contrast & wavelet pyramid (local contrast gradient).\nThe graduated filter preview is only accurate when the image is viewed in fit-to-screen mode.\n\nThe graduated filter is only available in Full image or Global mode.
TP_LOCALLAB_EXPLAPBAL_TOOLTIP;Changes the transformed/original image blend. TP_LOCALLAB_EXPLAPBAL_TOOLTIP;Changes the transformed/original image blend.
TP_LOCALLAB_EXPLAPGAMM_TOOLTIP;Changes the behaviour for images with too much or too little contrast by adding a gamma curve before and after the Laplace transform. TP_LOCALLAB_EXPLAPGAMM_TOOLTIP;Changes the behaviour for images with too much or too little contrast by adding a gamma curve before and after the Laplace transform.
TP_LOCALLAB_EXPLAPLIN_TOOLTIP;Changes the behaviour for underexposed images by adding a linear component prior to applying the Laplace transform. TP_LOCALLAB_EXPLAPLIN_TOOLTIP;Changes the behaviour for underexposed images by adding a linear component prior to applying the Laplace transform.
@ -3259,6 +3274,51 @@ TP_LOCALLAB_GAMUTNON;None
TP_LOCALLAB_GAMUTXYZABSO;XYZ Absolute TP_LOCALLAB_GAMUTXYZABSO;XYZ Absolute
TP_LOCALLAB_GAMUTXYZRELA;XYZ Relative TP_LOCALLAB_GAMUTXYZRELA;XYZ Relative
TP_LOCALLAB_GAMW;Gamma (wavelet pyramids) TP_LOCALLAB_GAMW;Gamma (wavelet pyramids)
TP_LOCALLAB_GHSBPWP;Clipped pixel count - Shadows:%1 Highlights:%2
TP_LOCALLAB_GHSBPWPVALUE;Pixel values - Darkest:%1 Lightest:%2
TP_LOCALLAB_GHS_GHSDIAG;GHS Curve Visualization
TP_LOCALLAB_GHS_SIMUL_TOOLTIP;Gives a representation of the GHS function.
TP_LOCALLAB_GHSRGBLUM;RGB Luminance
TP_LOCALLAB_GHSRGBSTD;RGB Standard
TP_LOCALLAB_GHSLAB;Lightness & 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;Stretch Regularization & Midtones
TP_LOCALLAB_GHS_LC_TOOLTIP;Slightly increases local contrast that was weakened by stretching.\nCan be completed by other tools specific to local contrast such as wavelets.\n\nWhen Stretch factor is 0.002 or less, Stretch Regularization & Midtones is disabled.
TP_LOCALLAB_GHS_MID;Midtones
TP_LOCALLAB_GHS_MID_TOOLTIP;Adjusts midtone balance after GHS transformation.\n Can be used to rebalance the midtones of the image after stretching.\n\nWhen Stretch factor is 0.002 or less, Stretch Regularization & Midtones is disabled
TP_LOCALLAB_GHS_BPFRAME_TOOLTIP;Sets the Black point (BP linear), White point (WP linear) and Highlight for a linear stretch of the image.\n\n * Black Point (BP linear) and White Point (WP linear) settings are only available if Stretch factor (D) is between 0.001 and 0.002 so as to not affect the histogram.\n\n * When Stretch factor is 0.002 or less, all stretch settings except for Black point and White point have no effect.\n\n * Black point (BP linear) and White point (WP linear) settings are sensitive to the general settings upstream of GHS: Highlight reconstruction, White balance and RAW processes.\n\n * To have relevant Black Point (BP linear) and White Point (WP linear) settings, the entire image must be analyzed. It is recommended to use 'Fit whole image to screen - Shortcut Alt-f'.
TP_LOCALLAB_GHS_BLACKPOINT_FRAME;Black point/White point/Highlights
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 negatives slider values, in GHS normal, shadows are raised linearly to avoid excessive noise build-up and facilitate GHS work.\n * For positives 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.\n * Contrast gained by performing the linear stretch will be evenly distributed over the image.\n\n * You can adjust a linear black point offset to either:\n - account for noise in the deep shadows.\n - adjust the histogram.\n\n * It is recommended to adjust these sliders before the main GHS sliders to avoid clipping data. A very low Stretch factor (D) value (0.001 by default) is recommended for performing this adjustment.\n * The label 'Clipped pixel count Shadows:x Highlights=y' shows you the number of pixels that would be clipped without adjusting the two sliders.\n * The label Pixel values - Darkest:w Lightest:z shows you the minimum and maximum values in the range [0, 1].\n\n * In Inverse GHS mode the behavior is reversed 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 generalized hyperbolic equations used in the GHS process have five main 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 image dynamic range.\n * Adjustment of pixel data in RGB Luminance, RGB standard, Luminance - chromaticity (Lab/Lch), Luminance (HSL), Saturation (HSL), or Hue (HSL) channels.\n\n * For a better results, 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 histogram peak 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 limit the effect to specific colors 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 White point 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 * The 'Highlight reconstruction' method has a very strong impact on the White-point value.\n\n * It is recommended to adjust this slider before the main GHS sliders to avoid clipping data. A very low Stretch factor (D) value (0.001 by default) is recommended for performing this adjustment.\n * The label 'Clipped pixel count - Shadows:x Highlights=y' shows you the number of pixels that would be clipped without adjusting the two sliders.\n * The label Pixel values - Darkest:w Lightest:z shows you the minimum and maximum values in the range [0, 1].\n\n * In Inverse GHS mode the behavior is 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. In other words, the transformation is the identity transformation.\n\n * Black Point (BP linear) and White Point (WP linear) settings are only available if Stretch factor (D) is between 0.001 and 0.002.
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, i.e. 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;The default value of 0.015 is suitable for the majority of images.\n * This is the key balance value of the GHS system.\n * Sets 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 overall 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 at least 0 and no greater than the Symmetry point.\n * The adjuster will automatically limit the maximum value to the Symmetry Point (SP).\n\n * Using Black point - negative values - when possible, allows to change both the value of Symmetry point (SP) and the action of Protect shadows (LP).
TP_LOCALLAB_GHS_HP_TOOLTIP;Sets a value above which the stretch is modified to preserve contrast in the highlights. 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 overall 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 at most 1 and no less than the Symmetry point.\n * The adjuster will automatically limits the maximum value to the Symmetry Point (SP).\n\n * Using Highlight attenuation helps to reinforce the action of Protect highlights (HP).
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 * The curve only reacts to the adjusters and cannot be modified directly.
TP_LOCALLAB_GHS_INV;Inverse GHS
TP_LOCALLAB_GHS_INV_TOOLTIP;The inverse GHS is useful for working in negative space. It adds contrast on the far right and left of the histogram, brightening the deep shadows, darkening the bright highlights, and squeezing the histogram to the middle.\n\n * The Generalized Hyperbolic inverse transformation allows you to recover your original image, subject to mathematical precision, but you can use it for other purposes.\n\n * If the White point and Black point were changed in normal mode, they will likely need to be readjusted. The White point often needs to be readjusted lower. There is interaction between the two settings.
TP_LOCALLAB_GRADANG;Gradient angle TP_LOCALLAB_GRADANG;Gradient angle
TP_LOCALLAB_GRADANG_TOOLTIP;Rotation angle in degrees: -180 0 +180. TP_LOCALLAB_GRADANG_TOOLTIP;Rotation angle in degrees: -180 0 +180.
TP_LOCALLAB_GRADFRA;Graduated Filter Mask TP_LOCALLAB_GRADFRA;Graduated Filter Mask
@ -3274,7 +3334,7 @@ TP_LOCALLAB_GRADSTRLUM;Luma gradient strength
TP_LOCALLAB_GRAINFRA;Film Grain 1:1 TP_LOCALLAB_GRAINFRA;Film Grain 1:1
TP_LOCALLAB_GRAINFRA2;Coarseness TP_LOCALLAB_GRAINFRA2;Coarseness
TP_LOCALLAB_GRAIN_TOOLTIP;Adds film-like grain to the image. TP_LOCALLAB_GRAIN_TOOLTIP;Adds film-like grain to the image.
TP_LOCALLAB_GRALWFRA;Graduated filter (local contrast) TP_LOCALLAB_GRALWFRA;Graduated filter (local contrast: Full image & Global)
TP_LOCALLAB_GRIDFRAME_TOOLTIP;You can use this tool as a brush. Use a small spot and adapt the 'Transition value' and 'Transition decay'\nOnly 'Normal' mode and possibly Hue, Saturation, Color, Luminosity are concerned by Merge background (ΔE). TP_LOCALLAB_GRIDFRAME_TOOLTIP;You can use this tool as a brush. Use a small spot and adapt the 'Transition value' and 'Transition decay'\nOnly 'Normal' mode and possibly Hue, Saturation, Color, Luminosity are concerned by Merge background (ΔE).
TP_LOCALLAB_GRIDMETH_TOOLTIP;Color toning: the luminance is taken into account when varying chroma. Equivalent to H=f(H) if the 'white dot' on the grid remains at zero and you only vary the 'black dot'. Equivalent to 'Color toning' if you vary the 2 dots.\n\nDirect: acts directly on the chroma. TP_LOCALLAB_GRIDMETH_TOOLTIP;Color toning: the luminance is taken into account when varying chroma. Equivalent to H=f(H) if the 'white dot' on the grid remains at zero and you only vary the 'black dot'. Equivalent to 'Color toning' if you vary the 2 dots.\n\nDirect: acts directly on the chroma.
TP_LOCALLAB_GRIDONE;Color Toning TP_LOCALLAB_GRIDONE;Color Toning
@ -3520,6 +3580,7 @@ TP_LOCALLAB_MRONE;None
TP_LOCALLAB_MRTHR;Original Image 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_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_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_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_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. TP_LOCALLAB_NLDENOISENLRAD_TOOLTIP;Higher values increase denoise at the expense of processing time.
@ -3528,6 +3589,7 @@ TP_LOCALLAB_NLDET;Detail recovery
TP_LOCALLAB_NLFRA;Non-local Means: Luminance 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_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_NLGAM;Gamma
TP_LOCALLAB_NLITER;Iterations
TP_LOCALLAB_NLLUM;Strength TP_LOCALLAB_NLLUM;Strength
TP_LOCALLAB_NLPAT;Maximum patch size TP_LOCALLAB_NLPAT;Maximum patch size
TP_LOCALLAB_NLRAD;Maximum radius size TP_LOCALLAB_NLRAD;Maximum radius size
@ -3635,12 +3697,13 @@ TP_LOCALLAB_SENSI_TOOLTIP;Adjusts the scope of the action:\nSmall values limit t
TP_LOCALLAB_SETTINGS;Settings TP_LOCALLAB_SETTINGS;Settings
TP_LOCALLAB_SH1;Shadows Highlights TP_LOCALLAB_SH1;Shadows Highlights
TP_LOCALLAB_SH2;Equalizer TP_LOCALLAB_SH2;Equalizer
TP_LOCALLAB_SH3;Generalized Hyperbolic Stretch
TP_LOCALLAB_SHADEX;Shadows TP_LOCALLAB_SHADEX;Shadows
TP_LOCALLAB_SHADEXCOMP;Shadow compression 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_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_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 &amp; 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. TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP;Adjust shadows and highlights either with 'Shadows Highlights' sliders, 'Tone Equalizer', or 'Generalized Hyperbolic Stretch' (GHS).\nCan be used instead of, or in conjunction with the Exposure module, or for GHS as a tone mapper.
TP_LOCALLAB_SHAMASKCOL;Shadows TP_LOCALLAB_SHAMASKCOL;Shadows
TP_LOCALLAB_SHAPETYPE;Spot shape TP_LOCALLAB_SHAPETYPE;Spot shape
TP_LOCALLAB_SHAPE_TOOLTIP;'Ellipse' is the normal mode.\n 'Rectangle' can be used in certain cases, for example to work in full-image mode by placing the delimiters outside the preview area. In this case, set transition = 100.\n\nFuture developments will include polygon shapes and Bezier curves. TP_LOCALLAB_SHAPE_TOOLTIP;'Ellipse' is the normal mode.\n 'Rectangle' can be used in certain cases, for example to work in full-image mode by placing the delimiters outside the preview area. In this case, set transition = 100.\n\nFuture developments will include polygon shapes and Bezier curves.
@ -3685,7 +3748,7 @@ TP_LOCALLAB_SHOWT;Mask And Modifications
TP_LOCALLAB_SHOWVI;Mask And Modifications TP_LOCALLAB_SHOWVI;Mask And Modifications
TP_LOCALLAB_SHRESFRA;Shadows/Highlights & TRC 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_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_SIGBLACKSSCIE;Blacks distribution
TP_LOCALLAB_SIGCIE;Sigmoid TP_LOCALLAB_SIGCIE;Sigmoid
TP_LOCALLAB_SIGFRA;Sigmoid Q & Slope based TP_LOCALLAB_SIGFRA;Sigmoid Q & Slope based
@ -3776,7 +3839,7 @@ TP_LOCALLAB_SYMSL;Symmetrical (mouse + sliders)
TP_LOCALLAB_TARGET_GRAY;Mean luminance (Yb%) TP_LOCALLAB_TARGET_GRAY;Mean luminance (Yb%)
TP_LOCALLAB_TE_PIVOT;Pivot (Ev) TP_LOCALLAB_TE_PIVOT;Pivot (Ev)
TP_LOCALLAB_THRES;Threshold structure TP_LOCALLAB_THRES;Threshold structure
TP_LOCALLAB_THRESDELTAE;ΔE scope threshold TP_LOCALLAB_THRESDELTAE;Range
TP_LOCALLAB_THRESRETI;Threshold TP_LOCALLAB_THRESRETI;Threshold
TP_LOCALLAB_THRESWAV;Balance threshold TP_LOCALLAB_THRESWAV;Balance threshold
TP_LOCALLAB_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sig=%4 TP_LOCALLAB_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sig=%4
@ -3795,10 +3858,10 @@ TP_LOCALLAB_TOOLMASK;Mask Tools
TP_LOCALLAB_TOOLMASK_2;Wavelets TP_LOCALLAB_TOOLMASK_2;Wavelets
TP_LOCALLAB_TOOLMASK_TOOLTIP;Structure mask (slider) with the checkbox 'Structure mask as tool' checked: in this case a mask showing the structure will be generated after one or more of the 2 curves L(L) or LC(H) has been modified.\n Here, the 'Structure mask' behaves like the other Mask tools : Gamma, Slope, etc.\n It allows you to vary the action on the mask according to the structure of the image. TP_LOCALLAB_TOOLMASK_TOOLTIP;Structure mask (slider) with the checkbox 'Structure mask as tool' checked: in this case a mask showing the structure will be generated after one or more of the 2 curves L(L) or LC(H) has been modified.\n Here, the 'Structure mask' behaves like the other Mask tools : Gamma, Slope, etc.\n It allows you to vary the action on the mask according to the structure of the image.
TP_LOCALLAB_TRANSIT;Transition Gradient TP_LOCALLAB_TRANSIT;Transition Gradient
TP_LOCALLAB_TRANSITGRAD;Transition differentiation XY TP_LOCALLAB_TRANSITGRAD;Symmetry X & Y
TP_LOCALLAB_TRANSITGRAD_TOOLTIP;Allows you to vary the y-axis transition. TP_LOCALLAB_TRANSITGRAD_TOOLTIP;Allows you to vary the y-axis transition.
TP_LOCALLAB_TRANSITVALUE;Transition value TP_LOCALLAB_TRANSITVALUE;Value
TP_LOCALLAB_TRANSITWEAK;Transition decay (linear-log) TP_LOCALLAB_TRANSITWEAK;Decay (linear-log)
TP_LOCALLAB_TRANSITWEAK_TOOLTIP;Adjust transition decay function: 1 linear , 2 parabolic, 3 cubic up to ^25.\nCan be used in conjunction with very low transition values to reduce defects (CBDL, Wavelets, Color &amp; Light). TP_LOCALLAB_TRANSITWEAK_TOOLTIP;Adjust transition decay function: 1 linear , 2 parabolic, 3 cubic up to ^25.\nCan be used in conjunction with very low transition values to reduce defects (CBDL, Wavelets, Color &amp; Light).
TP_LOCALLAB_TRANSIT_TOOLTIP;Adjust smoothness of transition between affected and unaffected areas as a percentage of the 'radius'. TP_LOCALLAB_TRANSIT_TOOLTIP;Adjust smoothness of transition between affected and unaffected areas as a percentage of the 'radius'.
TP_LOCALLAB_TRANSMISSIONGAIN;Transmission gain TP_LOCALLAB_TRANSMISSIONGAIN;Transmission gain

View File

@ -875,6 +875,7 @@ void Crop::update(int todo)
auto& lmasklocalcurve2 = parent->lmasklocalcurve; auto& lmasklocalcurve2 = parent->lmasklocalcurve;
auto& lmaskexplocalcurve2 = parent->lmaskexplocalcurve; auto& lmaskexplocalcurve2 = parent->lmaskexplocalcurve;
auto& lmaskSHlocalcurve2 = parent->lmaskSHlocalcurve; auto& lmaskSHlocalcurve2 = parent->lmaskSHlocalcurve;
// auto& ghslocalcurve2 = parent->ghslocalcurve;
auto& lmaskviblocalcurve2 = parent->lmaskviblocalcurve; auto& lmaskviblocalcurve2 = parent->lmaskviblocalcurve;
auto& lmasktmlocalcurve2 = parent->lmasktmlocalcurve; auto& lmasktmlocalcurve2 = parent->lmasktmlocalcurve;
auto& lmaskretilocalcurve2 = parent->lmaskretilocalcurve; auto& lmaskretilocalcurve2 = parent->lmaskretilocalcurve;
@ -954,6 +955,8 @@ void Crop::update(int todo)
auto& locwavCurveden = parent->locwavCurveden; auto& locwavCurveden = parent->locwavCurveden;
auto& lmasklocal_curve2 = parent->lmasklocal_curve; auto& lmasklocal_curve2 = parent->lmasklocal_curve;
auto& loclmasCurve_wav = parent->loclmasCurve_wav; auto& loclmasCurve_wav = parent->loclmasCurve_wav;
//big bug found 29//11/2024
std::vector<LocallabListener::locallabDenoiseLC> localldenoiselc;
for (int sp = 0; sp < (int)params.locallab.spots.size(); sp++) { for (int sp = 0; sp < (int)params.locallab.spots.size(); sp++) {
locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve); locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve);
@ -1026,6 +1029,7 @@ void Crop::update(int todo)
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve2, skip); 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 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 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 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 localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve2, skip);
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve2, skip); const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve2, skip);
@ -1050,7 +1054,6 @@ void Crop::update(int todo)
if (black < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) { if (black < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) {
black *= 1.5; black *= 1.5;
} }
std::vector<LocallabListener::locallabDenoiseLC> localldenoiselc;
double cont = params.locallab.spots.at(sp).contrast; double cont = params.locallab.spots.at(sp).contrast;
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre; double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
@ -1094,6 +1097,9 @@ void Crop::update(int todo)
float slopeg = 1.f; float slopeg = 1.f;
bool linkrgb = true; bool linkrgb = true;
float lightsig = params.locallab.spots.at(sp).lightsigqcie; float lightsig = params.locallab.spots.at(sp).lightsigqcie;
int ghsbpwp[2];
float ghsbpwpvalue[2];
/* huerefp[sp] = huere; /* huerefp[sp] = huere;
chromarefp[sp] = chromare; chromarefp[sp] = chromare;
lumarefp[sp] = lumare; lumarefp[sp] = lumare;
@ -1107,7 +1113,7 @@ void Crop::update(int todo)
if (sp == params.locallab.selspot) { 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, lllocalcurve2,locallutili,
cllocalcurve2, localclutili, cllocalcurve2, localclutili,
lclocalcurve2, locallcutili, lclocalcurve2, locallcutili,
@ -1117,6 +1123,7 @@ void Crop::update(int todo)
lmasklocalcurve2, localmaskutili, lmasklocalcurve2, localmaskutili,
lmaskexplocalcurve2, localmaskexputili, lmaskexplocalcurve2, localmaskexputili,
lmaskSHlocalcurve2, localmaskSHutili, lmaskSHlocalcurve2, localmaskSHutili,
// ghslocalcurve2, localghsutili,
lmaskviblocalcurve2, localmaskvibutili, lmaskviblocalcurve2, localmaskvibutili,
lmasktmlocalcurve2, localmasktmutili, lmasktmlocalcurve2, localmasktmutili,
lmaskretilocalcurve2, localmaskretiutili, lmaskretilocalcurve2, localmaskretiutili,
@ -1164,18 +1171,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->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, 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, 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, slopeg, linkrgb); highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46,slopeg, linkrgb,
ghsbpwp, ghsbpwpvalue);
LocallabListener::locallabDenoiseLC denoiselc;
denoiselc.highres = highresi;
denoiselc.nres = nresi;
denoiselc.highres46 = highresi46;
denoiselc.nres46 = nresi46;
denoiselc.Lhighres = Lhighresi;
denoiselc.Lnres = Lnresi;
denoiselc.Lhighres46 = Lhighresi46;
denoiselc.Lnres46 = Lnresi46;
localldenoiselc.push_back(denoiselc);
if (parent->previewDeltaE || parent->locallColorMask == 5 || parent->locallvibMask == 4 || parent->locallExpMask == 5 || parent->locallSHMask == 4 || parent->localllcMask == 4 || parent->localltmMask == 4 || parent->localllogMask == 4 || parent->locallsoftMask == 6 || parent->localllcMask == 4 || parent->locallcieMask == 4) { if (parent->previewDeltaE || parent->locallColorMask == 5 || parent->locallvibMask == 4 || parent->locallExpMask == 5 || parent->locallSHMask == 4 || parent->localllcMask == 4 || parent->localltmMask == 4 || parent->localllogMask == 4 || parent->locallsoftMask == 6 || parent->localllcMask == 4 || parent->locallcieMask == 4) {
params.blackwhite.enabled = false; params.blackwhite.enabled = false;
@ -1206,23 +1204,8 @@ void Crop::update(int todo)
} }
*/ */
denoiselc.highres = highresi;
denoiselc.nres = nresi;
denoiselc.highres46 = highresi46;
denoiselc.nres46 = nresi46;
denoiselc.Lhighres = Lhighresi;
denoiselc.Lnres = Lnresi;
denoiselc.Lhighres46 = Lhighresi46;
denoiselc.Lnres46 = Lnresi46;
localldenoiselc.push_back(denoiselc);
if (parent->locallListener) {
parent->locallListener->denChanged(localldenoiselc, params.locallab.selspot);
}
} else { } 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, lllocalcurve2,locallutili,
cllocalcurve2, localclutili, cllocalcurve2, localclutili,
lclocalcurve2, locallcutili, lclocalcurve2, locallcutili,
@ -1231,6 +1214,7 @@ void Crop::update(int todo)
lmasklocalcurve2, localmaskutili, lmasklocalcurve2, localmaskutili,
lmaskexplocalcurve2, localmaskexputili, lmaskexplocalcurve2, localmaskexputili,
lmaskSHlocalcurve2, localmaskSHutili, lmaskSHlocalcurve2, localmaskSHutili,
// ghslocalcurve2, localghsutili,
lmaskviblocalcurve2, localmaskvibutili, lmaskviblocalcurve2, localmaskvibutili,
lmasktmlocalcurve2, localmasktmutili, lmasktmlocalcurve2, localmasktmutili,
lmaskretilocalcurve2, localmaskretiutili, lmaskretilocalcurve2, localmaskretiutili,
@ -1277,8 +1261,25 @@ 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, 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, 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, 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, slopeg, linkrgb); highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46,slopeg, linkrgb,
ghsbpwp, ghsbpwpvalue);
} }
LocallabListener::locallabDenoiseLC denoiselc;
denoiselc.highres = highresi;
denoiselc.nres = nresi;
denoiselc.highres46 = highresi46;
denoiselc.nres46 = nresi46;
denoiselc.Lhighres = Lhighresi;
denoiselc.Lnres = Lnresi;
denoiselc.Lhighres46 = Lhighresi46;
denoiselc.Lnres46 = Lnresi46;
localldenoiselc.push_back(denoiselc);
if (parent->locallListener) {
parent->locallListener->denChanged(localldenoiselc, params.locallab.selspot);
}
if (sp + 1u < params.locallab.spots.size()) { if (sp + 1u < params.locallab.spots.size()) {

View File

@ -211,6 +211,7 @@ ImProcCoordinator::ImProcCoordinator() :
lmasklocalcurve(65536, LUT_CLIP_OFF), lmasklocalcurve(65536, LUT_CLIP_OFF),
lmaskexplocalcurve(65536, LUT_CLIP_OFF), lmaskexplocalcurve(65536, LUT_CLIP_OFF),
lmaskSHlocalcurve(65536, LUT_CLIP_OFF), lmaskSHlocalcurve(65536, LUT_CLIP_OFF),
ghslocalcurve(65536, LUT_CLIP_OFF),
lmaskviblocalcurve(65536, LUT_CLIP_OFF), lmaskviblocalcurve(65536, LUT_CLIP_OFF),
lmasktmlocalcurve(65536, LUT_CLIP_OFF), lmasktmlocalcurve(65536, LUT_CLIP_OFF),
lmaskretilocalcurve(65536, LUT_CLIP_OFF), lmaskretilocalcurve(65536, LUT_CLIP_OFF),
@ -1151,6 +1152,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
//std::vector<LocallabListener::locallabRef> locallref; //std::vector<LocallabListener::locallabRef> locallref;
std::vector<LocallabListener::locallabRetiMinMax> locallretiminmax; std::vector<LocallabListener::locallabRetiMinMax> locallretiminmax;
std::vector<LocallabListener::locallabcieLC> locallcielc; std::vector<LocallabListener::locallabcieLC> locallcielc;
std::vector<LocallabListener::locallabshGHSbw> locallshgshbw;
std::vector<LocallabListener::locallabsetLC> locallsetlc; std::vector<LocallabListener::locallabsetLC> locallsetlc;
std::vector<LocallabListener::locallabcieSIG> locallciesig; std::vector<LocallabListener::locallabcieSIG> locallciesig;
huerefs.resize(params->locallab.spots.size()); huerefs.resize(params->locallab.spots.size());
@ -1265,6 +1267,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, sca); 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 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 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 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 localmasktmutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, sca);
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, sca); const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, sca);
@ -1398,13 +1401,18 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
float Lnresi = 0.f; float Lnresi = 0.f;
float Lhighresi46 = 0.f; float Lhighresi46 = 0.f;
float Lnresi46 = 0.f; float Lnresi46 = 0.f;
int ghsbpwp[2] = {0, 0};
float ghsbpwpvalue[2] = {0.f, 1.f};
Glib::ustring prof = params->icm.workingProfile; Glib::ustring prof = params->icm.workingProfile;
if(params->locallab.spots.at(sp).complexcie == 2) { if(params->locallab.spots.at(sp).complexcie == 2) {
params->locallab.spots.at(sp).primMethod = prof;//in Basic mode set to Working profile params->locallab.spots.at(sp).primMethod = prof;//in Basic mode set to Working profile
} }
float slopeg = 1.f; float slopeg = 1.f;
bool linkrgb = true; bool linkrgb = true;
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,
// 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,
lllocalcurve, locallutili, lllocalcurve, locallutili,
cllocalcurve, localclutili, cllocalcurve, localclutili,
lclocalcurve, locallcutili, lclocalcurve, locallcutili,
@ -1413,6 +1421,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
lmasklocalcurve, localmaskutili, lmasklocalcurve, localmaskutili,
lmaskexplocalcurve, localmaskexputili, lmaskexplocalcurve, localmaskexputili,
lmaskSHlocalcurve, localmaskSHutili, lmaskSHlocalcurve, localmaskSHutili,
// ghslocalcurve, localghsutili,
lmaskviblocalcurve, localmaskvibutili, lmaskviblocalcurve, localmaskvibutili,
lmasktmlocalcurve, localmasktmutili, lmasktmlocalcurve, localmasktmutili,
lmaskretilocalcurve, localmaskretiutili, lmaskretilocalcurve, localmaskretiutili,
@ -1459,7 +1468,8 @@ 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, 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, 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, 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, slopeg, linkrgb); highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46, slopeg, linkrgb,
ghsbpwp, ghsbpwpvalue);
fabrefp[sp] = fab; fabrefp[sp] = fab;
@ -1571,6 +1581,13 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
locciesig.lightsigq = lightsig; locciesig.lightsigq = lightsig;
locallciesig.push_back(locciesig); locallciesig.push_back(locciesig);
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 // Recalculate references after
if (params->locallab.spots.at(sp).spotMethod == "exc") { if (params->locallab.spots.at(sp).spotMethod == "exc") {
@ -1611,7 +1628,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
bool iscbdl = params->locallab.spots.at(sp).expcbdl; bool iscbdl = params->locallab.spots.at(sp).expcbdl;
bool islog = params->locallab.spots.at(sp).explog; bool islog = params->locallab.spots.at(sp).explog;
bool ismas = params->locallab.spots.at(sp).expmask; bool ismas = params->locallab.spots.at(sp).expmask;
bool iscie = params->locallab.spots.at(sp).expcie; bool isci = params->locallab.spots.at(sp).expcie;
// bool isset = iscolor || issh || isvib; // bool isset = iscolor || issh || isvib;
//set select spot settings //set select spot settings
@ -1630,7 +1647,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
locsetlc.iscbd = iscbdl; locsetlc.iscbd = iscbdl;
locsetlc.islo = islog; locsetlc.islo = islog;
locsetlc.isma = ismas; locsetlc.isma = ismas;
locsetlc.isci = iscie; locsetlc.isci = isci;
locallsetlc.push_back(locsetlc); locallsetlc.push_back(locsetlc);
if (locallListener) { if (locallListener) {
@ -1640,6 +1657,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
locallListener->cieChanged(locallcielc,params->locallab.selspot); locallListener->cieChanged(locallcielc,params->locallab.selspot);
} }
locallListener->sigChanged(locallciesig,params->locallab.selspot); locallListener->sigChanged(locallciesig,params->locallab.selspot);
if (params->locallab.spots.at(sp).expshadhigh && params->locallab.spots.at(sp).shMethod == "ghs") {
locallListener->ghsbwChanged(locallshgshbw,params->locallab.selspot);//Black and White point
}
/* /*
if(params->locallab.spots.at(sp).colorscope != 0) {//compatibility with old method in controlspotpanel if(params->locallab.spots.at(sp).colorscope != 0) {//compatibility with old method in controlspotpanel
locallListener->scopeChangedcol(scopefp[sp], params->locallab.selspot, iscolor); locallListener->scopeChangedcol(scopefp[sp], params->locallab.selspot, iscolor);
@ -1670,7 +1691,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
//************************************************************* //*************************************************************
} }
if ((todo & M_RGBCURVE) || (todo & M_CROP)) { if ((todo & M_RGBCURVE) || (todo & M_CROP)) {
//complexCurve also calculated pre-curves histogram depending on crop //complexCurve also calculated pre-curves histogram depending on crop
CurveFactory::complexCurve(params->toneCurve.expcomp, params->toneCurve.black / 65535.0, CurveFactory::complexCurve(params->toneCurve.expcomp, params->toneCurve.black / 65535.0,

View File

@ -280,6 +280,7 @@ protected:
LUTf lmasklocalcurve; LUTf lmasklocalcurve;
LUTf lmaskexplocalcurve; LUTf lmaskexplocalcurve;
LUTf lmaskSHlocalcurve; LUTf lmaskSHlocalcurve;
LUTf ghslocalcurve;
LUTf lmaskviblocalcurve; LUTf lmaskviblocalcurve;
LUTf lmasktmlocalcurve; LUTf lmasktmlocalcurve;
LUTf lmaskretilocalcurve; LUTf lmaskretilocalcurve;

View File

@ -107,6 +107,32 @@ struct WaveletParams;
enum RenderingIntent : int; enum RenderingIntent : int;
// From Siril.
struct ght_compute_params {
float qlp;//protect shadows
float q0;
float qwp;//protect highlights - white point
float q1;
float q;
float b1;
float a1;
float a2;
float b2;
float c2;
float d2;
float e2;
float a3;
float b3;
float c3;
float d3;
float e3;
float a4;
float b4;
float LPT;//inverse protect shadow
float SPT;//inverse symmetric point
float HPT;//inverse protect highlight
};
class ImProcFunctions class ImProcFunctions
{ {
cmsHTRANSFORM monitorTransform; cmsHTRANSFORM monitorTransform;
@ -273,7 +299,7 @@ enum class BlurType {
void idirpyr(LabImage* data_coarse, LabImage* data_fine, int level, LUTf &rangefn_L, LUTf & nrwt_l, LUTf & nrwt_ab, 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*/); int pitch, int scale, const int luma, const int chroma/*, LUTf & Lcurve, LUTf & abcurve*/);
//locallab Local adjustments //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, float strumask, bool astool,
const LocCCmaskCurve & locccmasCurve, bool lcmasutili, const LocCCmaskCurve & locccmasCurve, bool lcmasutili,
const LocLLmaskCurve & locllmasCurve, bool llmasutili, const LocLLmaskCurve & locllmasCurve, bool llmasutili,
@ -282,7 +308,7 @@ enum class BlurType {
const LUTf& lmasklocalcurve, bool localmaskutili, const LUTf& lmasklocalcurve, bool localmaskutili,
const LocwavCurve & loclmasCurvecolwav, bool lmasutilicolwav, int level_bl, int level_hl, int level_br, int level_hr, 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, 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, float ksk, float kskx, float kbh, float kbw);
void avoidcolshi(const struct local_params& lp, int sp, LabImage *transformed, LabImage *reserved, int cy, int cx, int sk); void avoidcolshi(const struct local_params& lp, int sp, LabImage *transformed, LabImage *reserved, int cy, int cx, int sk);
@ -332,7 +358,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 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 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 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& lllocalcurve, bool locallutili,
const LUTf& cllocalcurve, bool localclutili, const LUTf& cllocalcurve, bool localclutili,
const LUTf& lclocalcurve, bool locallcutili, const LUTf& lclocalcurve, bool locallcutili,
@ -341,6 +367,7 @@ enum class BlurType {
const LUTf& lmasklocalcurve, bool localmaskutili, const LUTf& lmasklocalcurve, bool localmaskutili,
const LUTf& lmaskexplocalcurve, bool localmaskexputili, const LUTf& lmaskexplocalcurve, bool localmaskexputili,
const LUTf& lmaskSHlocalcurve, bool localmaskSHutili, const LUTf& lmaskSHlocalcurve, bool localmaskSHutili,
// const LUTf& ghslocalcurve, bool localghsutili,
const LUTf& lmaskviblocalcurve, bool localmaskvibutili, const LUTf& lmaskviblocalcurve, bool localmaskvibutili,
const LUTf& lmasktmlocalcurve, bool localmasktmutili, const LUTf& lmasktmlocalcurve, bool localmasktmutili,
LUTf& lmaskretilocalcurve, bool localmaskretiutili, LUTf& lmaskretilocalcurve, bool localmaskretiutili,
@ -389,7 +416,16 @@ 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, 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 &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& 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 &slopeg, bool &linkrgb); float &highresi, float &nresi, float &highresi46, float &nresi46, float &Lhighresi, float &Lnresi, float &Lhighresi46, float &Lnresi46, float &slopeg, bool &linkrgb,
int *ghsbpwp, float *ghsbpwpvalue);
enum class GHTStrType {
NORMAL,
INVERSE,
};
static ght_compute_params GHT_setup(float in_B, float D, float LP, float SP, float HP, GHTStrType strtype);
static float GHT(float x, float B, float D, float LP, float SP, float HP, ght_compute_params c, GHTStrType strtype);
void tone_eqcam2(ImProcFunctions *ipf, Imagefloat *rgb, int whits, int blacks, const Glib::ustring &workingProfile, double scale, bool multithread); 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); void tone_eqdehaz(ImProcFunctions *ipf, Imagefloat *rgb, int whits, int blacks, const Glib::ustring &workingProfile, double scale, bool multithread);
@ -411,13 +447,13 @@ enum class BlurType {
static void strcurv_data(std::string retistr, int *s_datc, int &siz); 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 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 & loclevwavCurve, bool loclevwavutili, bool wavcurvelev,
const LocwavCurve & locconwavCurve, bool locconwavutili, bool wavcurvecon, const LocwavCurve & locconwavCurve, bool locconwavutili, bool wavcurvecon,
const LocwavCurve & loccompwavCurve, bool loccompwavutili, bool wavcurvecomp, const LocwavCurve & loccompwavCurve, bool loccompwavutili, bool wavcurvecomp,
const LocwavCurve & loccomprewavCurve, bool loccomprewavutili, bool wavcurvecompre, const LocwavCurve & loccomprewavCurve, bool loccomprewavutili, bool wavcurvecompre,
const LocwavCurve & locedgwavCurve, bool locedgwavutili, 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, int cx, int cy, float ksk, float kskx, float kbh, float kbw);
void wavcont(const struct local_params& lp, float ** tmp, wavelet_decomposition &wdspot, int level_bl, int maxlvl, void wavcont(const struct local_params& lp, float ** tmp, wavelet_decomposition &wdspot, int level_bl, int maxlvl,
const LocwavCurve & loclevwavCurve, bool loclevwavutili, const LocwavCurve & loclevwavCurve, bool loclevwavutili,
@ -430,7 +466,12 @@ enum class BlurType {
void wavcbd(wavelet_decomposition &wdspot, int level_bl, int maxlvl, void wavcbd(wavelet_decomposition &wdspot, int level_bl, int maxlvl,
const LocwavCurve& locconwavCurve, bool locconwavutili, float sigm, float offs, float chromalev, int sk); const LocwavCurve& locconwavCurve, bool locconwavutili, float sigm, float offs, float chromalev, int sk);
void transit_shapedetect2(int sp, float meantm, float stdtm, int call, int senstype, const LabImage * bufexporig, const LabImage * bufexpfin, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); enum class LocalLabGradientMode {
STANDARD,
PLAIN_IMAGE,
};
void transit_shapedetect2(int sp, float meantm, float stdtm, int call, int senstype, const LabImage * bufexporig, const LabImage * bufexpfin, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, struct local_params & lp, LabImage * original, LabImage * transformed, const LabImage *tmp1, LocalLabGradientMode grad, int cx, int cy, int sk);
void transit_shapedetect_retinex(int call, int senstype, LabImage * bufexporig, LabImage * bufexpfin, LabImage * bufmask, LabImage * buforigmas, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); void transit_shapedetect_retinex(int call, int senstype, LabImage * bufexporig, LabImage * bufexpfin, LabImage * bufmask, LabImage * buforigmas, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
void transit_shapedetect(int senstype, const LabImage *bufexporig, LabImage * originalmask, float **bufchro, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk); void transit_shapedetect(int senstype, const LabImage *bufexporig, LabImage * originalmask, float **bufchro, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);

View File

@ -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 W = src->W;
const int H = src->H; 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_; vfloat x_, y_, z_;
Color::Lab2XYZ(LVFU(rL[j]), LVFU(ra[j]), LVFU(rb[j]), 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); Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzv);
STVF(rbuffer[j], Color::gamma2curve[R]); if(pro == 0) {
STVF(gbuffer[j], Color::gamma2curve[G]); STVF(rbuffer[j], Color::gamma2curve[R]);
STVF(bbuffer[j], Color::gamma2curve[B]); 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) { for (; j < W; ++j) {
@ -99,9 +105,15 @@ inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double r
float x_, y_, z_; float x_, y_, z_;
Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_); Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_);
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf); Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf);
rbuffer[j] = Color::gamma2curve[R]; if(pro == 0) {
gbuffer[j] = Color::gamma2curve[G]; rbuffer[j] = Color::gamma2curve[R];
bbuffer[j] = Color::gamma2curve[B]; 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) { 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_; float x_, y_, z_;
Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_); Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_);
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf); Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf);
if(pro == 0) {
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[R]); dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[R]);
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[G]); dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[G]);
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[B]); 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 #endif
@ -204,7 +221,7 @@ void ImProcFunctions::lab2monitorRgb(LabImage* lab, Image8* image)
} }
} // End of parallelization } // End of parallelization
} else { } 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; Glib::ustring profile;
cmsHPROFILE oprof = nullptr; cmsHPROFILE oprof = nullptr;
int pro = 0;//int pro to switch to Working Profile histogram mode without gamma
if (settings->HistogramWorking && consider_histogram_settings) { if (settings->HistogramWorking && consider_histogram_settings) {
profile = icm.workingProfile; profile = icm.workingProfile;
pro = 1;//no gamma for histogram and navigator panel and Lockable color picker
} else { } else {
profile = icm.outputProfile; profile = icm.outputProfile;
//pro = 0 histogram and navigator panel and Lockable color picker with gamma
if (icm.outputProfile.empty() || icm.outputProfile == ColorManagementParams::NoICMString) { if (icm.outputProfile.empty() || icm.outputProfile == ColorManagementParams::NoICMString) {
profile = "sRGB"; profile = "sRGB";
} }
@ -300,7 +318,7 @@ Image8* ImProcFunctions::lab2rgb(LabImage* lab, int cx, int cy, int cw, int ch,
} else { } else {
const auto xyz_rgb = ICCStore::getInstance()->workingSpaceInverseMatrix(profile); 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; return image;

File diff suppressed because it is too large Load Diff

View File

@ -751,7 +751,6 @@ static void calcGradientParams (int oW, int oH, const GradientParams& gradient,
double gradient_center_y = gradient.centerY / 200.0 + 0.5; double gradient_center_y = gradient.centerY / 200.0 + 0.5;
double gradient_angle = gradient.degree / 180.0 * rtengine::RT_PI; double gradient_angle = gradient.degree / 180.0 * rtengine::RT_PI;
//fprintf(stderr, "%f %f %f %f %f %d %d\n", gradient_stops, gradient_span, gradient_center_x, gradient_center_y, gradient_angle, w, h); //fprintf(stderr, "%f %f %f %f %f %d %d\n", gradient_stops, gradient_span, gradient_center_x, gradient_center_y, gradient_angle, w, h);
// make 0.0 <= gradient_angle < 2 * rtengine::RT_PI // make 0.0 <= gradient_angle < 2 * rtengine::RT_PI
gradient_angle = fmod (gradient_angle, 2 * rtengine::RT_PI); gradient_angle = fmod (gradient_angle, 2 * rtengine::RT_PI);

View File

@ -3687,7 +3687,23 @@ LocallabParams::LocallabSpot::LocallabSpot() :
visishadhigh(false), visishadhigh(false),
expshadhigh(false), expshadhigh(false),
complexshadhigh(0), complexshadhigh(0),
shMethod("tone"), shMethod("ghs"),
ghsMethod("rgb"),
ghsMode("ghs"),
ghs_D(0.001),
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_MID(0.),
ghs_BLP(0.),
ghs_HLP(1.),
ghs_smooth(false),
ghs_inv(false),
multsh{0, 0, 0, 0, 0, 0}, multsh{0, 0, 0, 0, 0, 0},
highlights(0), highlights(0),
h_tonalwidth(70), h_tonalwidth(70),
@ -3841,8 +3857,11 @@ LocallabParams::LocallabSpot::LocallabSpot() :
strvib(0.0), strvib(0.0),
strvibab(0.0), strvibab(0.0),
strvibh(0.0), strvibh(0.0),
angvib(0.0), // angvib(0.0),
feathervib(25.0), angvib(1.0),
// feathervib(25.0),
feathervib(1.0),
Lmaskvibcurve{ Lmaskvibcurve{
static_cast<double>(DCT_NURBS), static_cast<double>(DCT_NURBS),
0.0, 0.0,
@ -3915,6 +3934,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
nlpat(2), nlpat(2),
nlrad(5), nlrad(5),
nlgam(3.), nlgam(3.),
nliter(1),
sensiden(60), sensiden(60),
reparden(100.), reparden(100.),
detailthr(50), detailthr(50),
@ -4978,16 +4998,6 @@ LocallabParams::LocallabSpot::LocallabSpot() :
refi(0.), refi(0.),
shiftxl(0.), shiftxl(0.),
shiftyl(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(20), whitescie(20),
blackscie(0), blackscie(0),
illMethod("d50"), illMethod("d50"),
@ -5358,6 +5368,22 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& expshadhigh == other.expshadhigh && expshadhigh == other.expshadhigh
&& complexshadhigh == other.complexshadhigh && complexshadhigh == other.complexshadhigh
&& shMethod == other.shMethod && 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_MID == other.ghs_MID
&& ghs_BLP == other.ghs_BLP
&& ghs_HLP == other.ghs_HLP
&& ghs_smooth == other.ghs_smooth
&& ghs_inv == other.ghs_inv
&& [this, &other]() -> bool && [this, &other]() -> bool
{ {
for (int i = 0; i < 6; ++i) { for (int i = 0; i < 6; ++i) {
@ -5495,6 +5521,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& nlpat == other.nlpat && nlpat == other.nlpat
&& nlrad == other.nlrad && nlrad == other.nlrad
&& nlgam == other.nlgam && nlgam == other.nlgam
&& nliter == other.nliter
&& sensiden == other.sensiden && sensiden == other.sensiden
&& reparden == other.reparden && reparden == other.reparden
&& detailthr == other.detailthr && detailthr == other.detailthr
@ -7368,6 +7395,21 @@ 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->expshadhigh, "Locallab", "Expshadhigh_" + index_str, spot.expshadhigh, keyFile);
saveToKeyfile(!pedited || spot_edited->complexshadhigh, "Locallab", "Complexshadhigh_" + index_str, spot.complexshadhigh, 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->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_MID, "Locallab", "Ghs_MID_" + index_str, spot.ghs_MID, 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);
for (int j = 0; j < 6; j++) { 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); saveToKeyfile(!pedited || spot_edited->multsh[j], "Locallab", "Multsh" + std::to_string(j) + "_" + index_str, spot.multsh[j], keyFile);
@ -7503,6 +7545,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->nlpat, "Locallab", "Nlpat_" + index_str, spot.nlpat, keyFile);
saveToKeyfile(!pedited || spot_edited->nlrad, "Locallab", "Nlrad_" + index_str, spot.nlrad, 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->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->sensiden, "Locallab", "Sensiden_" + index_str, spot.sensiden, keyFile);
saveToKeyfile(!pedited || spot_edited->reparden, "Locallab", "Reparden_" + index_str, spot.reparden, 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); saveToKeyfile(!pedited || spot_edited->detailthr, "Locallab", "Detailthr_" + index_str, spot.detailthr, keyFile);
@ -9752,6 +9795,21 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Complexshadhigh_" + index_str, spot.complexshadhigh, spotEdited.complexshadhigh); assignFromKeyfile(keyFile, "Locallab", "Complexshadhigh_" + index_str, spot.complexshadhigh, spotEdited.complexshadhigh);
assignFromKeyfile(keyFile, "Locallab", "ShMethod_" + index_str, spot.shMethod, spotEdited.shMethod); 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_MID_" + index_str, spot.ghs_MID, spotEdited.ghs_MID);
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);
for (int j = 0; j < 6; j ++) { for (int j = 0; j < 6; j ++) {
assignFromKeyfile(keyFile, "Locallab", "Multsh" + std::to_string(j) + "_" + index_str, spot.multsh[j], spotEdited.multsh[j]); assignFromKeyfile(keyFile, "Locallab", "Multsh" + std::to_string(j) + "_" + index_str, spot.multsh[j], spotEdited.multsh[j]);
@ -9938,6 +9996,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Nlpat_" + index_str, spot.nlpat, spotEdited.nlpat); assignFromKeyfile(keyFile, "Locallab", "Nlpat_" + index_str, spot.nlpat, spotEdited.nlpat);
assignFromKeyfile(keyFile, "Locallab", "Nlrad_" + index_str, spot.nlrad, spotEdited.nlrad); assignFromKeyfile(keyFile, "Locallab", "Nlrad_" + index_str, spot.nlrad, spotEdited.nlrad);
assignFromKeyfile(keyFile, "Locallab", "Nlgam_" + index_str, spot.nlgam, spotEdited.nlgam); 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", "Sensiden_" + index_str, spot.sensiden, spotEdited.sensiden);
assignFromKeyfile(keyFile, "Locallab", "Reparden_" + index_str, spot.reparden, spotEdited.reparden); assignFromKeyfile(keyFile, "Locallab", "Reparden_" + index_str, spot.reparden, spotEdited.reparden);
assignFromKeyfile(keyFile, "Locallab", "Detailthr_" + index_str, spot.detailthr, spotEdited.detailthr); assignFromKeyfile(keyFile, "Locallab", "Detailthr_" + index_str, spot.detailthr, spotEdited.detailthr);

View File

@ -1256,6 +1256,22 @@ struct LocallabParams {
bool expshadhigh; bool expshadhigh;
int complexshadhigh; int complexshadhigh;
Glib::ustring shMethod; // std, tone 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_MID;
double ghs_BLP;
double ghs_HLP;
bool ghs_smooth;
bool ghs_inv;
int multsh[6]; int multsh[6];
int highlights; int highlights;
int h_tonalwidth; int h_tonalwidth;
@ -1385,6 +1401,7 @@ struct LocallabParams {
int nlpat; int nlpat;
int nlrad; int nlrad;
double nlgam; double nlgam;
int nliter;
int sensiden; int sensiden;
double reparden; double reparden;
int detailthr; int detailthr;

View File

@ -854,7 +854,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
AUTOEXP, // Evlocallabangmaskexp AUTOEXP, // Evlocallabangmaskexp
AUTOEXP, // Evlocallabstrexp AUTOEXP, // Evlocallabstrexp
AUTOEXP, // Evlocallabangexp AUTOEXP, // Evlocallabangexp
AUTOEXP, // EvlocallabstrSH AUTOEXP | M_AUTOEXP, // EvlocallabstrSH
AUTOEXP, // EvlocallabangSH AUTOEXP, // EvlocallabangSH
AUTOEXP, // Evlocallabstrcol AUTOEXP, // Evlocallabstrcol
AUTOEXP, // Evlocallabangcol AUTOEXP, // Evlocallabangcol

View File

@ -477,6 +477,12 @@ public:
bool linkrgblc; bool linkrgblc;
}; };
struct locallabshGHSbw {//To draw GHS S curve
int ghsbw[2];
double ghsbwvalue[2];
};
//select spot settings //select spot settings
struct locallabsetLC { struct locallabsetLC {
int mainf; int mainf;
@ -506,6 +512,7 @@ public:
virtual void minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int selspot) = 0; virtual void minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int selspot) = 0;
virtual void denChanged(const std::vector<locallabDenoiseLC> &denlc, 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 cieChanged(const std::vector<locallabcieLC> &cielc, 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 maiChanged(const std::vector<locallabsetLC> &csetlc, int selspot) = 0;
virtual void sigChanged(const std::vector<locallabcieSIG> &ciesig, 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; virtual void ciebefChanged(const std::vector<locallabcieBEF> &ciebef, int selspot) = 0;

View File

@ -1125,6 +1125,7 @@ private:
LUTf lmasklocalcurve(65536, LUT_CLIP_OFF); LUTf lmasklocalcurve(65536, LUT_CLIP_OFF);
LUTf lmaskexplocalcurve(65536, LUT_CLIP_OFF); LUTf lmaskexplocalcurve(65536, LUT_CLIP_OFF);
LUTf lmaskSHlocalcurve(65536, LUT_CLIP_OFF); LUTf lmaskSHlocalcurve(65536, LUT_CLIP_OFF);
// LUTf ghslocalcurve(65536, LUT_CLIP_OFF);
LUTf lmaskviblocalcurve(65536, LUT_CLIP_OFF); LUTf lmaskviblocalcurve(65536, LUT_CLIP_OFF);
LUTf lmasktmlocalcurve(65536, LUT_CLIP_OFF); LUTf lmasktmlocalcurve(65536, LUT_CLIP_OFF);
LUTf lmaskretilocalcurve(65536, LUT_CLIP_OFF); LUTf lmaskretilocalcurve(65536, LUT_CLIP_OFF);
@ -1222,6 +1223,7 @@ private:
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, 1); 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 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 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 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 localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, 1);
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, 1); const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, 1);
@ -1294,10 +1296,17 @@ private:
float Lnresi = 0.f; float Lnresi = 0.f;
float Lhighresi46 = 0.f; float Lhighresi46 = 0.f;
float Lnresi46 = 0.f; float Lnresi46 = 0.f;
int ghsbpwp[2];
ghsbpwp[0] = 0;
ghsbpwp[1] = 0;
float ghsbpwpvalue[2];
ghsbpwpvalue[0] = 0.f;
ghsbpwpvalue[1] = 1.f;
float slopeg = 1.f; float slopeg = 1.f;
bool linkrgb = true; bool linkrgb = true;
// No Locallab mask is shown in exported picture // 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, lllocalcurve, locallutili,
cllocalcurve, localclutili, cllocalcurve, localclutili,
lclocalcurve, locallcutili, lclocalcurve, locallcutili,
@ -1306,6 +1315,7 @@ private:
lmasklocalcurve, localmaskutili, lmasklocalcurve, localmaskutili,
lmaskexplocalcurve, localmaskexputili, lmaskexplocalcurve, localmaskexputili,
lmaskSHlocalcurve, localmaskSHutili, lmaskSHlocalcurve, localmaskSHutili,
// ghslocalcurve, localghsutili,
lmaskviblocalcurve, localmaskvibutili, lmaskviblocalcurve, localmaskvibutili,
lmasktmlocalcurve, localmasktmutili, lmasktmlocalcurve, localmasktmutili,
lmaskretilocalcurve, localmaskretiutili, lmaskretilocalcurve, localmaskretiutili,
@ -1351,8 +1361,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, 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, 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, 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, slopeg, linkrgb highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46, slopeg, linkrgb,
); ghsbpwp, ghsbpwpvalue);
if (sp + 1u < params.locallab.spots.size()) { if (sp + 1u < params.locallab.spots.size()) {
// do not copy for last spot as it is not needed anymore // do not copy for last spot as it is not needed anymore

View File

@ -647,7 +647,7 @@ void ColorToning::read (const ProcParams* pp, const ParamsEdited* pedited)
lastLumamode = pp->colorToning.lumamode; 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, false);
if (pedited && !pedited->colorToning.method) { if (pedited && !pedited->colorToning.method) {
method->set_active (7); method->set_active (7);

View File

@ -121,6 +121,7 @@ ControlSpotPanel::ControlSpotPanel():
EvLocallabavoidgamutMethod = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_GAMUTMUNSEL"); EvLocallabavoidgamutMethod = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_GAMUTMUNSEL");
EvLocallabavoidnegative = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_AVOIDNEGATIVE"); EvLocallabavoidnegative = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_AVOIDNEGATIVE");
const bool showtooltip = options.showtooltip; const bool showtooltip = options.showtooltip;
// pack_start(*hishow_); // pack_start(*hishow_);
Gtk::Box* const ctboxprevmethod = Gtk::manage(new Gtk::Box()); Gtk::Box* const ctboxprevmethod = Gtk::manage(new Gtk::Box());
@ -390,8 +391,6 @@ ControlSpotPanel::ControlSpotPanel():
artifBox->pack_start(*balan_); artifBox->pack_start(*balan_);
artifBox->pack_start(*balanh_); artifBox->pack_start(*balanh_);
artifBox->pack_start(*colorde_); artifBox->pack_start(*colorde_);
// artifBox->pack_start(*preview_);
// artifBox->pack_start(*colorscope_);
expShapeDetect_->add(*artifBox, false); expShapeDetect_->add(*artifBox, false);
pack_start(*expShapeDetect_, false, false); pack_start(*expShapeDetect_, false, false);
// ToolParamBlock* const artifBox2 = Gtk::manage(new ToolParamBlock()); // ToolParamBlock* const artifBox2 = Gtk::manage(new ToolParamBlock());
@ -868,10 +867,13 @@ void ControlSpotPanel::load_ControlSpot_param()
feather_->setValue((double)row[spots_.feather]); feather_->setValue((double)row[spots_.feather]);
struc_->setValue((double)row[spots_.struc]); struc_->setValue((double)row[spots_.struc]);
thresh_->setValue((double)row[spots_.thresh]); thresh_->setValue((double)row[spots_.thresh]);
iter_->setValue((double)row[spots_.iter]);
iter_->setValue((double)row[spots_.iter]);
balan_->setValue((double)row[spots_.balan]); balan_->setValue((double)row[spots_.balan]);
balanh_->setValue((double)row[spots_.balanh]); balanh_->setValue((double)row[spots_.balanh]);
colorde_->setValue((double)row[spots_.colorde]); colorde_->setValue((double)row[spots_.colorde]);
colorscope_->setValue((double)row[spots_.colorscope]); colorscope_->setValue((double)row[spots_.colorscope]);
avoidrad_->setValue((double)row[spots_.avoidrad]); avoidrad_->setValue((double)row[spots_.avoidrad]);
hishow_->set_active(row[spots_.hishow]); hishow_->set_active(row[spots_.hishow]);
@ -2910,12 +2912,12 @@ void ControlSpotPanel::deleteControlSpot(const int index)
} }
//new function linked to Global and options //new function linked to Global and options
void ControlSpotPanel::updateguiset(int spottype, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool iscie) void ControlSpotPanel::updateguiset(int spottype, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool isci)
{ {
{ //with this function we can 1) activate Settings SpotMethod { //with this function we can 1) activate Settings SpotMethod
// also if need GUI for mask , todo... // also if need GUI for mask , todo...
idle_register.add( idle_register.add(
[this, spottype, iscolor, issh , isvib, isexpos, issoft, isblur, istom, isret, issharp, iscont, iscbdl, islog, ismas, iscie]() -> bool { [this, spottype, iscolor, issh , isvib, isexpos, issoft, isblur, istom, isret, issharp, iscont, iscbdl, islog, ismas, isci]() -> bool {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
// Update GUI fullimage or main // Update GUI fullimage or main
@ -2924,7 +2926,7 @@ void ControlSpotPanel::updateguiset(int spottype, bool iscolor, bool issh, bool
spotMethodChanged(); spotMethodChanged();
} }
if((iscolor || issh || isvib || isexpos || istom || iscont || islog || ismas || iscie) if((iscolor || issh || isvib || isexpos || istom || iscont || islog || ismas || isci)
&& !issharp && !issoft && !isret && !isblur & !iscbdl) { && !issharp && !issoft && !isret && !isblur & !iscbdl) {
preview_->hide(); preview_->hide();
} else if (issoft || isblur || isret || issharp || iscbdl) { } else if (issoft || isblur || isret || issharp || iscbdl) {

View File

@ -226,7 +226,7 @@ public:
/** /**
* upadte function to work with Preferences and spotMethod * upadte function to work with Preferences and spotMethod
*/ */
void updateguiset(int spottype, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool iscie); void updateguiset(int spottype, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool isci);
void updateguiscopeset(int scope); void updateguiscopeset(int scope);
private: private:

View File

@ -89,7 +89,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 = Gtk::manage(new MyFileChooserButton(M("TP_ICM_INPUTDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
ipDialog->set_tooltip_text(M("TP_ICM_INPUTCUSTOM_TOOLTIP")); ipDialog->set_tooltip_text(M("TP_ICM_INPUTCUSTOM_TOOLTIP"));
bindCurrentFolder(*ipDialog, options.lastIccDir); 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 // ------------------------------- Input profile
@ -828,7 +828,7 @@ void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g
[this]() -> bool [this]() -> bool
{ {
disableListener(); 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, false);
enableListener(); enableListener();
return false; return false;
} }
@ -1467,6 +1467,8 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
pp->icm.workingProfile = wProfNames->get_active_text(); pp->icm.workingProfile = wProfNames->get_active_text();
pp->icm.dcpIlluminant = rtengine::max<int>(dcpIll->get_active_row_number(), 0); 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); 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);
if (oProfNames->get_active_text() == M("TP_ICM_NOICM")) { if (oProfNames->get_active_text() == M("TP_ICM_NOICM")) {
@ -1596,6 +1598,8 @@ void ICMPanel::setDefaults(const ProcParams* defParams, const ParamsEdited* pedi
shiftx->setDefault(defParams->icm.shiftx); shiftx->setDefault(defParams->icm.shiftx);
shifty->setDefault(defParams->icm.shifty); shifty->setDefault(defParams->icm.shifty);
preser->setDefault(defParams->icm.preser); 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); 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);
if (pedited) { if (pedited) {

View File

@ -4,7 +4,7 @@
* *
* Copyright (c) 2017 Alberto Griggio <alberto.griggio@gmail.com> * Copyright (c) 2017 Alberto Griggio <alberto.griggio@gmail.com>
* *
* Copyright (c) 2021 Jacques Desmis <jdesmis@gmail.com> for CIE xy graph * Copyright (c) 2021 / 2024 Jacques Desmis <jdesmis@gmail.com> for CIE xy graph and GHS curve
* *
* RawTherapee is free software: you can redistribute it and/or modify * RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -52,6 +52,11 @@ using rtengine::Color;
// LabGridArea // LabGridArea
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool LabGridArea::FunctionParams::is_valid() const
{
return x_min < x_max && y_min < y_max;
}
bool LabGridArea::notifyListener() bool LabGridArea::notifyListener()
{ {
if (listener) { if (listener) {
@ -60,9 +65,9 @@ bool LabGridArea::notifyListener()
{ {
return int(v * 1000) / 1000.f; 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))); 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_a1 = 0.55f * (high_a + 1.f) - 0.1f;
float high_b1 = 0.55f * (high_b + 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; float low_a1 = 0.55f * (low_a + 1.f) - 0.1f;
@ -76,17 +81,19 @@ 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(), Gtk::DrawingArea(),
evt(evt), evtMsg(msg), evt(evt), evtMsg(msg),
litPoint(NONE), 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),
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), 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),
listener(nullptr), listener(nullptr),
edited(false), edited(false),
isDragged(false), isDragged(false),
low_enabled(enable_low), low_enabled(enable_low),
ciexy_enabled(ciexy), ciexy_enabled(ciexy),
ghs_enabled(ghs),
mous_enabled(mous) mous_enabled(mous)
@ -98,6 +105,7 @@ LabGridArea::LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool
} }
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) const
{ {
la = low_a; la = low_a;
ha = high_a; ha = high_a;
@ -109,11 +117,11 @@ void LabGridArea::getParams(double &la, double &lb, double &ha, double &hb, doub
wy = whi_y; wy = whi_y;
mx = me_x; mx = me_x;
my = me_y; my = me_y;
// 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, bool notify)
{ {
const double lo = -1.0; const double lo = -1.0;
const double hi = 1.0; const double hi = 1.0;
@ -127,14 +135,21 @@ void LabGridArea::setParams(double la, double lb, double ha, double hb, double g
whi_y = rtengine::LIM(wy, lo, hi); whi_y = rtengine::LIM(wy, lo, hi);
me_x = rtengine::LIM(mx, lo, hi); me_x = rtengine::LIM(mx, lo, hi);
me_y = rtengine::LIM(my, lo, hi); me_y = rtengine::LIM(my, lo, hi);
queue_draw(); queue_draw();
if (notify) { if (notify) {
notifyListener(); notifyListener();
} }
} }
void LabGridArea::setFunctionParams(const FunctionParams &params)
{
function_params = params;
queue_draw();
}
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)
{ {
defaultLow_a = la; defaultLow_a = la;
defaultLow_b = lb; defaultLow_b = lb;
@ -154,7 +169,6 @@ void LabGridArea::reset(bool toInitial)
if (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, true);
} else { } 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., true);
} }
} }
@ -224,7 +238,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
cr->translate(0., static_cast<double>(height)); cr->translate(0., static_cast<double>(height));
cr->scale(1., -1.); 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 int cells = 8;
const float step = 12000.f / static_cast<float>(cells/2); const float step = 12000.f / static_cast<float>(cells/2);
const double cellW = static_cast<double>(width) / static_cast<double>(cells); const double cellW = static_cast<double>(width) / static_cast<double>(cells);
@ -257,7 +271,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
cellYMin = cellYMax; cellYMin = cellYMax;
cellYMax = std::floor(cellH * static_cast<double>(j+2) + 0.01); 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 int cells = 600;
const float step = 1.f / static_cast<float>(cells); const float step = 1.f / static_cast<float>(cells);
const double cellW = static_cast<double>(width) / static_cast<double>(cells); const double cellW = static_cast<double>(width) / static_cast<double>(cells);
@ -326,6 +340,11 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
cellYMin = cellYMax; cellYMin = cellYMax;
cellYMax = std::floor(cellH * static_cast<double>(j+2) + 0.001); cellYMax = std::floor(cellH * static_cast<double>(j+2) + 0.001);
} }
} else if (ghs_enabled) {//cells for GHS and simulation GHS
constexpr double value = 0.7;
cr->set_source_rgb(value, value, value);
cr->rectangle( 0., 0., width, height);
cr->fill();
} }
// Drawing the connection line // Drawing the connection line
@ -342,20 +361,68 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
double mex = .5 * (static_cast<double>(width) + static_cast<double>(width) * me_x); 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); double mey = .5 * (static_cast<double>(height) + static_cast<double>(height) * me_y);
cr->set_line_width(1.5); cr->set_line_width(1.5);
if (ciexy_enabled) {
mex = .5 * (width + width * me_x); mex = .5 * (width + width * me_x);
mey = .5 * (height + height * me_y); mey = .5 * (height + height * me_y);
}
cr->set_source_rgb(0.6, 0.6, 0.6); cr->set_source_rgb(0.6, 0.6, 0.6);
cr->move_to(loa, lob); if (!ghs_enabled) {
cr->line_to(hia, hib); cr->move_to(loa, lob);
cr->line_to(hia, hib);
}
if (ciexy_enabled) { if (ciexy_enabled) {
cr->move_to(loa, lob); cr->move_to(loa, lob);
cr->line_to(grx, gry); cr->line_to(grx, gry);
cr->move_to(grx, gry); cr->move_to(grx, gry);
cr->line_to(hia, hib); cr->line_to(hia, hib);
} else if (ghs_enabled) {
if (function_params.is_valid()) {
constexpr double line_width = 3.;
cr->set_line_width(line_width);
cr->set_source_rgb(0.2, 0.2, 0.2);
const int curve_segment_count = std::max(1, function_params.resolution_function(width));
std::vector<double> curve(curve_segment_count + 1);
// Calculate y-values.
const double x_range = function_params.x_max - function_params.x_min;
const double y_range = function_params.y_max - function_params.y_min;
const double y_scale = height / y_range;
for (int i = 0; i <= curve_segment_count; ++i) {
const double x = function_params.x_min + x_range / curve_segment_count * i;
curve[i] = rtengine::LIM<double>(y_scale * (function_params.function(x) - function_params.y_min), 0.0, height);
}
// Plot curve.
const double dx = static_cast<double>(width) / curve_segment_count;
for (int i = 0; i < curve_segment_count; ++i) {
const double x0 = dx * i;
const double x1 = x0 + dx;
const double y0 = curve[i];
const double y1 = curve[i + 1];
cr->move_to(x0, y0);
cr->line_to(x1, y1);
}
}
} }
cr->stroke(); 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_line_width(0.2);
cr->set_source_rgb(0.1, 0.1, 0.1); cr->set_source_rgb(0.1, 0.1, 0.1);
//draw horiz and vertical lines //draw horiz and vertical lines
@ -397,33 +464,33 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
cr->stroke(); cr->stroke();
} }
if(!ghs_enabled) {//no points with GHS
// Drawing points // Drawing points
if (low_enabled) { if (low_enabled) {
cr->set_source_rgb(0.1, 0.1, 0.1);//black for red in Ciexy cr->set_source_rgb(0.1, 0.1, 0.1);//black for red in Ciexy
if (litPoint == LOW) { if (litPoint == LOW) {
cr->arc(loa, lob, 5., 0., 2. * rtengine::RT_PI); cr->arc(loa, lob, 5., 0., 2. * rtengine::RT_PI);
} else { } else {
cr->arc(loa, lob, 3., 0., 2. * rtengine::RT_PI); cr->arc(loa, lob, 3., 0., 2. * rtengine::RT_PI);
}
cr->fill();
} }
cr->fill();
}
if (ciexy_enabled) { if (ciexy_enabled) {
cr->set_source_rgb(0.5, 0.5, 0.5);//gray for green cr->set_source_rgb(0.5, 0.5, 0.5);//gray for green
if (litPoint == GRE) { if (litPoint == GRE) {
cr->arc(grx, gry, 5., 0., 2. * rtengine::RT_PI); cr->arc(grx, gry, 5., 0., 2. * rtengine::RT_PI);
} else { } else {
cr->arc(grx, gry, 3., 0., 2. * rtengine::RT_PI); cr->arc(grx, gry, 3., 0., 2. * rtengine::RT_PI);
}
cr->fill();
} }
cr->fill();
}
if (ciexy_enabled) {//White Point if (ciexy_enabled) {//White Point
cr->set_source_rgb(1., 1., 1.);//White cr->set_source_rgb(1., 1., 1.);//White
cr->arc(whx, why, 3., 0., 2. * rtengine::RT_PI); cr->arc(whx, why, 3., 0., 2. * rtengine::RT_PI);
cr->fill(); cr->fill();
} }
if (ciexy_enabled) {//Dominant if (ciexy_enabled) {//Dominant
cr->set_source_rgb(0.3, 0.4, 0.3); cr->set_source_rgb(0.3, 0.4, 0.3);
@ -431,13 +498,14 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
cr->fill(); cr->fill();
} }
cr->set_source_rgb(0.9, 0.9, 0.9);//white for blue en Ciexy cr->set_source_rgb(0.9, 0.9, 0.9);//white for blue en Ciexy
if (litPoint == HIGH) { if (litPoint == HIGH) {
cr->arc(hia, hib, 5., 0., 2. * rtengine::RT_PI); cr->arc(hia, hib, 5., 0., 2. * rtengine::RT_PI);
} else { } else {
cr->arc(hia, hib, 3., 0., 2. * rtengine::RT_PI); cr->arc(hia, hib, 3., 0., 2. * rtengine::RT_PI);
} }
cr->fill(); cr->fill();
}
return false; return false;
} }
@ -446,7 +514,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
bool LabGridArea::on_button_press_event(GdkEventButton *event) bool LabGridArea::on_button_press_event(GdkEventButton *event)
{ {
if (event->button == 1 && mous_enabled) { if (event->button == 1 && mous_enabled) {
if (!ciexy_enabled) { if (!ciexy_enabled && !ghs_enabled) {
if (event->type == GDK_2BUTTON_PRESS) { if (event->type == GDK_2BUTTON_PRESS) {
switch (litPoint) { switch (litPoint) {
case NONE: case NONE:
@ -547,7 +615,7 @@ bool LabGridArea::on_motion_notify_event(GdkEventMotion *event)
litPoint = LOW; litPoint = LOW;
} else if (disthi < thrs * thrs && disthi <= distlo) { } else if (disthi < thrs * thrs && disthi <= distlo) {
litPoint = HIGH; litPoint = HIGH;
} else if (ciexy_enabled && distgxy < thrs * thrs && distgxy <= distlo) { } else if (ciexy_enabled && !ghs_enabled && distgxy < thrs * thrs && distgxy <= distlo) {
litPoint = GRE; litPoint = GRE;
} }
if ((oldLitPoint == NONE && litPoint != NONE) || (oldLitPoint != NONE && litPoint == NONE)) { if ((oldLitPoint == NONE && litPoint != NONE) || (oldLitPoint != NONE && litPoint == NONE)) {
@ -595,6 +663,11 @@ bool LabGridArea::ciexyEnabled() const
return ciexy_enabled; return ciexy_enabled;
} }
bool LabGridArea::ghsEnabled() const
{
return ghs_enabled;
}
void LabGridArea::setLowEnabled(bool yes) void LabGridArea::setLowEnabled(bool yes)
{ {
if (low_enabled != yes) { if (low_enabled != yes) {
@ -611,6 +684,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) void LabGridArea::setmousEnabled(bool yes)
{ {
if (mous_enabled != yes) { if (mous_enabled != yes) {
@ -624,12 +705,12 @@ void LabGridArea::setmousEnabled(bool yes)
// LabGrid // LabGrid
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LabGrid::LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low, bool ciexy, bool 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, mous) grid(evt, msg, enable_low, ciexy, ghs, mous)
{ {
Gtk::Button *reset = Gtk::manage(new Gtk::Button()); Gtk::Button *reset = Gtk::manage(new Gtk::Button());
reset->set_tooltip_markup(M("ADJUSTER_RESET_TO_DEFAULT")); 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->add(*Gtk::manage(new RTImage("undo-small", Gtk::ICON_SIZE_BUTTON)));
} }
reset->signal_button_release_event().connect(sigc::mem_fun(*this, &LabGrid::resetPressed)); reset->signal_button_release_event().connect(sigc::mem_fun(*this, &LabGrid::resetPressed));
@ -641,7 +722,9 @@ LabGrid::LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_
reset->set_size_request(-1, 20); reset->set_size_request(-1, 20);
pack_start(grid, true, true, true); pack_start(grid, true, true, true);
pack_start(*reset, false, false); if(!ghs) {//disable reset when GHS
pack_start(*reset, false, false);
}
show_all_children(); show_all_children();
} }

View File

@ -3,7 +3,7 @@
* This file is part of RawTherapee. * This file is part of RawTherapee.
* *
* Copyright (c) 2017 Alberto Griggio <alberto.griggio@gmail.com> * Copyright (c) 2017 Alberto Griggio <alberto.griggio@gmail.com>
* * adapted for Rawtherapee J.Desmis december 2024
* RawTherapee is free software: you can redistribute it and/or modify * RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
@ -39,11 +39,55 @@
#pragma once #pragma once
#include <gtkmm.h> #include <gtkmm.h>
#include "rtengine/improcfun.h"
#include "eventmapper.h" #include "eventmapper.h"
#include "toolpanel.h" #include "toolpanel.h"
class LabGridArea final : public Gtk::DrawingArea { class LabGridArea final : public Gtk::DrawingArea {
public:
struct FunctionParams {
using Function = std::function<double(double)>;
using ResolutionFunction = std::function<int(int)>;
/** x-value of the left side. */
double x_min;
/** x-value of the right side. */
double x_max;
/** y-value of the left side. */
double y_min;
/** y-value of the right side. */
double y_max;
/**
* The function itself, which takes an x-value and returns the y-value.
*/
Function function;
/**
* A function returning the resolution of the plot.
*
* It takes the width of the plot, in pixels, and returns the number of
* line segments that should be used to plot the function.
*/
ResolutionFunction resolution_function{[](int width) { return width; }};
FunctionParams() = default;
FunctionParams(double x_min, double x_max, double y_min, double y_max,
const Function &function,
const ResolutionFunction & resolution_function) :
x_min(x_min),
x_max(x_max),
y_min(y_min),
y_max(y_max),
function(function),
resolution_function(resolution_function)
{
}
bool is_valid() const;
};
private: private:
rtengine::ProcEvent evt; rtengine::ProcEvent evt;
Glib::ustring evtMsg; Glib::ustring evtMsg;
@ -60,6 +104,8 @@ private:
double whi_y; double whi_y;
double me_x; double me_x;
double me_y; double me_y;
FunctionParams function_params;
double defaultLow_a; double defaultLow_a;
double defaultHigh_a; double defaultHigh_a;
double defaultLow_b; double defaultLow_b;
@ -79,16 +125,18 @@ private:
bool low_enabled; bool low_enabled;
bool ciexy_enabled; bool ciexy_enabled;
bool ghs_enabled;
bool mous_enabled; bool mous_enabled;
bool notifyListener(); bool notifyListener();
void getLitPoint(); void getLitPoint();
public: 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 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 setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, bool notify);
void setFunctionParams(const FunctionParams &params);
void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my); void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my);
void setEdited(bool yes); void setEdited(bool yes);
bool getEdited() const; bool getEdited() const;
@ -99,9 +147,11 @@ public:
void setLowEnabled(bool yes); void setLowEnabled(bool yes);
bool ciexyEnabled() const; bool ciexyEnabled() const;
void setciexyEnabled(bool yes); void setciexyEnabled(bool yes);
bool ghsEnabled() const;
void setghsEnabled(bool yes);
bool mousEnabled() const; bool mousEnabled() const;
void setmousEnabled(bool yes); void setmousEnabled(bool yes);
bool on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr) override; bool on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr) override;
void on_style_updated () override; void on_style_updated () override;
bool on_button_press_event(GdkEventButton *event) override; bool on_button_press_event(GdkEventButton *event) override;
@ -120,11 +170,18 @@ private:
bool resetPressed(GdkEventButton *event); bool resetPressed(GdkEventButton *event);
public: 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 getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &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); } const { return grid.getParams(la, lb, ha, hb, gx, gy, wx, wy, mx, my); }
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 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 setFunctionParams(const LabGridArea::FunctionParams &params)
{
grid.setFunctionParams(params);
}
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 setEdited(bool yes) { grid.setEdited(yes); } void setEdited(bool yes) { grid.setEdited(yes); }
bool getEdited() const { return grid.getEdited(); } bool getEdited() const { return grid.getEdited(); }
void reset(bool toInitial) { grid.reset(toInitial); } void reset(bool toInitial) { grid.reset(toInitial); }
@ -133,8 +190,9 @@ public:
void setLowEnabled(bool yes) { grid.setLowEnabled(yes); } void setLowEnabled(bool yes) { grid.setLowEnabled(yes); }
bool ciexyEnabled() const { return grid.ciexyEnabled(); } bool ciexyEnabled() const { return grid.ciexyEnabled(); }
void setciexyEnabled(bool yes) { grid.setciexyEnabled(yes); } 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(); } bool mousEnabled() const { return grid.mousEnabled(); }
void setmousEnabled(bool yes) { grid.setmousEnabled(yes); } void setmousEnabled(bool yes) { grid.setmousEnabled(yes); }
}; };

View File

@ -152,7 +152,6 @@ Locallab::Locallab():
// Tool list widget // Tool list widget
toollist(Gtk::manage(new LocallabToolList())) toollist(Gtk::manage(new LocallabToolList()))
// expcie(Gtk::manage(new Locallabcie())),
// Other widgets // Other widgets
//resetshowButton(Gtk::manage(new Gtk::Button(M("TP_LOCALLAB_RESETSHOW")))) //resetshowButton(Gtk::manage(new Gtk::Button(M("TP_LOCALLAB_RESETSHOW"))))
{ {
@ -247,6 +246,7 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
// Update Locallab activation state // Update Locallab activation state
setEnabled(pp->locallab.enabled); setEnabled(pp->locallab.enabled);
// const int showsettings = options.complexity;
// Transmit Locallab activation state to Locallab tools // Transmit Locallab activation state to Locallab tools
for (auto tool : locallabTools) { for (auto tool : locallabTools) {
@ -266,6 +266,7 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit
ControlSpotPanel::SpotRow r; ControlSpotPanel::SpotRow r;
for (int i = 0; i < (int)pp->locallab.spots.size(); i++) { for (int i = 0; i < (int)pp->locallab.spots.size(); i++) {
r.name = pp->locallab.spots.at(i).name; r.name = pp->locallab.spots.at(i).name;
r.isvisible = pp->locallab.spots.at(i).isvisible; r.isvisible = pp->locallab.spots.at(i).isvisible;
@ -1143,7 +1144,7 @@ void Locallab::minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int
const double cdmin = retiMinMax.at(selspot).cdmin; const double cdmin = retiMinMax.at(selspot).cdmin;
const double mini = retiMinMax.at(selspot).mini; const double mini = retiMinMax.at(selspot).mini;
const double maxi = retiMinMax.at(selspot).maxi; const double maxi = retiMinMax.at(selspot).maxi;
const double Tmean = retiMinMax.at(selspot).Tmean; const double Tmean = retiMinMax.at(selspot).Tmean;
const double Tsigma = retiMinMax.at(selspot).Tsigma; const double Tsigma = retiMinMax.at(selspot).Tsigma;
const double Tmin = retiMinMax.at(selspot).Tmin; const double Tmin = retiMinMax.at(selspot).Tmin;
const double Tmax = retiMinMax.at(selspot).Tmax; const double Tmax = retiMinMax.at(selspot).Tmax;
@ -1163,7 +1164,7 @@ void Locallab::denChanged(const std::vector<locallabDenoiseLC> &denlc, int selsp
const double nres = denoiselc.at(selspot).nres; const double nres = denoiselc.at(selspot).nres;
const double highres46 = denoiselc.at(selspot).highres46; const double highres46 = denoiselc.at(selspot).highres46;
const double nres46 = denoiselc.at(selspot).nres46; const double nres46 = denoiselc.at(selspot).nres46;
const double Lhighres = denoiselc.at(selspot).Lhighres; const double Lhighres = denoiselc.at(selspot).Lhighres;
const double Lnres = denoiselc.at(selspot).Lnres; const double Lnres = denoiselc.at(selspot).Lnres;
const double Lhighres46 = denoiselc.at(selspot).Lhighres46; const double Lhighres46 = denoiselc.at(selspot).Lhighres46;
const double Lnres46 = denoiselc.at(selspot).Lnres46; const double Lnres46 = denoiselc.at(selspot).Lnres46;
@ -1208,72 +1209,7 @@ void Locallab::scopeChangedset(int scope, int selspot, bool enab)
} }
} }
/*
//main new fonction global to hide show and activated or not some functions - inverse, scope...
void Locallab::mainChanged(int spottype, int selspot, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool iscie )
{
if(iscolor) {
expcolor.updateguicolor(spottype);
}
if(issh) {
expshadhigh.updateguishad(spottype);
}
if(isvib) {
expvibrance.updateguivib(spottype);
}
if(isexpos) {
expexpose.updateguiexpos(spottype);
}
if(issoft) {
expsoft.updateguisoft(spottype);
}
if(isblur) {
expblur.updateguiblur(spottype);
}
if(istom) {
exptonemap.updateguitone(spottype);
}
if(isret) {
expreti.updateguireti(spottype);
}
if(issharp) {
expsharp.updateguisharp(spottype);
}
if(iscont) {
expcontrast.updateguicont(spottype);
}
if(iscbdl) {
expcbdl.updateguicbdl(spottype);
}
if(islog) {
explog.updateguilog(spottype);
}
if(ismas) {
expmask.updateguimask(spottype);
}
if(iscie) {
expcie.updateguicie(spottype);
}
expsettings->updateguiset(spottype, iscolor, issh, isvib, isexpos, issoft, isblur, istom, isret, issharp, iscont, iscbdl, islog, ismas, iscie);
}
*/
void Locallab::sigChanged(const std::vector<locallabcieSIG> &ciesig, int selspot) void Locallab::sigChanged(const std::vector<locallabcieSIG> &ciesig, int selspot)
{ {
cie_sig = ciesig; cie_sig = ciesig;
@ -1329,7 +1265,7 @@ void Locallab::maiChanged(const std::vector<locallabsetLC> &setlc, int selspot)
const bool iscbdl = set_lc.at(selspot).iscbd; const bool iscbdl = set_lc.at(selspot).iscbd;
const bool islog = set_lc.at(selspot).islo; const bool islog = set_lc.at(selspot).islo;
const bool ismas = set_lc.at(selspot).isma; const bool ismas = set_lc.at(selspot).isma;
const bool iscie = set_lc.at(selspot).isci; const bool isci = set_lc.at(selspot).isci;
if(iscolor) { if(iscolor) {
expcolor.updateguicolor(spottype); expcolor.updateguicolor(spottype);
@ -1383,18 +1319,35 @@ void Locallab::maiChanged(const std::vector<locallabsetLC> &setlc, int selspot)
expmask.updateguimask(spottype); expmask.updateguimask(spottype);
} }
if(iscie) { if(isci) {
expcie.updateguicie(spottype); expcie.updateguicie(spottype);
} }
expsettings->updateguiset(spottype, iscolor, issh, isvib, isexpos, issoft, isblur, istom, isret, issharp, iscont, iscbdl, islog, ismas, iscie); expsettings->updateguiset(spottype, iscolor, issh, isvib, isexpos, issoft, isblur, istom, isret, issharp, iscont, iscbdl, islog, ismas, isci);
} }
} }
void Locallab::ghsbwChanged(const std::vector<locallabshGHSbw> &shghsbw, int selspot)
{
sh_ghsbw = shghsbw;
int bw[2] = {0, 1};
double bwvalue[2] = {0., 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) void Locallab::cieChanged(const std::vector<locallabcieLC> &cielc, int selspot)
{ {
// Saving transmitted min/max data // Saving transmitted min/max data
cie_lc = cielc; cie_lc = cielc;
//Update Locallab Denoise tool lum chro //Update Locallab Denoise tool lum chro
if (selspot < (int) cie_lc.size()) { if (selspot < (int) cie_lc.size()) {
@ -1402,7 +1355,7 @@ void Locallab::cieChanged(const std::vector<locallabcieLC> &cielc, int selspot)
const double r2 = cie_lc.at(selspot).redylc; const double r2 = cie_lc.at(selspot).redylc;
const double g1 = cie_lc.at(selspot).grexlc; const double g1 = cie_lc.at(selspot).grexlc;
const double g2 = cie_lc.at(selspot).greylc; const double g2 = cie_lc.at(selspot).greylc;
const double b1 = cie_lc.at(selspot).bluxlc; const double b1 = cie_lc.at(selspot).bluxlc;
const double b2 = cie_lc.at(selspot).bluylc; const double b2 = cie_lc.at(selspot).bluylc;
const double w1 = cie_lc.at(selspot).wxlc; const double w1 = cie_lc.at(selspot).wxlc;
const double w2 = cie_lc.at(selspot).wylc; const double w2 = cie_lc.at(selspot).wylc;

View File

@ -129,11 +129,12 @@ private:
// Locallab tools mask background management data // Locallab tools mask background management data
std::vector<locallabDenoiseLC> denoiselc; std::vector<locallabDenoiseLC> denoiselc;
std::vector<locallabcieBEF> cie_bef; std::vector<locallabcieBEF> cie_bef;
std::vector<locallabcieLC> cie_lc; std::vector<locallabcieLC> cie_lc;
std::vector<locallabshGHSbw> sh_ghsbw;
std::vector<locallabsetLC> set_lc; std::vector<locallabsetLC> set_lc;
std::vector<locallabcieSIG> cie_sig; std::vector<locallabcieSIG> cie_sig;
@ -161,7 +162,7 @@ public:
void minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int selspot) override; void minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int selspot) override;
// new functions for global - normal use // new functions for global - normal use
// void mainChanged(int spottype, int selspot, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool iscie)override; // void mainChanged(int spottype, int selspot, bool iscolor, bool issh, bool isvib, bool isexpos, bool issoft, bool isblur, bool istom, bool isret, bool issharp, bool iscont, bool iscbdl, bool islog, bool ismas, bool isci)override;
void scopeChangedcol(int scope, int selspot, bool enab)override; void scopeChangedcol(int scope, int selspot, bool enab)override;
void scopeChangedsh(int scope, int selspot, bool enab)override; void scopeChangedsh(int scope, int selspot, bool enab)override;
void scopeChangedvib(int scope, int selspot, bool enab)override; void scopeChangedvib(int scope, int selspot, bool enab)override;
@ -176,6 +177,9 @@ public:
// Locallab CIE tool primaries function // Locallab CIE tool primaries function
void cieChanged(const std::vector<locallabcieLC> &cielc, int selspot) override; void cieChanged(const std::vector<locallabcieLC> &cielc, 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 // Locallab Log Encoding and Cam16 autocompute function
void ciebefChanged(const std::vector<locallabcieBEF> &ciebef, int selspot) override; void ciebefChanged(const std::vector<locallabcieBEF> &ciebef, int selspot) override;

File diff suppressed because it is too large Load Diff

View File

@ -123,6 +123,7 @@ protected:
rtengine::ProcEvent Evlocallabbluxl; rtengine::ProcEvent Evlocallabbluxl;
rtengine::ProcEvent Evlocallabbluyl; rtengine::ProcEvent Evlocallabbluyl;
rtengine::ProcEvent EvlocallabGridciexy; rtengine::ProcEvent EvlocallabGridciexy;
rtengine::ProcEvent EvlocallabGridghs;
rtengine::ProcEvent Evlocallabgamutcie; rtengine::ProcEvent Evlocallabgamutcie;
rtengine::ProcEvent Evlocallabbwcie; rtengine::ProcEvent Evlocallabbwcie;
rtengine::ProcEvent Evlocallabexpprecam; rtengine::ProcEvent Evlocallabexpprecam;
@ -387,7 +388,7 @@ public:
bool isMaskViewActive() override; bool isMaskViewActive() override;
void resetMaskView() override; void resetMaskView() override;
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
int nbmaskcol;
Gtk::ToggleButton *getPreviewDeltaEButton() const override; Gtk::ToggleButton *getPreviewDeltaEButton() const override;
sigc::connection *getPreviewDeltaEButtonConnection() override; sigc::connection *getPreviewDeltaEButtonConnection() override;
@ -522,6 +523,7 @@ public:
bool isMaskViewActive() override; bool isMaskViewActive() override;
void resetMaskView() override; void resetMaskView() override;
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
int nbmaskexp;
Gtk::ToggleButton *getPreviewDeltaEButton() const override; Gtk::ToggleButton *getPreviewDeltaEButton() const override;
sigc::connection *getPreviewDeltaEButtonConnection() override; sigc::connection *getPreviewDeltaEButtonConnection() override;
@ -594,6 +596,33 @@ private:
Gtk::Frame* const gamFrame; Gtk::Frame* const gamFrame;
Adjuster* const gamSH; Adjuster* const gamSH;
Adjuster* const sloSH; 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;
Adjuster* const ghs_MID;
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; MyExpander* const expgradsh;
Adjuster* const strSH; Adjuster* const strSH;
Adjuster* const angSH; Adjuster* const angSH;
@ -620,8 +649,22 @@ private:
Adjuster* const fatanchorSH; Adjuster* const fatanchorSH;
rtengine::ProcEvent EvlocallabTePivot; 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_MID;
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: public:
LocallabShadow(); LocallabShadow();
@ -637,7 +680,9 @@ public:
void updateAdviceTooltips(const bool showTooltips) override; void updateAdviceTooltips(const bool showTooltips) override;
void updateguishad(int spottype); void updateguishad(int spottype);
void updateguiscopesahd(int scope); void updateguiscopesahd(int scope);
int nbmasksh;
void updateghsbw(int bp, int wp, double minbp, double maxwp);
void setDefaultExpanderVisibility() override; void setDefaultExpanderVisibility() override;
void disableListener() override; void disableListener() override;
void enableListener() override; void enableListener() override;
@ -657,13 +702,18 @@ private:
void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer, const double normHuerjz) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer, const double normHuerjz) override;
void shMethodChanged(); void shMethodChanged();
void ghsMethodChanged();
void inversshChanged(); void inversshChanged();
void ghs_smoothChanged();
void ghs_invChanged();
void showmaskSHMethodChanged(); void showmaskSHMethodChanged();
void showmaskSHMethodChangedinv(); void showmaskSHMethodChangedinv();
void enaSHMaskChanged(); void enaSHMaskChanged();
void updateShadowGUI1(); void updateShadowGUImask();
void updateShadowGUI2(); void updateShadowGUIshmet();
void updateShadowGUIsym();
}; };
/* ==== LocallabVibrance ==== */ /* ==== LocallabVibrance ==== */
@ -726,6 +776,7 @@ public:
bool isMaskViewActive() override; bool isMaskViewActive() override;
void resetMaskView() override; void resetMaskView() override;
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
int nbmaskvib;
Gtk::ToggleButton *getPreviewDeltaEButton() const override; Gtk::ToggleButton *getPreviewDeltaEButton() const override;
sigc::connection *getPreviewDeltaEButtonConnection() override; sigc::connection *getPreviewDeltaEButtonConnection() override;
@ -907,9 +958,12 @@ private:
Adjuster* const nlpat; Adjuster* const nlpat;
Adjuster* const nlrad; Adjuster* const nlrad;
Adjuster* const nlgam; Adjuster* const nlgam;
Adjuster* const nliter;
Adjuster* const bilateral; Adjuster* const bilateral;
Adjuster* const sensiden; Adjuster* const sensiden;
rtengine::ProcEvent Evlocallabnliter;
Adjuster* const reparden; Adjuster* const reparden;
Gtk::Button* neutral; Gtk::Button* neutral;
MyExpander* const expmaskbl; MyExpander* const expmaskbl;
@ -1279,6 +1333,7 @@ private:
Adjuster* const clarisoft; Adjuster* const clarisoft;
Gtk::CheckButton* const origlc; Gtk::CheckButton* const origlc;
MyExpander* const expcontrastpyr; MyExpander* const expcontrastpyr;
Gtk::Frame* const gradwavFrame;
Gtk::CheckButton* const wavgradl; Gtk::CheckButton* const wavgradl;
Adjuster* const sigmalc2; Adjuster* const sigmalc2;
Adjuster* const strwav; Adjuster* const strwav;
@ -1358,6 +1413,7 @@ public:
bool isMaskViewActive() override; bool isMaskViewActive() override;
void resetMaskView() override; void resetMaskView() override;
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
int nbmaskcont;
Gtk::ToggleButton *getPreviewDeltaEButton() const override; Gtk::ToggleButton *getPreviewDeltaEButton() const override;
sigc::connection *getPreviewDeltaEButtonConnection() override; sigc::connection *getPreviewDeltaEButtonConnection() override;
@ -1578,7 +1634,7 @@ public:
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
void updateguilog(int spottype); void updateguilog(int spottype);
void previewlogChanged(); void previewlogChanged();
int nbmasklog;
Gtk::ToggleButton *getPreviewDeltaEButton() const override; Gtk::ToggleButton *getPreviewDeltaEButton() const override;
sigc::connection *getPreviewDeltaEButtonConnection() override; sigc::connection *getPreviewDeltaEButtonConnection() override;
@ -2003,7 +2059,7 @@ public:
bool isMaskViewActive() override; bool isMaskViewActive() override;
void resetMaskView() override; void resetMaskView() override;
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
int nbmaskcie;
Gtk::ToggleButton *getPreviewDeltaEButton() const override; Gtk::ToggleButton *getPreviewDeltaEButton() const override;
sigc::connection *getPreviewDeltaEButtonConnection() override; sigc::connection *getPreviewDeltaEButtonConnection() override;

View File

@ -2544,6 +2544,7 @@ LocallabContrast::LocallabContrast():
clarisoft(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 1.))), clarisoft(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 1.))),
origlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ORIGLC")))), origlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ORIGLC")))),
expcontrastpyr(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::Box())))), expcontrastpyr(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::Box())))),
gradwavFrame(Gtk::manage(new Gtk::Frame())),
wavgradl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_GRALWFRA")))), wavgradl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_GRALWFRA")))),
sigmalc2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))), sigmalc2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))),
strwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4.0, 4.0, 0.05, 0.))), strwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4.0, 4.0, 0.05, 0.))),
@ -2966,7 +2967,6 @@ LocallabContrast::LocallabContrast():
clariFrame->add(*clariBox); clariFrame->add(*clariBox);
pack_start(*clariFrame); pack_start(*clariFrame);
ToolParamBlock* const blurcontBox = Gtk::manage(new ToolParamBlock()); ToolParamBlock* const blurcontBox = Gtk::manage(new ToolParamBlock());
Gtk::Frame* const gradwavFrame = Gtk::manage(new Gtk::Frame());
gradwavFrame->set_label_align(0.025, 0.5); gradwavFrame->set_label_align(0.025, 0.5);
gradwavFrame->set_label_widget(*wavgradl); gradwavFrame->set_label_widget(*wavgradl);
ToolParamBlock* const gradwavBox = Gtk::manage(new ToolParamBlock()); ToolParamBlock* const gradwavBox = Gtk::manage(new ToolParamBlock());
@ -3384,7 +3384,7 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa
{ {
// Disable all listeners // Disable all listeners
disableListener(); disableListener();
nbmaskcont = 0;
// Update GUI to selected spot value // Update GUI to selected spot value
const int index = pp->locallab.selspot; const int index = pp->locallab.selspot;
@ -6118,7 +6118,7 @@ void LocallabLog::read(const rtengine::procparams::ProcParams* pp, const ParamsE
{ {
// Disable all listeners // Disable all listeners
disableListener(); disableListener();
nbmasklog = 0;
// Update GUI to selected spot value // Update GUI to selected spot value
const int index = pp->locallab.selspot; const int index = pp->locallab.selspot;
@ -8162,7 +8162,7 @@ Locallabcie::Locallabcie():
refi(Gtk::manage(new Adjuster(M("TC_PRIM_REFI"), -0.5, 1., 0.0001, 0.))), 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")))), 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")))), colorFramecie(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COLORFRAME")))),
catBox(Gtk::manage(new Gtk::Box())), catBox(Gtk::manage(new Gtk::Box())),
@ -9402,6 +9402,7 @@ void Locallabcie::updateguicie(int spottype)
} }
void Locallabcie::previewcieChanged() void Locallabcie::previewcieChanged()
{ {
@ -9491,6 +9492,8 @@ void Locallabcie::updateAdviceTooltips(const bool showTooltips)
mask2cieCurveEditorG->set_tooltip_text(M("TP_LOCALLAB_CONTRASTCURVMASK_TOOLTIP")); mask2cieCurveEditorG->set_tooltip_text(M("TP_LOCALLAB_CONTRASTCURVMASK_TOOLTIP"));
Lmaskcieshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); Lmaskcieshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP"));
exprecovcie->set_tooltip_markup(M("TP_LOCALLAB_MASKRESH_TOOLTIP")); exprecovcie->set_tooltip_markup(M("TP_LOCALLAB_MASKRESH_TOOLTIP"));
expgradcie->set_tooltip_text(M("TP_LOCALLAB_EXPGRADCOL_TOOLTIP"));
strumaskcie->set_tooltip_text(M("TP_LOCALLAB_STRUSTRMASK_TOOLTIP")); strumaskcie->set_tooltip_text(M("TP_LOCALLAB_STRUSTRMASK_TOOLTIP"));
fftcieMask->set_tooltip_text(M("TP_LOCALLAB_FFTMASK_TOOLTIP")); fftcieMask->set_tooltip_text(M("TP_LOCALLAB_FFTMASK_TOOLTIP"));
contcie->set_tooltip_text(M("TP_LOCALLAB_CONTTHMASK_TOOLTIP")); contcie->set_tooltip_text(M("TP_LOCALLAB_CONTTHMASK_TOOLTIP"));
@ -9712,7 +9715,7 @@ void Locallabcie::showmaskcieMethodChanged()
// If mask preview is activated, deactivate all other tool mask preview // If mask preview is activated, deactivate all other tool mask preview
if (locToolListener) { if (locToolListener) {
locToolListener->resetOtherMaskView(this); // locToolListener->resetOtherMaskView(this);
} }
if (exp->getEnabled()) { if (exp->getEnabled()) {
@ -9853,7 +9856,7 @@ void Locallabcie::fftcieMaskChanged()
void Locallabcie::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) void Locallabcie::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited)
{ {
disableListener(); disableListener();
nbmaskcie = 0;
// Update GUI to selected spot value // Update GUI to selected spot value
const int index = pp->locallab.selspot; const int index = pp->locallab.selspot;
Glib::ustring prof = pp->icm.workingProfile; Glib::ustring prof = pp->icm.workingProfile;
@ -10325,7 +10328,8 @@ void Locallabcie::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedi
spot.labgridcieWx, spot.labgridcieWx,
spot.labgridcieWy, spot.labgridcieWy,
spot.labgridcieMx, spot.labgridcieMx,
spot.labgridcieMy); spot.labgridcieMy
);
spot.Autograycie = Autograycie->get_active(); spot.Autograycie = Autograycie->get_active();
spot.sigybjz12 = sigybjz12->get_active(); spot.sigybjz12 = sigybjz12->get_active();
@ -10716,7 +10720,7 @@ void Locallabcie::updateiPrimloc(const float r_x, const float r_y, const float g
bluxl->setValue(b_x); bluxl->setValue(b_x);
bluyl->setValue(b_y); 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, false);
/* /*
if(lkg) { if(lkg) {
slopesmor->setValue(slg); slopesmor->setValue(slg);
slopesmob->setValue(slg); slopesmob->setValue(slg);
@ -10724,7 +10728,7 @@ void Locallabcie::updateiPrimloc(const float r_x, const float r_y, const float g
adjusterChanged(slopesmob, 0.); adjusterChanged(slopesmob, 0.);
} }
*/ */
enableListener(); enableListener();
return false; return false;
} }
@ -11377,7 +11381,6 @@ void Locallabcie::modecamChanged()
} else if (mode != Simple){ } else if (mode != Simple){
exprecovcie->show(); exprecovcie->show();
expgradcie->show();
expmaskcie->show(); expmaskcie->show();
qjmodcam(); qjmodcam();
@ -11423,7 +11426,6 @@ void Locallabcie::modecamChanged()
expcam16->hide(); expcam16->hide();
expcamviewing->hide(); expcamviewing->hide();
catadcie->hide(); catadcie->hide();
expgradcie->hide();
expcam16->hide(); expcam16->hide();
lapmaskcie->hide(); lapmaskcie->hide();
lapmaskcie->setValue(defSpot.lapmaskcie); lapmaskcie->setValue(defSpot.lapmaskcie);
@ -11431,7 +11433,6 @@ void Locallabcie::modecamChanged()
} else if (mode != Simple){ } else if (mode != Simple){
exprecovcie->show(); exprecovcie->show();
expgradcie->show();
expmaskcie->show(); expmaskcie->show();
} }
} else { } else {
@ -11460,7 +11461,6 @@ void Locallabcie::modecamChanged()
bevwevFrame->show(); bevwevFrame->show();
catadcie->hide(); catadcie->hide();
expcamviewing->hide(); expcamviewing->hide();
expgradcie->hide();
expcam16->hide(); expcam16->hide();
lapmaskcie->hide(); lapmaskcie->hide();
lapmaskcie->setValue(defSpot.lapmaskcie); lapmaskcie->setValue(defSpot.lapmaskcie);
@ -11487,7 +11487,6 @@ void Locallabcie::modecamChanged()
expcamviewing->show(); expcamviewing->show();
if (mode != Simple){ if (mode != Simple){
exprecovcie->show(); exprecovcie->show();
expgradcie->show();
expmaskcie->show(); expmaskcie->show();
} }
@ -11525,14 +11524,12 @@ void Locallabcie::modecieChanged()
const int mode = complexity->get_active_row_number(); const int mode = complexity->get_active_row_number();
exprecovcie->show(); exprecovcie->show();
expmaskcie->show(); expmaskcie->show();
expgradcie->show();
if (modecie->get_active_row_number() > 0 && mode == Expert) { if (modecie->get_active_row_number() > 0 && mode == Expert) {
sensicie->hide(); sensicie->hide();
reparcie->hide(); reparcie->hide();
exprecovcie->show(); exprecovcie->show();
expmaskcie->show(); expmaskcie->show();
expgradcie->hide();
} else { } else {
sensicie->show(); sensicie->show();
@ -11541,7 +11538,6 @@ void Locallabcie::modecieChanged()
if (mode == Expert) { if (mode == Expert) {
exprecovcie->show(); exprecovcie->show();
expmaskcie->show(); expmaskcie->show();
expgradcie->show();
} }
} }
@ -11821,7 +11817,6 @@ void Locallabcie::guijzczhz()
expmaskcie->hide(); expmaskcie->hide();
expprecam->hide(); expprecam->hide();
exprecovcie->hide(); exprecovcie->hide();
expgradcie->hide();
lapmaskcie->hide(); lapmaskcie->hide();
} }
@ -11938,7 +11933,6 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
sourceGraycie->show(); sourceGraycie->show();
expcamscene->show(); expcamscene->show();
exprecovcie->hide(); exprecovcie->hide();
expgradcie->hide();
maskusablecie->hide(); maskusablecie->hide();
maskunusablecie->hide(); maskunusablecie->hide();
decaycie->hide(); decaycie->hide();
@ -11974,7 +11968,6 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
primillFrame->hide(); primillFrame->hide();
expmaskcie->hide(); expmaskcie->hide();
exprecovcie->hide(); exprecovcie->hide();
expgradcie->hide();
sigmoidjzFrame12->hide(); sigmoidjzFrame12->hide();
sigmoidjzFrame->hide(); sigmoidjzFrame->hide();
sigmoidFrame12->hide(); sigmoidFrame12->hide();
@ -12086,7 +12079,6 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
lightsigqcie->hide(); lightsigqcie->hide();
expmaskcie->hide(); expmaskcie->hide();
exprecovcie->hide(); exprecovcie->hide();
expgradcie->hide();
break; break;
@ -12156,7 +12148,6 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
sourceGraycie->show(); sourceGraycie->show();
expcamscene->show(); expcamscene->show();
exprecovcie->show(); exprecovcie->show();
expgradcie->show();
expmaskcie->show(); expmaskcie->show();
decaycie->hide(); decaycie->hide();
lapmaskcie->hide(); lapmaskcie->hide();
@ -12282,7 +12273,6 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
qjmodjz(); qjmodjz();
} else { } else {
exprecovcie->show(); exprecovcie->show();
expgradcie->show();
expmaskcie->show(); expmaskcie->show();
} }
@ -12290,7 +12280,6 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
if (modecie->get_active_row_number() > 0) { if (modecie->get_active_row_number() > 0) {
exprecovcie->hide(); exprecovcie->hide();
expmaskcie->hide(); expmaskcie->hide();
expgradcie->hide();
} }
contsigqcie->hide(); contsigqcie->hide();
@ -12355,7 +12344,6 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
sourceGraycie->show(); sourceGraycie->show();
expcamscene->show(); expcamscene->show();
exprecovcie->show(); exprecovcie->show();
expgradcie->show();
decaycie->show(); decaycie->show();
lapmaskcie->show(); lapmaskcie->show();
gammaskcie->show(); gammaskcie->show();
@ -12484,7 +12472,6 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
sigmoidjzFrame12->show(); sigmoidjzFrame12->show();
sigmoidFrame12->hide(); sigmoidFrame12->hide();
expprecam->hide(); expprecam->hide();
expgradcie->hide();
expcam16->hide(); expcam16->hide();
exprecovcie->show(); exprecovcie->show();
expmaskcie->show(); expmaskcie->show();
@ -12617,12 +12604,10 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
catadcie->hide(); catadcie->hide();
expcamviewing->hide(); expcamviewing->hide();
exprecovcie->show(); exprecovcie->show();
expgradcie->show();
expmaskcie->show(); expmaskcie->show();
maskusablecie->show(); maskusablecie->show();
maskunusablecie->show(); maskunusablecie->show();
expprecam->hide(); expprecam->hide();
expgradcie->hide();
expcam16->hide(); expcam16->hide();
lapmaskcie->hide(); lapmaskcie->hide();
lapmaskcie->setValue(defSpot.lapmaskcie); lapmaskcie->setValue(defSpot.lapmaskcie);
@ -12642,7 +12627,6 @@ void Locallabcie::updateGUIToMode(const modeType new_type)
if (modecie->get_active_row_number() > 0) { if (modecie->get_active_row_number() > 0) {
exprecovcie->hide(); exprecovcie->hide();
expmaskcie->hide(); expmaskcie->hide();
expgradcie->hide();
} }
contsigqcie->hide(); contsigqcie->hide();
@ -12657,7 +12641,6 @@ void Locallabcie::updatecieGUI()
const int mode = complexity->get_active_row_number(); const int mode = complexity->get_active_row_number();
expmaskcie->show(); expmaskcie->show();
exprecovcie->show(); exprecovcie->show();
expgradcie->show();
contsigqcie->hide(); contsigqcie->hide();
lightsigqcie->hide(); lightsigqcie->hide();
@ -12671,13 +12654,11 @@ void Locallabcie::updatecieGUI()
sensicie->hide(); sensicie->hide();
reparcie->hide(); reparcie->hide();
exprecovcie->hide(); exprecovcie->hide();
expgradcie->hide();
expmaskcie->hide(); expmaskcie->hide();
} else { } else {
sensicie->show(); sensicie->show();
reparcie->show(); reparcie->show();
exprecovcie->show(); exprecovcie->show();
expgradcie->show();
expmaskcie->show(); expmaskcie->show();
} }
@ -12694,7 +12675,6 @@ void Locallabcie::updatecieGUI()
expmaskcie->hide(); expmaskcie->hide();
exprecovcie->hide(); exprecovcie->hide();
primillFrame->hide(); primillFrame->hide();
expgradcie->hide();
} else if (mode == Normal) { } else if (mode == Normal) {
primillFrame->hide(); primillFrame->hide();
@ -12861,7 +12841,6 @@ void Locallabcie::updatecieGUI()
if (modecie->get_active_row_number() > 0) { if (modecie->get_active_row_number() > 0) {
exprecovcie->hide(); exprecovcie->hide();
expgradcie->hide();
expmaskcie->hide(); expmaskcie->hide();
} }
@ -12881,7 +12860,6 @@ void Locallabcie::updatecieGUI()
catadcie->hide(); catadcie->hide();
expprecam->hide(); expprecam->hide();
expcamviewing->hide(); expcamviewing->hide();
expgradcie->hide();
expcam16->hide(); expcam16->hide();
exprecovcie->show(); exprecovcie->show();
expmaskcie->show(); expmaskcie->show();
@ -12917,9 +12895,9 @@ void Locallabcie::convertParamToSimple()
showmaskcieMethod->set_active(0); showmaskcieMethod->set_active(0);
enacieMask->set_active(defSpot.enacieMask); enacieMask->set_active(defSpot.enacieMask);
enacieMaskall->set_active(defSpot.enacieMaskall); enacieMaskall->set_active(defSpot.enacieMaskall);
strgradcie->setValue(defSpot.strgradcie); //strgradcie->setValue(defSpot.strgradcie);
anggradcie->setValue(defSpot.anggradcie); //anggradcie->setValue(defSpot.anggradcie);
feathercie->setValue(defSpot.feathercie); //feathercie->setValue(defSpot.feathercie);
refi->setValue(defSpot.refi); refi->setValue(defSpot.refi);
modecie->set_active(0); modecie->set_active(0);
primMethod->set_active(0);//Prophoto primMethod->set_active(0);//Prophoto
@ -13130,7 +13108,8 @@ void Locallabcie::setDefaults(const rtengine::procparams::ProcParams* defParams,
defSpot.labgridcieWx, defSpot.labgridcieWx,
defSpot.labgridcieWy, defSpot.labgridcieWy,
defSpot.labgridcieMx, defSpot.labgridcieMx,
defSpot.labgridcieMy); defSpot.labgridcieMy
);
} }
} }
@ -13938,7 +13917,7 @@ void Locallabcie::adjusterChanged(Adjuster* a, double newval)
if (listener) { if (listener) {
listener->panelChanged(Evlocallabstrgradcie, listener->panelChanged(Evlocallabstrgradcie,
strgradcie->getTextValue() + spName); strgradcie->getTextValue() + spName);
} }
} }
if (a == anggradcie) { if (a == anggradcie) {

View File

@ -185,6 +185,10 @@ void Options::updatePaths()
lastlocalCurvesDir = preferredPath; 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)) { if (lastPFCurvesDir.empty() || !Glib::file_test(lastPFCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test(lastPFCurvesDir, Glib::FILE_TEST_IS_DIR)) {
lastPFCurvesDir = preferredPath; lastPFCurvesDir = preferredPath;
} }
@ -692,6 +696,7 @@ void Options::setDefaults()
lastDenoiseCurvesDir = ""; lastDenoiseCurvesDir = "";
lastWaveletCurvesDir = ""; lastWaveletCurvesDir = "";
lastlocalCurvesDir = ""; lastlocalCurvesDir = "";
lastlocalCurvesDirghs = "";
lastPFCurvesDir = ""; lastPFCurvesDir = "";
lastHsvCurvesDir = ""; lastHsvCurvesDir = "";
lastToneCurvesDir = ""; lastToneCurvesDir = "";
@ -2314,6 +2319,7 @@ void Options::readFromFile(Glib::ustring fname)
safeDirGet(keyFile, "Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); safeDirGet(keyFile, "Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir);
safeDirGet(keyFile, "Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); safeDirGet(keyFile, "Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir);
safeDirGet(keyFile, "Dialogs", "LastlocalCurvesDir", lastlocalCurvesDir); safeDirGet(keyFile, "Dialogs", "LastlocalCurvesDir", lastlocalCurvesDir);
safeDirGet(keyFile, "Dialogs", "LastlocalCurvesDirghs", lastlocalCurvesDirghs);
safeDirGet(keyFile, "Dialogs", "LastPFCurvesDir", lastPFCurvesDir); safeDirGet(keyFile, "Dialogs", "LastPFCurvesDir", lastPFCurvesDir);
safeDirGet(keyFile, "Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); safeDirGet(keyFile, "Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir);
@ -2813,6 +2819,7 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_string("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); keyFile.set_string("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir);
keyFile.set_string("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); keyFile.set_string("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir);
keyFile.set_string("Dialogs", "LastlocalCurvesDir", lastlocalCurvesDir); keyFile.set_string("Dialogs", "LastlocalCurvesDir", lastlocalCurvesDir);
keyFile.set_string("Dialogs", "LastlocalCurvesDirghs", lastlocalCurvesDirghs);
keyFile.set_string("Dialogs", "LastPFCurvesDir", lastPFCurvesDir); keyFile.set_string("Dialogs", "LastPFCurvesDir", lastPFCurvesDir);
keyFile.set_string("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); keyFile.set_string("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir);
keyFile.set_string("Dialogs", "LastBWCurvesDir", lastBWCurvesDir); keyFile.set_string("Dialogs", "LastBWCurvesDir", lastBWCurvesDir);

View File

@ -488,6 +488,7 @@ public:
Glib::ustring lastWaveletCurvesDir; Glib::ustring lastWaveletCurvesDir;
Glib::ustring lastIcmCurvesDir; Glib::ustring lastIcmCurvesDir;
Glib::ustring lastlocalCurvesDir; Glib::ustring lastlocalCurvesDir;
Glib::ustring lastlocalCurvesDirghs;
Glib::ustring lastPFCurvesDir; Glib::ustring lastPFCurvesDir;
Glib::ustring lastHsvCurvesDir; Glib::ustring lastHsvCurvesDir;
Glib::ustring lastToneCurvesDir; Glib::ustring lastToneCurvesDir;

View File

@ -1455,6 +1455,21 @@ 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).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).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).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_MID = locallab.spots.at(j).ghs_MID && pSpot.ghs_MID == otherSpot.ghs_MID;
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;
for (int k = 0; k < 6; k++) { 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]; locallab.spots.at(j).multsh[k] = locallab.spots.at(j).multsh[k] && pSpot.multsh[k] == otherSpot.multsh[k];
@ -1588,6 +1603,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).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).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).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).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).reparden = locallab.spots.at(j).reparden && pSpot.reparden == otherSpot.reparden;
locallab.spots.at(j).detailthr = locallab.spots.at(j).detailthr && pSpot.detailthr == otherSpot.detailthr; locallab.spots.at(j).detailthr = locallab.spots.at(j).detailthr && pSpot.detailthr == otherSpot.detailthr;
@ -4514,6 +4530,67 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).shMethod = mods.locallab.spots.at(i).shMethod; 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).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_MID) {
toEdit.locallab.spots.at(i).ghs_MID = mods.locallab.spots.at(i).ghs_MID;
}
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++) { for (int j = 0; j < 6; j++) {
if (locallab.spots.at(i).multsh[j]) { if (locallab.spots.at(i).multsh[j]) {
toEdit.locallab.spots.at(i).multsh[j] = mods.locallab.spots.at(i).multsh[j]; toEdit.locallab.spots.at(i).multsh[j] = mods.locallab.spots.at(i).multsh[j];
@ -5023,6 +5100,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).nlgam = mods.locallab.spots.at(i).nlgam; 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) { if (locallab.spots.at(i).sensiden) {
toEdit.locallab.spots.at(i).sensiden = mods.locallab.spots.at(i).sensiden; toEdit.locallab.spots.at(i).sensiden = mods.locallab.spots.at(i).sensiden;
} }
@ -8481,6 +8562,22 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
expshadhigh(v), expshadhigh(v),
complexshadhigh(v), complexshadhigh(v),
shMethod(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_MID(v),
ghs_BLP(v),
ghs_HLP(v),
ghs_smooth(v),
ghs_inv(v),
multsh{v, v, v, v, v, v, v}, multsh{v, v, v, v, v, v, v},
highlights(v), highlights(v),
h_tonalwidth(v), h_tonalwidth(v),
@ -8610,6 +8707,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
nlpat(v), nlpat(v),
nlrad(v), nlrad(v),
nlgam(v), nlgam(v),
nliter(v),
sensiden(v), sensiden(v),
reparden(v), reparden(v),
detailthr(v), detailthr(v),
@ -9267,6 +9365,21 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
expshadhigh = v; expshadhigh = v;
complexshadhigh = v; complexshadhigh = v;
shMethod = 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_MID = v;
ghs_BLP = v;
ghs_HLP = v;
ghs_smooth = v;
ghs_inv = v;
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
multsh[i] = v; multsh[i] = v;
@ -9400,6 +9513,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
nlpat = v; nlpat = v;
nlrad = v; nlrad = v;
nlgam = v; nlgam = v;
nliter = v;
sensiden = v; sensiden = v;
reparden = v; reparden = v;
detailthr = v; detailthr = v;

View File

@ -596,6 +596,22 @@ public:
bool expshadhigh; bool expshadhigh;
bool complexshadhigh; bool complexshadhigh;
bool shMethod; 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_MID;
bool ghs_BLP;
bool ghs_HLP;
bool ghs_smooth;
bool ghs_inv;
bool multsh[7]; bool multsh[7];
bool highlights; bool highlights;
bool h_tonalwidth; bool h_tonalwidth;
@ -725,6 +741,7 @@ public:
bool nlpat; bool nlpat;
bool nlrad; bool nlrad;
bool nlgam; bool nlgam;
bool nliter;
bool sensiden; bool sensiden;
bool reparden; bool reparden;
bool detailthr; bool detailthr;

View File

@ -1752,7 +1752,8 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
strend->setValue(pp->wavelet.strend); strend->setValue(pp->wavelet.strend);
detend->setValue(pp->wavelet.detend); detend->setValue(pp->wavelet.detend);
thrend->setValue(pp->wavelet.thrend); 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, false);
sigm->setValue(pp->wavelet.sigm); sigm->setValue(pp->wavelet.sigm);
levden->setValue(pp->wavelet.levden); levden->setValue(pp->wavelet.levden);
@ -2215,7 +2216,8 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
pp->wavelet.chromco = chromco->getValue(); pp->wavelet.chromco = chromco->getValue();
double zerox = 0.; double zerox = 0.;
double zeroy = 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);
pp->wavelet.labgridALow *= WaveletParams::LABGRID_CORR_MAX; pp->wavelet.labgridALow *= WaveletParams::LABGRID_CORR_MAX;
pp->wavelet.labgridAHigh *= WaveletParams::LABGRID_CORR_MAX; pp->wavelet.labgridAHigh *= WaveletParams::LABGRID_CORR_MAX;
pp->wavelet.labgridBLow *= WaveletParams::LABGRID_CORR_MAX; pp->wavelet.labgridBLow *= WaveletParams::LABGRID_CORR_MAX;
@ -2677,7 +2679,8 @@ void Wavelet::setDefaults(const ProcParams* defParams, const ParamsEdited* pedit
balchrom->setDefault(defParams->wavelet.balchrom); balchrom->setDefault(defParams->wavelet.balchrom);
chromfi->setDefault(defParams->wavelet.chromfi); chromfi->setDefault(defParams->wavelet.chromfi);
chromco->setDefault(defParams->wavelet.chromco); 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);
greenlow->setDefault(defParams->wavelet.greenlow); greenlow->setDefault(defParams->wavelet.greenlow);
bluelow->setDefault(defParams->wavelet.bluelow); bluelow->setDefault(defParams->wavelet.bluelow);