Changeset View
Changeset View
Standalone View
Standalone View
kstars/fitsviewer/fitssepdetector.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | fitssepdetector.h - FITS Image | ||||
3 | ------------------- | ||||
4 | begin : Sun March 29 2020 | ||||
5 | copyright : (C) 2004 by Jasem Mutlaq, (C) 2020 by Eric Dejouhanet | ||||
6 | email : eric.dejouhanet@gmail.com | ||||
7 | ***************************************************************************/ | ||||
8 | | ||||
9 | /*************************************************************************** | ||||
10 | * * | ||||
11 | * This program is free software; you can redistribute it and/or modify * | ||||
12 | * it under the terms of the GNU General Public License as published by * | ||||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||||
14 | * (at your option) any later version. * | ||||
15 | * * | ||||
16 | * Some code fragments were adapted from Peter Kirchgessner's FITS plugin* | ||||
17 | * See http://members.aol.com/pkirchg for more details. * | ||||
18 | ***************************************************************************/ | ||||
19 | | ||||
20 | #ifndef FITSSEPDETECTOR_H | ||||
21 | #define FITSSEPDETECTOR_H | ||||
22 | | ||||
23 | #include <QObject> | ||||
24 | | ||||
25 | #include "fitsstardetector.h" | ||||
26 | | ||||
27 | class FITSSEPDetector : public FITSStarDetector | ||||
28 | { | ||||
29 | Q_OBJECT | ||||
30 | | ||||
31 | public: | ||||
32 | explicit FITSSEPDetector(FITSData *parent): FITSStarDetector(parent) {}; | ||||
33 | | ||||
34 | public: | ||||
35 | /** @brief Find sources in the parent FITS data file. | ||||
36 | * @see FITSStarDetector::findSources(). | ||||
37 | */ | ||||
38 | int findSources(QList<Edge*> &starCenters, QRect const &boundary = QRect()) override; | ||||
39 | | ||||
40 | /** @brief Configure the detection method. | ||||
41 | * @see FITSStarDetector::configure(). | ||||
42 | * @note No parameters are currently available for configuration. | ||||
43 | * @todo Provide parameters for detection configuration. | ||||
44 | */ | ||||
45 | FITSStarDetector & configure(const QString &setting, const QVariant &value) override; | ||||
46 | | ||||
47 | protected: | ||||
48 | /** @internal Consolidate a float data buffer from FITS data. | ||||
49 | * @param buffer is the destination float block. | ||||
50 | * @param x, y, w, h define a (x,y)-(x+w,y+h) sub-frame to extract from the FITS data out to block 'buffer'. | ||||
51 | * @param image_data is the FITS data block to extract from. | ||||
52 | */ | ||||
53 | template <typename T> | ||||
54 | void getFloatBuffer(float * buffer, int x, int y, int w, int h, FITSData const * image_data) const; | ||||
55 | }; | ||||
56 | | ||||
57 | #endif // FITSSEPDETECTOR_H |