rectfile.h

00001
00002 /***************************************************************************
00003  *  rectfile.h - Rectification info file
00004  *
00005  *  Created: Wed Oct 31 11:33:19 2007
00006  *  Copyright  2007  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023
00024 #ifndef __FIREVISION_FVUTILS_RECTIFICATION_RECTFILE_H_
00025 #define __FIREVISION_FVUTILS_RECTIFICATION_RECTFILE_H_
00026 
00027 #include <fvutils/rectification/rectinfo.h>
00028 #include <fvutils/fileformat/fvfile.h>
00029 #include <vector>
00030
00031 class RectificationInfoBlock;
00032
00033 class RectificationInfoFile : public FireVisionDataFile
00034 {
00035  public:
00036   RectificationInfoFile();
00037   RectificationInfoFile(uint64_t cam_guid, const char *model);
00038   ~RectificationInfoFile();
00039 
00040   /** Vector that is used for maintaining the rectification info blocks.
00041    * For instance use RectificationInfoFile::RectInfoBlockVector::iterator as
00042    * iterator to go through the blocks returned by blocks().
00043    */
00044   class RectInfoBlockVector : public std::vector<RectificationInfoBlock *>
00045   {
00046     public:
00047      ~RectInfoBlockVector();
00048   };
00049
00050   uint64_t      guid();
00051   const char *  model();
00052
00053   void add_rectinfo_block(RectificationInfoBlock *block);
00054
00055   RectInfoBlockVector *  rectinfo_blocks();
00056
00057   virtual void read(const char *filename);
00058
00059  private:
00060   rectinfo_header_t  *_header;
00061   uint64_t            _cam_guid;
00062   char               *_model;
00063 };
00064
00065 #endif