Add support for WCS

This commit is contained in:
2022-06-13 18:02:58 +02:00
parent 701a425cc7
commit 6b9ea5e4b9
7 changed files with 162 additions and 13 deletions
+10
View File
@@ -12,6 +12,7 @@
#include <pcl/XISF.h>
#include "rawimage.h"
#include "starfit.h"
#include "wcslib/wcshdr.h"
LoadRunable::LoadRunable(const QString &file, Image *receiver, AnalyzeLevel level, bool thumbnail) :
m_file(file),
@@ -166,6 +167,15 @@ int loadFITSHeader(fitsfile *file, ImageInfoData &info)
return status;
}
}
char *header = nullptr;
int nrec = 0;
fits_hdr2str(file, TRUE, nullptr, 0, &header, &nrec, &status);
if(status == 0)
{
info.wcs = std::make_shared<WCSData>(header, nrec);
}
fits_free_memory(header, &status);
return status;
}