digiKam
Loading...
Searching...
No Matches
infraredfilter.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2005-05-25
7 * Description : Infrared threaded image filter.
8 *
9 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2006-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
11 * SPDX-FileCopyrightText: 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 *
15 * ============================================================ */
16
17#pragma once
18
19// Local includes
20
21#include "dimgthreadedfilter.h"
22#include "digikam_export.h"
23
24namespace Digikam
25{
26
27class DIGIKAM_EXPORT InfraredContainer
28{
29
30public:
31
32 InfraredContainer() = default;
33 ~InfraredContainer() = default;
34
35public:
36
38 int sensibility = 200;
39
40 double redGain = 0.4;
41 double greenGain = 2.1;
42 double blueGain = -0.8;
43};
44
45// ---------------------------------------------------------------------------
46
47class DIGIKAM_EXPORT InfraredFilter : public DImgThreadedFilter
48{
49 Q_OBJECT
50
51public:
52
53 explicit InfraredFilter(QObject* const parent = nullptr);
54 explicit InfraredFilter(DImg* const orgImage,
55 QObject* const parent = nullptr,
56 const InfraredContainer& settings = InfraredContainer());
57 ~InfraredFilter() override;
58
59 static QString FilterIdentifier()
60 {
61 return QLatin1String("digikam:InfraredFilter");
62 }
63
64 static QString DisplayableName();
65
66 static QList<int> SupportedVersions()
67 {
68 return QList<int>() << 1;
69 }
70
71 static int CurrentVersion()
72 {
73 return 1;
74 }
75
76 QString filterIdentifier() const override
77 {
78 return FilterIdentifier();
79 }
80
81 FilterAction filterAction() override;
82 void readParameters(const FilterAction& action) override;
83
84private:
85
86 void filterImage() override;
87
88 inline int intMult8(uint a, uint b);
89 inline int intMult16(uint a, uint b);
90
91private:
92
93 InfraredContainer m_settings;
94};
95
96} // namespace Digikam
Definition dimgthreadedfilter.h:31
Definition dimg.h:52
Definition filteraction.h:33
Definition infraredfilter.h:28
Definition infraredfilter.h:48
static QString FilterIdentifier()
Definition infraredfilter.h:59
QString filterIdentifier() const override
Definition infraredfilter.h:76
static int CurrentVersion()
Definition infraredfilter.h:71
static QList< int > SupportedVersions()
Definition infraredfilter.h:66
Definition datefolderview.cpp:34