Calculate bounds on indexing

This commit is contained in:
2022-06-14 21:44:32 +02:00
parent 04e587b51c
commit 08e70cdb52
5 changed files with 83 additions and 25 deletions
+5 -3
View File
@@ -30,14 +30,16 @@ class WCSData
{
int nwcs = 0;
struct wcsprm *wcs = nullptr;
int width;
int height;
void freeWCS();
public:
WCSData();
WCSData(char *header, int nrec);
WCSData(int width, int height, char *header, int nrec);
WCSData(const WCSData &) = delete;
~WCSData();
bool pixelToWorld(const QPointF &pixel, SkyPoint &point) const;
bool worldToPixel(const SkyPoint &point, QPointF &pixel) const;
void calculateBounds(int w, int h, double &minRa, double &maxRa, double &minDec, double &maxDec);
void calculateBounds(double &minRa, double &maxRa, double &minDec, double &maxDec) const;
bool valid() const { return wcs; };
};