#ifndef FITSIOSERVER_SEEN #define FITSIOSERVER_SEEN #include "fitsio.h" #include "tvector.h" #include "sphericalmap.h" #include "localmap.h" #include "ntuple.h" #include "outilsinit.h" #include "cimage.h" #include "dvlist.h" #define LEN_KEYWORD 9 class FitsIoServer { public : FitsIoServer() : FITS_tab_typ_(0),i_4tab_(NULL),ftab_(NULL),dtab_(NULL) {;} ~FitsIoServer() { if (i_4tab_ != NULL) delete [] i_4tab_; if (ftab_ != NULL) delete [] ftab_; if (dtab_ != NULL) delete [] dtab_; } void load(SphericalMap& sph, char flnm[]); void load(SphericalMap& sph, char flnm[]); void load(TMatrix& mat, char flnm[]); void load(LocalMap& sph, char flnm[]); void save(SphericalMap& sph, char flnm[]); void save(SphericalMap& sph, char flnm[]); void save(LocalMap& locm, char flnm[]); void save(TMatrix& mat, char flnm[]); void sinus_picture_projection(SphericalMap& sph, char flnm[]); void sinus_picture_projection(SphericalMap& sph, char flnm[]); void picture(LocalMap& lcm, char flnm[]); void load(NTuple& ntpl,char flnm[],int hdunum); void save(NTuple& ntpl,char flnm[]); void load(ImageR4& DpcImg,char flnm[]); void save(ImageR4& DpcImg,char flnm[]); void load(ImageI4& DpcImg,char flnm[]); void save(ImageI4& DpcImg,char flnm[]); void readheader(char flnm[]); private : void read_sphere(char flnm[],int& npixels,int& nside); // creer, ecrire une imageformat FITS, a partir des tableaux de donnees // dtab_, ftab_ prealablement remplis void planck_write_img(fitsfile *fptr,int naxis,int n1,int n2,int n3,DVList& dvl); void planck_read_img(fitsfile *fptr,long& naxis,int& n1,int& n2,int& n3,DVList& dvl); void write_picture(long* naxes,float* map,char* filename) const; void printerror(int status) const; bool check_keyword(fitsfile*,int,char keyword[]); inline int key_type_PL2FITS(char typ) { switch (typ) { case 'I' : return TINT; case 'D' : return TDOUBLE; case 'S' : return TSTRING; default : cout << " FITSIOSERVER : type de donnee non prevu " << endl; return 0; } } int FITS_tab_typ_; int* i_4tab_; float* ftab_; double* dtab_; }; #endif