Move source files to src directory
This commit is contained in:
+31
-31
@@ -28,34 +28,34 @@ find_library(STELLARSOLVER_LIB stellarsolver)
|
|||||||
add_subdirectory(libXISF)
|
add_subdirectory(libXISF)
|
||||||
|
|
||||||
set(TENMON_SRC
|
set(TENMON_SRC
|
||||||
about.cpp about.h
|
src/about.cpp src/about.h
|
||||||
batchprocessing.cpp batchprocessing.h batchprocessing.ui
|
src/batchprocessing.cpp src/batchprocessing.h src/batchprocessing.ui
|
||||||
chartgraph.h chartgraph.cpp
|
src/chartgraph.h src/chartgraph.cpp
|
||||||
database.cpp database.h
|
src/database.cpp src/database.h
|
||||||
databaseview.cpp databaseview.h
|
src/databaseview.cpp src/databaseview.h
|
||||||
delete.cpp
|
src/delete.cpp
|
||||||
filesystemwidget.cpp filesystemwidget.h
|
src/filesystemwidget.cpp src/filesystemwidget.h
|
||||||
histogram.cpp histogram.h
|
src/histogram.cpp src/histogram.h
|
||||||
httpdownloader.h httpdownloader.cpp
|
src/httpdownloader.h src/httpdownloader.cpp
|
||||||
imageinfo.cpp imageinfo.h
|
src/imageinfo.cpp src/imageinfo.h
|
||||||
imageinfodata.cpp imageinfodata.h
|
src/imageinfodata.cpp src/imageinfodata.h
|
||||||
imageringlist.cpp imageringlist.h
|
src/imageringlist.cpp src/imageringlist.h
|
||||||
imagescrollarea.cpp imagescrollarea.h
|
src/imagescrollarea.cpp src/imagescrollarea.h
|
||||||
imagewidget.h imagewidget.cpp
|
src/imagewidget.h src/imagewidget.cpp
|
||||||
loadimage.h loadimage.cpp
|
src/loadimage.h src/loadimage.cpp
|
||||||
loadrunable.cpp loadrunable.h
|
src/loadrunable.cpp src/loadrunable.h
|
||||||
main.cpp
|
src/main.cpp
|
||||||
mainwindow.cpp mainwindow.h
|
src/mainwindow.cpp src/mainwindow.h
|
||||||
markedfiles.cpp markedfiles.h
|
src/markedfiles.cpp src/markedfiles.h
|
||||||
mtfparam.h
|
src/mtfparam.h
|
||||||
rawimage.cpp rawimage.h
|
src/rawimage.cpp src/rawimage.h
|
||||||
rawimage_sse.cpp
|
src/rawimage_sse.cpp
|
||||||
scriptengine.cpp scriptengine.h
|
src/scriptengine.cpp src/scriptengine.h
|
||||||
settingsdialog.cpp settingsdialog.h
|
src/settingsdialog.cpp src/settingsdialog.h
|
||||||
statusbar.cpp statusbar.h
|
src/statusbar.cpp src/statusbar.h
|
||||||
stfslider.cpp stfslider.h
|
src/stfslider.cpp src/stfslider.h
|
||||||
stretchtoolbar.cpp stretchtoolbar.h
|
src/stretchtoolbar.cpp src/stretchtoolbar.h
|
||||||
tfloat16.h
|
src/tfloat16.h
|
||||||
thumbnailer/genthumbnail.cpp thumbnailer/genthumbnail.h
|
thumbnailer/genthumbnail.cpp thumbnailer/genthumbnail.h
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -96,9 +96,9 @@ if(STELLARSOLVER_INCLUDE AND STELLARSOLVER_LIB)
|
|||||||
endif(MXE)
|
endif(MXE)
|
||||||
target_compile_definitions(tenmon PRIVATE "PLATESOLVER")
|
target_compile_definitions(tenmon PRIVATE "PLATESOLVER")
|
||||||
target_sources(tenmon PRIVATE
|
target_sources(tenmon PRIVATE
|
||||||
solver.cpp solver.h
|
src/solver.cpp src/solver.h
|
||||||
platesolving.cpp platesolving.h platesolving.ui
|
src/platesolving.cpp src/platesolving.h src/platesolving.ui
|
||||||
platesolvingsettings.cpp platesolvingsettings.h platesolvingsettings.ui
|
src/platesolvingsettings.cpp src/platesolvingsettings.h src/platesolvingsettings.ui
|
||||||
)
|
)
|
||||||
message(STATUS "Found stellarsolver ${STELLARSOLVER_INCLUDE} ${STELLARSOLVER_LIB}")
|
message(STATUS "Found stellarsolver ${STELLARSOLVER_INCLUDE} ${STELLARSOLVER_LIB}")
|
||||||
endif(STELLARSOLVER_INCLUDE AND STELLARSOLVER_LIB)
|
endif(STELLARSOLVER_INCLUDE AND STELLARSOLVER_LIB)
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ For working plate solving you must have compiled and installed StellarSolver htt
|
|||||||
It is important that you compile StellarSolver with Qt6. By default it use Qt5 but when linked with Qt6 program it will
|
It is important that you compile StellarSolver with Qt6. By default it use Qt5 but when linked with Qt6 program it will
|
||||||
crash.
|
crash.
|
||||||
|
|
||||||
Using OpenNGC database https://github.com/mattiaverga/OpenNGC under [CC-BY-SA-4.0](https://creativecommons.org/licenses/by-sa/4.0/)
|
Using OpenNGC database https://github.com/mattiaverga/OpenNGC under CC-BY-SA-4.0 https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ QVector<SkyObject> Database::getObjects(double minRa, double maxRa, double minDe
|
|||||||
m_getNgc.value("MajAx").toDouble(),
|
m_getNgc.value("MajAx").toDouble(),
|
||||||
m_getNgc.value("MinAx").toDouble(),
|
m_getNgc.value("MinAx").toDouble(),
|
||||||
m_getNgc.value("PosAng").toDouble(),
|
m_getNgc.value("PosAng").toDouble(),
|
||||||
m_getNgc.value("mag").toDouble(),
|
m_getNgc.value("mag").isNull() ? NAN : m_getNgc.value("mag").toDouble(),
|
||||||
{0, 0},
|
{0, 0},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ struct SkyObject
|
|||||||
double maj_ax;
|
double maj_ax;
|
||||||
double min_ax;
|
double min_ax;
|
||||||
double pos_ang;
|
double pos_ang;
|
||||||
double vmag;
|
double mag;
|
||||||
QPointF pixel;
|
QPointF pixel;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "thumbnailer/genthumbnail.h"
|
#include "../thumbnailer/genthumbnail.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@@ -107,7 +107,34 @@ QJSValue ScriptEngine::getObjects(double ra, double dec, double distance)
|
|||||||
jsObj.setProperty("name2", object.name2);
|
jsObj.setProperty("name2", object.name2);
|
||||||
jsObj.setProperty("ra", object.skyPoint.RA());
|
jsObj.setProperty("ra", object.skyPoint.RA());
|
||||||
jsObj.setProperty("dec", object.skyPoint.DEC());
|
jsObj.setProperty("dec", object.skyPoint.DEC());
|
||||||
jsObj.setProperty("vmag", object.vmag);
|
jsObj.setProperty("mag", object.mag);
|
||||||
|
ret.setProperty(i++, jsObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
QJSValue ScriptEngine::getObjects(const QJSValue &bounds)
|
||||||
|
{
|
||||||
|
QVector<SkyObject> objects;
|
||||||
|
double minRa = bounds.property("minRA").toNumber();
|
||||||
|
double maxRa = bounds.property("maxRA").toNumber();
|
||||||
|
double minDec = bounds.property("minDEC").toNumber();
|
||||||
|
double maxDec = bounds.property("maxDEC").toNumber();
|
||||||
|
|
||||||
|
QMetaObject::invokeMethod(_database, [this, minRa, maxRa, minDec, maxDec](){
|
||||||
|
return _database->getObjects(minRa, maxRa, minDec, maxDec); }, Qt::BlockingQueuedConnection, &objects);
|
||||||
|
|
||||||
|
QJSValue ret = newArray(objects.size());
|
||||||
|
qint32 i = 0;
|
||||||
|
for(auto &object : objects)
|
||||||
|
{
|
||||||
|
QJSValue jsObj = newObject();
|
||||||
|
jsObj.setProperty("name", object.name);
|
||||||
|
jsObj.setProperty("name2", object.name2);
|
||||||
|
jsObj.setProperty("ra", object.skyPoint.RA());
|
||||||
|
jsObj.setProperty("dec", object.skyPoint.DEC());
|
||||||
|
jsObj.setProperty("mag", object.mag);
|
||||||
ret.setProperty(i++, jsObj);
|
ret.setProperty(i++, jsObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -432,12 +459,14 @@ void File::loadFitsKeywords()
|
|||||||
{
|
{
|
||||||
readXISFHeader(_path, info);
|
readXISFHeader(_path, info);
|
||||||
}
|
}
|
||||||
else if(suffix().toLower() == "fits" || suffix().toLower() == "fit")
|
else if(suffix().toLower() == "fits" || suffix().toLower() == "fit" || suffix().toLower() == "fz")
|
||||||
{
|
{
|
||||||
readFITSHeader(_path, info);
|
readFITSHeader(_path, info);
|
||||||
}
|
}
|
||||||
else return;
|
else return;
|
||||||
|
|
||||||
|
_wcs = info.wcs;
|
||||||
|
|
||||||
for(auto &record : info.fitsHeader)
|
for(auto &record : info.fitsHeader)
|
||||||
{
|
{
|
||||||
_fitsKeywords.append(record.key);
|
_fitsKeywords.append(record.key);
|
||||||
@@ -810,6 +839,24 @@ QJSValue File::stats()
|
|||||||
return _stats;
|
return _stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QJSValue File::calculatedBounds()
|
||||||
|
{
|
||||||
|
QJSValue ret = _engine->newObject();
|
||||||
|
loadFitsKeywords();
|
||||||
|
if(_wcs)
|
||||||
|
{
|
||||||
|
double minRa, maxRa, minDec, maxDec, crVal1, crVal2;
|
||||||
|
_wcs->calculateBounds(minRa, maxRa, minDec, maxDec, crVal1, crVal2);
|
||||||
|
ret.setProperty("minRA", minRa);
|
||||||
|
ret.setProperty("maxRA", maxRa);
|
||||||
|
ret.setProperty("minDEC", minDec);
|
||||||
|
ret.setProperty("maxDEC", maxDec);
|
||||||
|
ret.setProperty("crVal1", crVal1);
|
||||||
|
ret.setProperty("crVal2", crVal2);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef PLATESOLVER
|
#ifdef PLATESOLVER
|
||||||
QJSValue File::solve(bool updateHeader)
|
QJSValue File::solve(bool updateHeader)
|
||||||
{
|
{
|
||||||
@@ -42,6 +42,7 @@ public:
|
|||||||
Q_INVOKABLE void unmark(File *file);
|
Q_INVOKABLE void unmark(File *file);
|
||||||
Q_INVOKABLE bool isMarked(const File *file);
|
Q_INVOKABLE bool isMarked(const File *file);
|
||||||
Q_INVOKABLE QJSValue getObjects(double ra, double dec, double distance);
|
Q_INVOKABLE QJSValue getObjects(double ra, double dec, double distance);
|
||||||
|
Q_INVOKABLE QJSValue getObjects(const QJSValue &bounds);
|
||||||
Q_INVOKABLE void setMaxThread(int maxthread);
|
Q_INVOKABLE void setMaxThread(int maxthread);
|
||||||
Q_INVOKABLE void sync();
|
Q_INVOKABLE void sync();
|
||||||
Q_INVOKABLE QJSValue getString(const QString &label = QString(), const QString &text = QString()) const;
|
Q_INVOKABLE QJSValue getString(const QString &label = QString(), const QString &text = QString()) const;
|
||||||
@@ -97,6 +98,7 @@ class File : public QObject
|
|||||||
bool _fitsKeywordsLoaded = false;
|
bool _fitsKeywordsLoaded = false;
|
||||||
QStringList _fitsKeywords;
|
QStringList _fitsKeywords;
|
||||||
QMultiHash<QString, FITSRecord> _fitsRecords;
|
QMultiHash<QString, FITSRecord> _fitsRecords;
|
||||||
|
std::shared_ptr<WCSDataT> _wcs;
|
||||||
void loadFitsKeywords();
|
void loadFitsKeywords();
|
||||||
bool mkpath(const QString &path) const;
|
bool mkpath(const QString &path) const;
|
||||||
QJSValue _stats;
|
QJSValue _stats;
|
||||||
@@ -125,6 +127,7 @@ public:
|
|||||||
Q_INVOKABLE File* convert(const QString &outpath, const QString &format, const QVariantMap ¶ms = QVariantMap());
|
Q_INVOKABLE File* convert(const QString &outpath, const QString &format, const QVariantMap ¶ms = QVariantMap());
|
||||||
Q_INVOKABLE File* convertAsync(const QString &outpath, const QString &format, const QVariantMap ¶ms = QVariantMap());
|
Q_INVOKABLE File* convertAsync(const QString &outpath, const QString &format, const QVariantMap ¶ms = QVariantMap());
|
||||||
Q_INVOKABLE QJSValue stats();
|
Q_INVOKABLE QJSValue stats();
|
||||||
|
Q_INVOKABLE QJSValue calculatedBounds();
|
||||||
#ifdef PLATESOLVER
|
#ifdef PLATESOLVER
|
||||||
Q_INVOKABLE QJSValue solve(bool updateHeader = false);
|
Q_INVOKABLE QJSValue solve(bool updateHeader = false);
|
||||||
Q_INVOKABLE QJSValue extractStars(bool hfr);
|
Q_INVOKABLE QJSValue extractStars(bool hfr);
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
#include "genthumbnail.h"
|
#include "genthumbnail.h"
|
||||||
#include "../rawimage.h"
|
#include "../src/rawimage.h"
|
||||||
#include "../loadimage.h"
|
#include "../src/loadimage.h"
|
||||||
|
|
||||||
|
|
||||||
int generateThumbnail(const QString &input, const QString &output, uint32_t size)
|
int generateThumbnail(const QString &input, const QString &output, uint32_t size)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "../rawimage.h"
|
#include "../src/rawimage.h"
|
||||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||||
#include "stb_image_write.h"
|
#include "stb_image_write.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user