digiKam
Loading...
Searching...
No Matches
hotpixelsweights.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-03-27
7 * Description : a class to calculate filter weights for hot pixels tool
8 *
9 * SPDX-FileCopyrightText: 2005-2006 by Unai Garro <ugarro at users dot sourceforge dot net>
10 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QList>
21#include <QRect>
22
23// Local includes
24
25#include "digikam_export.h"
26
27namespace Digikam
28{
29
30class DIGIKAM_EXPORT HotPixelsWeights
31{
32
33public:
34
35 HotPixelsWeights() = default;
38
39 HotPixelsWeights& operator=(const HotPixelsWeights& w);
40 bool operator==(const HotPixelsWeights& ws) const;
41 double** operator[](int n) const;
42
43 unsigned int height() const;
44 void setHeight(int h);
45
46 unsigned int polynomeOrder() const;
47 void setPolynomeOrder(int order);
48
49 bool twoDim() const;
50 void setTwoDim(bool td);
51
52 void setWidth(int w);
53 unsigned int width() const;
54
55 const QList<QPoint> positions() const;
56
57 void calculateHotPixelsWeights();
58
59protected:
60
61 int coefficientNumber() const;
62
63 double** * weightMatrices() const;
64
65private:
66
67 double polyTerm(const size_t i_coeff,
68 const int x,
69 const int y,
70 const int poly_order) const;
71
72 void matrixInv(double* const a,
73 const size_t size);
74
75private:
76
77 unsigned int m_height = 0;
78 unsigned int m_width = 0;
79 unsigned int m_coefficientNumber = 0;
80 bool m_twoDim = false;
81 unsigned int m_polynomeOrder = 0;
82 double** * m_weightMatrices = nullptr;
83 QList<QPoint> m_positions;
84};
85
86} // namespace Digikam
Definition hotpixelsweights.h:31
Definition datefolderview.cpp:34
bool operator==(const SearchTextSettings &a, const SearchTextSettings &b)
Definition searchtextbar.cpp:40