pto_var.cpp File Reference

program to manipulate variables for scripting More...

#include <fstream>
#include <sstream>
#include <getopt.h>
#include <panodata/Panorama.h>
#include <panodata/ImageVariableTranslate.h>
#include <panodata/ImageVariableGroup.h>
#include <panodata/StandardImageVariableGroups.h>
#include "hugin_utils/utils.h"
#include "panodata/ParseExp.h"
#include "panodata/image_variables.h"

Include dependency graph for pto_var.cpp:

Go to the source code of this file.

Defines

#define image_variable(name, type, default_value)

Functions

void ParseSingleOptVar (Parser::ParseVarVec &varVec, const std::string &s, std::ostream &errorStream)
void ParseSingleLinkVar (Parser::ParseVarVec &varVec, const std::string &s, std::ostream &errorStream)
void AddToOptVec (HuginBase::OptimizeVector &optVec, std::string varname, size_t imgNr, std::set< size_t > refImgs, bool linkRefImgsYaw, bool linkRefImgsPitch, bool linkRefImgsRoll, std::vector< std::set< std::string > > groupedVars)
void RemoveFromOptVec (HuginBase::OptimizeVector &optVec, std::string varname, size_t imgNr, std::vector< std::set< std::string > > groupedVars)
bool ParseCoordinateRelativ (const std::string &s, double &val, bool &relativ)
void SetCropToImages (const std::string &s, HuginBase::Panorama &pano, HuginBase::UIntSet &imgs)
void SetCrop (HuginBase::Panorama &pano, const std::string &crop)
static void usage (const char *name)
int main (int argc, char *argv[])


Detailed Description

program to manipulate variables for scripting

Author:
T. Modes

Definition in file pto_var.cpp.


Define Documentation

#define image_variable ( name,
type,
default_value   ) 

Value:

if (HuginBase::PTOVariableConverterFor##name::checkApplicability(parseVec[i].varname))\
    {\
        variables.insert(HuginBase::ImageVariableGroup::IVE_##name);\
    };


Function Documentation

void AddToOptVec ( HuginBase::OptimizeVector optVec,
std::string  varname,
size_t  imgNr,
std::set< size_t >  refImgs,
bool  linkRefImgsYaw,
bool  linkRefImgsPitch,
bool  linkRefImgsRoll,
std::vector< std::set< std::string > >  groupedVars 
)

Definition at line 83 of file pto_var.cpp.

References set_contains().

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 457 of file pto_var.cpp.

References AddToOptVec(), HuginBase::append(), cerr, HuginBase::Panorama::checkRefOptStatus(), cout, fill_set(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptimizeVector(), HuginBase::Panorama::getOptions(), hugin_utils::getPathPrefix(), HuginBase::Panorama::getRefImages(), Parser::PanoParseExpression(), ParseSingleLinkVar(), ParseSingleOptVar(), Parser::ParseVariableString(), HuginBase::Panorama::printPanoramaScript(), HuginBase::Panorama::readData(), RemoveFromOptVec(), SetCrop(), HuginBase::Panorama::setFilePrefix(), HuginBase::Panorama::setOptimizerSwitch(), HuginBase::Panorama::setOptimizeVector(), HuginBase::Panorama::setPhotometricOptimizerSwitch(), hugin_utils::stripPath(), AppBase::DocumentData::SUCCESSFUL, and usage().

bool ParseCoordinateRelativ ( const std::string s,
double &  val,
bool &  relativ 
)

Definition at line 242 of file pto_var.cpp.

References hugin_utils::stringToDouble(), and hugin_utils::stringToInt().

Referenced by SetCropToImages().

void ParseSingleLinkVar ( Parser::ParseVarVec varVec,
const std::string s,
std::ostream errorStream 
)

Definition at line 58 of file pto_var.cpp.

References Parser::ParseVar::imgNr, and Parser::ParseVarNumber().

Referenced by main().

void ParseSingleOptVar ( Parser::ParseVarVec varVec,
const std::string s,
std::ostream errorStream 
)

Definition at line 38 of file pto_var.cpp.

References Parser::ParseVar::flag, and Parser::ParseVarNumber().

Referenced by main().

void RemoveFromOptVec ( HuginBase::OptimizeVector optVec,
std::string  varname,
size_t  imgNr,
std::vector< std::set< std::string > >  groupedVars 
)

Definition at line 141 of file pto_var.cpp.

References set_contains().

Referenced by main().

void SetCrop ( HuginBase::Panorama pano,
const std::string crop 
)

Definition at line 351 of file pto_var.cpp.

References cerr, fill_set(), HuginBase::Panorama::getNrOfImages(), SetCropToImages(), hugin_utils::SplitString(), hugin_utils::stringToUInt(), and hugin_utils::StrTrim().

Referenced by main().

void SetCropToImages ( const std::string s,
HuginBase::Panorama pano,
HuginBase::UIntSet imgs 
)

Definition at line 274 of file pto_var.cpp.

References cerr, HuginBase::Panorama::changeFinished(), cout, HuginBase::SrcPanoImage::getHeight(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getSrcImage(), HuginBase::SrcPanoImage::getWidth(), ParseCoordinateRelativ(), HuginBase::BaseSrcPanoImage::setAutoCenterCrop(), HuginBase::BaseSrcPanoImage::setCropRect(), HuginBase::Panorama::setSrcImage(), hugin_utils::SplitString(), and hugin_utils::stringToInt().

Referenced by SetCrop().

static void usage ( const char *  name  )  [static]

Definition at line 401 of file pto_var.cpp.

References cout, and hugin_utils::GetHuginVersion().


Generated on 17 Dec 2017 for Hugintrunk by  doxygen 1.4.7