* Change TRC in the process * Improve GUI slope * Add tooltip output profile * Various change to enable and tooltip * Chnage rtthumbnail * Small change tooltip trc * Another small change tooltip * Improve GUI - change default TRC BT709 - change tooltip * Other GUI improvment * Small changes to BT709 values * Various change to TRC - add illuminant working profile * Change labels tooltip TRC illuminant * Display wp in console if wp provided * Change tooltip * Change max wlope * Init trc + illum + primaries * Add black point compensation * Change location abstract * Fixed bug with rtthumbnail... * Added tooltip * Logscale for wslope * Change tooltip abstract * Change labels tooltips abstract profile * Added 6 sliders custom primaries X and Y * Change GUI custom primaries * Use custom primaries abstract profiles * Tooltip with primaries red green blue * Fixed warning gtk * Change one tooltip * Change range custom primaries * Change GUI default Primaries * Change one tooltip * Speedup for trc * Rendering intent for abstract profile * Hide intent abstract * Preserve neutral tones * Chnage settings preserves neutral tones * Improve GUI * Improvment to preserv * Clean code - speedup TRC when illuminant and primaries default * Change label * Change bad default value Blux * Add forgoten illuminant when selecting primaries * clean code * Change labels * improve workingtrc for LA * Change default primaries when select default * Added others working profile to primaries * Change labels and GUI * Change tooltip * CIExy diagram displaying the primaries (interactive) and the white point (#6207) * Ciexy diagram * Change to Ciexy graph * Change graph and defaut coordonates * Various changes to graph - params * Disable setListener(ToolPanelListener) * Add some graduation to graph * Clean comment code graph * Change radius 0 * Enable sensitive graph Ciexy * update Ciexy graph with primaries * Remove reset button graph * Change labels and behavior * First step third spot green * Second step 3rd spot green * First try 3 primaries graph Ciexy * Fixed bad behavior in lab grid * Fixed another bad behavior graph * Clean and comment code * Change default gamma * More accurate graph Cie xy * Added white point to Ciexy graph * Added tooltip Cie xy diagram * Improvment when illuminant change * Refine diagram CIE xy - added WP 2000K * White point D120 + tooltip * Change label * Change labels * Change tooltips * Improve diagram CIE xy with parabolic * Other parabolic to improve Cie xy diagram * Small change GUI * Added Label CIE xy - change labels * Change behavior when none - change labels * Improve gUI and trys to fix LGTM alerts * CIE xy change set sensitive * Improve tooltip primaries sliders * Adapt tooltip to new labels * Fixed crash and some bad behavior * First fix bad behavior with some primaries * Second fixed bad behavior primaries * Third fixed bad behavior primaries * Change white point BestRGB * Change order rgb in history msg Ciexy * Change tooltip * Change tooltip * Improve GUI primaries * Illuminant 1500K - display in console matrix XYZ-RGB * Improve GUI illuminant * Change a tooltip * Somme changes to GUI and verbose * Test code for wprim in read * clean code for wprims * further cleanups, not tested * Some cleanups and bugfixes, #5949 * Simplify `std::unique_ptr<>` dereferencing Also some minor cleanups. * Some changes suggested by Floessie * Others change suggested * Others changes suggested by Floessie * Forgotten change in procparams.cc * Added black and white for use with the primaries channel mixer * Small change behavior GUI - illuminant * Change pragma omp in iplab2rgb * Add enums and clean up * Remove unused code icmpanel.cc * Fix LGTM alert, #5949 Co-authored-by: Ingo Weyrich <heckflosse67@gmx.de> Co-authored-by: Flössie <floessie.mail@gmail.com>
218 lines
6.2 KiB
C++
218 lines
6.2 KiB
C++
/*
|
|
* This file is part of RawTherapee.
|
|
*
|
|
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
|
*
|
|
* RawTherapee is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* RawTherapee is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include <gtkmm.h>
|
|
|
|
#include "adjuster.h"
|
|
#include "guiutils.h"
|
|
#include "popupbutton.h"
|
|
#include "toolpanel.h"
|
|
|
|
#include "../rtengine/imagedata.h"
|
|
|
|
class ICMPanelListener
|
|
{
|
|
public:
|
|
virtual ~ICMPanelListener() = default;
|
|
virtual void saveInputICCReference(const Glib::ustring& fname, bool apply_wb) = 0;
|
|
};
|
|
|
|
class LabGrid;
|
|
|
|
class ICMPanel final :
|
|
public ToolParamBlock,
|
|
public FoldableToolPanel,
|
|
public rtengine::AutoprimListener,
|
|
public AdjusterListener
|
|
{
|
|
|
|
protected:
|
|
Gtk::Frame* dcpFrame;
|
|
Gtk::Frame* coipFrame;
|
|
Gtk::Frame* redFrame;
|
|
|
|
Adjuster* wGamma;
|
|
Adjuster* wSlope;
|
|
Adjuster* redx;
|
|
Adjuster* redy;
|
|
Adjuster* grex;
|
|
Adjuster* grey;
|
|
Adjuster* blux;
|
|
Adjuster* bluy;
|
|
Adjuster* preser;
|
|
|
|
Gtk::Label* labmga;
|
|
Gtk::Box* gabox;
|
|
Gtk::Label* blr;
|
|
Gtk::Label* blg;
|
|
Gtk::Label* blb;
|
|
|
|
bool lastToneCurve;
|
|
sigc::connection tcurveconn;
|
|
bool lastApplyLookTable;
|
|
sigc::connection ltableconn;
|
|
bool lastApplyBaselineExposureOffset;
|
|
sigc::connection beoconn;
|
|
bool lastApplyHueSatMap;
|
|
sigc::connection hsmconn;
|
|
bool lastobpc;
|
|
sigc::connection obpcconn;
|
|
bool lastfbw;
|
|
sigc::connection fbwconn;
|
|
bool isBatchMode;
|
|
|
|
private:
|
|
rtengine::ProcEvent EvICMprimariMethod;
|
|
rtengine::ProcEvent EvICMprofileMethod;
|
|
rtengine::ProcEvent EvICMtempMethod;
|
|
rtengine::ProcEvent EvICMpredx;
|
|
rtengine::ProcEvent EvICMpredy;
|
|
rtengine::ProcEvent EvICMpgrex;
|
|
rtengine::ProcEvent EvICMpgrey;
|
|
rtengine::ProcEvent EvICMpblux;
|
|
rtengine::ProcEvent EvICMpbluy;
|
|
rtengine::ProcEvent EvICMgamm;
|
|
rtengine::ProcEvent EvICMslop;
|
|
rtengine::ProcEvent EvICMtrcinMethod;
|
|
rtengine::ProcEvent EvICMwillMethod;
|
|
rtengine::ProcEvent EvICMwprimMethod;
|
|
rtengine::ProcEvent EvICMredx;
|
|
rtengine::ProcEvent EvICMredy;
|
|
rtengine::ProcEvent EvICMgrex;
|
|
rtengine::ProcEvent EvICMgrey;
|
|
rtengine::ProcEvent EvICMblux;
|
|
rtengine::ProcEvent EvICMbluy;
|
|
rtengine::ProcEvent EvaIntent;
|
|
rtengine::ProcEvent EvICMpreser;
|
|
rtengine::ProcEvent EvICMLabGridciexy;
|
|
rtengine::ProcEvent EvICMfbw;
|
|
LabGrid *labgridcie;
|
|
IdleRegister idle_register;
|
|
|
|
Gtk::Box* willuBox;
|
|
Gtk::Label* willulab;
|
|
Gtk::Box* wprimBox;
|
|
Gtk::Label* wprimlab;
|
|
Gtk::Label* cielab;
|
|
Gtk::Box* redBox;
|
|
Gtk::Box* greBox;
|
|
Gtk::Box* bluBox;
|
|
Gtk::Box* riaHBox;
|
|
Gtk::Box* preBox;
|
|
Gtk::Box* iVBox;
|
|
Gtk::Box* wTRCBox;
|
|
Gtk::CheckButton* fbw;
|
|
|
|
Gtk::CheckButton* obpc;
|
|
Gtk::RadioButton* inone;
|
|
|
|
Gtk::RadioButton* iembedded;
|
|
Gtk::RadioButton* icamera;
|
|
Gtk::RadioButton* icameraICC;
|
|
Gtk::RadioButton* ifromfile;
|
|
Gtk::Label* dcpIllLabel;
|
|
MyComboBoxText* dcpIll;
|
|
sigc::connection dcpillconn;
|
|
Gtk::CheckButton* ckbToneCurve;
|
|
Gtk::CheckButton* ckbApplyLookTable;
|
|
Gtk::CheckButton* ckbApplyBaselineExposureOffset;
|
|
Gtk::CheckButton* ckbApplyHueSatMap;
|
|
MyComboBoxText* wProfNames;
|
|
sigc::connection wprofnamesconn;
|
|
MyComboBoxText* wTRC;
|
|
sigc::connection wtrcconn;
|
|
MyComboBoxText* will;
|
|
sigc::connection willconn;
|
|
MyComboBoxText* wprim;
|
|
sigc::connection wprimconn;
|
|
std::unique_ptr<PopUpButton> aRendIntent;
|
|
sigc::connection arendintentconn;
|
|
|
|
MyComboBoxText* oProfNames;
|
|
sigc::connection oprofnamesconn;
|
|
std::unique_ptr<PopUpButton> oRendIntent;
|
|
sigc::connection orendintentconn;
|
|
Gtk::RadioButton* iunchanged;
|
|
MyFileChooserButton* ipDialog;
|
|
Gtk::RadioButton::Group opts;
|
|
Gtk::Button* saveRef;
|
|
sigc::connection ipc;
|
|
Glib::ustring oldip;
|
|
ICMPanelListener* icmplistener;
|
|
|
|
double dcpTemperatures[2];
|
|
Glib::ustring lastRefFilename;
|
|
Glib::ustring camName;
|
|
void updateDCP(int dcpIlluminant, Glib::ustring dcp_name);
|
|
void updateRenderingIntent(const Glib::ustring &profile);
|
|
|
|
float nextrx;
|
|
float nextry;
|
|
float nextbx;
|
|
float nextby;
|
|
float nextgx;
|
|
float nextgy;
|
|
float nextwx;
|
|
float nextwy;
|
|
|
|
public:
|
|
ICMPanel();
|
|
~ICMPanel() override;
|
|
|
|
void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) override;
|
|
void write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr) override;
|
|
void setBatchMode(bool batchMode) override;
|
|
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
|
|
void adjusterChanged(Adjuster* a, double newval) override;
|
|
void primChanged (float rx, float ry, float bx, float by, float gx, float gy) override;
|
|
void iprimChanged (float r_x, float r_y, float b_x, float b_y, float g_x, float g_y, float w_x, float w_y) override;
|
|
|
|
void wpChanged();
|
|
void wtrcinChanged();
|
|
void willChanged();
|
|
void wprimChanged();
|
|
void opChanged();
|
|
void oiChanged(int n);
|
|
void aiChanged(int n);
|
|
void oBPCChanged();
|
|
void fbwChanged();
|
|
void ipChanged();
|
|
void ipSelectionChanged();
|
|
void dcpIlluminantChanged();
|
|
void toneCurveChanged();
|
|
void applyLookTableChanged();
|
|
void applyBaselineExposureOffsetChanged();
|
|
void applyHueSatMapChanged();
|
|
|
|
void setRawMeta(bool raw, const rtengine::FramesData* pMeta);
|
|
void saveReferencePressed();
|
|
void setListener(ToolPanelListener* tpl) override;
|
|
void setEditProvider(EditDataProvider *provider) override;
|
|
|
|
void setICMPanelListener(ICMPanelListener* ipl)
|
|
{
|
|
icmplistener = ipl;
|
|
}
|
|
|
|
};
|
|
|