Index: trunk/SophyaExt/FitsIOServer/fitsioserver.h
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitsioserver.h	(revision 471)
+++ trunk/SophyaExt/FitsIOServer/fitsioserver.h	(revision 477)
@@ -6,55 +6,83 @@
 #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), itab_(NULL), ftab_(NULL), dtab_(NULL) {;}
-~FitsIoServer()
-  {
-    if (itab_ != NULL) delete [] itab_;
-    if (ftab_ != NULL) delete [] ftab_;
-    if (dtab_ != NULL) delete [] dtab_;
-  }
-void load(SphericalMap<double>& sph, char flnm[]);
-void load(SphericalMap<float>& sph, char flnm[]);
-void load(TMatrix<double>& mat, char flnm[]);
-void load(LocalMap<double>& sph, char flnm[]);
-void save(SphericalMap<double>& sph, char flnm[]);
-void save(SphericalMap<float>& sph, char flnm[]);
-void save(LocalMap<double>& locm, char flnm[]);
-void save(TMatrix<double>& mat, char flnm[]);
-void sinus_picture_projection(SphericalMap<double>& sph, char flnm[]);
-void sinus_picture_projection(SphericalMap<float>& sph, char flnm[]);
-void picture(LocalMap<double>& lcm, char flnm[]);
-private :
-void read_sphere(char flnm[], int& npixels, int& nside);
-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;
-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* itab_;
-float* ftab_;
-double* dtab_;
+  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<double>& sph, char flnm[]);
+ void load(SphericalMap<float>& sph, char flnm[]);
+ void load(TMatrix<double>& mat, char flnm[]);
+ void load(LocalMap<double>& sph, char flnm[]);
+ void save(SphericalMap<double>& sph, char flnm[]);
+ void save(SphericalMap<float>& sph, char flnm[]);
+ void save(LocalMap<double>& locm, char flnm[]);
+ void save(TMatrix<double>& mat, char flnm[]);
+ void sinus_picture_projection(SphericalMap<double>& sph, char flnm[]);
+ void sinus_picture_projection(SphericalMap<float>& sph, char flnm[]);
+ void picture(LocalMap<double>& 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
 
