FitsFile.h

Go to the documentation of this file.
00001 /* -*- mode:c++ -*- */
00002 
00014 #ifndef _FitsFile_h
00015 #define _FitsFile_h
00016 
00017 #include "FitsFileBase.h"
00018 
00019 #ifndef _MSC_VER
00020 #include <inttypes.h>
00021 #endif
00022 
00023 #include <vector>
00024 
00025 namespace hippodraw {
00026 
00039 class FitsFile : public FitsFileBase {
00040 
00041 private:
00042 
00046   int fillFromTableColumn ( std::vector < double > & v, 
00047                             int column );
00048   
00053   int fillFromImage ( std::vector < double > & vec, unsigned int axis );
00054 
00058   int fillColumnNamesFromTable ( std::vector < std::string > & labels );
00059 
00062   int fillColumnNamesFromImage ( std::vector < std::string > & labels );
00063 
00079   int fillIntVectorFromColumn ( std::vector < int > & vec, int column );
00080 
00081  public:
00082 
00084   FitsFile ( const std::string & filename , bool write = false );
00085 
00089   void fillHDUNames ( std::vector < std::string > & names );
00090 
00094   int fillColumnNames ( std::vector < std::string > & labels );
00095 
00113   int fillDoubleVectorFromColumn ( std::vector < double > &vec,
00114                                    int column );
00115 
00120   int fillAxisSizes ( std::vector < long > & vec ) const;
00121 
00127   void fillShape ( std::vector < intptr_t > & shape, int column );
00128 
00132   void fillImageDeltas ( std::vector < double > & deltas ) const;
00133 
00137   void fillRefPixelIndices ( std::vector < int > & indices ) const;
00138 
00142   void fillRefPixelValues ( std::vector < double > & values ) const;
00143 
00147   bool isHammerAitoff () const;
00148 
00149   void writeHDU ( long rows, int columns, 
00150                   const std::vector < std::string > & names,
00151                   const std::vector < std::vector < int > > & shapes,
00152                   const std::string & extname );
00153 
00154   void writeImageHDU ( long x, long y );
00155 
00158   void writeColumn ( int c, const std::vector < double > & data );
00159 
00160   void writePix ( long x, long y,
00161                   const std::vector <double > & data );
00162 
00163   void writeCloseFile ();
00164 
00165   bool pixCenter () const;
00166 
00167   void writeRefPixelValues ( double value1, double value2 );
00168 
00169 };
00170 
00171 } // namespace hippodraw
00172 
00173 #endif // _FitsFile_h

Generated for HippoDraw Class Library by doxygen