|
Hugin trunk 0.1
|
#include "PanoOptionsFromIni.h"#include "IniParser.h"#include <cmath>#include <algorithms/nona/CenterHorizontally.h>#include <algorithms/basic/StraightenPanorama.h>#include <algorithms/nona/FitPanorama.h>#include <algorithms/basic/CalculateOptimalScale.h>#include <algorithms/basic/CalculateOptimalROI.h>#include <algorithms/basic/LayerStacks.h>#include <algorithms/basic/CalculateMeanExposure.h>
Go to the source code of this file.
Classes | |
| struct | PanoProperties |
Variables | |
| static std::vector< std::string > | projectionNames |
| static std::map< HuginBase::BaseSrcPanoImage::Projection, std::string > | lensTypeNames |
| bool CheckCondition | ( | const std::string & | condition, |
| const HuginBase::Panorama & | pano, | ||
| const PanoProperties & | panoProps | ||
| ) |
check if given condition is fulfilled by given panorama and PanoProperties
Definition at line 157 of file PanoOptionsFromIni.cpp.
References CheckDouble(), CheckInt(), CheckString(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), lensTypeNames, projectionNames, ReadProjectionNames(), threshold(), and hugin_utils::tolower().
Referenced by ProcessSection().
| bool CheckDouble | ( | const double | variable, |
| const std::string & | operatorString, | ||
| const std::string & | stringValue | ||
| ) |
check if given double matches the condition (operator and value)
Definition at line 145 of file PanoOptionsFromIni.cpp.
References hugin_utils::stringToDouble(), and threshold().
Referenced by CheckCondition().
| bool CheckInt | ( | const int | variable, |
| const std::string & | operatorString, | ||
| const std::string & | stringValue | ||
| ) |
check if given integer matches the condition (operator and value)
Definition at line 133 of file PanoOptionsFromIni.cpp.
References hugin_utils::stringToInt(), and threshold().
Referenced by CheckCondition().
general number comparison function
Definition at line 102 of file PanoOptionsFromIni.cpp.
References threshold().
| bool CheckString | ( | const std::string & | variable, |
| const std::string & | operatorString, | ||
| const std::string & | value | ||
| ) |
check if given string matches the value with the corresponding operator
Definition at line 76 of file PanoOptionsFromIni.cpp.
References threshold().
Referenced by CheckCondition().
| void ProcessSection | ( | const IniParser & | iniParser, |
| const std::string & | section, | ||
| HuginBase::Panorama & | pano, | ||
| HuginBase::PanoramaOptions & | options, | ||
| const PanoProperties & | panoProps | ||
| ) |
process the given section, check if all conditions are fulfilled and if so apply all wished settings
Definition at line 619 of file PanoOptionsFromIni.cpp.
References HuginBase::PanoramaOptions::blendMode, CheckCondition(), HuginBase::PanoramaOptions::ENBLEND_BLEND, HuginBase::PanoramaOptions::enblendOptions, HuginBase::PanoramaOptions::INTERNAL_BLEND, HuginBase::PanoramaOptions::outputImageType, HuginBase::PanoramaOptions::outputImageTypeHDR, SetCanvas(), SetCrop(), SetExposure(), SetFOV(), SetHDRCompression(), SetLDRCompression(), SetOutputType(), SetProjection(), hugin_utils::StrTrim(), threshold(), hugin_utils::tolower(), hugin_utils::toupper(), and HuginBase::PanoramaOptions::verdandiOptions.
Referenced by ReadPanoramaOptionsFromIni().
| HuginBase::PanoramaOptions ReadPanoramaOptionsFromIni | ( | const std::string & | iniFile, |
| HuginBase::Panorama & | pano | ||
| ) |
read settings from given ini file and apply wished settings if they are applicable
Definition at line 780 of file PanoOptionsFromIni.cpp.
References hugin_utils::GetAbsoluteFilename(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), hugin_utils::getPathPrefix(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), ProcessSection(), IniParser::Read(), HuginBase::SrcPanoImage::readEXIF(), hugin_utils::roundi(), HuginBase::PanoramaAlgorithm::run(), HuginBase::Panorama::setSrcImage(), hugin_utils::stripPath(), and threshold().
Referenced by main().
| void ReadProjectionNames | ( | ) |
Definition at line 50 of file PanoOptionsFromIni.cpp.
References HuginBase::BaseSrcPanoImage::CIRCULAR_FISHEYE, HuginBase::BaseSrcPanoImage::EQUIRECTANGULAR, HuginBase::BaseSrcPanoImage::FISHEYE_EQUISOLID, HuginBase::BaseSrcPanoImage::FISHEYE_ORTHOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_STEREOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_THOBY, HuginBase::BaseSrcPanoImage::FULL_FRAME_FISHEYE, lensTypeNames, HuginBase::BaseSrcPanoImage::PANORAMIC, projectionNames, HuginBase::BaseSrcPanoImage::RECTILINEAR, threshold(), and hugin_utils::tolower().
Referenced by CheckCondition(), and SetProjection().
| void SetCanvas | ( | const std::string & | canvas, |
| HuginBase::Panorama & | pano, | ||
| HuginBase::PanoramaOptions & | options | ||
| ) |
Definition at line 285 of file PanoOptionsFromIni.cpp.
References HuginBase::CalculateOptimalScale::calcOptimalScale(), HuginBase::Panorama::duplicate(), HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getWidth(), hugin_utils::roundi(), HuginBase::PanoramaOptions::setHeight(), HuginBase::Panorama::setOptions(), HuginBase::PanoramaOptions::setWidth(), hugin_utils::stringToInt(), and threshold().
Referenced by ProcessSection().
| void SetCrop | ( | const std::string & | cropString, |
| HuginBase::Panorama & | pano, | ||
| HuginBase::PanoramaOptions & | options | ||
| ) |
Definition at line 326 of file PanoOptionsFromIni.cpp.
References HuginBase::Panorama::duplicate(), HuginBase::Panorama::getActiveImages(), HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getROI(), HuginBase::PanoramaOptions::getWidth(), HuginBase::Panorama::setOptions(), HuginBase::PanoramaOptions::setROI(), and threshold().
Referenced by ProcessSection().
| void SetExposure | ( | const std::string & | exposure, |
| HuginBase::Panorama & | pano, | ||
| HuginBase::PanoramaOptions & | options | ||
| ) |
Definition at line 407 of file PanoOptionsFromIni.cpp.
References HuginBase::CalculateMeanExposure::calcMeanExposure(), HuginBase::PanoramaOptions::outputExposureValue, hugin_utils::stringToDouble(), and threshold().
Referenced by ProcessSection().
| void SetFOV | ( | const std::string & | fov, |
| HuginBase::Panorama & | pano, | ||
| HuginBase::PanoramaOptions & | options | ||
| ) |
Definition at line 255 of file PanoOptionsFromIni.cpp.
References HuginBase::Panorama::duplicate(), HuginBase::PanoramaOptions::fovCalcSupported(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::PanoramaOptions::getProjection(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), HuginBase::PanoramaOptions::getVFOV(), hugin_utils::roundi(), HuginBase::PanoramaAlgorithm::run(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), HuginBase::Panorama::setOptions(), HuginBase::PanoramaOptions::setVFOV(), and threshold().
Referenced by ProcessSection().
| void SetHDRCompression | ( | const std::string | hdrCompression, |
| HuginBase::PanoramaOptions & | options | ||
| ) |
Definition at line 590 of file PanoOptionsFromIni.cpp.
References HuginBase::PanoramaOptions::outputImageTypeHDR, HuginBase::PanoramaOptions::outputImageTypeHDRCompression, and threshold().
Referenced by ProcessSection().
| void SetLDRCompression | ( | const std::string | ldrCompression, |
| HuginBase::PanoramaOptions & | options | ||
| ) |
Definition at line 537 of file PanoOptionsFromIni.cpp.
References HuginBase::PanoramaOptions::outputImageType, HuginBase::PanoramaOptions::outputImageTypeCompression, HuginBase::PanoramaOptions::quality, threshold(), and HuginBase::PanoramaOptions::tiffCompression.
Referenced by ProcessSection().
| void SetOutputType | ( | const std::string & | outputType, |
| HuginBase::PanoramaOptions & | options | ||
| ) |
Definition at line 445 of file PanoOptionsFromIni.cpp.
References HuginBase::PanoramaOptions::outputHDRBlended, HuginBase::PanoramaOptions::outputHDRLayers, HuginBase::PanoramaOptions::outputHDRStacks, HuginBase::PanoramaOptions::outputLDRBlended, HuginBase::PanoramaOptions::outputLDRExposureBlended, HuginBase::PanoramaOptions::outputLDRExposureLayers, HuginBase::PanoramaOptions::outputLDRExposureLayersFused, HuginBase::PanoramaOptions::outputLDRExposureRemapped, HuginBase::PanoramaOptions::outputLDRLayers, HuginBase::PanoramaOptions::outputLDRStacks, hugin_utils::SplitString(), hugin_utils::StrTrim(), and threshold().
Referenced by ProcessSection().
| void SetProjection | ( | const std::string & | projectionString, |
| HuginBase::PanoramaOptions & | options | ||
| ) |
Definition at line 237 of file PanoOptionsFromIni.cpp.
References projectionNames, ReadProjectionNames(), HuginBase::PanoramaOptions::setProjection(), and threshold().
Referenced by ProcessSection().
|
static |
Definition at line 49 of file PanoOptionsFromIni.cpp.
Referenced by CheckCondition(), and ReadProjectionNames().
|
static |
Definition at line 48 of file PanoOptionsFromIni.cpp.
Referenced by CheckCondition(), ReadProjectionNames(), and SetProjection().