FitsFileBase.h
Go to the documentation of this file.
1 /* -*- mode:c++ -*- */
2 
14 #ifndef _FitsFileBase_h
15 #define _FitsFileBase_h
16 
17 #include "fitsio.h"
18 
19 #include <string>
20 
21 namespace hippodraw {
22 
32 class FitsFileBase {
33 
34 public:
35 
38  enum HduType
39  { Image = IMAGE_HDU,
40  Atable = ASCII_TBL,
41  Btable = BINARY_TBL,
42  Any = ANY_HDU
43  };
44 
47  enum ImageType
48  { ByteImg = BYTE_IMG,
49  ShortImg = SHORT_IMG,
50  LongImg = LONG_IMG,
51  FloatImg = FLOAT_IMG,
52  DoubleImg = DOUBLE_IMG,
53  NoImg = 0
54  };
55 
58  enum DataType {
59  ByteU = TBYTE,
60  Short = TSHORT,
61  ShortU = TUSHORT,
62  Int = TINT,
63  IntU = TUINT,
64  Long = TLONG,
65  LongU = TULONG,
66  LongLong = TLONGLONG,
67  Float = TFLOAT,
68  Double = TDOUBLE
69  };
70 
71 private:
72 
75  static HduType convert ( int i );
76 
81  int numKeywords() const;
82 
83 protected:
84 
87  mutable int m_status;
88 
91 
93  FitsFileBase ( const std::string & filename, bool write = false );
94 
97  ImageType getImageType () const;
98 
101  int getImageDimensions ( ) const;
102 
109  double doubleValueForKey ( const char * key ) const;
110 
113  int getNumberOfColumns ( ) const;
114 
117  int getNumberOfHDU () const;
118 
121  bool hasKey ( const char * key ) const;
122 
128  int intValueForKey( const char * key ) const;
129 
136  std::string stringValueForKey ( const char * key ) const;
137 
138 public:
139 
141  virtual ~FitsFileBase();
142 
144  void clearErrorMessageStack( void );
145 
148  HduType getHduType () const;
149 
153  int getHDUNumber ( ) const;
154 
162  int moveToHDU ( int hdunum );
163 
169  int moveToHDU ( const std::string & name );
170 
173  int status () const;
174 
177  long getNumberOfRows ( ) const;
178 
179 private:
180 
182  FitsFileBase( const FitsFileBase& );
183 
186 
187 };
188 
189 } // namespace hippodraw
190 
191 #endif // _FitsFileBase_h

Generated for HippoDraw Class Library by doxygen