Kstars

fitscentroiddetector.h
1/*
2 SPDX-FileCopyrightText: 2004 Jasem Mutlaq
3 SPDX-FileCopyrightText: 2020 Eric Dejouhanet <eric.dejouhanet@gmail.com>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6
7 Some code fragments were adapted from Peter Kirchgessner's FITS plugin
8 SPDX-FileCopyrightText: Peter Kirchgessner <http://members.aol.com/pkirchg>
9*/
10
11#ifndef FITSCENTROIDDETECTOR_H
12#define FITSCENTROIDDETECTOR_H
13
14#include <QObject>
15#include "fitsstardetector.h"
16
17class FITSCentroidDetector: public FITSStarDetector
18{
20
21 public:
22 explicit FITSCentroidDetector(FITSData * data): FITSStarDetector(data) {};
23
24 public:
25 /** @brief Find sources in the parent FITS data file.
26 * @see FITSStarDetector::findSources().
27 */
28 QFuture<bool> findSources(QRect const &boundary = QRect()) override;
29
30 /** @brief Configure the detection method.
31 * @see FITSStarDetector::configure().
32 * @see Detection parameters.
33 */
34 //void configure(const QString &setting, const QVariant &value) override;
35
36 protected:
37 /** @group Detection parameters. Use the names as strings for FITSStarDetector::configure().
38 * @{ */
39 /** @brief Initial variation, decreasing as search progresses. Configurable. */
40 //int MINIMUM_STDVAR { 5 };
41 /** @brief Initial source width, decreasing as search progresses. Configurable. */
42 //int MINIMUM_PIXEL_RANGE { 5 };
43 /** @brief Custom image contrast index from the frame histogram. Configurable. */
44 //double JMINDEX { 100 };
45 /** @brief Initial source count over which search stops. */
46 int MINIMUM_EDGE_LIMIT { 2 };
47 /** @brief Maximum source count over which search aborts. */
48 int MAX_EDGE_LIMIT { 10000 };
49 /** @brief Minimum value of JMINDEX under which the custom image contrast index from the histogram is used to redefine edge width and count. */
50 double DIFFUSE_THRESHOLD { 0.15 };
51 /** @brief */
52 int MINIMUM_ROWS_PER_CENTER { 3 };
53 /** @brief */
54 int LOW_EDGE_CUTOFF_1 { 50 };
55 /** @brief */
56 int LOW_EDGE_CUTOFF_2 { 10 };
57 /** @} */
58
59 protected:
60 /** @internal Find sources in the parent FITS data file, dependent of the pixel depth.
61 * @see FITSGradientDetector::findSources.
62 */
63 template <typename T>
64 bool findSources(const QRect &boundary);
65
66 /** @internal Check whether two sources overlap.
67 * @param s1, s2 are the two sources to check collision on.
68 * @return true if the sources collide, else false.
69 */
70 bool checkCollision(Edge * s1, Edge * s2) const;
71};
72
73#endif // FITSCENTROIDDETECTOR_H
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:05:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.