source: Sophya/trunk/SophyaExt/FitsIOServer/fitsspherethetaphi.h@ 3088

Last change on this file since 3088 was 3047, checked in by ansari, 19 years ago

Ajout FitsInOutFile::SkipEmptyFirstHDU() , positionnement sur HDU 2 si HDU 1 vide ds operateur >> lisant des tables + autres petites corrections , Reza 11/08/2006

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