source: Sophya/trunk/SophyaExt/FitsIOServer/fitsioserver.h@ 603

Last change on this file since 603 was 603, checked in by ansari, 26 years ago

ajout save sphereGorski

File size: 2.8 KB
Line 
1#ifndef FITSIOSERVER_SEEN
2#define FITSIOSERVER_SEEN
3
4#include "fitsio.h"
5#include "tvector.h"
6#include "sphericalmap.h"
7#include "spheregorski.h"
8#include "localmap.h"
9#include "ntuple.h"
10#include "outilsinit.h"
11#include "cimage.h"
12#include "dvlist.h"
13
14#define LEN_KEYWORD 9
15
16class FitsIoServer
17{
18
19public :
20
21 FitsIoServer() : FITS_tab_typ_(0),i_4tab_(NULL),r_4tab_(NULL),r_8tab_(NULL) {;}
22 ~FitsIoServer()
23 {
24 if (i_4tab_ != NULL) delete [] i_4tab_;
25 if (r_4tab_ != NULL) delete [] r_4tab_;
26 if (r_8tab_ != NULL) delete [] r_8tab_;
27 }
28
29 void load(TMatrix<double>& mat, char flnm[]);
30 void load(NTuple& ntpl,char flnm[],int hdunum);
31 void load(SphericalMap<double>& sph, char flnm[]);
32 void load(SphericalMap<float>& sph, char flnm[]);
33 void load(LocalMap<double>& sph, char flnm[]);
34 void load(ImageR4& DpcImg,char flnm[]);
35 void load(ImageI4& DpcImg,char flnm[]);
36 void load(SphereGorski<float>& sph, char flnm[], int hdunum);
37 void load(SphereGorski<double>& sph, char flnm[], int hdunum);
38 void save(TMatrix<double>& mat, char flnm[]);
39 void save(NTuple& ntpl,char flnm[]);
40 void save(SphericalMap<double>& sph, char flnm[]);
41 void save(SphericalMap<float>& sph, char flnm[]);
42 void save(SphereGorski<float>& sph, char filename[]);
43 void save(SphereGorski<double>& sph, char filename[]);
44 void save(LocalMap<double>& locm, char flnm[]);
45 void save(const ImageR4& DpcImg,char flnm[]);
46 void save(const ImageI4& DpcImg,char flnm[]);
47 void sinus_picture_projection(SphericalMap<double>& sph, char flnm[]);
48 void sinus_picture_projection(SphericalMap<float>& sph, char flnm[]);
49 void Mollweide_picture_projection(SphericalMap<float>& sph, char flnm[]);
50 void Mollweide_picture_projection(SphericalMap<double>& sph, char flnm[]);
51 void picture(LocalMap<double>& lcm, char flnm[]);
52
53
54
55 void readheader(char flnm[]);
56
57 private :
58
59
60 // creer, ecrire une imageformat FITS, a partir des tableaux de donnees
61 // dtab_, ftab_ prealablement remplis
62 void planck_write_img(char flnm[],int naxis,int n1,int n2,int n3,DVList& dvl);
63
64 void planck_read_img(char flnm[],long& naxis,int& n1,int& n2,int& n3,DVList& dvl);
65 void planck_read_bntbl(char flnm[], int hdunum, int& npixels, DVList& dvl);
66 void planck_write_bntbl(char flnm[], int npixels, char typeOfContent[], char extname[], char comment1[], DVList& dvl);
67 void write_picture(long* naxes,float* map,char* filename) const;
68
69 void printerror(int& status) const;
70 void printerror(int& status, char* texte) const;
71 bool check_keyword(fitsfile*,int,char keyword[]);
72
73 inline int key_type_PL2FITS(char typ)
74 {
75 switch (typ)
76 {
77 case 'I' :
78 return TINT;
79 case 'D' :
80 return TDOUBLE;
81 case 'S' :
82 return TSTRING;
83 default :
84 cout << " FITSIOSERVER : type de donnee non prevu " << endl;
85 return 0;
86 }
87 }
88
89 int FITS_tab_typ_;
90 int_4* i_4tab_;
91 r_4* r_4tab_;
92 r_8* r_8tab_;
93};
94
95#endif
96
97
98
Note: See TracBrowser for help on using the repository browser.