Fix issue with numeric values in XISF FITS header

This commit is contained in:
2022-06-15 08:55:07 +02:00
parent 3e94aa0eda
commit 5b6fead6f1
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -323,7 +323,7 @@ bool loadXISF(const QString &path, ImageInfoData &info, RawImage **image)
auto fitskeywords = xisf.ReadFITSKeywords();
for(auto fits : fitskeywords)
{
info.fitsHeader.append({fits.name.c_str(), fits.value.c_str(), fits.comment.c_str()});
info.fitsHeader.append({fits.name.c_str(), fits.value.IsNumeral() ? QVariant(fits.value.ToDouble()) : QVariant(fits.value.c_str()), fits.comment.c_str()});
}
if(floatType && bps == 32)
@@ -498,7 +498,7 @@ bool readXISFHeader(const QString &path, ImageInfoData &info)
auto fitskeywords = xisf.ReadFITSKeywords();
for(auto fits : fitskeywords)
{
info.fitsHeader.append({fits.name.c_str(), fits.value.c_str(), fits.comment.c_str()});
info.fitsHeader.append({fits.name.c_str(), fits.value.IsNumeral() ? QVariant(fits.value.ToDouble()) : QVariant(fits.value.c_str()), fits.comment.c_str()});
}
}
catch (pcl::Error err)
+5
View File
@@ -2,9 +2,14 @@
#include <QApplication>
#include <QSurfaceFormat>
#include <QTranslator>
#include <stdlib.h>
int main(int argc, char *argv[])
{
#ifdef __linux__
setenv("LC_NUMERIC", "C", 1);
#endif
QSurfaceFormat format;
format.setMajorVersion(3);
format.setMinorVersion(3);