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