Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
deghosting/deghosting.h
Go to the documentation of this file.00001 00021 #ifndef DEGHOSTING_H_ 00022 #define DEGHOSTING_H_ 00023 00024 #include <exception> 00025 #include <vector> 00026 #include <string> 00027 00028 #ifdef _WIN32 00029 #include <boost/cstdint.hpp> 00030 using namespace boost; 00031 #else 00032 #include <stdint.h> 00033 #endif 00034 00035 #include <boost/shared_ptr.hpp> 00036 #include <vigra/stdimage.hxx> 00037 #include <vigra/imageinfo.hxx> 00038 00039 // define if you want to use image cache 00040 #define DEGHOSTING_CACHE_IMAGES 00041 00042 namespace deghosting { 00043 00046 class BadDimensions : public std::exception { 00047 public: 00048 BadDimensions() : std::exception() {}; 00049 virtual const char * what() const throw() { 00050 return "Input images must have the same dimensions"; 00051 } 00052 }; 00053 00056 class NoImages : public std::exception { 00057 public: 00058 NoImages() : std::exception() {}; 00059 virtual const char * what() const throw() { 00060 return "You must specify images"; 00061 } 00062 }; 00063 00064 typedef boost::shared_ptr<vigra::BImage> BImagePtr; 00065 typedef boost::shared_ptr<vigra::FImage> FImagePtr; 00066 // type for camera response 00067 typedef std::vector<float> EMoR; 00068 00069 // constants for advanced modes 00070 const uint16_t ADV_GAMMA = 1; 00071 const uint16_t ADV_ONLYP = 2; 00072 const uint16_t ADV_MULTIRES = 4; 00073 00074 // constants for debug modes 00075 const uint16_t SAVE_INITWEIGHTS = 1; 00076 00077 class Deghosting 00078 { 00079 public: 00080 Deghosting() {} 00081 00085 virtual std::vector<FImagePtr> createWeightMasks() = 0; 00086 00090 virtual void loadImages(std::vector<std::string>& inputFiles) throw(NoImages, BadDimensions); 00091 virtual void loadImages(std::vector<vigra::ImageImportInfo>& inputFiles) throw(NoImages, BadDimensions); 00092 00097 virtual void setFlags(const uint16_t flags); 00098 00102 virtual void setDebugFlags(const uint16_t debugFlags); 00103 00106 virtual void setIterationNum(const int iterations); 00107 00112 virtual void setCameraResponse(EMoR response); 00113 00117 virtual void setVerbosity(int verbosity); 00118 virtual ~Deghosting() {} 00119 00120 protected: 00121 std::vector<vigra::ImageImportInfo> inputFiles; 00122 uint16_t flags; 00123 uint16_t debugFlags; 00124 int iterations; 00125 EMoR response; 00126 int verbosity; 00127 }; 00128 00129 } 00130 00131 #endif /* DEGHOSTING_H_ */
1.3.9.1