Files
tenmon/solver.h
T
2024-09-20 14:34:21 +02:00

46 lines
1.1 KiB
C++

#ifndef SOLVER_H
#define SOLVER_H
#include <stellarsolver.h>
class RawImage;
class Solver : public QObject
{
Q_OBJECT
StellarSolver *_solver;
FITSImage::Statistic _stats;
SSolver::ProcessType _process = SSolver::SOLVE;
bool _loaded = false;
QString _path;
QString _error;
std::shared_ptr<RawImage> _rawImage;
public:
explicit Solver(QObject *parent = nullptr);
~Solver();
void setIndexFolders(const QStringList &list);
bool loadImage(const QString &path);
bool loadImage(std::shared_ptr<RawImage> &image, const QString &path);
bool solveImage();
bool extractSources(bool hfr);
const FITSImage::Solution& getSolution() const;
const QList<FITSImage::Star>& getStars() const;
double getHFR() const;
QString errorMessage() const;
void updateHeader();
void setParameters(SSolver::Parameters::ParametersProfile profile);
void setParameters(const SSolver::Parameters &parameters);
static QStringList getIndexPaths();
static QString getTenmonIndexPath();
public slots:
void finished();
signals:
void solvingDone();
void extractionDone();
};
#endif // SOLVER_H