Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
hugin_base/algorithm/StitcherAlgorithm.h
Go to the documentation of this file.00001 // -*- c-basic-offset: 4 -*- 00032 #ifndef _ALGORITHM_STITCHERALGORITHM_H 00033 #define _ALGORITHM_STITCHERALGORITHM_H 00034 00035 00036 #include <algorithm/PanoramaAlgorithm.h> 00037 00038 #include <hugin_shared.h> 00039 #include <vigra/impex.hxx> 00040 #include <panodata/PanoramaData.h> 00041 00042 00043 namespace HuginBase { 00044 00045 00047 class IMPEX StitcherAlgorithm : public TimeConsumingPanoramaAlgorithm 00048 { 00049 00050 public: 00052 StitcherAlgorithm(PanoramaData& panoramaData, 00053 AppBase::ProgressDisplay* progressDisplay, 00054 const PanoramaOptions& options, 00055 const UIntSet& usedImages) 00056 : TimeConsumingPanoramaAlgorithm(panoramaData, progressDisplay), 00057 o_panoramaOptions(options), o_usedImages(usedImages) 00058 {}; 00059 00060 public: 00062 virtual ~StitcherAlgorithm() {}; 00063 00064 00065 public: 00067 virtual bool runAlgorithm() 00068 { return runStitcher(); } 00069 00071 virtual bool modifiesPanoramaData() const { return false; }; 00072 00073 protected: 00075 virtual bool runStitcher() =0; 00076 00077 00078 protected: 00079 PanoramaOptions o_panoramaOptions; 00080 UIntSet o_usedImages; 00081 }; 00082 00083 00084 00086 class IMPEX ImageStitcherAlgorithm : public StitcherAlgorithm 00087 { 00088 00089 public: 00090 typedef vigra::FRGBImage DestImage; 00091 typedef vigra::BImage DestAlpha; 00092 00094 ImageStitcherAlgorithm(PanoramaData& panoramaData, 00095 AppBase::ProgressDisplay* progressDisplay, 00096 const PanoramaOptions& options, 00097 const UIntSet& usedImages, 00098 DestImage& panoImage, DestAlpha& alpha) 00099 : StitcherAlgorithm(panoramaData, progressDisplay, options, usedImages), 00100 o_panoImage(panoImage), o_alpha(alpha) 00101 {}; 00102 00103 public: 00105 virtual ~ImageStitcherAlgorithm() {}; 00106 00107 00108 protected: 00109 DestImage& o_panoImage; 00110 DestAlpha& o_alpha; 00111 }; 00112 00113 00115 class IMPEX FileOutputStitcherAlgorithm : public StitcherAlgorithm 00116 { 00117 00118 public: 00119 typedef std::string String; 00120 00122 FileOutputStitcherAlgorithm(PanoramaData& panoramaData, 00123 AppBase::ProgressDisplay* progressDisplay, 00124 const PanoramaOptions& options, 00125 const UIntSet& usedImages, 00126 const String& filename, const bool& addExtension = true) 00127 : StitcherAlgorithm(panoramaData, progressDisplay, options, usedImages), 00128 o_filename(filename) 00129 {}; 00130 00131 public: 00133 virtual ~FileOutputStitcherAlgorithm() {}; 00134 00135 00136 00137 protected: 00138 String o_filename; 00139 }; 00140 00141 00142 // parent class does not have a default constructor, leads to compiler errors 00143 #if 0 00144 00147 class MultiFileOutputStitcherAlgorithm : public FileOutputStitcherAlgorithm 00148 { 00149 public: 00151 virtual ~MultiFileOutputStitcherAlgorithm() {}; 00152 }; 00153 #endif 00154 00155 } // namespace 00156 #endif // _H
1.3.9.1