Small fixes

This commit is contained in:
2024-03-24 18:39:46 +01:00
parent 81d138f799
commit f35db9d1af
3 changed files with 7 additions and 5 deletions
+5 -3
View File
@@ -190,8 +190,10 @@ bool loadFITS(const QString path, ImageInfoData &info, std::shared_ptr<RawImage>
{
fitsfile *file;
int status = 0;
int type;
fits_open_image(&file, path.toLocal8Bit().data(), READONLY, &status);
int type = -1;
fits_open_diskfile(&file, path.toLocal8Bit().data(), READONLY, &status);
int hudtype = IMAGE_HDU;
fits_movabs_hdu(file, 1, &hudtype, &status);
fits_get_hdu_type(file, &type, &status);
if(type == IMAGE_HDU)
@@ -423,7 +425,7 @@ void LoadRunable::run()
}
catch(std::exception e)
{
qDebug() << e.what();
qDebug() << m_file << e.what();
}
}
+1 -1
View File
@@ -120,7 +120,7 @@ RawImage::RawImage(const QImage &img)
m_stats.m_stats = false;
}
const RawImage::Stats& RawImage::imageStats()
const RawImage::Stats& RawImage::imageStats() const
{
return m_stats;
}
+1 -1
View File
@@ -78,7 +78,7 @@ public:
RawImage(const RawImage &d);
RawImage(RawImage &&d);
RawImage(const QImage &img);
const RawImage::Stats& imageStats();
const RawImage::Stats& imageStats() const;
void calcStats();
void rect(int &x, int &y, int w, int h, std::vector<double> &r) const;
int findPeaks(double background, double distance, std::vector<Peak> &peaks) const;