Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
deghosting.h
Go to the documentation of this file.
1 
21 #ifndef DEGHOSTING_H_
22 #define DEGHOSTING_H_
23 
24 #include <exception>
25 #include <vector>
26 #include <string>
27 #include <stdint.h>
28 
29 #include <memory>
30 #include <vigra/stdimage.hxx>
31 #include <vigra/imageinfo.hxx>
32 
33 namespace deghosting {
34 
37  class NoImages : public std::exception {
38  public:
39  NoImages() : std::exception() {};
40  virtual const char * what() const throw() {
41  return "You must specify images";
42  }
43  };
44 
45  typedef std::shared_ptr<vigra::BImage> BImagePtr;
46  typedef std::shared_ptr<vigra::FImage> FImagePtr;
47  // type for camera response
48  typedef std::vector<float> EMoR;
49 
50  // constants for advanced modes
51  const uint16_t ADV_GAMMA = 1;
52  const uint16_t ADV_ONLYP = 2;
53  const uint16_t ADV_MULTIRES = 4;
54 
55  // constants for debug modes
56  const uint16_t SAVE_INITWEIGHTS = 1;
57 
58  class Deghosting
59  {
60  public:
62 
66  virtual std::vector<FImagePtr> createWeightMasks() = 0;
67 
71  virtual void loadImages(std::vector<std::string>& inputFiles);
72 
77  virtual void setFlags(const uint16_t flags);
78 
82  virtual void setDebugFlags(const uint16_t debugFlags);
83 
86  virtual void setIterationNum(const int iterations);
87 
92  virtual void setCameraResponse(EMoR response);
93 
97  virtual void setVerbosity(int verbosity);
98  virtual ~Deghosting() {}
99 
100  vigra::Rect2D getOutputROI() const;
101  std::vector<vigra::Rect2D> getInputROIs() const;
102 
103  protected:
104  std::vector<vigra::ImageImportInfo> inputFiles;
105  std::vector<vigra::Rect2D> m_inputROI;
106  uint16_t flags;
107  uint16_t debugFlags;
111  vigra::Rect2D m_outputROI;
112  };
113 
114 }
115 
116 #endif /* DEGHOSTING_H_ */
const uint16_t ADV_MULTIRES
Definition: deghosting.h:53
exception called when there are no input images
Definition: deghosting.h:37
std::shared_ptr< vigra::BImage > BImagePtr
Definition: deghosting.h:45
virtual void setVerbosity(int verbosity)
set verbosity level
Definition: deghosting.cpp:59
virtual void setDebugFlags(const uint16_t debugFlags)
set flags for debugging purposes
Definition: deghosting.cpp:47
std::vector< vigra::Rect2D > getInputROIs() const
Definition: deghosting.cpp:68
virtual void setCameraResponse(EMoR response)
set camera response function set camera response function in EMoR format
Definition: deghosting.cpp:55
virtual void loadImages(std::vector< std::string > &inputFiles)
load images for processing
Definition: deghosting.cpp:25
vigra::Rect2D m_outputROI
Definition: deghosting.h:111
virtual void setFlags(const uint16_t flags)
set advanced flags Allows to change behavior of used algorithm
Definition: deghosting.cpp:43
const uint16_t ADV_ONLYP
Definition: deghosting.h:52
std::shared_ptr< vigra::FImage > FImagePtr
Definition: deghosting.h:46
virtual const char * what() const
Definition: deghosting.h:40
virtual void setIterationNum(const int iterations)
set number of iterations
Definition: deghosting.cpp:51
std::vector< vigra::Rect2D > m_inputROI
Definition: deghosting.h:105
const uint16_t SAVE_INITWEIGHTS
Definition: deghosting.h:56
std::vector< float > EMoR
Definition: deghosting.h:48
const uint16_t ADV_GAMMA
Definition: deghosting.h:51
virtual std::vector< FImagePtr > createWeightMasks()=0
create weight masks create weight masks for masking out ghosting regions
vigra::Rect2D getOutputROI() const
Definition: deghosting.cpp:63
std::vector< vigra::ImageImportInfo > inputFiles
Definition: deghosting.h:104