Hugin trunk 0.1
Loading...
Searching...
No Matches
Classes | Functions | Variables
PanoOptionsFromIni.cpp File Reference
#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>
Include dependency graph for PanoOptionsFromIni.cpp:

Go to the source code of this file.

Classes

struct  PanoProperties
 

Functions

void ReadProjectionNames ()
 
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
 
template<class Number >
bool CheckNumber (const Number variable, const std::string &operatorString, const Number value)
 general number comparison function
 
bool CheckInt (const int variable, const std::string &operatorString, const std::string &stringValue)
 check if given integer matches the condition (operator and value)
 
bool CheckDouble (const double variable, const std::string &operatorString, const std::string &stringValue)
 check if given double matches the condition (operator and value)
 
bool CheckCondition (const std::string &condition, const HuginBase::Panorama &pano, const PanoProperties &panoProps)
 check if given condition is fulfilled by given panorama and PanoProperties
 
void SetProjection (const std::string &projectionString, HuginBase::PanoramaOptions &options)
 
void SetFOV (const std::string &fov, HuginBase::Panorama &pano, HuginBase::PanoramaOptions &options)
 
void SetCanvas (const std::string &canvas, HuginBase::Panorama &pano, HuginBase::PanoramaOptions &options)
 
void SetCrop (const std::string &cropString, HuginBase::Panorama &pano, HuginBase::PanoramaOptions &options)
 
void SetExposure (const std::string &exposure, HuginBase::Panorama &pano, HuginBase::PanoramaOptions &options)
 
void SetOutputType (const std::string &outputType, HuginBase::PanoramaOptions &options)
 
void SetLDRCompression (const std::string ldrCompression, HuginBase::PanoramaOptions &options)
 
void SetHDRCompression (const std::string hdrCompression, HuginBase::PanoramaOptions &options)
 
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
 
HuginBase::PanoramaOptions ReadPanoramaOptionsFromIni (const std::string &iniFile, HuginBase::Panorama &pano)
 read settings from given ini file and apply wished settings if they are applicable
 

Variables

static std::vector< std::string > projectionNames
 
static std::map< HuginBase::BaseSrcPanoImage::Projection, std::string > lensTypeNames
 

Function Documentation

◆ CheckCondition()

bool CheckCondition ( const std::string &  condition,
const HuginBase::Panorama pano,
const PanoProperties panoProps 
)

◆ CheckDouble()

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().

◆ CheckInt()

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().

◆ CheckNumber()

template<class Number >
bool CheckNumber ( const Number  variable,
const std::string &  operatorString,
const Number  value 
)

general number comparison function

Definition at line 102 of file PanoOptionsFromIni.cpp.

References threshold().

◆ CheckString()

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().

◆ ProcessSection()

void ProcessSection ( const IniParser iniParser,
const std::string &  section,
HuginBase::Panorama pano,
HuginBase::PanoramaOptions options,
const PanoProperties panoProps 
)

◆ ReadPanoramaOptionsFromIni()

HuginBase::PanoramaOptions ReadPanoramaOptionsFromIni ( const std::string &  iniFile,
HuginBase::Panorama pano 
)

◆ ReadProjectionNames()

void ReadProjectionNames ( )

◆ SetCanvas()

void SetCanvas ( const std::string &  canvas,
HuginBase::Panorama pano,
HuginBase::PanoramaOptions options 
)

◆ SetCrop()

void SetCrop ( const std::string &  cropString,
HuginBase::Panorama pano,
HuginBase::PanoramaOptions options 
)

◆ SetExposure()

void SetExposure ( const std::string &  exposure,
HuginBase::Panorama pano,
HuginBase::PanoramaOptions options 
)

◆ SetFOV()

void SetFOV ( const std::string &  fov,
HuginBase::Panorama pano,
HuginBase::PanoramaOptions options 
)

◆ SetHDRCompression()

void SetHDRCompression ( const std::string  hdrCompression,
HuginBase::PanoramaOptions options 
)

◆ SetLDRCompression()

void SetLDRCompression ( const std::string  ldrCompression,
HuginBase::PanoramaOptions options 
)

◆ SetOutputType()

void SetOutputType ( const std::string &  outputType,
HuginBase::PanoramaOptions options 
)

◆ SetProjection()

void SetProjection ( const std::string &  projectionString,
HuginBase::PanoramaOptions options 
)

Variable Documentation

◆ lensTypeNames

std::map<HuginBase::BaseSrcPanoImage::Projection, std::string> lensTypeNames
static

Definition at line 49 of file PanoOptionsFromIni.cpp.

Referenced by CheckCondition(), and ReadProjectionNames().

◆ projectionNames

std::vector<std::string> projectionNames
static

Definition at line 48 of file PanoOptionsFromIni.cpp.

Referenced by CheckCondition(), ReadProjectionNames(), and SetProjection().