Support dnggainmap (embedded correction) for Bayer files (#6382)

* dng gainmap support, #6379
* dng GainMap: control sensitivity of checkbox, #6379
* dng GainMap: partial paste
* dng GainMap: moved isGainMapSupported() from dcraw.h to dcraw.cc
* RawImageSource::applyDngGainMap: small speedup
* Change GUI to separate gainmap from other flat-field; also reorder checkbox

Co-authored-by: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com>
This commit is contained in:
Ingo Weyrich
2023-01-02 21:30:06 +01:00
committed by GitHub
parent 2101b846c3
commit 8d29d361a8
22 changed files with 299 additions and 21 deletions

View File

@@ -343,12 +343,12 @@ ToolPanelCoordinator::~ToolPanelCoordinator ()
delete toolBar;
}
void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans, bool isMono)
void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans, bool isMono, bool isGainMapSupported)
{
if (isRaw) {
if (isBayer) {
idle_register.add(
[this]() -> bool
[this, isGainMapSupported]() -> bool
{
rawPanelSW->set_sensitive(true);
sensorxtrans->FoldableToolPanel::hide();
@@ -362,6 +362,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
preprocessWB->FoldableToolPanel::show();
preprocess->FoldableToolPanel::show();
flatfield->FoldableToolPanel::show();
flatfield->setGainMap(isGainMapSupported);
pdSharpening->FoldableToolPanel::show();
retinex->FoldableToolPanel::setGrayedOut(false);
return false;
@@ -369,7 +370,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
);
} else if (isXtrans) {
idle_register.add(
[this]() -> bool
[this, isGainMapSupported]() -> bool
{
rawPanelSW->set_sensitive(true);
sensorxtrans->FoldableToolPanel::show();
@@ -383,6 +384,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
preprocessWB->FoldableToolPanel::show();
preprocess->FoldableToolPanel::show();
flatfield->FoldableToolPanel::show();
flatfield->setGainMap(isGainMapSupported);
pdSharpening->FoldableToolPanel::show();
retinex->FoldableToolPanel::setGrayedOut(false);
return false;
@@ -390,7 +392,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
);
} else if (isMono) {
idle_register.add(
[this]() -> bool
[this, isGainMapSupported]() -> bool
{
rawPanelSW->set_sensitive(true);
sensorbayer->FoldableToolPanel::hide();
@@ -403,6 +405,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
preprocessWB->FoldableToolPanel::hide();
preprocess->FoldableToolPanel::hide();
flatfield->FoldableToolPanel::show();
flatfield->setGainMap(isGainMapSupported);
pdSharpening->FoldableToolPanel::show();
retinex->FoldableToolPanel::setGrayedOut(false);
return false;