digiKam
Loading...
Searching...
No Matches
unsharpmaskfilter.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-17-07
7 * Description : A Unsharp Mask threaded image filter.
8 *
9 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2009 by Matthias Welwarsky <matze at welwarsky 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 "digikam_export.h"
22#include "dimgthreadedfilter.h"
23#include "digikam_globals.h"
24
25namespace Digikam
26{
27
28class DIGIKAM_EXPORT UnsharpMaskFilter : public DImgThreadedFilter
29{
30 Q_OBJECT
31
32public:
33
34 explicit UnsharpMaskFilter(QObject* const parent = nullptr);
35 explicit UnsharpMaskFilter(DImg* const orgImage,
36 QObject* const parent = nullptr,
37 double radius = 1.0,
38 double amount = 1.0,
39 double threshold = 0.05,
40 bool luma=false);
41
42 ~UnsharpMaskFilter() override;
43
44 static QString FilterIdentifier()
45 {
46 return QLatin1String("digikam:UnsharpMaskFilter");
47 }
48
49 static QString DisplayableName();
50
51 static QList<int> SupportedVersions()
52 {
53 return QList<int>() << 1;
54 }
55
56 static int CurrentVersion()
57 {
58 return 1;
59 }
60
61 QString filterIdentifier() const override
62 {
63 return FilterIdentifier();
64 }
65
66 FilterAction filterAction() override;
67 void readParameters(const FilterAction& action) override;
68
69private:
70
71 void filterImage() override;
72 void unsharpMaskMultithreaded(uint start, uint stop, uint y);
73
74private:
75
76 double m_radius = 1.0;
77 double m_amount = 1.0;
78 double m_threshold = 0.05;
79 bool m_luma = false;
80};
81
82} // namespace Digikam
Definition dimgthreadedfilter.h:31
Definition dimg.h:52
Definition filteraction.h:33
Definition unsharpmaskfilter.h:29
QString filterIdentifier() const override
Definition unsharpmaskfilter.h:61
static QString FilterIdentifier()
Definition unsharpmaskfilter.h:44
static QList< int > SupportedVersions()
Definition unsharpmaskfilter.h:51
static int CurrentVersion()
Definition unsharpmaskfilter.h:56
Definition datefolderview.cpp:34