pto_var.cpp File Reference

program to manipulate variables for scripting More...

#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 "hugin_utils/utils.h"
#include "ParseExp.h"
#include "panodata/image_variables.h"

Include dependency graph for pto_var.cpp:

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)

Typedefs

typedef std::vector< ParseVarParseVarVec

Functions

void ParseSingleOptVar (ParseVarVec &varVec, const std::string &s)
void ParseSingleLinkVar (ParseVarVec &varVec, const std::string &s)
void ParseSingleVar (ParseVarVec &varVec, const std::string &s)
void ParseVariableString (ParseVarVec &parseVec, const std::string &input, void(*func)(ParseVarVec &, const 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)
bool UpdateSingleVar (Panorama &pano, ParseVar parseVar, size_t imgNr)
static void usage (const char *name)


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(varName))\
    {\
        var.varname=varName;\
        return true;\
    };


Typedef Documentation

typedef std::vector<ParseVar> ParseVarVec

Definition at line 53 of file pto_var.cpp.


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

References set_contains().

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

Definition at line 104 of file pto_var.cpp.

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

Definition at line 88 of file pto_var.cpp.

References ParseVar::removeOpt.

void ParseSingleVar ( ParseVarVec varVec,
const std::string s 
)

Definition at line 114 of file pto_var.cpp.

References ParseVar::expression.

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

Definition at line 131 of file pto_var.cpp.

References hugin_utils::SplitString().

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

Definition at line 202 of file pto_var.cpp.

References set_contains().

bool UpdateSingleVar ( Panorama pano,
ParseVar  parseVar,
size_t  imgNr 
)

Definition at line 295 of file pto_var.cpp.

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

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

Definition at line 317 of file pto_var.cpp.

References cout, and hugin_utils::GetHuginVersion().


Generated on 1 Aug 2015 for Hugintrunk by  doxygen 1.4.7