deghosting.cpp

Go to the documentation of this file.
00001 
00021 #include "deghosting.h"
00022 
00023 namespace deghosting {
00024     
00025     void Deghosting::loadImages(std::vector<std::string>& newInputFiles) THROWNOIMAGESBADDIMENSION {
00026         if (newInputFiles.empty())
00027             throw NoImages();
00028         const vigra::ImageImportInfo firstInfo(newInputFiles[0].c_str());
00029         const int width = firstInfo.width();
00030         const int height = firstInfo.height();
00031         for (unsigned int i = 0; i< newInputFiles.size(); i++) {
00032             vigra::ImageImportInfo tmpInfo(newInputFiles[i].c_str());
00033             if ((width != tmpInfo.width()) || (height != tmpInfo.height()))
00034                 throw BadDimensions();
00035             inputFiles.push_back(tmpInfo);
00036         }
00037      }
00038     
00039     void Deghosting::loadImages(std::vector<vigra::ImageImportInfo>& newInputFiles) THROWNOIMAGESBADDIMENSION {
00040         if (newInputFiles.empty())
00041             throw NoImages();
00042         const int width = newInputFiles[0].width();
00043         const int height = newInputFiles[0].height();
00044         for (unsigned int i = 0; i< newInputFiles.size(); i++) {
00045             if ((width != newInputFiles[i].width()) || (height != newInputFiles[i].height()))
00046                 throw BadDimensions();
00047         }
00048         inputFiles = newInputFiles;
00049     }
00050 
00051     void Deghosting::setFlags(const uint16_t newFlags) {
00052         flags = newFlags;
00053     }
00054 
00055     void Deghosting::setDebugFlags(const uint16_t newFlags) {
00056         debugFlags = newFlags;
00057     }
00058 
00059     void Deghosting::setIterationNum(const int newIterations) {
00060         iterations = newIterations;
00061     }
00062 
00063     void Deghosting::setCameraResponse(EMoR newResponse) {
00064         response = newResponse;
00065     }
00066 
00067     void Deghosting::setVerbosity(int newVerbosity) {
00068         verbosity = newVerbosity;
00069     }
00070 
00071 }
00072 

Generated on 28 Jun 2016 for Hugintrunk by  doxygen 1.4.7