Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
deghosting.cpp
Go to the documentation of this file.
1 
21 #include "deghosting.h"
22 
23 namespace deghosting {
24 
25  void Deghosting::loadImages(std::vector<std::string>& newInputFiles)
26  {
27  if (newInputFiles.empty())
28  throw NoImages();
29  const vigra::ImageImportInfo firstInfo(newInputFiles[0].c_str());
30  const vigra::Rect2D inputRect(vigra::Point2D(firstInfo.getPosition()), firstInfo.size());
31  m_inputROI.push_back(inputRect);
32  inputFiles.push_back(firstInfo);
33  m_outputROI = inputRect;
34  for (unsigned int i = 1; i< newInputFiles.size(); i++) {
35  vigra::ImageImportInfo tmpInfo(newInputFiles[i].c_str());
36  const vigra::Rect2D inputRect(vigra::Point2D(tmpInfo.getPosition()), tmpInfo.size());
37  m_inputROI.push_back(inputRect);
38  inputFiles.push_back(tmpInfo);
39  m_outputROI |= inputRect;
40  }
41  }
42 
43  void Deghosting::setFlags(const uint16_t newFlags) {
44  flags = newFlags;
45  }
46 
47  void Deghosting::setDebugFlags(const uint16_t newFlags) {
48  debugFlags = newFlags;
49  }
50 
51  void Deghosting::setIterationNum(const int newIterations) {
52  iterations = newIterations;
53  }
54 
55  void Deghosting::setCameraResponse(EMoR newResponse) {
56  response = newResponse;
57  }
58 
59  void Deghosting::setVerbosity(int newVerbosity) {
60  verbosity = newVerbosity;
61  }
62 
63  vigra::Rect2D Deghosting::getOutputROI() const
64  {
65  return m_outputROI;
66  }
67 
68  std::vector<vigra::Rect2D> Deghosting::getInputROIs() const
69  {
70  return m_inputROI;
71  }
72 }
73 
exception called when there are no input images
Definition: deghosting.h:37
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
virtual void setIterationNum(const int iterations)
set number of iterations
Definition: deghosting.cpp:51
std::vector< vigra::Rect2D > m_inputROI
Definition: deghosting.h:105
std::vector< float > EMoR
Definition: deghosting.h:48
vigra::Rect2D getOutputROI() const
Definition: deghosting.cpp:63
std::vector< vigra::ImageImportInfo > inputFiles
Definition: deghosting.h:104