Read FITS headers
This commit is contained in:
@@ -75,6 +75,17 @@ QImage loadFITS(QString path, ImageInfoData &info)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int nheader, more;
|
||||||
|
fits_get_hdrspace(file, &nheader, &more, &status);
|
||||||
|
for(int i=1; i<=nheader; i++)
|
||||||
|
{
|
||||||
|
char key[FLEN_KEYWORD];
|
||||||
|
char val[FLEN_VALUE];
|
||||||
|
char comm[FLEN_COMMENT];
|
||||||
|
fits_read_keyn(file, i, key, val, comm, &status);
|
||||||
|
info.append(StringPair(key, QString(val)));
|
||||||
|
}
|
||||||
|
|
||||||
fits_close_file(file, &status);
|
fits_close_file(file, &status);
|
||||||
if(status)
|
if(status)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user