File indexing completed on 2025-01-19 03:53:16

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2008-13-08
0007  * Description : Raw post processing corrections.
0008  *
0009  * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_RAW_POST_PROCESSING_H
0016 #define DIGIKAM_RAW_POST_PROCESSING_H
0017 
0018 // Local includes
0019 
0020 #include "dimgthreadedfilter.h"
0021 
0022 using namespace Digikam;
0023 
0024 namespace DigikamRawImportNativePlugin
0025 {
0026 
0027 class RawPostProcessing : public DImgThreadedFilter
0028 {
0029 
0030 public:
0031 
0032     explicit RawPostProcessing(DImg* const orgImage,
0033                                QObject* const parent = nullptr,
0034                                const DRawDecoding& settings = DRawDecoding());
0035 
0036     /**
0037      * Constructor for slave mode: execute immediately in current thread with specified master filter
0038      */
0039     RawPostProcessing(DImgThreadedFilter* const parentFilter,
0040                       const DImg& orgImage,
0041                       const DImg& destImage,
0042                       int progressBegin = 0,
0043                       int progressEnd = 100,
0044                       const DRawDecoding& settings = DRawDecoding());
0045 
0046     ~RawPostProcessing();
0047 
0048 private:
0049 
0050     void rawPostProcessing();
0051 
0052     virtual void filterImage()                          override;
0053 
0054     /**
0055      * This filter is only for preview calculation.
0056      */
0057     virtual FilterAction filterAction()                 override
0058     {
0059         return FilterAction();
0060     }
0061 
0062     virtual void readParameters(const FilterAction&)    override
0063     {
0064     }
0065 
0066     virtual QString filterIdentifier() const            override
0067     {
0068         return QString();
0069     }
0070 
0071 private:
0072 
0073     DRawDecoding m_customRawSettings;
0074 };
0075 
0076 } // namespace DigikamRawImportNativePlugin
0077 
0078 #endif // DIGIKAM_RAW_POST_PROCESSING_H