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