Merge with c3a84087d8675dbd37e95cc6177b04b359bf4e73
This commit is contained in:
@@ -42,9 +42,9 @@ if (WIN32)
|
||||
#set_target_properties (rth PROPERTIES LINK_FLAGS "-mwindows")
|
||||
else (WIN32)
|
||||
include_directories (${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS}
|
||||
${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} ${LCMS_INCLUDE_DIRS} ${EXPAT_INCLUDE_DIRS} ${GTHREAD_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS} )
|
||||
${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} ${LCMS_INCLUDE_DIRS} ${EXPAT_INCLUDE_DIRS} ${FFTW3F_LIBRARY_DIRS} ${GTHREAD_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS} )
|
||||
link_directories (${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS}
|
||||
${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS} ${GIO_LIBRARY_DIRS} ${GIOMM_LIBRARY_DIRS} ${IPTCDATA_LIBRARY_DIRS} ${LCMS_LIBRARY_DIRS} ${EXPAT_LIBRARY_DIRS} ${GTHREAD_LIBRARY_DIRS} ${GOBJECT_LIBRARY_DIRS})
|
||||
${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS} ${GIO_LIBRARY_DIRS} ${GIOMM_LIBRARY_DIRS} ${IPTCDATA_LIBRARY_DIRS} ${LCMS_LIBRARY_DIRS} ${EXPAT_LIBRARY_DIRS} ${FFTW3F_LIBRARY_DIRS} ${GTHREAD_LIBRARY_DIRS} ${GOBJECT_LIBRARY_DIRS})
|
||||
endif (WIN32)
|
||||
# create config.h which defines where data are stored
|
||||
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h")
|
||||
@@ -55,6 +55,6 @@ set_target_properties (rth PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_
|
||||
#target_link_libraries (rth rtengine ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${TIFF_LIBRARIES} ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
|
||||
# ${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${GTK_LIBRARIES} ${GTKMM_LIBRARIES} ${GIO_LIBRARIES} ${GIOMM_LIBRARIES} ${LCMS_LIBRARIES} ${IPTCDATA_LIBRARIES})
|
||||
target_link_libraries (rth rtengine ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${TIFF_LIBRARIES} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
|
||||
${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${GTK_LIBRARIES} ${GTKMM_LIBRARIES} ${GIO_LIBRARIES} ${GIOMM_LIBRARIES} ${LCMS_LIBRARIES} ${EXPAT_LIBRARIES} ${IPTCDATA_LIBRARIES} ${EXTRA_LIB_RTGUI})
|
||||
${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${GTK_LIBRARIES} ${GTKMM_LIBRARIES} ${GIO_LIBRARIES} ${GIOMM_LIBRARIES} ${LCMS_LIBRARIES} ${EXPAT_LIBRARIES} ${FFTW3F_LIBRARIES} ${IPTCDATA_LIBRARIES} ${EXTRA_LIB_RTGUI})
|
||||
install (TARGETS rth DESTINATION ${BINDIR})
|
||||
|
||||
|
@@ -216,7 +216,7 @@ void BatchToolPanelCoordinator::initSession () {
|
||||
if (options.baBehav[ADDSET_VIGN_CENTER]) pparams.vignetting.centerY = 0;
|
||||
|
||||
if (options.baBehav[ADDSET_DIRPYREQ]) for (int i=0; i<5; i++) pparams.dirpyrequalizer.mult[i] = 0;
|
||||
if (options.baBehav[ADDSET_DIRPYRDN_CHLUM]) pparams.dirpyrDenoise.luma = pparams.dirpyrDenoise.chroma = 0;
|
||||
if (options.baBehav[ADDSET_DIRPYRDN_CHLUM]) pparams.dirpyrDenoise.Ldetail = pparams.dirpyrDenoise.luma = pparams.dirpyrDenoise.chroma = 0;
|
||||
if (options.baBehav[ADDSET_DIRPYRDN_GAMMA]) pparams.dirpyrDenoise.gamma = 0;
|
||||
|
||||
if (options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]) pparams.raw.greenthresh = 0;
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#ifndef __CONFIG_H__
|
||||
#define __CONFIG_H__
|
||||
|
||||
#cmakedefine BUILD_BUNDLE
|
||||
#define DATA_SEARCH_PATH "${DATADIR}"
|
||||
#define DOC_SEARCH_PATH "${DOCDIR}"
|
||||
#define CREDITS_SEARCH_PATH "${CREDITSDIR}"
|
||||
|
@@ -36,19 +36,25 @@ DirPyrDenoise::DirPyrDenoise () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
enaConn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &DirPyrDenoise::enabledChanged) );
|
||||
|
||||
luma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LUMA"), 0, 100, 1, 5));
|
||||
chroma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_CHROMA"), 0, 100, 1, 5));
|
||||
gamma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_GAMMA"), 1.0, 3.0, 0.01, 2.0));
|
||||
|
||||
luma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LUMA"), 0, 100, 0.01, 0));
|
||||
Ldetail = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LDETAIL"), 0, 100, 0.01, 80));
|
||||
chroma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_CHROMA"), 0, 100, 0.01, 15));
|
||||
gamma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_GAMMA"), 1.0, 3.0, 0.01, 1.7));
|
||||
|
||||
|
||||
luma->setAdjusterListener (this);
|
||||
Ldetail->setAdjusterListener (this);
|
||||
chroma->setAdjusterListener (this);
|
||||
gamma->setAdjusterListener (this);
|
||||
|
||||
luma->show();
|
||||
chroma->show();
|
||||
luma->show();
|
||||
Ldetail->show();
|
||||
chroma->show();
|
||||
gamma->show();
|
||||
|
||||
pack_start (*luma);
|
||||
pack_start (*Ldetail);
|
||||
pack_start (*chroma);
|
||||
pack_start (*gamma);
|
||||
|
||||
@@ -59,9 +65,10 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
disableListener ();
|
||||
|
||||
if (pedited) {
|
||||
luma->setEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
chroma->setEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
gamma->setEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited);
|
||||
luma->setEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
Ldetail->setEditedState (pedited->dirpyrDenoise.Ldetail ? Edited : UnEdited);
|
||||
chroma->setEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
gamma->setEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited);
|
||||
enabled->set_inconsistent (!pedited->dirpyrDenoise.enabled);
|
||||
}
|
||||
|
||||
@@ -72,8 +79,9 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
lastEnabled = pp->dirpyrDenoise.enabled;
|
||||
|
||||
luma->setValue (pp->dirpyrDenoise.luma);
|
||||
chroma->setValue (pp->dirpyrDenoise.chroma);
|
||||
gamma->setValue (pp->dirpyrDenoise.gamma);
|
||||
Ldetail->setValue (pp->dirpyrDenoise.Ldetail);
|
||||
chroma->setValue (pp->dirpyrDenoise.chroma);
|
||||
gamma->setValue (pp->dirpyrDenoise.gamma);
|
||||
|
||||
enableListener ();
|
||||
}
|
||||
@@ -81,46 +89,56 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
void DirPyrDenoise::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
pp->dirpyrDenoise.luma = luma->getValue ();
|
||||
pp->dirpyrDenoise.Ldetail = Ldetail->getValue ();
|
||||
pp->dirpyrDenoise.chroma = chroma->getValue ();
|
||||
pp->dirpyrDenoise.gamma = gamma->getValue ();
|
||||
pp->dirpyrDenoise.enabled = enabled->get_active();
|
||||
|
||||
if (pedited) {
|
||||
pedited->dirpyrDenoise.luma = luma->getEditedState ();
|
||||
pedited->dirpyrDenoise.chroma = chroma->getEditedState ();
|
||||
pedited->dirpyrDenoise.gamma = gamma->getEditedState ();
|
||||
pedited->dirpyrDenoise.enabled = !enabled->get_inconsistent();
|
||||
pedited->dirpyrDenoise.Ldetail = Ldetail->getEditedState ();
|
||||
pedited->dirpyrDenoise.chroma = chroma->getEditedState ();
|
||||
pedited->dirpyrDenoise.gamma = gamma->getEditedState ();
|
||||
pedited->dirpyrDenoise.enabled = !enabled->get_inconsistent();
|
||||
}
|
||||
}
|
||||
|
||||
void DirPyrDenoise::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
|
||||
luma->setDefault (defParams->dirpyrDenoise.luma);
|
||||
chroma->setDefault (defParams->dirpyrDenoise.chroma);
|
||||
gamma->setDefault (defParams->dirpyrDenoise.gamma);
|
||||
luma->setDefault (defParams->dirpyrDenoise.luma);
|
||||
Ldetail->setDefault (defParams->dirpyrDenoise.Ldetail);
|
||||
chroma->setDefault (defParams->dirpyrDenoise.chroma);
|
||||
gamma->setDefault (defParams->dirpyrDenoise.gamma);
|
||||
|
||||
if (pedited) {
|
||||
luma->setDefaultEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
chroma->setDefaultEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
gamma->setDefaultEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited);
|
||||
luma->setDefaultEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
Ldetail->setDefaultEditedState (pedited->dirpyrDenoise.Ldetail ? Edited : UnEdited);
|
||||
chroma->setDefaultEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
gamma->setDefaultEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited);
|
||||
}
|
||||
else {
|
||||
luma->setDefaultEditedState (Irrelevant);
|
||||
chroma->setDefaultEditedState (Irrelevant);
|
||||
gamma->setDefaultEditedState (Irrelevant);
|
||||
luma->setDefaultEditedState (Irrelevant);
|
||||
Ldetail->setDefaultEditedState (Irrelevant);
|
||||
chroma->setDefaultEditedState (Irrelevant);
|
||||
gamma->setDefaultEditedState (Irrelevant);
|
||||
}
|
||||
}
|
||||
|
||||
void DirPyrDenoise::adjusterChanged (Adjuster* a, double newval) {
|
||||
|
||||
Glib::ustring costr;
|
||||
costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue());
|
||||
|
||||
if (listener && enabled->get_active()) {
|
||||
if (a==luma)
|
||||
listener->panelChanged (EvDPDNLuma, Glib::ustring::format ((int)a->getValue()));
|
||||
if (a==Ldetail)
|
||||
listener->panelChanged (EvDPDNLdetail, costr);
|
||||
else if (a==luma)
|
||||
listener->panelChanged (EvDPDNLuma, costr);
|
||||
else if (a==chroma)
|
||||
listener->panelChanged (EvDPDNChroma, Glib::ustring::format ((int)a->getValue()));
|
||||
else if (a==gamma)
|
||||
listener->panelChanged (EvDPDNGamma, Glib::ustring::format (std::setw(2), std::fixed, std::setprecision(2), a->getValue()));
|
||||
}
|
||||
listener->panelChanged (EvDPDNChroma, costr);
|
||||
else if (a==gamma)
|
||||
listener->panelChanged (EvDPDNGamma, costr);
|
||||
}
|
||||
}
|
||||
|
||||
void DirPyrDenoise::enabledChanged () {
|
||||
@@ -150,6 +168,7 @@ void DirPyrDenoise::setBatchMode (bool batchMode) {
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
luma->showEditedCB ();
|
||||
Ldetail->showEditedCB ();
|
||||
chroma->showEditedCB ();
|
||||
gamma->showEditedCB ();
|
||||
}
|
||||
@@ -157,6 +176,7 @@ void DirPyrDenoise::setBatchMode (bool batchMode) {
|
||||
void DirPyrDenoise::setAdjusterBehavior (bool chrolumaadd, bool gammaadd) {
|
||||
|
||||
luma->setAddMode(chrolumaadd);
|
||||
Ldetail->setAddMode(chrolumaadd);
|
||||
chroma->setAddMode(chrolumaadd);
|
||||
gamma->setAddMode(gammaadd);
|
||||
}
|
||||
@@ -164,6 +184,7 @@ void DirPyrDenoise::setAdjusterBehavior (bool chrolumaadd, bool gammaadd) {
|
||||
void DirPyrDenoise::trimValues (rtengine::procparams::ProcParams* pp) {
|
||||
|
||||
luma->trimValue(pp->dirpyrDenoise.luma);
|
||||
Ldetail->trimValue(pp->dirpyrDenoise.Ldetail);
|
||||
chroma->trimValue(pp->dirpyrDenoise.chroma);
|
||||
gamma->trimValue(pp->dirpyrDenoise.gamma);
|
||||
}
|
||||
|
@@ -26,8 +26,9 @@
|
||||
class DirPyrDenoise : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
||||
|
||||
protected:
|
||||
Adjuster* luma;
|
||||
Adjuster* chroma;
|
||||
Adjuster* luma;
|
||||
Adjuster* Ldetail;
|
||||
Adjuster* chroma;
|
||||
Adjuster* gamma;
|
||||
|
||||
Gtk::CheckButton* enabled;
|
||||
|
@@ -111,6 +111,7 @@ void ParamsEdited::set (bool v) {
|
||||
impulseDenoise.thresh = v;
|
||||
dirpyrDenoise.enabled = v;
|
||||
dirpyrDenoise.luma = v;
|
||||
dirpyrDenoise.Ldetail = v;
|
||||
dirpyrDenoise.chroma = v;
|
||||
dirpyrDenoise.gamma = v;
|
||||
edgePreservingDecompositionUI.enabled = v;
|
||||
@@ -312,6 +313,7 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
|
||||
dirpyrDenoise.enabled = dirpyrDenoise.enabled && p.dirpyrDenoise.enabled == other.dirpyrDenoise.enabled;
|
||||
dirpyrDenoise.luma = dirpyrDenoise.luma && p.dirpyrDenoise.luma == other.dirpyrDenoise.luma;
|
||||
dirpyrDenoise.Ldetail = dirpyrDenoise.Ldetail && p.dirpyrDenoise.Ldetail == other.dirpyrDenoise.Ldetail;
|
||||
dirpyrDenoise.chroma = dirpyrDenoise.chroma && p.dirpyrDenoise.chroma == other.dirpyrDenoise.chroma;
|
||||
dirpyrDenoise.gamma = dirpyrDenoise.gamma && p.dirpyrDenoise.gamma == other.dirpyrDenoise.gamma;
|
||||
|
||||
@@ -522,6 +524,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
|
||||
if (dirpyrDenoise.enabled) toEdit.dirpyrDenoise.enabled = mods.dirpyrDenoise.enabled;
|
||||
if (dirpyrDenoise.luma) toEdit.dirpyrDenoise.luma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.luma + mods.dirpyrDenoise.luma : mods.dirpyrDenoise.luma;
|
||||
if (dirpyrDenoise.Ldetail) toEdit.dirpyrDenoise.Ldetail = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.Ldetail + mods.dirpyrDenoise.Ldetail : mods.dirpyrDenoise.Ldetail;
|
||||
if (dirpyrDenoise.chroma) toEdit.dirpyrDenoise.chroma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.chroma + mods.dirpyrDenoise.chroma : mods.dirpyrDenoise.chroma;
|
||||
if (dirpyrDenoise.gamma) toEdit.dirpyrDenoise.gamma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_GAMMA] ? toEdit.dirpyrDenoise.gamma + mods.dirpyrDenoise.gamma : mods.dirpyrDenoise.gamma;
|
||||
|
||||
|
@@ -184,6 +184,7 @@ class DirPyrDenoiseParamsEdited {
|
||||
|
||||
public:
|
||||
bool enabled;
|
||||
bool Ldetail;
|
||||
bool luma;
|
||||
bool chroma;
|
||||
bool gamma;
|
||||
|
Reference in New Issue
Block a user