1 | /*
|
---|
2 | --- SOPHYA software - FitsIOServer module ---
|
---|
3 | Guy Le Meur 10/2001 R. Ansari , 2006
|
---|
4 | (C) UPS+LAL IN2P3/CNRS (C) DAPNIA-SPP/CEA
|
---|
5 | */
|
---|
6 | #ifndef FITSSPHERETHETAPHI_SEEN
|
---|
7 | #define FITSSPHERETHETAPHI_SEEN
|
---|
8 |
|
---|
9 |
|
---|
10 | #include "spherethetaphi.h"
|
---|
11 | #include "anydataobj.h"
|
---|
12 | #include "fitsfile.h"
|
---|
13 | namespace SOPHYA {
|
---|
14 | ///////////////////////////////////////////////////////////////////////
|
---|
15 | // ------------- Classe pour la gestion de persistance I/O format fits--
|
---|
16 | // spherethetaphi
|
---|
17 | //////////////////////////////////////////////////////////////////////
|
---|
18 | template <class T>
|
---|
19 | class FITS_SphereThetaPhi : public FitsIOHandler
|
---|
20 | {
|
---|
21 | public:
|
---|
22 |
|
---|
23 | FITS_SphereThetaPhi();
|
---|
24 | FITS_SphereThetaPhi(const char inputfile[],int hdunum=0);
|
---|
25 | FITS_SphereThetaPhi(const SphereThetaPhi<T>& obj);
|
---|
26 | FITS_SphereThetaPhi(SphereThetaPhi<T>* obj);
|
---|
27 | virtual ~FITS_SphereThetaPhi();
|
---|
28 | virtual AnyDataObj* DataObj();
|
---|
29 | virtual void SetDataObj(AnyDataObj & o);
|
---|
30 |
|
---|
31 | virtual int CheckHandling(AnyDataObj & o) ;
|
---|
32 | virtual int CheckReadability(FitsInOutFile& is);
|
---|
33 | virtual FitsHandlerInterface* Clone();
|
---|
34 |
|
---|
35 | void Mollweide_picture_projection(const char flnm[]);
|
---|
36 | void sinus_picture_projection(const char flnm[]);
|
---|
37 |
|
---|
38 |
|
---|
39 | inline operator SphereThetaPhi<T>() { return(*dobj_); }
|
---|
40 |
|
---|
41 |
|
---|
42 | protected:
|
---|
43 |
|
---|
44 | virtual void ReadFromFits(FitsInFile& is);
|
---|
45 | virtual void WriteToFits(FitsOutFile& os) ;
|
---|
46 | SphereThetaPhi<T>* dobj_;
|
---|
47 | bool ownobj_;
|
---|
48 |
|
---|
49 |
|
---|
50 |
|
---|
51 | };
|
---|
52 |
|
---|
53 |
|
---|
54 | //////////////////////////////////////////////////////////////////
|
---|
55 |
|
---|
56 | template <class T>
|
---|
57 | inline FitsInOutFile& operator << (FitsInOutFile& fios, SphereThetaPhi<T> & sph)
|
---|
58 | { FITS_SphereThetaPhi<T> fih(&sph); fih.Write(fios); return (fios); }
|
---|
59 |
|
---|
60 | template <class T>
|
---|
61 | inline FitsInOutFile& operator >> (FitsInOutFile& fiis, SphereThetaPhi<T> & sph)
|
---|
62 | { FITS_SphereThetaPhi<T> fih(&sph); fiis.SkipEmptyFirstHDU();
|
---|
63 | fih.Read(fiis); fiis.MoveToNextHDU(); return (fiis); }
|
---|
64 |
|
---|
65 |
|
---|
66 |
|
---|
67 | } // Fin du namespace
|
---|
68 |
|
---|
69 |
|
---|
70 | #endif
|
---|