Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rectfile.h
1 
2 /***************************************************************************
3  * rectfile.h - Rectification info file
4  *
5  * Created: Wed Oct 31 11:33:19 2007
6  * Copyright 2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FIREVISION_FVUTILS_RECTIFICATION_RECTFILE_H_
25 #define __FIREVISION_FVUTILS_RECTIFICATION_RECTFILE_H_
26 
27 #include <fvutils/rectification/rectinfo.h>
28 #include <fvutils/fileformat/fvfile.h>
29 #include <vector>
30 
31 namespace firevision {
32 #if 0 /* just to make Emacs auto-indent happy */
33 }
34 #endif
35 
36 class RectificationInfoBlock;
37 
39 {
40  public:
42  RectificationInfoFile(uint64_t cam_guid, const char *model);
44 
45  /** Vector that is used for maintaining the rectification info blocks.
46  * For instance use RectificationInfoFile::RectInfoBlockVector::iterator as
47  * iterator to go through the blocks returned by blocks().
48  */
49  class RectInfoBlockVector : public std::vector<RectificationInfoBlock *>
50  {
51  public:
53  };
54 
55  uint64_t guid();
56  const char * model();
57 
58  void add_rectinfo_block(RectificationInfoBlock *block);
59 
60  RectInfoBlockVector * rectinfo_blocks();
61 
62  virtual void read(const char *filename);
63 
64  private:
65  rectinfo_header_t *_header;
66  uint64_t _cam_guid;
67  char *_model;
68 };
69 
70 } // end namespace firevision
71 
72 #endif