| [3493] | 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 | */ | 
|---|
| [854] | 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> | 
|---|
| [1136] | 21 | class FITS_SphereHEALPix : public FitsIOHandler | 
|---|
| [854] | 22 | { | 
|---|
|  | 23 | public: | 
|---|
|  | 24 |  | 
|---|
|  | 25 | FITS_SphereHEALPix(); | 
|---|
| [3572] | 26 | FITS_SphereHEALPix(const char inputfile[],int hdunum=0); | 
|---|
| [854] | 27 | FITS_SphereHEALPix(const SphereHEALPix<T>& obj); | 
|---|
|  | 28 | FITS_SphereHEALPix(SphereHEALPix<T>* obj); | 
|---|
|  | 29 | virtual ~FITS_SphereHEALPix(); | 
|---|
|  | 30 | virtual AnyDataObj* DataObj(); | 
|---|
| [921] | 31 | virtual void        SetDataObj(AnyDataObj & o); | 
|---|
| [854] | 32 |  | 
|---|
| [2897] | 33 | virtual int         CheckHandling(AnyDataObj & o) ; | 
|---|
|  | 34 | virtual int         CheckReadability(FitsInOutFile& is); | 
|---|
|  | 35 | virtual FitsHandlerInterface* Clone(); | 
|---|
|  | 36 |  | 
|---|
| [3572] | 37 | void Mollweide_picture_projection(const char flnm[]); | 
|---|
|  | 38 | void sinus_picture_projection(const char flnm[]); | 
|---|
| [1752] | 39 | //void ReWriteFromFitsToFits(FitsInFile& headerin, FitsOutFile& os); | 
|---|
| [1176] | 40 |  | 
|---|
| [1011] | 41 | inline operator SphereHEALPix<T>() { return(*dobj_); } | 
|---|
| [854] | 42 |  | 
|---|
|  | 43 | protected: | 
|---|
|  | 44 |  | 
|---|
| [1047] | 45 | //virtual void ReadFromFits(FitsFile& fn); | 
|---|
| [1136] | 46 | virtual void ReadFromFits(FitsInFile& is); | 
|---|
|  | 47 | virtual void WriteToFits(FitsOutFile& os) ; | 
|---|
| [854] | 48 | SphereHEALPix<T>* dobj_; | 
|---|
| [1136] | 49 | bool ownobj_; | 
|---|
| [854] | 50 | }; | 
|---|
|  | 51 |  | 
|---|
|  | 52 |  | 
|---|
|  | 53 | ////////////////////////////////////////////////////////////////// | 
|---|
|  | 54 |  | 
|---|
| [1231] | 55 | template <class T> | 
|---|
| [3035] | 56 | inline FitsInOutFile& operator << (FitsInOutFile& fios, SphereHEALPix<T> & sph) | 
|---|
| [1231] | 57 | { FITS_SphereHEALPix<T> fih(&sph); fih.Write(fios); return (fios); } | 
|---|
| [854] | 58 |  | 
|---|
| [1231] | 59 | template <class T> | 
|---|
| [3035] | 60 | inline FitsInOutFile& operator >> (FitsInOutFile& fiis, SphereHEALPix<T> & sph) | 
|---|
| [3047] | 61 | { FITS_SphereHEALPix<T> fih(&sph); fiis.SkipEmptyFirstHDU(); | 
|---|
|  | 62 | fih.Read(fiis); fiis.MoveToNextHDU(); return (fiis); } | 
|---|
| [1231] | 63 |  | 
|---|
|  | 64 |  | 
|---|
| [854] | 65 | } // Fin du namespace | 
|---|
|  | 66 |  | 
|---|
|  | 67 | #endif | 
|---|