Fix issue with numeric values in XISF FITS header
This commit is contained in:
+2
-2
@@ -323,7 +323,7 @@ bool loadXISF(const QString &path, ImageInfoData &info, RawImage **image)
|
|||||||
auto fitskeywords = xisf.ReadFITSKeywords();
|
auto fitskeywords = xisf.ReadFITSKeywords();
|
||||||
for(auto fits : fitskeywords)
|
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)
|
if(floatType && bps == 32)
|
||||||
@@ -498,7 +498,7 @@ bool readXISFHeader(const QString &path, ImageInfoData &info)
|
|||||||
auto fitskeywords = xisf.ReadFITSKeywords();
|
auto fitskeywords = xisf.ReadFITSKeywords();
|
||||||
for(auto fits : fitskeywords)
|
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)
|
catch (pcl::Error err)
|
||||||
|
|||||||
@@ -2,9 +2,14 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QSurfaceFormat>
|
#include <QSurfaceFormat>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#ifdef __linux__
|
||||||
|
setenv("LC_NUMERIC", "C", 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
QSurfaceFormat format;
|
QSurfaceFormat format;
|
||||||
format.setMajorVersion(3);
|
format.setMajorVersion(3);
|
||||||
format.setMinorVersion(3);
|
format.setMinorVersion(3);
|
||||||
|
|||||||
Reference in New Issue
Block a user