Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StitcherAlgorithm.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
32 #ifndef _ALGORITHM_STITCHERALGORITHM_H
33 #define _ALGORITHM_STITCHERALGORITHM_H
34 
35 
37 
38 #include <hugin_shared.h>
39 #include <vigra/stdimage.hxx>
40 #include <panodata/PanoramaData.h>
41 
42 
43 namespace HuginBase {
44 
45 
48  {
49 
50  public:
53  AppBase::ProgressDisplay* progressDisplay,
54  const PanoramaOptions& options,
55  const UIntSet& usedImages)
56  : TimeConsumingPanoramaAlgorithm(panoramaData, progressDisplay),
57  o_panoramaOptions(options), o_usedImages(usedImages)
58  {};
59 
60  public:
62  virtual ~StitcherAlgorithm() {};
63 
64 
65  public:
67  virtual bool runAlgorithm()
68  { return runStitcher(); }
69 
71  virtual bool modifiesPanoramaData() const { return false; };
72 
73  protected:
75  virtual bool runStitcher() =0;
76 
77 
78  protected:
81  };
82 
83 
84 
87  {
88 
89  public:
90  typedef vigra::FRGBImage DestImage;
91  typedef vigra::BImage DestAlpha;
92 
95  AppBase::ProgressDisplay* progressDisplay,
96  const PanoramaOptions& options,
97  const UIntSet& usedImages,
98  DestImage& panoImage, DestAlpha& alpha)
99  : StitcherAlgorithm(panoramaData, progressDisplay, options, usedImages),
100  o_panoImage(panoImage), o_alpha(alpha)
101  {};
102 
103  public:
106 
107 
108  protected:
109  DestImage& o_panoImage;
111  };
112 
113 
116  {
117 
118  public:
119  typedef std::string String;
120 
123  AppBase::ProgressDisplay* progressDisplay,
124  const PanoramaOptions& options,
125  const UIntSet& usedImages,
126  const String& filename, const bool& addExtension = true)
127  : StitcherAlgorithm(panoramaData, progressDisplay, options, usedImages),
128  o_filename(filename)
129  {};
130 
131  public:
134 
135 
136 
137  protected:
138  String o_filename;
139  };
140 
141 
142  // parent class does not have a default constructor, leads to compiler errors
143 #if 0
144 
147  class MultiFileOutputStitcherAlgorithm : public FileOutputStitcherAlgorithm
148  {
149  public:
151  virtual ~MultiFileOutputStitcherAlgorithm() {};
152  };
153 #endif
154 
155 } // namespace
156 #endif // _H
virtual bool runAlgorithm()
implementation of the algorithm.
Just a conceptual base class...
std::set< unsigned int > UIntSet
Definition: PanoramaData.h:51
Model for a panorama.
Definition: PanoramaData.h:81
#define IMPEX
Definition: hugin_shared.h:39
virtual bool modifiesPanoramaData() const
returns flase, hope this is correct
FileOutputStitcherAlgorithm(PanoramaData &panoramaData, AppBase::ProgressDisplay *progressDisplay, const PanoramaOptions &options, const UIntSet &usedImages, const String &filename, const bool &addExtension=true)
Panorama image options.
ImageStitcherAlgorithm(PanoramaData &panoramaData, AppBase::ProgressDisplay *progressDisplay, const PanoramaOptions &options, const UIntSet &usedImages, DestImage &panoImage, DestAlpha &alpha)
StitcherAlgorithm(PanoramaData &panoramaData, AppBase::ProgressDisplay *progressDisplay, const PanoramaOptions &options, const UIntSet &usedImages)