ImageVariableGroup.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00025 #ifndef IMAGE_VARIABLE_GROUP_H
00026 #define IMAGE_VARIABLE_GROUP_H
00027 
00028 // if this file is preprocessed for SWIG, we want to ignore
00029 // all the header inclusions that follow:
00030 
00031 #ifndef _HSI_IGNORE_SECTION
00032 
00033 #include <set>
00034 #include "Panorama.h"
00035 
00036 #endif // _HSI_IGNORE_SECTION
00037 
00038 namespace HuginBase {
00039 
00064 class IMPEX ConstImageVariableGroup
00065 {
00066 public:
00067     enum ImageVariableEnum {
00068 #define image_variable( name, type, default_value ) \
00069 IVE_##name, 
00070 #include "image_variables.h"
00071 #undef image_variable
00072     };
00078     ConstImageVariableGroup(std::set<ImageVariableEnum> variables,
00079                             const PanoramaData & pano);
00080     
00082     virtual ~ConstImageVariableGroup();
00083     
00090     unsigned int getPartNumber(unsigned int imageNr) const;
00091 
00093     UIntSetVector getPartsSet() const;
00094     
00099     std::size_t getNumberOfParts() const;
00100     
00109     bool getVarLinkedInPart(ImageVariableEnum variable, std::size_t part) const;
00110     
00113     void updatePartNumbers();
00114 protected:
00115     // Member variables
00117     std::set<ImageVariableEnum> m_variables;
00118     
00120     const PanoramaData & m_pano;
00121     
00125     std::vector<unsigned int> m_image_part_numbers;
00126     
00127     unsigned int m_num_parts;
00128     
00129     // Member functions
00136     void setPartNumbers();
00137     
00138 };
00139 
00145 class IMPEX ImageVariableGroup: public ConstImageVariableGroup
00146 {
00147 public:
00153     ImageVariableGroup(std::set<ImageVariableEnum> variables,
00154                        PanoramaData & pano)
00155             : ConstImageVariableGroup(variables, pano),
00156                 m_pano (pano)
00157     {
00158     }
00159     
00167     void unlinkVariablePart(ImageVariableEnum variable, unsigned int partNr);
00168     
00170     void unlinkVariableImage(ImageVariableEnum variable, unsigned int imageNr);
00171     
00173     void linkVariablePart(ImageVariableEnum variable, unsigned int partNr);
00174     
00176     void linkVariableImage(ImageVariableEnum variable, unsigned int imageNr);
00177     
00190     void switchParts (unsigned int ImageNr, unsigned int partNr);
00191 private:
00192     PanoramaData & m_pano;
00193 };
00194 
00195 } // HuginBase namespace
00196 
00197 #endif

Generated on 31 Aug 2015 for Hugintrunk by  doxygen 1.4.7