pto_var.cpp File Reference

program to manipulate variables for scripting More...

#include <hugin_version.h>
#include <fstream>
#include <sstream>
#include <getopt.h>
#include <unistd.h>
#include <panodata/Panorama.h>
#include <panodata/ImageVariableTranslate.h>
#include <panodata/ImageVariableGroup.h>
#include <panodata/StandardImageVariableGroups.h>
#include <boost/algorithm/string.hpp>
#include <boost/regex.hpp>
#include <boost/lexical_cast.hpp>
#include "ParseExp.h"
#include "panodata/image_variables.h"

Include dependency graph for pto_var.cpp:

Include dependency graph

Go to the source code of this file.

Classes

struct  ParseVar

Defines

#define image_variable(name, type, default_value)
#define image_variable(name, type, default_value)
#define image_variable(name, type, default_value)
#define image_variable(name, type, default_value)
#define image_variable(name, type, default_value)

Typedefs

typedef std::vector< ParseVarParseVarVec

Functions

void ParseSingleOptVar (ParseVarVec &varVec, std::string s)
void ParseSingleLinkVar (ParseVarVec &varVec, std::string s)
void ParseSingleVar (ParseVarVec &varVec, std::string s)
void ParseVariableString (ParseVarVec &parseVec, std::string input, void(*func)(ParseVarVec &, std::string))
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)
void UnLinkVars (Panorama &pano, ParseVarVec parseVec, bool link)
bool UpdateSingleVar (Panorama &pano, ParseVar parseVar, size_t imgNr)
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(setVars[i].varname))\
                    {\
                        if(img1.name##isLinked())\
                        {\
                            for(size_t k=j+1; k<pano.getNrOfImages(); k++)\
                            {\
                                if(img1.name##isLinkedWith(pano.getImage(k)))\
                                {\
                                    updatedImgs.insert(k);\
                                }\
                            };\
                        };\
                    };

#define image_variable name,
type,
default_value   ) 
 

Value:

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

#define image_variable name,
type,
default_value   ) 
 

Value:

if (HuginBase::PTOVariableConverterFor##name::checkApplicability(temp))\
            {\
                validVarname=true;\
            };

#define image_variable name,
type,
default_value   ) 
 

Value:

if (HuginBase::PTOVariableConverterFor##name::checkApplicability(temp))\
            {\
                validVarname=true;\
            };

#define image_variable name,
type,
default_value   ) 
 

Value:

if (HuginBase::PTOVariableConverterFor##name::checkApplicability(temp))\
            {\
                validVarname=true;\
            };


Typedef Documentation

typedef std::vector<ParseVar> ParseVarVec
 

Definition at line 57 of file pto_var.cpp.

Referenced by main().


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 207 of file pto_var.cpp.

References set_contains().

Referenced by main().

int main int  argc,
char *  argv[]
 

Definition at line 427 of file pto_var.cpp.

References AddToOptVec(), cerr, HuginBase::Panorama::checkRefOptStatus(), cout, fill_set(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptimizeVector(), HuginBase::Panorama::getOptions(), hugin_utils::getPathPrefix(), HuginBase::Panorama::getRefImages(), makefile::ifstream, makefile::ofstream, ParseSingleLinkVar(), ParseSingleOptVar(), ParseSingleVar(), ParseVariableString(), ParseVarVec, HuginBase::Panorama::printPanoramaScript(), HuginBase::Panorama::readData(), RemoveFromOptVec(), set_contains(), HuginBase::Panorama::setFilePrefix(), HuginBase::Panorama::setOptimizerSwitch(), HuginBase::Panorama::setOptimizeVector(), HuginBase::Panorama::setPhotometricOptimizerSwitch(), makefile::string, HuginBase::UIntSet, UnLinkVars(), UpdateSingleVar(), and usage().

void ParseSingleLinkVar ParseVarVec varVec,
std::string  s
 

Definition at line 104 of file pto_var.cpp.

References ParseVar::imgNr, makefile::string, and ParseVar::varname.

Referenced by main().

void ParseSingleOptVar ParseVarVec varVec,
std::string  s
 

Definition at line 60 of file pto_var.cpp.

References ParseVar::imgNr, ParseVar::removeOpt, makefile::string, and ParseVar::varname.

Referenced by main().

void ParseSingleVar ParseVarVec varVec,
std::string  s
 

Definition at line 144 of file pto_var.cpp.

References ParseVar::expression, ParseVar::imgNr, makefile::string, and ParseVar::varname.

Referenced by main().

void ParseVariableString ParseVarVec parseVec,
std::string  input,
void(*)(ParseVarVec &, std::string func
 

Definition at line 193 of file pto_var.cpp.

Referenced by main().

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

Definition at line 265 of file pto_var.cpp.

References set_contains().

Referenced by main().

void UnLinkVars Panorama pano,
ParseVarVec  parseVec,
bool  link
 

Definition at line 282 of file pto_var.cpp.

References cerr, HuginBase::Panorama::getNrOfImages(), HuginBase::ImageVariableGroup::linkVariableImage(), set_contains(), HuginBase::ImageVariableGroup::unlinkVariableImage(), and HuginBase::ConstImageVariableGroup::updatePartNumbers().

Referenced by main().

bool UpdateSingleVar Panorama pano,
ParseVar  parseVar,
size_t  imgNr
 

Definition at line 358 of file pto_var.cpp.

References cerr, cout, ParseVar::expression, HuginBase::Panorama::getImage(), HuginBase::SrcPanoImage::getVar(), Parser::ParseExpression(), HuginBase::Panorama::updateVariable(), and ParseVar::varname.

Referenced by main().

void usage const char *  name  )  [static]
 

Definition at line 380 of file pto_var.cpp.

References cout.


Generated on Thu Apr 24 01:25:45 2014 for Hugintrunk by  doxygen 1.3.9.1