Changeset 2453 in Sophya for trunk/SophyaExt/FitsIOServer/fabtcolread.h
- Timestamp:
- Nov 13, 2003, 4:49:45 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fabtcolread.h
r2451 r2453 28 28 inline fitsfile* GetFitsPtr() {return FitsPtr;} 29 29 30 static double ReadKey(fitsfile *fitsptr,char *keyname); 31 static long ReadKeyL(fitsfile *fitsptr,char *keyname); 32 static string ReadKeyS(fitsfile *fitsptr,char *keyname); 33 static void printerror(int sta); 34 30 35 protected: 31 36 void Init(const char *cfname); 32 37 void Delete(void); 33 void printerror(int sta) const;34 38 35 39 string FitsFN; … … 121 125 ,int ihdu,long blen,long bsens,int lp); 122 126 void Delete(void); 123 void printerror(int sta) const;124 127 125 128 string FitsFN,ColLabel,ColTUnit,ColTForm; … … 158 161 } // namespace SOPHYA 159 162 #endif /* FABTCOLREAD_H_SEEN */ 163 164 /////////////////////////////////////////////////////////////////// 165 //! Class for reading a 2D image from a FITS file 166 class FitsImg2DRd : public AnyDataObj { 167 public: 168 FitsImg2DRd(FitsOpenFile* fof,int ihdu=0,int lp=0); 169 FitsImg2DRd(FitsImg2DRd& fbt); 170 FitsImg2DRd(); 171 virtual ~FitsImg2DRd(); 172 173 double ReadKey(char *keyname); 174 long ReadKeyL(char *keyname); 175 string ReadKeyS(char *keyname); 176 177 long Read(TMatrix<uint_2>& data); 178 long Read(TMatrix<int_4>& data); 179 long Read(TMatrix<int_8>& data); 180 long Read(TMatrix<float>& data); 181 long Read(TMatrix<double>& data); 182 183 //! Set debug level 184 inline void SetDebug(int lp=0) {DbgLevel = (unsigned short) lp;} 185 //! Set null value to be return when reading null data (0=return the data) 186 inline void SetNulVal(double nulval=0.) {NulVal = nulval;} 187 //! Get the pointer to FitsOpenFile 188 inline FitsOpenFile* GetFitsOpenFile(void) {return FitsOF;} 189 //! Get the number of the HDU read 190 inline int GetHDU(void) {return IHdu;} 191 //! Get the HDU type 192 inline int GetHDUType(void) {return HduType;} 193 //! Get NAXIS1 194 inline long GetNaxis1(void) {return Naxis[0];} 195 //! Get NAXIS2 196 inline long GetNaxis2(void) {return Naxis[1];} 197 198 protected: 199 void Init(FitsOpenFile* fof,int ihdu,int lp); 200 201 string FitsFN; 202 int IHdu,NHdu,HduType; 203 long Naxis[2]; 204 205 double NulVal; 206 unsigned short DbgLevel; 207 208 FitsOpenFile* FitsOF; 209 fitsfile* FitsPtr; 210 };
Note:
See TracChangeset
for help on using the changeset viewer.