Changeset 3114 in Sophya for trunk/SophyaExt/FitsIOServer/fabtcolread.h
- Timestamp:
- Dec 13, 2006, 6:44:39 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fabtcolread.h
r2791 r3114 104 104 inline FitsOpenFile* GetFitsOpenFile(void) const {return FitsOF;} 105 105 //! Get the FITS file pointer (cfistio pointer) 106 inline fitsfile* GetFitsPtr(void) const {return Fits Ptr;}106 inline fitsfile* GetFitsPtr(void) const {return FitsOF->GetFitsPtr();} 107 107 //! Get the number of HDU in the FITS file 108 108 inline int NHDU(void) const … … 156 156 unsigned long NFitsRead; 157 157 FitsOpenFile* FitsOF; 158 fitsfile* FitsPtr; // Redite avec FitsOF->FitsPtr, mais utilise partout!159 158 long LineDeb, LineFin; 160 159 double *Buffer; … … 193 192 string ReadKeyS(char *keyname); 194 193 195 longRead(TMatrix<uint_2>& data);196 longRead(TMatrix<int_4>& data);197 longRead(TMatrix<int_8>& data);198 longRead(TMatrix<float>& data);199 longRead(TMatrix<double>& data);194 size_t Read(TMatrix<uint_2>& data); 195 size_t Read(TMatrix<int_4>& data); 196 size_t Read(TMatrix<int_8>& data); 197 size_t Read(TMatrix<float>& data); 198 size_t Read(TMatrix<double>& data); 200 199 201 200 //! Set debug level … … 206 205 inline FitsOpenFile* GetFitsOpenFile(void) const {return FitsOF;} 207 206 //! Get the FITS file pointer (cfistio pointer) 208 inline fitsfile* GetFitsPtr(void) const {return Fits Ptr;}207 inline fitsfile* GetFitsPtr(void) const {return FitsOF->GetFitsPtr();} 209 208 //! Get the number of HDU in the FITS file 210 209 inline int NHDU(void) const … … 229 228 230 229 FitsOpenFile* FitsOF; 231 fitsfile* FitsPtr; // Redite avec FitsOF->FitsPtr, mais utilise partout!232 230 }; 233 231 … … 243 241 }; 244 242 243 244 /////////////////////////////////////////////////////////////////// 245 //! Class for reading a 3D image from a FITS file 246 class FitsImg3DRd : public AnyDataObj { 247 public: 248 FitsImg3DRd(FitsOpenFile* fof,int ihdu=0,int lp=0); 249 FitsImg3DRd(FitsImg3DRd& fbt); 250 FitsImg3DRd(); 251 virtual ~FitsImg3DRd(); 252 253 double ReadKey(char *keyname); 254 long ReadKeyL(char *keyname); 255 string ReadKeyS(char *keyname); 256 257 size_t Read(TArray<uint_2>& data); 258 size_t Read(TArray<int_4>& data); 259 size_t Read(TArray<int_8>& data); 260 size_t Read(TArray<float>& data); 261 size_t Read(TArray<double>& data); 262 263 //! Set debug level 264 inline void SetDebug(int lp=0) {DbgLevel = (unsigned short) lp;} 265 //! Set null value to be return when reading null data (0=return the data) 266 inline void SetNulVal(double nulval=0.) {NulVal = nulval;} 267 //! Get the pointer to FitsOpenFile 268 inline FitsOpenFile* GetFitsOpenFile(void) const {return FitsOF;} 269 //! Get the FITS file pointer (cfistio pointer) 270 inline fitsfile* GetFitsPtr(void) const {return FitsOF->GetFitsPtr();} 271 //! Get the number of HDU in the FITS file 272 inline int NHDU(void) const 273 {if(FitsOF) return FitsOF->NHDU(); else return 0;} 274 //! Get the number of the HDU read 275 inline int HDU(void) const 276 {if(FitsOF) return FitsOF->HDU(); else return 0;} 277 //! Get the HDU type 278 inline int HDUType(void) const 279 {if(FitsOF) return FitsOF->HDUType(); else return 0;} 280 //! Get NAXIS1 281 inline long Naxis1(void) const {return Naxis[0];} 282 //! Get NAXIS2 283 inline long Naxis2(void) const {return Naxis[1];} 284 //! Get NAXIS3 285 inline long Naxis3(void) const {return Naxis[2];} 286 287 protected: 288 void Init(FitsOpenFile* fof,int ihdu,int lp); 289 290 long Naxis[3]; 291 double NulVal; 292 unsigned short DbgLevel; 293 294 FitsOpenFile* FitsOF; 295 }; 296 297 /////////////////////////////////////////////////////////////////// 298 //! Class for reading a 3D image from a FITS file 299 class FitsImg3DRead : public FitsImg3DRd { 300 public: 301 FitsImg3DRead(string fname,int ihdu=0,int lp=0); 302 FitsImg3DRead(const char *cfname,int ihdu=0,int lp=0); 303 FitsImg3DRead(FitsImg3DRead& fbt); 304 FitsImg3DRead(); 305 virtual ~FitsImg3DRead(); 306 }; 307 245 308 } // namespace SOPHYA 246 309 #endif /* FABTCOLREAD_H_SEEN */
Note:
See TracChangeset
for help on using the changeset viewer.