Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageVariableGroup.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
25 #ifndef IMAGE_VARIABLE_GROUP_H
26 #define IMAGE_VARIABLE_GROUP_H
27 
28 // if this file is preprocessed for SWIG, we want to ignore
29 // all the header inclusions that follow:
30 
31 #ifndef _HSI_IGNORE_SECTION
32 
33 #include <set>
34 #include "Panorama.h"
35 
36 #endif // _HSI_IGNORE_SECTION
37 
38 namespace HuginBase {
39 
65 {
66 public:
68 #define image_variable( name, type, default_value ) \
69 IVE_##name,
70 #include "image_variables.h"
71 #undef image_variable
72  };
78  ConstImageVariableGroup(std::set<ImageVariableEnum> variables,
79  const PanoramaData & pano);
80 
82  virtual ~ConstImageVariableGroup();
83 
90  unsigned int getPartNumber(unsigned int imageNr) const;
91 
93  UIntSetVector getPartsSet() const;
94 
99  std::size_t getNumberOfParts() const;
100 
109  bool getVarLinkedInPart(ImageVariableEnum variable, std::size_t part) const;
110 
113  void updatePartNumbers();
114 protected:
115  // Member variables
117  std::set<ImageVariableEnum> m_variables;
118 
121 
125  std::vector<unsigned int> m_image_part_numbers;
126 
127  unsigned int m_num_parts;
128 
129  // Member functions
136  void setPartNumbers();
137 
138 };
139 
146 {
147 public:
153  ImageVariableGroup(std::set<ImageVariableEnum> variables,
154  PanoramaData & pano)
155  : ConstImageVariableGroup(variables, pano),
156  m_pano (pano)
157  {
158  }
159 
167  void unlinkVariablePart(ImageVariableEnum variable, unsigned int partNr);
168 
170  void unlinkVariableImage(ImageVariableEnum variable, unsigned int imageNr);
171 
173  void linkVariablePart(ImageVariableEnum variable, unsigned int partNr);
174 
176  void linkVariableImage(ImageVariableEnum variable, unsigned int imageNr);
177 
190  void switchParts (unsigned int ImageNr, unsigned int partNr);
191 private:
193 };
194 
195 } // HuginBase namespace
196 
197 #endif
std::set< ImageVariableEnum > m_variables
The set of variables which make up this group.
An ImageVariableGroup is a collection of image variables that can have some shared variable values...
std::vector< UIntSet > UIntSetVector
Definition: PanoramaData.h:56
const PanoramaData & m_pano
The panorama this group works on.
ImageVariableGroup(std::set< ImageVariableEnum > variables, PanoramaData &pano)
constructor
Model for a panorama.
Definition: PanoramaData.h:81
std::vector< unsigned int > m_image_part_numbers
The part numbers for each image.
#define IMPEX
Definition: hugin_shared.h:39
Same as above, but use a non const panorama.
This file specifies what image variables SrcPanoImg should have.