Code cleanup: removed colorboost, colordenoise, colorshift, waveletequalizer, lumadenoise
Code was already commented and superseded
This commit is contained in:
@@ -15,7 +15,7 @@ set (RTENGINESOURCEFILES safegtk.cc colortemp.cc curves.cc flatcurves.cc diagona
|
||||
iplab2rgb.cc ipsharpen.cc iptransform.cc ipresize.cc
|
||||
jpeg_memsrc.c jdatasrc.c
|
||||
PF_correct_RT.cc
|
||||
wavelet_dec.cc ipequalizer.cc dirpyrLab_denoise.cc dirpyrLab_equalizer.cc dirpyr_equalizer.cc
|
||||
wavelet_dec.cc dirpyrLab_denoise.cc dirpyrLab_equalizer.cc dirpyr_equalizer.cc
|
||||
calc_distort.c
|
||||
klt/convolve.c klt/error.c klt/klt.c klt/klt_util.c klt/pnmio.c klt/pyramid.c klt/selectGoodFeatures.c
|
||||
klt/storeFeatures.c klt/trackFeatures.c klt/writeFeatures.c
|
||||
|
||||
@@ -169,15 +169,12 @@ void Crop::update (int todo) {
|
||||
if (skip==1) {
|
||||
parent->ipf.impulsedenoise (labnCrop);
|
||||
parent->ipf.defringe (labnCrop);
|
||||
//parent->ipf.lumadenoise (labnCrop, cbuffer);
|
||||
//parent->ipf.colordenoise (labnCrop, cbuffer);
|
||||
parent->ipf.dirpyrdenoise (labnCrop);
|
||||
parent->ipf.MLsharpen (labnCrop);
|
||||
parent->ipf.MLmicrocontrast (labnCrop);
|
||||
//parent->ipf.MLmicrocontrast (labnCrop);
|
||||
parent->ipf.sharpening (labnCrop, (float**)cbuffer);
|
||||
parent->ipf.dirpyrequalizer (labnCrop);
|
||||
//parent->ipf.waveletEqualizer(labnCrop, true, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -253,10 +253,6 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {
|
||||
ipf.impulsedenoise (nprevl);
|
||||
progress ("Defringing...",100*readyphase/numofphases);
|
||||
ipf.defringe (nprevl);
|
||||
// progress ("Denoising luminance...",100*readyphase/numofphases);
|
||||
// ipf.lumadenoise (nprevl, buffer);
|
||||
// progress ("Denoising color...",100*readyphase/numofphases);
|
||||
// ipf.colordenoise (nprevl, buffer);
|
||||
progress ("Denoising luma/chroma...",100*readyphase/numofphases);
|
||||
ipf.dirpyrdenoise (nprevl);
|
||||
if (params.clarity.enabled) {
|
||||
@@ -283,10 +279,6 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {
|
||||
|
||||
progress ("Pyramid equalizer...",100*readyphase/numofphases);
|
||||
ipf.dirpyrequalizer (nprevl);
|
||||
|
||||
// Superseded by dirpyreq
|
||||
//progress ("Wavelet...",100*readyphase/numofphases);
|
||||
//ipf.waveletEqualizer (nprevl, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -614,33 +614,6 @@ void ImProcFunctions::colorCurve (LabImage* lold, LabImage* lnew) {
|
||||
}
|
||||
}
|
||||
|
||||
void ImProcFunctions::lumadenoise (LabImage* lab, int** b2) {
|
||||
|
||||
if (params->lumaDenoise.enabled && lab->W>=8 && lab->H>=8)
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
bilateral<float, float> (lab->L, lab->L, (float**)b2, lab->W, lab->H, params->lumaDenoise.radius / scale, params->lumaDenoise.edgetolerance, multiThread);
|
||||
}
|
||||
|
||||
void ImProcFunctions::colordenoise (LabImage* lab, int** b2) {
|
||||
|
||||
if (params->colorDenoise.enabled && lab->W>=8 && lab->H>=8) {
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
{
|
||||
AlignedBuffer<double>* buffer = new AlignedBuffer<double> (MAX(lab->W,lab->H));
|
||||
gaussHorizontal<float> (lab->a, lab->a, buffer, lab->W, lab->H, params->colorDenoise.amount / 10.0 / scale, multiThread);
|
||||
gaussHorizontal<float> (lab->b, lab->b, buffer, lab->W, lab->H, params->colorDenoise.amount / 10.0 / scale, multiThread);
|
||||
gaussVertical<float> (lab->a, lab->a, buffer, lab->W, lab->H, params->colorDenoise.amount / 10.0 / scale, multiThread);
|
||||
gaussVertical<float> (lab->b, lab->b, buffer, lab->W, lab->H, params->colorDenoise.amount / 10.0 / scale, multiThread);
|
||||
|
||||
delete buffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImProcFunctions::getAutoExp (LUTu & histogram, int histcompr, double expcomp, double clip, double& br, int& bl) {
|
||||
|
||||
double sum = 0;
|
||||
|
||||
@@ -80,14 +80,10 @@ class ImProcFunctions {
|
||||
void chrominanceCurve (LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve);
|
||||
void colorCurve (LabImage* lold, LabImage* lnew);
|
||||
void sharpening (LabImage* lab, float** buffer);
|
||||
void lumadenoise (LabImage* lab, int** buffer);
|
||||
void colordenoise (LabImage* lab, int** buffer);
|
||||
void transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH);
|
||||
void lab2rgb (LabImage* lab, Image8* image);
|
||||
void resize (Image16* src, Image16* dst, double dScale);
|
||||
void deconvsharpening (LabImage* lab, float** buffer);
|
||||
void waveletEqualizer (Imagefloat * image);
|
||||
void waveletEqualizer (LabImage * image, bool luminance, bool chromaticity);
|
||||
void MLsharpen (LabImage* lab);// Manuel's clarity / sharpening
|
||||
void MLmicrocontrast(LabImage* lab ); //Manuel's microcontrast
|
||||
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* 2010 Ilya Popov <ilia_popov@rambler.ru>
|
||||
*/
|
||||
|
||||
#include <rtengine.h>
|
||||
#include <improcfun.h>
|
||||
|
||||
#include <wavelet_dec.h>
|
||||
|
||||
//#include <iostream>
|
||||
|
||||
namespace rtengine {
|
||||
|
||||
void ImProcFunctions :: waveletEqualizer(Imagefloat * image) {
|
||||
|
||||
if (!params->equalizer.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
limiter<wavelet_decomposition::internal_type> l(0, 65535);
|
||||
|
||||
wavelet_decomposition r(image->r, image->getW(), image->getH());
|
||||
r.reconstruct(image->r, params->equalizer.c, l);
|
||||
|
||||
wavelet_decomposition g(image->g, image->getW(), image->getH());
|
||||
g.reconstruct(image->g, params->equalizer.c, l);
|
||||
|
||||
wavelet_decomposition b(image->b, image->getW(), image->getH());
|
||||
b.reconstruct(image->b, params->equalizer.c, l);
|
||||
|
||||
}
|
||||
|
||||
void ImProcFunctions :: waveletEqualizer (LabImage * image, bool luminance, bool chromaticity) {
|
||||
|
||||
if (!params->equalizer.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
//clock_t start = clock();
|
||||
|
||||
if (luminance) {
|
||||
limiter<wavelet_decomposition::internal_type> l1(0, 65535);
|
||||
|
||||
wavelet_decomposition L(image->L, image->W, image->H);
|
||||
L.reconstruct(image->L, params->equalizer.c, l1);
|
||||
}
|
||||
|
||||
if (chromaticity) {
|
||||
limiter<wavelet_decomposition::internal_type> l2(-32768, 32767);
|
||||
|
||||
wavelet_decomposition a(image->a, image->W, image->H);
|
||||
a.reconstruct(image->a, params->equalizer.c, l2);
|
||||
|
||||
wavelet_decomposition b(image->b, image->W, image->H);
|
||||
b.reconstruct(image->b, params->equalizer.c, l2);
|
||||
}
|
||||
|
||||
//std::cout << "Wavelets done in " << (double)(clock() - start) / CLOCKS_PER_SEC << std::endl;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -224,11 +224,6 @@ void ProcParams::setDefaults () {
|
||||
icm.slpos=4.5;
|
||||
icm.freegamma = false;
|
||||
|
||||
equalizer.enabled = false;
|
||||
for(int i = 0; i < 8; i ++)
|
||||
{
|
||||
equalizer.c[i] = 0;
|
||||
}
|
||||
dirpyrequalizer.enabled = false;
|
||||
for(int i = 0; i < 4; i ++)
|
||||
{
|
||||
@@ -471,15 +466,6 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2) const {
|
||||
keyFile.set_double ("Color Management", "GammaValue", icm.gampos);
|
||||
keyFile.set_double ("Color Management", "GammaSlope", icm.slpos);
|
||||
|
||||
// save wavelet equalizer parameters
|
||||
keyFile.set_boolean ("Equalizer", "Enabled", equalizer.enabled);
|
||||
for(int i = 0; i < 8; i++)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "C" << i;
|
||||
keyFile.set_integer("Equalizer", ss.str(), equalizer.c[i]);
|
||||
}
|
||||
|
||||
// save directional pyramid equalizer parameters
|
||||
keyFile.set_boolean ("Directional Pyramid Equalizer", "Enabled", dirpyrequalizer.enabled);
|
||||
for(int i = 0; i < 5; i++)
|
||||
@@ -833,17 +819,6 @@ if (keyFile.has_group ("Color Management")) {
|
||||
|
||||
}
|
||||
|
||||
// load wavelet equalizer parameters
|
||||
if (keyFile.has_group ("Equalizer")) {
|
||||
if (keyFile.has_key ("Equalizer", "Enabled")) equalizer.enabled = keyFile.get_boolean ("Equalizer", "Enabled");
|
||||
for(int i = 0; i < 8; i ++)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "C" << i;
|
||||
if(keyFile.has_key ("Equalizer", ss.str())) equalizer.c[i] = keyFile.get_integer ("Equalizer", ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
// load directional pyramid equalizer parameters
|
||||
if (keyFile.has_group ("Directional Pyramid Equalizer")) {
|
||||
if (keyFile.has_key ("Directional Pyramid Equalizer", "Enabled")) dirpyrequalizer.enabled = keyFile.get_boolean ("Directional Pyramid Equalizer", "Enabled");
|
||||
@@ -930,17 +905,6 @@ if (keyFile.has_group ("IPTC")) {
|
||||
|
||||
const Glib::ustring ColorManagementParams::NoICMString = Glib::ustring("No ICM: sRGB output");
|
||||
|
||||
bool operator==(const EqualizerParams & a, const EqualizerParams & b) {
|
||||
if(a.enabled != b.enabled)
|
||||
return false;
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
if(a.c[i] != b.c[i])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator==(const DirPyrEqualizerParams & a, const DirPyrEqualizerParams & b) {
|
||||
if(a.enabled != b.enabled)
|
||||
return false;
|
||||
@@ -1101,7 +1065,6 @@ bool ProcParams::operator== (const ProcParams& other) {
|
||||
&& icm.freegamma == other.icm.freegamma
|
||||
&& icm.gampos == other.icm.gampos
|
||||
&& icm.slpos == other.icm.slpos
|
||||
&& equalizer == other.equalizer
|
||||
&& dirpyrequalizer == other.dirpyrequalizer
|
||||
&& hsvequalizer.hcurve == other.hsvequalizer.hcurve
|
||||
&& hsvequalizer.scurve == other.hsvequalizer.scurve
|
||||
|
||||
@@ -370,16 +370,6 @@ class IPTCPair {
|
||||
std::vector<Glib::ustring> values;
|
||||
};
|
||||
|
||||
/**
|
||||
* Wavelet equalizer params
|
||||
*/
|
||||
class EqualizerParams {
|
||||
|
||||
public:
|
||||
bool enabled;
|
||||
int c[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* Directional pyramid equalizer params
|
||||
*/
|
||||
@@ -479,7 +469,6 @@ class ProcParams {
|
||||
HRecParams hlrecovery; ///< Highlight recovery parameters
|
||||
ResizeParams resize; ///< Resize parameters
|
||||
ColorManagementParams icm; ///< profiles/color spaces used during the image processing
|
||||
EqualizerParams equalizer; ///< wavelet equalizer parameters
|
||||
RAWParams raw; ///< RAW parameters before demosaicing
|
||||
DirPyrEqualizerParams dirpyrequalizer; ///< directional pyramid equalizer parameters
|
||||
HSVEqualizerParams hsvequalizer; ///< hsv equalizer parameters
|
||||
|
||||
@@ -53,22 +53,9 @@ SHARPENING, // EvShrDRadius,
|
||||
SHARPENING, // EvShrDAmount,
|
||||
SHARPENING, // EvShrDDamping,
|
||||
SHARPENING, // EvShrDIterations,
|
||||
COLORBOOST, // EvCBAvoidClip,
|
||||
COLORBOOST, // EvCBSatLimiter,
|
||||
COLORBOOST, // EvCBSatLimit,
|
||||
COLORBOOST, // EvCBBoost,
|
||||
WHITEBALANCE, // EvWBMethod,
|
||||
WHITEBALANCE, // EvWBTemp,
|
||||
WHITEBALANCE, // EvWBGreen,
|
||||
COLORBOOST, // EvCShiftA,
|
||||
COLORBOOST, // EvCShiftB,
|
||||
LUMADENOISE, // EvLDNEnabled,
|
||||
LUMADENOISE, // EvLDNRadius,
|
||||
LUMADENOISE, // EvLDNEdgeTolerance,
|
||||
COLORDENOISE, // EvCDNEnabled,
|
||||
COLORDENOISE, // EvCDNRadius,
|
||||
COLORDENOISE, // EvCDNEdgeTolerance,
|
||||
COLORDENOISE, // EvCDNEdgeSensitive,
|
||||
RETINEX, // EvSHEnabled,
|
||||
RGBCURVE, // EvSHHighlights,
|
||||
RGBCURVE, // EvSHShadows,
|
||||
@@ -104,8 +91,6 @@ RESIZE, // EvResizeEnabled
|
||||
ALL, // EvProfileChangeNotification
|
||||
RETINEX, // EvShrHighQuality
|
||||
TRANSFORM, // EvPerspCorr
|
||||
EQUALIZER, // EvEqualizer
|
||||
EQUALIZER, // EvEqlEnabled
|
||||
IMPULSEDENOISE, // EvIDNEnabled,
|
||||
IMPULSEDENOISE, // EvIDNThresh,
|
||||
DIRPYRDENOISE, // EvDPDNEnabled,
|
||||
|
||||
@@ -53,19 +53,15 @@
|
||||
#define SHARPENING M_LUMINANCE
|
||||
#define IMPULSEDENOISE M_LUMINANCE
|
||||
#define DEFRINGE M_LUMINANCE
|
||||
#define LUMADENOISE M_LUMINANCE
|
||||
#define WHITEBALANCE (M_INIT|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR)
|
||||
#define DEMOSAIC (M_RAW|M_INIT|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR)
|
||||
#define DARKFRAME (M_PREPROC|M_RAW|M_INIT|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR)
|
||||
#define FLATFIELD (M_PREPROC|M_RAW|M_INIT|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR)
|
||||
#define COLORBOOST M_COLOR
|
||||
#define COLORDENOISE M_COLOR
|
||||
#define DIRPYRDENOISE (M_COLOR|M_LUMINANCE)
|
||||
#define CROP M_MINUPDATE
|
||||
#define RESIZE M_VOID
|
||||
#define EXIF M_VOID
|
||||
#define IPTC M_VOID
|
||||
#define EQUALIZER (M_COLOR|M_LUMINANCE)
|
||||
#define DIRPYREQUALIZER (M_COLOR|M_LUMINANCE)
|
||||
#define NONE 0
|
||||
|
||||
|
||||
@@ -176,7 +176,6 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
|
||||
ipf.impulsedenoise (labView);
|
||||
ipf.defringe (labView);
|
||||
//ipf.lumadenoise (labView, buffer);
|
||||
ipf.dirpyrdenoise (labView);
|
||||
if (params.clarity.enabled) {
|
||||
ipf.MLsharpen(labView);
|
||||
@@ -196,9 +195,6 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
delete [] buffer; buffer=NULL;
|
||||
}
|
||||
|
||||
// wavelet equalizer
|
||||
//ipf.waveletEqualizer (labView, true, true);
|
||||
|
||||
// directional pyramid equalizer
|
||||
ipf.dirpyrequalizer (labView);//TODO: this is the luminance tonecurve, not the RGB one
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ set (BASESOURCEFILES
|
||||
ilabel.cc thumbbrowserbase.cc adjuster.cc filebrowserentry.cc filebrowser.cc filethumbnailbuttonset.cc
|
||||
cachemanager.cc cacheimagedata.cc shcselector.cc perspective.cc
|
||||
clipboard.cc thumbimageupdater.cc bqentryupdater.cc lensgeom.cc
|
||||
coarsepanel.cc cacorrection.cc colorshift.cc hlrec.cc chmixer.cc
|
||||
colorboost.cc resize.cc icmpanel.cc crop.cc shadowshighlights.cc
|
||||
colordenoise.cc
|
||||
coarsepanel.cc cacorrection.cc hlrec.cc chmixer.cc
|
||||
resize.cc icmpanel.cc crop.cc shadowshighlights.cc
|
||||
impulsedenoise.cc dirpyrdenoise.cc
|
||||
exifpanel.cc toolpanel.cc
|
||||
sharpening.cc
|
||||
@@ -17,7 +16,7 @@ set (BASESOURCEFILES
|
||||
filecatalog.cc
|
||||
previewloader.cc
|
||||
histogrampanel.cc history.cc imagearea.cc
|
||||
imageareapanel.cc iptcpanel.cc labcurve.cc lumadenoise.cc main.cc
|
||||
imageareapanel.cc iptcpanel.cc labcurve.cc main.cc
|
||||
multilangmgr.cc mycurve.cc myflatcurve.cc mydiagonalcurve.cc options.cc
|
||||
preferences.cc profilepanel.cc saveasdlg.cc
|
||||
saveformatpanel.cc soundman.cc splash.cc
|
||||
@@ -28,7 +27,7 @@ set (BASESOURCEFILES
|
||||
batchqueuebuttonset.cc browserfilter.cc exiffiltersettings.cc
|
||||
profilestore.cc partialpastedlg.cc rawprocess.cc preprocess.cc
|
||||
darkframe.cc flatfield.cc rawcacorrection.cc rawexposure.cc
|
||||
equalizer.cc dirpyrequalizer.cc hsvequalizer.cc defringe.cc
|
||||
dirpyrequalizer.cc hsvequalizer.cc defringe.cc
|
||||
popupcommon.cc popupbutton.cc popuptogglebutton.cc clarity.cc)
|
||||
|
||||
if (WIN32)
|
||||
|
||||
@@ -125,9 +125,6 @@ void BatchToolPanelCoordinator::initSession () {
|
||||
distortion->setAdjusterBehavior (false);
|
||||
perspective->setAdjusterBehavior (false);
|
||||
cacorrection->setAdjusterBehavior (false);
|
||||
//colorshift->setAdjusterBehavior (false, false);
|
||||
//colorboost->setAdjusterBehavior (false);
|
||||
//lumadenoise->setAdjusterBehavior (false);
|
||||
sharpening->setAdjusterBehavior (false);
|
||||
clarity->setAdjusterBehavior (false, false, false, false);
|
||||
|
||||
@@ -149,9 +146,6 @@ void BatchToolPanelCoordinator::initSession () {
|
||||
distortion->setAdjusterBehavior (options.baBehav[ADDSET_DIST_AMOUNT]);
|
||||
perspective->setAdjusterBehavior (options.baBehav[ADDSET_PERSPECTIVE]);
|
||||
cacorrection->setAdjusterBehavior (options.baBehav[ADDSET_CA]);
|
||||
//colorshift->setAdjusterBehavior (options.baBehav[ADDSET_CS_BLUEYELLOW], options.baBehav[ADDSET_CS_GREENMAGENTA]);
|
||||
//colorboost->setAdjusterBehavior (options.baBehav[ADDSET_CBOOST_AMOUNT]);
|
||||
//lumadenoise->setAdjusterBehavior (options.baBehav[ADDSET_LD_EDGETOLERANCE]);
|
||||
sharpening->setAdjusterBehavior (options.baBehav[ADDSET_SHARP_AMOUNT]);
|
||||
clarity->setAdjusterBehavior (options.baBehav[ADDSET_CLAR_STREN],options.baBehav[ADDSET_CLAR_MLSTREN],options.baBehav[ADDSET_CLAR_PASS],options.baBehav[ADDSET_CLAR_UNIFORMITY]);
|
||||
|
||||
|
||||
@@ -1,191 +0,0 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <colorboost.h>
|
||||
#include <iomanip>
|
||||
#include <guiutils.h>
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
ColorBoost::ColorBoost () : Gtk::VBox(), FoldableToolPanel(this), cbAdd(false) {
|
||||
|
||||
colorboost = Gtk::manage (new Adjuster (M("TP_COLORBOOST_AMOUNT"), -100, 300, 1, 0));
|
||||
|
||||
pack_start (*colorboost);
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
avoidclip = Gtk::manage (new Gtk::CheckButton (M("TP_COLORBOOST_AVOIDCOLORCLIP")));
|
||||
|
||||
pack_start (*avoidclip);
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
enablelimiter = Gtk::manage (new Gtk::CheckButton (M("TP_COLORBOOST_ENABLESATLIMITER")));
|
||||
pack_start (*enablelimiter);
|
||||
|
||||
saturationlimiter = new Adjuster (M("TP_COLORBOOST_SATLIMIT"), 0, 200, 0.1, 100);
|
||||
saturationlimiter->show ();
|
||||
saturationlimiter->reference ();
|
||||
|
||||
colorboost->setAdjusterListener (this);
|
||||
saturationlimiter->setAdjusterListener (this);
|
||||
acconn = avoidclip->signal_toggled().connect( sigc::mem_fun(*this, &ColorBoost::avoidclip_toggled) );
|
||||
elconn = enablelimiter->signal_toggled().connect( sigc::mem_fun(*this, &ColorBoost::enablelimiter_toggled) );
|
||||
|
||||
show_all_children ();
|
||||
}
|
||||
|
||||
ColorBoost::~ColorBoost () {
|
||||
|
||||
delete saturationlimiter;
|
||||
}
|
||||
|
||||
void ColorBoost::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
disableListener ();
|
||||
|
||||
if (pedited) {
|
||||
colorboost->setEditedState (pedited->colorBoost.amount ? Edited : UnEdited);
|
||||
saturationlimiter->setEditedState (pedited->colorBoost.saturationlimit ? Edited : UnEdited);
|
||||
avoidclip->set_inconsistent (!pedited->colorBoost.avoidclip);
|
||||
enablelimiter->set_inconsistent (!pedited->colorBoost.enable_saturationlimiter);
|
||||
}
|
||||
|
||||
colorboost->setValue (pp->colorBoost.amount);
|
||||
saturationlimiter->setValue (pp->colorBoost.saturationlimit);
|
||||
acconn.block (true);
|
||||
avoidclip->set_active (pp->colorBoost.avoidclip);
|
||||
acconn.block (false);
|
||||
elconn.block (true);
|
||||
enablelimiter->set_active (pp->colorBoost.enable_saturationlimiter);
|
||||
elconn.block (false);
|
||||
|
||||
removeIfThere (this, saturationlimiter, false);
|
||||
if (enablelimiter->get_active () || enablelimiter->get_inconsistent())
|
||||
pack_start (*saturationlimiter);
|
||||
|
||||
lastACVal = pp->colorBoost.avoidclip;
|
||||
lastELVal = pp->colorBoost.enable_saturationlimiter;
|
||||
|
||||
enableListener ();
|
||||
}
|
||||
|
||||
void ColorBoost::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
pp->colorBoost.amount = (int)colorboost->getValue();
|
||||
pp->colorBoost.avoidclip = avoidclip->get_active ();
|
||||
pp->colorBoost.enable_saturationlimiter = enablelimiter->get_active ();
|
||||
pp->colorBoost.saturationlimit = saturationlimiter->getValue ();
|
||||
|
||||
if (pedited) {
|
||||
pedited->colorBoost.amount = colorboost->getEditedState ();
|
||||
pedited->colorBoost.avoidclip = !avoidclip->get_inconsistent();
|
||||
pedited->colorBoost.enable_saturationlimiter = !enablelimiter->get_inconsistent();
|
||||
pedited->colorBoost.saturationlimit = saturationlimiter->getEditedState ();
|
||||
}
|
||||
}
|
||||
|
||||
void ColorBoost::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
|
||||
colorboost->setDefault (defParams->colorBoost.amount);
|
||||
saturationlimiter->setDefault (defParams->colorBoost.saturationlimit);
|
||||
|
||||
if (pedited) {
|
||||
colorboost->setDefaultEditedState (pedited->colorBoost.amount ? Edited : UnEdited);
|
||||
saturationlimiter->setDefaultEditedState (pedited->colorBoost.saturationlimit ? Edited : UnEdited);
|
||||
}
|
||||
else {
|
||||
colorboost->setDefaultEditedState (Irrelevant);
|
||||
saturationlimiter->setDefaultEditedState (Irrelevant);
|
||||
}
|
||||
}
|
||||
|
||||
void ColorBoost::avoidclip_toggled () {
|
||||
|
||||
if (batchMode) {
|
||||
if (avoidclip->get_inconsistent()) {
|
||||
avoidclip->set_inconsistent (false);
|
||||
acconn.block (true);
|
||||
avoidclip->set_active (false);
|
||||
acconn.block (false);
|
||||
}
|
||||
else if (lastACVal)
|
||||
avoidclip->set_inconsistent (true);
|
||||
|
||||
lastACVal = avoidclip->get_active ();
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
if (avoidclip->get_active ())
|
||||
listener->panelChanged (EvCBAvoidClip, M("GENERAL_ENABLED"));
|
||||
else
|
||||
listener->panelChanged (EvCBAvoidClip, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
void ColorBoost::enablelimiter_toggled () {
|
||||
|
||||
if (batchMode) {
|
||||
if (enablelimiter->get_inconsistent()) {
|
||||
enablelimiter->set_inconsistent (false);
|
||||
elconn.block (true);
|
||||
enablelimiter->set_active (false);
|
||||
elconn.block (false);
|
||||
}
|
||||
else if (lastELVal)
|
||||
enablelimiter->set_inconsistent (true);
|
||||
|
||||
lastELVal = enablelimiter->get_active ();
|
||||
}
|
||||
|
||||
removeIfThere (this, saturationlimiter, false);
|
||||
if (enablelimiter->get_active () || enablelimiter->get_inconsistent())
|
||||
pack_start (*saturationlimiter);
|
||||
|
||||
if (listener) {
|
||||
if (enablelimiter->get_active ())
|
||||
listener->panelChanged (EvCBSatLimiter, M("GENERAL_ENABLED"));
|
||||
else
|
||||
listener->panelChanged (EvCBSatLimiter, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
void ColorBoost::adjusterChanged (Adjuster* a, double newval) {
|
||||
|
||||
if (listener) {
|
||||
if (a!=saturationlimiter)
|
||||
listener->panelChanged (EvCBBoost, Glib::ustring::format ((int)a->getValue()));
|
||||
else
|
||||
listener->panelChanged (EvCBSatLimit, Glib::ustring::format (std::setw(2), std::fixed, std::setprecision(1), a->getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
void ColorBoost::setAdjusterBehavior (bool bcbadd) {
|
||||
|
||||
if ((!cbAdd && bcbadd) || (cbAdd && !bcbadd))
|
||||
colorboost->setLimits (-100, 100, 1, 0);
|
||||
|
||||
cbAdd = bcbadd;
|
||||
}
|
||||
|
||||
void ColorBoost::setBatchMode (bool batchMode) {
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
colorboost->showEditedCB ();
|
||||
saturationlimiter->showEditedCB ();
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef _COLORBOOST_H_
|
||||
#define _COLORBOOST_H_
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <adjuster.h>
|
||||
#include <toolpanel.h>
|
||||
|
||||
class ColorBoost : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
||||
|
||||
protected:
|
||||
Adjuster* colorboost;
|
||||
Gtk::CheckButton* avoidclip;
|
||||
Gtk::CheckButton* enablelimiter;
|
||||
Adjuster* saturationlimiter;
|
||||
bool cbAdd;
|
||||
sigc::connection acconn, elconn;
|
||||
bool lastACVal, lastELVal;
|
||||
|
||||
public:
|
||||
|
||||
ColorBoost ();
|
||||
virtual ~ColorBoost ();
|
||||
|
||||
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
|
||||
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
|
||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void avoidclip_toggled ();
|
||||
void enablelimiter_toggled ();
|
||||
void setAdjusterBehavior (bool bcbadd);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,120 +0,0 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <colordenoise.h>
|
||||
#include <math.h>
|
||||
#include <iomanip>
|
||||
#include <guiutils.h>
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
ColorDenoise::ColorDenoise () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
enabled = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLED")));
|
||||
enabled->set_active (false);
|
||||
|
||||
amount = Gtk::manage (new Adjuster (M("TP_DETAIL_AMOUNT"), 1, 100, 1, 30));
|
||||
|
||||
pack_start (*enabled);
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
pack_start (*amount);
|
||||
|
||||
enaConn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &ColorDenoise::enabledChanged) );
|
||||
amount->setAdjusterListener (this);
|
||||
|
||||
show_all_children ();
|
||||
}
|
||||
|
||||
void ColorDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
disableListener ();
|
||||
|
||||
if (pedited) {
|
||||
amount->setEditedState (pedited->colorDenoise.amount ? Edited : UnEdited);
|
||||
enabled->set_inconsistent (!pedited->colorDenoise.enabled);
|
||||
}
|
||||
|
||||
enaConn.block (true);
|
||||
enabled->set_active (pp->colorDenoise.enabled);
|
||||
enaConn.block (false);
|
||||
|
||||
lastEnabled = pp->colorDenoise.enabled;
|
||||
|
||||
amount->setValue (pp->colorDenoise.amount);
|
||||
|
||||
enableListener ();
|
||||
}
|
||||
|
||||
void ColorDenoise::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
pp->colorDenoise.amount = amount->getValue ();
|
||||
pp->colorDenoise.enabled = enabled->get_active();
|
||||
|
||||
if (pedited) {
|
||||
pedited->colorDenoise.amount = amount->getEditedState ();
|
||||
pedited->colorDenoise.enabled = !enabled->get_inconsistent();
|
||||
}
|
||||
}
|
||||
|
||||
void ColorDenoise::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
|
||||
amount->setDefault (defParams->colorDenoise.amount);
|
||||
|
||||
if (pedited)
|
||||
amount->setDefaultEditedState (pedited->colorDenoise.amount ? Edited : UnEdited);
|
||||
else
|
||||
amount->setDefaultEditedState (Irrelevant);
|
||||
}
|
||||
|
||||
void ColorDenoise::adjusterChanged (Adjuster* a, double newval) {
|
||||
|
||||
if (listener && enabled->get_active()) {
|
||||
|
||||
listener->panelChanged (EvCDNRadius, Glib::ustring::format (std::setw(2), std::fixed, std::setprecision(1), a->getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
void ColorDenoise::enabledChanged () {
|
||||
|
||||
if (batchMode) {
|
||||
if (enabled->get_inconsistent()) {
|
||||
enabled->set_inconsistent (false);
|
||||
enaConn.block (true);
|
||||
enabled->set_active (false);
|
||||
enaConn.block (false);
|
||||
}
|
||||
else if (lastEnabled)
|
||||
enabled->set_inconsistent (true);
|
||||
|
||||
lastEnabled = enabled->get_active ();
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
if (enabled->get_active ())
|
||||
listener->panelChanged (EvCDNEnabled, M("GENERAL_ENABLED"));
|
||||
else
|
||||
listener->panelChanged (EvCDNEnabled, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
void ColorDenoise::setBatchMode (bool batchMode) {
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
amount->showEditedCB ();
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef _COLORDENOISE_H_
|
||||
#define _COLORDENOISE_H_
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <adjuster.h>
|
||||
#include <toolpanel.h>
|
||||
|
||||
class ColorDenoise : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
||||
|
||||
protected:
|
||||
Adjuster* amount;
|
||||
Gtk::CheckButton* enabled;
|
||||
bool lastEnabled;
|
||||
sigc::connection enaConn;
|
||||
|
||||
public:
|
||||
|
||||
ColorDenoise ();
|
||||
|
||||
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
|
||||
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
|
||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void enabledChanged ();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,108 +0,0 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <colorshift.h>
|
||||
#include <iomanip>
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
ColorShift::ColorShift () : Gtk::VBox(), FoldableToolPanel(this), aAdd(false), bAdd(false) {
|
||||
|
||||
ashift = Gtk::manage (new Adjuster (M("TP_COLORSHIFT_GREENMAGENTA"), -25, 25, 0.1, 0));
|
||||
pack_start (*ashift);
|
||||
|
||||
bshift = Gtk::manage (new Adjuster (M("TP_COLORSHIFT_BLUEYELLOW"), -25, 25, 0.1, 0));
|
||||
pack_start (*bshift);
|
||||
|
||||
ashift->setAdjusterListener (this);
|
||||
bshift->setAdjusterListener (this);
|
||||
|
||||
show_all ();
|
||||
}
|
||||
|
||||
void ColorShift::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
disableListener ();
|
||||
|
||||
if (pedited) {
|
||||
ashift->setEditedState (pedited->colorShift.a ? Edited : UnEdited);
|
||||
bshift->setEditedState (pedited->colorShift.b ? Edited : UnEdited);
|
||||
}
|
||||
|
||||
ashift->setValue (pp->colorShift.a);
|
||||
bshift->setValue (pp->colorShift.b);
|
||||
|
||||
enableListener ();
|
||||
}
|
||||
|
||||
void ColorShift::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
pp->colorShift.a = ashift->getValue ();
|
||||
pp->colorShift.b = bshift->getValue ();
|
||||
|
||||
if (pedited) {
|
||||
pedited->colorShift.a = ashift->getEditedState ();
|
||||
pedited->colorShift.b = bshift->getEditedState ();
|
||||
}
|
||||
}
|
||||
|
||||
void ColorShift::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
|
||||
ashift->setDefault (defParams->colorShift.a);
|
||||
bshift->setDefault (defParams->colorShift.b);
|
||||
|
||||
if (pedited) {
|
||||
ashift->setDefaultEditedState (pedited->colorShift.a ? Edited : UnEdited);
|
||||
bshift->setDefaultEditedState (pedited->colorShift.b ? Edited : UnEdited);
|
||||
}
|
||||
else {
|
||||
ashift->setDefaultEditedState (Irrelevant);
|
||||
bshift->setDefaultEditedState (Irrelevant);
|
||||
}
|
||||
}
|
||||
|
||||
void ColorShift::adjusterChanged (Adjuster* a, double newval) {
|
||||
|
||||
if (!listener)
|
||||
return;
|
||||
|
||||
if (a==ashift)
|
||||
listener->panelChanged (EvCShiftA, Glib::ustring::format (std::setw(2), std::fixed, std::setprecision(1), a->getValue()));
|
||||
else if (a==bshift)
|
||||
listener->panelChanged (EvCShiftB, Glib::ustring::format (std::setw(2), std::fixed, std::setprecision(1), a->getValue()));
|
||||
}
|
||||
|
||||
void ColorShift::setAdjusterBehavior (bool baadd, bool bbadd) {
|
||||
|
||||
if ((!aAdd && baadd) || (aAdd && !baadd))
|
||||
ashift->setLimits (-25, 25, 0.1, 0);
|
||||
|
||||
if ((!bAdd && bbadd) || (bAdd && !bbadd))
|
||||
bshift->setLimits (-25, 25, 0.1, 0);
|
||||
|
||||
aAdd = baadd;
|
||||
bAdd = bbadd;
|
||||
}
|
||||
|
||||
void ColorShift::setBatchMode (bool batchMode) {
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
ashift->showEditedCB ();
|
||||
bshift->showEditedCB ();
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef _COLORSHIFT_H_
|
||||
#define _COLORSHIFT_H_
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <adjuster.h>
|
||||
#include <toolpanel.h>
|
||||
|
||||
class ColorShift : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
||||
|
||||
protected:
|
||||
Adjuster* ashift;
|
||||
Adjuster* bshift;
|
||||
bool aAdd, bAdd;
|
||||
|
||||
public:
|
||||
|
||||
ColorShift ();
|
||||
|
||||
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
|
||||
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
|
||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void setAdjusterBehavior (bool baadd, bool bbadd);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,214 +0,0 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* 2010 Ilya Popov <ilia_popov@rambler.ru>
|
||||
*/
|
||||
|
||||
#include <equalizer.h>
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
Equalizer::Equalizer () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
enabled = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLED")));
|
||||
enabled->set_active (true);
|
||||
pack_start(*enabled);
|
||||
enaConn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &Equalizer::enabledToggled) );
|
||||
|
||||
Gtk::HSeparator *separator1 = Gtk::manage (new Gtk::HSeparator());
|
||||
pack_start(*separator1, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
Gtk::HBox * buttonBox = Gtk::manage (new Gtk::HBox());
|
||||
pack_start(*buttonBox, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
Gtk::Button * contrastMinusButton = Gtk::manage (new Gtk::Button(M("TP_EQUALIZER_CONTRAST_MINUS")));
|
||||
buttonBox->pack_start(*contrastMinusButton, Gtk::PACK_SHRINK, 2);
|
||||
contrastMinusPressedConn = contrastMinusButton->signal_pressed().connect( sigc::mem_fun(*this, &Equalizer::contrastMinusPressed));
|
||||
|
||||
Gtk::Button * neutralButton = Gtk::manage (new Gtk::Button(M("TP_EQUALIZER_NEUTRAL")));
|
||||
buttonBox->pack_start(*neutralButton, Gtk::PACK_SHRINK, 2);
|
||||
neutralPressedConn = neutralButton->signal_pressed().connect( sigc::mem_fun(*this, &Equalizer::neutralPressed));
|
||||
|
||||
Gtk::Button * contrastPlusButton = Gtk::manage (new Gtk::Button(M("TP_EQUALIZER_CONTRAST_PLUS")));
|
||||
buttonBox->pack_start(*contrastPlusButton, Gtk::PACK_SHRINK, 2);
|
||||
contrastPlusPressedConn = contrastPlusButton->signal_pressed().connect( sigc::mem_fun(*this, &Equalizer::contrastPlusPressed));
|
||||
|
||||
buttonBox->show_all_children();
|
||||
|
||||
Gtk::HSeparator *separator2 = Gtk::manage (new Gtk::HSeparator());
|
||||
pack_start(*separator2, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
for(int i = 0; i < 8; i++)
|
||||
{
|
||||
Glib::ustring ss;
|
||||
ss = Glib::ustring::format(i);
|
||||
if(i == 0)
|
||||
ss += Glib::ustring::compose(" (%1)", M("TP_EQUALIZER_FINEST"));
|
||||
if(i == 7)
|
||||
ss += Glib::ustring::compose(" (%1)", M("TP_EQUALIZER_LARGEST"));
|
||||
|
||||
correction[i] = Gtk::manage ( new Adjuster (ss, -100, 100, 1, 0) );
|
||||
correction[i]->setAdjusterListener(this);
|
||||
pack_start(*correction[i]);
|
||||
}
|
||||
|
||||
show_all_children ();
|
||||
}
|
||||
|
||||
Equalizer::~Equalizer () {
|
||||
|
||||
}
|
||||
|
||||
void Equalizer::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
disableListener ();
|
||||
|
||||
if (pedited) {
|
||||
|
||||
enabled->set_inconsistent (!pedited->equalizer.enabled);
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
correction[i]->setEditedState (pedited->equalizer.c[i] ? Edited : UnEdited);
|
||||
}
|
||||
}
|
||||
|
||||
enaConn.block (true);
|
||||
enabled->set_active (pp->equalizer.enabled);
|
||||
enaConn.block (false);
|
||||
lastEnabled = pp->equalizer.enabled;
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
correction[i]->setValue(pp->equalizer.c[i]);
|
||||
}
|
||||
|
||||
enableListener ();
|
||||
}
|
||||
|
||||
void Equalizer::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
pp->equalizer.enabled = enabled->get_active ();
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
pp->equalizer.c[i] = (int) correction[i]->getValue();
|
||||
}
|
||||
|
||||
if (pedited) {
|
||||
|
||||
pedited->equalizer.enabled = !enabled->get_inconsistent();
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
pedited->equalizer.c[i] = correction[i]->getEditedState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Equalizer::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
correction[i]->setDefault(defParams->equalizer.c[i]);
|
||||
}
|
||||
|
||||
if (pedited) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
correction[i]->setDefaultEditedState(pedited->equalizer.c[i] ? Edited : UnEdited);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
correction[i]->setDefaultEditedState(Irrelevant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Equalizer::setBatchMode (bool batchMode) {
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
correction[i]->showEditedCB();
|
||||
}
|
||||
}
|
||||
|
||||
void Equalizer::adjusterChanged (Adjuster* a, double newval) {
|
||||
|
||||
if (listener && enabled->get_active()) {
|
||||
std::stringstream ss;
|
||||
ss << "(";
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (i > 0) {
|
||||
ss << ", ";
|
||||
}
|
||||
ss << static_cast<int>(correction[i]->getValue());
|
||||
}
|
||||
ss << ")";
|
||||
listener->panelChanged (EvEqualizer, ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
void Equalizer::enabledToggled () {
|
||||
|
||||
if (batchMode) {
|
||||
if (enabled->get_inconsistent()) {
|
||||
enabled->set_inconsistent (false);
|
||||
enaConn.block (true);
|
||||
enabled->set_active (false);
|
||||
enaConn.block (false);
|
||||
}
|
||||
else if (lastEnabled)
|
||||
enabled->set_inconsistent (true);
|
||||
|
||||
lastEnabled = enabled->get_active ();
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
if (enabled->get_active ())
|
||||
listener->panelChanged (EvEqlEnabled, M("GENERAL_ENABLED"));
|
||||
else
|
||||
listener->panelChanged (EvEqlEnabled, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Equalizer::neutralPressed () {
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
correction[i]->setValue(0);
|
||||
adjusterChanged(correction[i], 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Equalizer::contrastPlusPressed () {
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
int inc = 1 * (8 - i);
|
||||
correction[i]->setValue(correction[i]->getValue() + inc);
|
||||
adjusterChanged(correction[i], correction[i]->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Equalizer::contrastMinusPressed () {
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
int inc = -1 * (8 - i);
|
||||
correction[i]->setValue(correction[i]->getValue() + inc);
|
||||
adjusterChanged(correction[i], correction[i]->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* 2010 Ilya Popov <ilia_popov@rambler.ru>
|
||||
*/
|
||||
|
||||
#ifndef EQUALIZER_H_INCLUDED
|
||||
#define EQUALIZER_H_INCLUDED
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <adjuster.h>
|
||||
#include <toolpanel.h>
|
||||
|
||||
class Equalizer : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
Gtk::CheckButton * enabled;
|
||||
Adjuster* correction[8];
|
||||
|
||||
sigc::connection enaConn;
|
||||
sigc::connection neutralPressedConn;
|
||||
sigc::connection contrastPlusPressedConn;
|
||||
sigc::connection contrastMinusPressedConn;
|
||||
|
||||
bool lastEnabled;
|
||||
|
||||
public:
|
||||
|
||||
Equalizer ();
|
||||
virtual ~Equalizer ();
|
||||
|
||||
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
|
||||
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
|
||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void enabledToggled ();
|
||||
void neutralPressed ();
|
||||
void contrastPlusPressed ();
|
||||
void contrastMinusPressed ();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,149 +0,0 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <lumadenoise.h>
|
||||
#include <iomanip>
|
||||
#include <math.h>
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
LumaDenoise::LumaDenoise () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
enabled = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLED")));
|
||||
enabled->set_active (false);
|
||||
enabled->show ();
|
||||
pack_start (*enabled);
|
||||
|
||||
Gtk::HSeparator *hsep1 = Gtk::manage (new Gtk::HSeparator());
|
||||
hsep1->show ();
|
||||
pack_start (*hsep1);
|
||||
|
||||
enaConn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &LumaDenoise::enabledChanged) );
|
||||
|
||||
radius = Gtk::manage (new Adjuster (M("TP_LUMADENOISE_RADIUS"), 0.5, 50, 0.1, 1.9));
|
||||
edge = Gtk::manage (new Adjuster (M("TP_LUMADENOISE_EDGETOLERANCE"), 10, 30000, 100, 1500));
|
||||
radius->setAdjusterListener (this);
|
||||
edge->setAdjusterListener (this);
|
||||
radius->show();
|
||||
edge->show();
|
||||
|
||||
pack_start (*radius);
|
||||
pack_start (*edge);
|
||||
}
|
||||
|
||||
void LumaDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
disableListener ();
|
||||
|
||||
if (pedited) {
|
||||
radius->setEditedState (pedited->lumaDenoise.radius ? Edited : UnEdited);
|
||||
edge->setEditedState (pedited->lumaDenoise.edgetolerance ? Edited : UnEdited);
|
||||
enabled->set_inconsistent (!pedited->lumaDenoise.enabled);
|
||||
}
|
||||
|
||||
enaConn.block (true);
|
||||
enabled->set_active (pp->lumaDenoise.enabled);
|
||||
enaConn.block (false);
|
||||
|
||||
lastEnabled = pp->lumaDenoise.enabled;
|
||||
|
||||
radius->setValue (pp->lumaDenoise.radius);
|
||||
edge->setValue (pp->lumaDenoise.edgetolerance);
|
||||
|
||||
enableListener ();
|
||||
}
|
||||
|
||||
void LumaDenoise::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
pp->lumaDenoise.radius = radius->getValue ();
|
||||
pp->lumaDenoise.edgetolerance = (int)edge->getValue ();
|
||||
pp->lumaDenoise.enabled = enabled->get_active();
|
||||
|
||||
if (pedited) {
|
||||
pedited->lumaDenoise.radius = radius->getEditedState ();
|
||||
pedited->lumaDenoise.edgetolerance = edge->getEditedState ();
|
||||
pedited->lumaDenoise.enabled = !enabled->get_inconsistent();
|
||||
}
|
||||
}
|
||||
|
||||
void LumaDenoise::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
|
||||
radius->setDefault (defParams->lumaDenoise.radius);
|
||||
edge->setDefault (defParams->lumaDenoise.edgetolerance);
|
||||
|
||||
if (pedited) {
|
||||
radius->setDefaultEditedState (pedited->lumaDenoise.radius ? Edited : UnEdited);
|
||||
edge->setDefaultEditedState (pedited->lumaDenoise.edgetolerance ? Edited : UnEdited);
|
||||
}
|
||||
else {
|
||||
radius->setDefaultEditedState (Irrelevant);
|
||||
edge->setDefaultEditedState (Irrelevant);
|
||||
}
|
||||
}
|
||||
|
||||
void LumaDenoise::adjusterChanged (Adjuster* a, double newval) {
|
||||
|
||||
if (listener && enabled->get_active()) {
|
||||
|
||||
if (a==radius)
|
||||
listener->panelChanged (EvLDNRadius, Glib::ustring::format (std::setw(2), std::fixed, std::setprecision(1), a->getValue()));
|
||||
else if (a==edge)
|
||||
listener->panelChanged (EvLDNEdgeTolerance, Glib::ustring::format ((int)a->getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
void LumaDenoise::enabledChanged () {
|
||||
|
||||
if (batchMode) {
|
||||
if (enabled->get_inconsistent()) {
|
||||
enabled->set_inconsistent (false);
|
||||
enaConn.block (true);
|
||||
enabled->set_active (false);
|
||||
enaConn.block (false);
|
||||
}
|
||||
else if (lastEnabled)
|
||||
enabled->set_inconsistent (true);
|
||||
|
||||
lastEnabled = enabled->get_active ();
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
if (enabled->get_active ())
|
||||
listener->panelChanged (EvLDNEnabled, M("GENERAL_ENABLED"));
|
||||
else
|
||||
listener->panelChanged (EvLDNEnabled, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
void LumaDenoise::setBatchMode (bool batchMode) {
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
radius->showEditedCB ();
|
||||
edge->showEditedCB ();
|
||||
}
|
||||
|
||||
void LumaDenoise::setAdjusterBehavior (bool bedgetoladd) {
|
||||
|
||||
if (!edgetolAdd && bedgetoladd)
|
||||
edge->setLimits (-10000, 10000, 100, 0);
|
||||
else if (edgetolAdd && !bedgetoladd)
|
||||
edge->setLimits (10, 30000, 100, 1500);
|
||||
|
||||
edgetolAdd = bedgetoladd;
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef _LUMADENOISE_H_
|
||||
#define _LUMADENOISE_H_
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <adjuster.h>
|
||||
#include <toolpanel.h>
|
||||
|
||||
class LumaDenoise : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
||||
|
||||
protected:
|
||||
Adjuster* radius;
|
||||
Adjuster* edge;
|
||||
Gtk::CheckButton* enabled;
|
||||
bool lastEnabled;
|
||||
sigc::connection enaConn;
|
||||
bool edgetolAdd;
|
||||
|
||||
public:
|
||||
|
||||
LumaDenoise ();
|
||||
|
||||
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
|
||||
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
|
||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void enabledChanged ();
|
||||
|
||||
void setAdjusterBehavior (bool bedgetoladd);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -177,11 +177,7 @@ void ParamsEdited::set (bool v) {
|
||||
raw.ff_AutoSelect = v;
|
||||
raw.ff_BlurRadius = v;
|
||||
raw.ff_BlurType = v;
|
||||
equalizer.enabled = v;
|
||||
dirpyrequalizer.enabled = v;
|
||||
for(int i = 0; i < 8; i++) {
|
||||
equalizer.c[i] = v;
|
||||
}
|
||||
for(int i = 0; i < 5; i++) {
|
||||
dirpyrequalizer.mult[i] = v;
|
||||
}
|
||||
@@ -358,10 +354,6 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
raw.hotDeadPixel = raw.hotDeadPixel && p.raw.hotdeadpix_filt == other.raw.hotdeadpix_filt;
|
||||
raw.linenoise = raw.linenoise && p.raw.linenoise == other.raw.linenoise;
|
||||
|
||||
equalizer.enabled = equalizer.enabled && p.equalizer.enabled == other.equalizer.enabled;
|
||||
for(int i = 0; i < 8; i++) {
|
||||
equalizer.c[i] = equalizer.c[i] && p.equalizer.c[i] == other.equalizer.c[i];
|
||||
}
|
||||
dirpyrequalizer.enabled = dirpyrequalizer.enabled && p.dirpyrequalizer.enabled == other.dirpyrequalizer.enabled;
|
||||
for(int i = 0; i < 8; i++) {
|
||||
dirpyrequalizer.mult[i] = dirpyrequalizer.mult[i] && p.dirpyrequalizer.mult[i] == other.dirpyrequalizer.mult[i];
|
||||
@@ -530,10 +522,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
if (raw.ff_BlurRadius) toEdit.raw.ff_BlurRadius = mods.raw.ff_BlurRadius;
|
||||
if (raw.ff_BlurType) toEdit.raw.ff_BlurType = mods.raw.ff_BlurType;
|
||||
|
||||
if (equalizer.enabled) toEdit.equalizer.enabled = mods.equalizer.enabled;
|
||||
for(int i = 0; i < 8; i++) {
|
||||
if(equalizer.c[i]) toEdit.equalizer.c[i] = mods.equalizer.c[i];
|
||||
}
|
||||
if (dirpyrequalizer.enabled) toEdit.dirpyrequalizer.enabled = mods.dirpyrequalizer.enabled;
|
||||
for(int i = 0; i < 5; i++) {
|
||||
if(dirpyrequalizer.mult[i]) toEdit.dirpyrequalizer.mult[i] = dontforceSet && options.baBehav[ADDSET_DIRPYREQ] ? toEdit.dirpyrequalizer.mult[i] + mods.dirpyrequalizer.mult[i] : mods.dirpyrequalizer.mult[i];
|
||||
|
||||
@@ -270,13 +270,6 @@ class ColorManagementParamsEdited {
|
||||
bool freegamma;
|
||||
};
|
||||
|
||||
class EqualizerParamsEdited {
|
||||
|
||||
public:
|
||||
bool enabled;
|
||||
bool c[8];
|
||||
};
|
||||
|
||||
class DirPyrEqualizerParamsEdited {
|
||||
|
||||
public:
|
||||
@@ -365,7 +358,6 @@ class ParamsEdited {
|
||||
HRecParamsEdited hlrecovery;
|
||||
ResizeParamsEdited resize;
|
||||
ColorManagementParamsEdited icm;
|
||||
EqualizerParamsEdited equalizer;
|
||||
RAWParamsEdited raw;
|
||||
DirPyrEqualizerParamsEdited dirpyrequalizer;
|
||||
HSVEqualizerParamsEdited hsvequalizer;
|
||||
|
||||
@@ -54,16 +54,11 @@ PartialPasteDlg::PartialPasteDlg () {
|
||||
gradsharpen = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_GRADIENTSHARPEN")));
|
||||
microcontrast = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_MICROCONTRAST")));
|
||||
impden = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_IMPULSEDENOISE")));
|
||||
//lumaden = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_LUMADENOISE")));
|
||||
dirpyreq = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DIRPYREQUALIZER")));
|
||||
//waveq = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_WAVELETEQUALIZER")));
|
||||
defringe = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DEFRINGE")));
|
||||
|
||||
// options in color:
|
||||
chmixer = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_CHANNELMIXER")));
|
||||
//colorshift = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COLORSHIFT")));
|
||||
//colorboost = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COLORBOOST")));
|
||||
//colorden = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COLORDENOISE")));
|
||||
dirpyrden = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DIRPYRDENOISE")));
|
||||
hsveq = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_HSVEQUALIZER")));
|
||||
|
||||
@@ -131,8 +126,6 @@ PartialPasteDlg::PartialPasteDlg () {
|
||||
vboxes[1]->pack_start (*gradsharpen, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[1]->pack_start (*microcontrast, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[1]->pack_start (*impden, Gtk::PACK_SHRINK, 2);
|
||||
//vboxes[1]->pack_start (*lumaden, Gtk::PACK_SHRINK, 2);
|
||||
//vboxes[1]->pack_start (*colorden, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[1]->pack_start (*dirpyrden, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[1]->pack_start (*defringe, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[1]->pack_start (*dirpyreq, Gtk::PACK_SHRINK, 2);
|
||||
@@ -141,8 +134,6 @@ PartialPasteDlg::PartialPasteDlg () {
|
||||
vboxes[2]->pack_start (*color, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[2]->pack_start (*hseps[2], Gtk::PACK_SHRINK, 2);
|
||||
vboxes[2]->pack_start (*chmixer, Gtk::PACK_SHRINK, 2);
|
||||
//vboxes[2]->pack_start (*colorshift, Gtk::PACK_SHRINK, 2);
|
||||
//vboxes[2]->pack_start (*colorboost, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[2]->pack_start (*hsveq, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
vboxes[3]->pack_start (*lens, Gtk::PACK_SHRINK, 2);
|
||||
@@ -246,16 +237,12 @@ PartialPasteDlg::PartialPasteDlg () {
|
||||
gradsharpenConn = gradsharpen->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true));
|
||||
microcontrastConn = microcontrast->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true));
|
||||
impdenConn = impden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true));
|
||||
//lumadenConn = lumaden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true));
|
||||
//colordenConn = colorden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true));
|
||||
dirpyrdenConn = dirpyrden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true));
|
||||
dirpyreqConn = dirpyreq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true));
|
||||
//waveqConn = waveq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true));
|
||||
defringeConn = defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun(*detail, &Gtk::CheckButton::set_inconsistent), true));
|
||||
|
||||
chmixerConn = chmixer->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
|
||||
//colorshiftConn = colorshift->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
|
||||
//colorboostConn = colorboost->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
|
||||
hsveqConn = hsveq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
|
||||
|
||||
distortionConn = distortion->signal_toggled().connect (sigc::bind (sigc::mem_fun(*lens, &Gtk::CheckButton::set_inconsistent), true));
|
||||
@@ -439,8 +426,6 @@ void PartialPasteDlg::detailToggled () {
|
||||
microcontrastConn.block(true);
|
||||
impdenConn.block (true);
|
||||
dirpyrdenConn.block (true);
|
||||
//lumadenConn.block (true);
|
||||
//colordenConn.block (true);
|
||||
defringeConn.block (true);
|
||||
dirpyreqConn.block (true);
|
||||
//waveqConn.block (true);
|
||||
@@ -452,8 +437,6 @@ void PartialPasteDlg::detailToggled () {
|
||||
microcontrast->set_active (detail->get_active ());
|
||||
impden->set_active (detail->get_active ());
|
||||
dirpyrden->set_active (detail->get_active ());
|
||||
//lumaden->set_active (detail->get_active ());
|
||||
//colorden->set_active (detail->get_active ());
|
||||
defringe->set_active (detail->get_active ());
|
||||
dirpyreq->set_active (detail->get_active ());
|
||||
//waveq->set_active (detail->get_active ());
|
||||
@@ -463,8 +446,6 @@ void PartialPasteDlg::detailToggled () {
|
||||
microcontrastConn.block(false);
|
||||
impdenConn.block (false);
|
||||
dirpyrdenConn.block (false);
|
||||
//lumadenConn.block (false);
|
||||
//colordenConn.block (false);
|
||||
defringeConn.block (false);
|
||||
dirpyreqConn.block (false);
|
||||
//waveqConn.block (false);
|
||||
@@ -474,20 +455,14 @@ void PartialPasteDlg::colorToggled () {
|
||||
|
||||
chmixerConn.block (true);
|
||||
hsveqConn.block (true);
|
||||
//colorshiftConn.block (true);
|
||||
//colorboostConn.block (true);
|
||||
|
||||
color->set_inconsistent (false);
|
||||
|
||||
chmixer->set_active (color->get_active ());
|
||||
//colorshift->set_active (color->get_active ());
|
||||
//colorboost->set_active (color->get_active ());
|
||||
hsveq->set_active (color->get_active ());
|
||||
|
||||
chmixerConn.block (false);
|
||||
hsveqConn.block (false);
|
||||
//colorshiftConn.block (false);
|
||||
//colorboostConn.block (false);
|
||||
}
|
||||
|
||||
void PartialPasteDlg::lensToggled () {
|
||||
@@ -573,18 +548,12 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dst, const r
|
||||
dst->clarity.uniformity = src->clarity.uniformity;
|
||||
}
|
||||
if (impden->get_active ()) dst->impulseDenoise = src->impulseDenoise;
|
||||
//if (lumaden->get_active ()) dst->lumaDenoise = src->lumaDenoise;
|
||||
if (dirpyreq->get_active ()) dst->dirpyrequalizer = src->dirpyrequalizer;
|
||||
//if (waveq->get_active ()) dst->equalizer = src->equalizer;
|
||||
if (defringe->get_active ()) dst->defringe = src->defringe;
|
||||
if (dirpyrden->get_active ()) dst->dirpyrDenoise = src->dirpyrDenoise;
|
||||
|
||||
if (chmixer->get_active ()) dst->chmixer = src->chmixer;
|
||||
//if (colorshift->get_active ()) dst->colorShift = src->colorShift;
|
||||
//if (colorboost->get_active ()) dst->colorBoost = src->colorBoost;
|
||||
if (hsveq->get_active ()) dst->hsvequalizer = src->hsvequalizer;
|
||||
//if (colorden->get_active ()) dst->colorDenoise = src->colorDenoise;
|
||||
|
||||
if (distortion->get_active ()) dst->distortion = src->distortion;
|
||||
if (cacorr->get_active ()) dst->cacorrection = src->cacorrection;
|
||||
if (vignetting->get_active ()) dst->vignetting = src->vignetting;
|
||||
|
||||
@@ -49,17 +49,13 @@ class PartialPasteDlg : public Gtk::Dialog {
|
||||
Gtk::CheckButton* gradsharpen;
|
||||
Gtk::CheckButton* microcontrast;
|
||||
Gtk::CheckButton* impden;
|
||||
Gtk::CheckButton* lumaden;
|
||||
Gtk::CheckButton* waveq;
|
||||
Gtk::CheckButton* colorden;
|
||||
Gtk::CheckButton* dirpyrden;
|
||||
Gtk::CheckButton* defringe;
|
||||
Gtk::CheckButton* dirpyreq;
|
||||
|
||||
// options in color:
|
||||
Gtk::CheckButton* chmixer;
|
||||
Gtk::CheckButton* colorshift;
|
||||
Gtk::CheckButton* colorboost;
|
||||
Gtk::CheckButton* hsveq;
|
||||
|
||||
// options in lens:
|
||||
@@ -106,8 +102,8 @@ class PartialPasteDlg : public Gtk::Dialog {
|
||||
sigc::connection everythingConn, basicConn, detailConn, colorConn, lensConn, compositionConn, metaicmConn, rawConn;;
|
||||
|
||||
sigc::connection wbConn, exposureConn, hlrecConn, shConn, labcurveConn;
|
||||
sigc::connection sharpenConn, gradsharpenConn, microcontrastConn, impdenConn, lumadenConn, dirpyrdenConn, colordenConn, waveqConn, defringeConn, dirpyreqConn;
|
||||
sigc::connection chmixerConn, colorshiftConn, colorboostConn, hsveqConn;
|
||||
sigc::connection sharpenConn, gradsharpenConn, microcontrastConn, impdenConn, dirpyrdenConn, waveqConn, defringeConn, dirpyreqConn;
|
||||
sigc::connection chmixerConn, hsveqConn;
|
||||
sigc::connection distortionConn, cacorrConn, vignettingConn;
|
||||
sigc::connection coarserotConn, finerotConn, cropConn, resizeConn, perspectiveConn, commonTransConn;
|
||||
sigc::connection exifchConn, iptcConn, icmConn;
|
||||
|
||||
@@ -176,10 +176,6 @@ Gtk::Widget* Preferences::getBatchProcPanel () {
|
||||
appendBehavList (mi, M("TP_MLMICRO_UNIFORMITY"), ADDSET_CLAR_UNIFORMITY, false);
|
||||
|
||||
|
||||
//mi = behModel->append ();
|
||||
//mi->set_value (behavColumns.label, M("TP_LUMADENOISE_LABEL"));
|
||||
//appendBehavList (mi, M("TP_LUMADENOISE_EDGETOLERANCE"), ADDSET_LD_EDGETOLERANCE, true);
|
||||
|
||||
mi = behModel->append ();
|
||||
mi->set_value (behavColumns.label, M("TP_DIRPYRDENOISE_LABEL"));
|
||||
appendBehavList (mi, M("TP_DIRPYRDENOISE_LUMA")+", "+M("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHLUM, true);
|
||||
@@ -194,15 +190,6 @@ Gtk::Widget* Preferences::getBatchProcPanel () {
|
||||
mi->set_value (behavColumns.label, M("TP_CHMIXER_LABEL"));
|
||||
appendBehavList (mi, M("TP_CHMIXER_RED")+", "+M("TP_CHMIXER_GREEN")+", "+M("TP_CHMIXER_BLUE"), ADDSET_CHMIXER, false);
|
||||
|
||||
//mi = behModel->append ();
|
||||
//mi->set_value (behavColumns.label, M("TP_COLORBOOST_LABEL"));
|
||||
//appendBehavList (mi, M("TP_COLORBOOST_AMOUNT"), ADDSET_CBOOST_AMOUNT, false);
|
||||
|
||||
//mi = behModel->append ();
|
||||
//mi->set_value (behavColumns.label, M("TP_COLORSHIFT_LABEL"));
|
||||
//appendBehavList (mi, M("TP_COLORSHIFT_BLUEYELLOW"), ADDSET_CS_BLUEYELLOW, false);
|
||||
//appendBehavList (mi, M("TP_COLORSHIFT_GREENMAGENTA"), ADDSET_CS_GREENMAGENTA, false);
|
||||
|
||||
mi = behModel->append ();
|
||||
mi->set_value (behavColumns.label, M("TP_ROTATE_LABEL"));
|
||||
appendBehavList (mi, M("TP_ROTATE_DEGREE"), ADDSET_ROTATE_DEGREE, false);
|
||||
|
||||
@@ -38,16 +38,12 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
|
||||
coarse = Gtk::manage (new CoarsePanel ());
|
||||
toneCurve = Gtk::manage (new ToneCurve ());
|
||||
shadowshighlights = Gtk::manage (new ShadowsHighlights ());
|
||||
//lumadenoise = Gtk::manage (new LumaDenoise ());
|
||||
//colordenoise = Gtk::manage (new ColorDenoise ());
|
||||
impulsedenoise = Gtk::manage (new ImpulseDenoise ());
|
||||
defringe = Gtk::manage (new Defringe ());
|
||||
dirpyrdenoise = Gtk::manage (new DirPyrDenoise ());
|
||||
sharpening = Gtk::manage (new Sharpening ());
|
||||
clarity = Gtk::manage (new Clarity ());
|
||||
lcurve = Gtk::manage (new LCurve ());
|
||||
//colorboost = Gtk::manage (new ColorBoost ());
|
||||
//colorshift = Gtk::manage (new ColorShift ());
|
||||
lensgeom = Gtk::manage (new LensGeometry ());
|
||||
distortion = Gtk::manage (new Distortion ());
|
||||
rotate = Gtk::manage (new Rotate ());
|
||||
@@ -62,7 +58,6 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
|
||||
icm = Gtk::manage (new ICMPanel ());
|
||||
exifpanel = Gtk::manage (new ExifPanel ());
|
||||
iptcpanel = Gtk::manage (new IPTCPanel ());
|
||||
//equalizer = Gtk::manage (new Equalizer ());
|
||||
dirpyrequalizer = Gtk::manage (new DirPyrEqualizer ());
|
||||
hsvequalizer = Gtk::manage (new HSVEqualizer ());
|
||||
rawprocess = Gtk::manage (new RawProcess ());
|
||||
@@ -79,18 +74,12 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
|
||||
addPanel (exposurePanel, shadowshighlights, M("TP_SHADOWSHLIGHTS_LABEL")); toolPanels.push_back (shadowshighlights);
|
||||
addPanel (detailsPanel, sharpening, M("TP_SHARPENING_LABEL")); toolPanels.push_back (sharpening);
|
||||
addPanel (detailsPanel, clarity, M("TP_CLARITY_LABEL")); toolPanels.push_back (clarity);
|
||||
|
||||
//addPanel (colorPanel, colorboost, M("TP_COLORBOOST_LABEL")); toolPanels.push_back (colorboost);
|
||||
//addPanel (colorPanel, colorshift, M("TP_COLORSHIFT_LABEL")); toolPanels.push_back (colorshift);
|
||||
addPanel (colorPanel, hsvequalizer, M("TP_HSVEQUALIZER_LABEL")); toolPanels.push_back (hsvequalizer);
|
||||
addPanel (exposurePanel, lcurve, M("TP_LABCURVE_LABEL")); toolPanels.push_back (lcurve);
|
||||
addPanel (detailsPanel, impulsedenoise, M("TP_IMPULSEDENOISE_LABEL")); toolPanels.push_back (impulsedenoise);
|
||||
//addPanel (detailsPanel, lumadenoise, M("TP_LUMADENOISE_LABEL")); toolPanels.push_back (lumadenoise);
|
||||
//addPanel (detailsPanel, colordenoise, M("TP_COLORDENOISE_LABEL")); toolPanels.push_back (colordenoise);
|
||||
addPanel (detailsPanel, dirpyrdenoise, M("TP_DIRPYRDENOISE_LABEL")); toolPanels.push_back (dirpyrdenoise);
|
||||
addPanel (detailsPanel, defringe, M("TP_DEFRINGE_LABEL")); toolPanels.push_back (defringe);
|
||||
addPanel (detailsPanel, dirpyrequalizer, M("TP_DIRPYREQUALIZER_LABEL")); toolPanels.push_back (dirpyrequalizer);
|
||||
//addPanel (detailsPanel, equalizer, M("TP_EQUALIZER_LABEL")); toolPanels.push_back (equalizer);
|
||||
addPanel (transformPanel, crop, M("TP_CROP_LABEL")); toolPanels.push_back (crop);
|
||||
addPanel (transformPanel, resize, M("TP_RESIZE_LABEL")); toolPanels.push_back (resize);
|
||||
addPanel (transformPanel, lensgeom, M("TP_LENSGEOM_LABEL")); toolPanels.push_back (lensgeom);
|
||||
|
||||
@@ -27,12 +27,9 @@
|
||||
#include <imageareatoollistener.h>
|
||||
#include <gtkmm.h>
|
||||
#include <whitebalance.h>
|
||||
#include <colorboost.h>
|
||||
#include <coarsepanel.h>
|
||||
#include <tonecurve.h>
|
||||
#include <shadowshighlights.h>
|
||||
#include <lumadenoise.h>
|
||||
#include <colordenoise.h>
|
||||
#include <impulsedenoise.h>
|
||||
#include <defringe.h>
|
||||
#include <dirpyrdenoise.h>
|
||||
@@ -45,7 +42,6 @@
|
||||
#include <resize.h>
|
||||
#include <chmixer.h>
|
||||
#include <hlrec.h>
|
||||
#include <colorshift.h>
|
||||
#include <cacorrection.h>
|
||||
#include <distortion.h>
|
||||
#include <perspective.h>
|
||||
@@ -54,7 +50,6 @@
|
||||
#include <toolbar.h>
|
||||
#include <lensgeom.h>
|
||||
#include <lensgeomlistener.h>
|
||||
#include <equalizer.h>
|
||||
#include <dirpyrequalizer.h>
|
||||
#include <hsvequalizer.h>
|
||||
#include <rawprocess.h>
|
||||
@@ -86,24 +81,19 @@ class ToolPanelCoordinator : public ToolPanelListener,
|
||||
Distortion* distortion;
|
||||
PerspCorrection* perspective;
|
||||
CACorrection* cacorrection;
|
||||
//ColorShift* colorshift;
|
||||
HLRecovery* hlrecovery;
|
||||
ChMixer* chmixer;
|
||||
//ColorBoost* colorboost;
|
||||
Resize* resize;
|
||||
ICMPanel* icm;
|
||||
Crop* crop;
|
||||
ToneCurve* toneCurve;
|
||||
ShadowsHighlights* shadowshighlights;
|
||||
//LumaDenoise* lumadenoise;
|
||||
//ColorDenoise* colordenoise;
|
||||
Defringe* defringe;
|
||||
ImpulseDenoise* impulsedenoise;
|
||||
DirPyrDenoise* dirpyrdenoise;
|
||||
Sharpening* sharpening;
|
||||
Clarity* clarity;
|
||||
LCurve* lcurve;
|
||||
//Equalizer * equalizer;
|
||||
DirPyrEqualizer * dirpyrequalizer;
|
||||
HSVEqualizer * hsvequalizer;
|
||||
RawProcess* rawprocess;
|
||||
|
||||
Reference in New Issue
Block a user