1 /*
2  *  This file is part of RawTherapee.
3  *
4  *  Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
5  *
6  *  RawTherapee is free software: you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation, either version 3 of the License, or
9  *  (at your option) any later version.
10  *
11  *  RawTherapee is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with RawTherapee.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 #pragma once
20 
21 #include <glibmm/ustring.h>
22 namespace rtengine
23 {
24 
25 /** This structure holds the global parameters used by the RT engine. */
26 class Settings
27 {
28 public:
29     Glib::ustring   iccDirectory;           ///< The directory containing the possible output icc profiles
30     int             viewingdevice;          // white of output device (D50...D65..)
31     int             viewingdevicegrey;      // level of grey output device
32     int             viewinggreySc;          // level of grey Scene
33     int             leveldnv;               // level of crop denoise
34     int             leveldnti;              // size of tiles denoise
35     int             leveldnaut;             // level of auto denoise
36     int             leveldnliss;            // level of auto multi zone
37     int             leveldnautsimpl;        // STD or EXPERT
38 
39     Glib::ustring   printerProfile;         ///< ICC profile name used for soft-proofing a printer output
40     int             printerIntent;          ///< Colorimetric intent used with the above profile
41     bool            printerBPC;             ///< Black Point Compensation for the Labimage->Printer->Monitor transform
42     Glib::ustring   monitorProfile;         ///< ICC profile name used for the monitor
43     int             monitorIntent;          ///< Colorimetric intent used with the above profile
44     bool            monitorBPC;             ///< Black Point Compensation for the Labimage->Monitor transform (directly, i.e. not soft-proofing and no WCS in between)
45     bool            autoMonitorProfile;     ///< Try to auto-determine the correct monitor color profile
46     bool            autocielab;
47     bool            rgbcurveslumamode_gamut;// controls gamut enforcement for RGB curves in lumamode
48     bool            verbose;
49     Glib::ustring   darkFramesPath;         ///< The default directory for dark frames
50     Glib::ustring   flatFieldsPath;         ///< The default directory for flat fields
51 
52     Glib::ustring   adobe;                  // filename of AdobeRGB1998 profile (default to the bundled one)
53     Glib::ustring   prophoto;               // filename of Prophoto     profile (default to the bundled one)
54     Glib::ustring   widegamut;              // filename of WidegamutRGB profile (default to the bundled one)
55     Glib::ustring   beta;                   // filename of BetaRGB      profile (default to the bundled one)
56     Glib::ustring   best;                   // filename of BestRGB      profile (default to the bundled one)
57     Glib::ustring   bruce;                  // filename of BruceRGB     profile (default to the bundled one)
58     Glib::ustring   srgb;                   // filename of sRGB         profile (default to the bundled one)
59     Glib::ustring   rec2020;                // filename of Rec2020      profile (default to the bundled one)
60     Glib::ustring   ACESp0;                 // filename of ACES P0      profile (default to the bundled one)
61     Glib::ustring   ACESp1;                 // filename of ACES P1      profile (default to the bundled one)
62 
63     bool            gamutICC; // no longer used
64     bool            gamutLch;
65     bool            HistogramWorking;       // true: histogram is display the value of the image computed in the Working profile
66                                             // false: histogram is display the value of the image computed in the Output profile
67     int             amchroma;
68     int             protectred;
69     double          protectredh;
70     double          nrauto;
71     double          nrautomax;
72     double          nrhigh;
73     int             nrwavlevel;
74     bool            daubech;
75     bool            ciebadpixgauss;
76     int             CRI_color; // Number for display Lab value; 0 = disabled
77     int             denoiselabgamma; // 0=gamma 26 11   1=gamma 40 5  2 =gamma 55 10
78     //  double          colortoningab; //
79     //  double          decaction;
80     //  bool            bw_complementary;
81     double          level0_cbdl;
82     double          level123_cbdl;
83     Glib::ustring   lensfunDbDirectory; // The directory containing the lensfun database. If empty, the system defaults will be used, as described in https://lensfun.github.io/manual/latest/dbsearch.html
84 
85     enum class ThumbnailInspectorMode {
86         JPEG,
87         RAW,
88         RAW_IF_NOT_JPEG_FULLSIZE
89     };
90     ThumbnailInspectorMode thumbnail_inspector_mode;
91 
92     /** Creates a new instance of Settings.
93       * @return a pointer to the new Settings instance. */
94     static Settings* create();
95     /** Destroys an instance of Settings.
96       * @param s a pointer to the Settings instance to destroy. */
97     static void      destroy(Settings* s);
98 };
99 extern const Settings* settings;
100 }
101