Hugin trunk 0.1
Loading...
Searching...
No Matches
ParseExp.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
2
11/* This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
15 *
16 * This software is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public
22 * License along with this software. If not, see
23 * <http://www.gnu.org/licenses/>.
24 *
25 */
26
27#ifndef PARSEEXP_H
28#define PARSEEXP_H
29#include <string>
30#include <vector>
31#include <iostream>
32#include <hugin_shared.h>
33#include "hugin_config.h"
34#include "panodata/Panorama.h"
35
36namespace Parser
37{
40{
41 std::string varname;
42 // contains image number or -1 if it applies to all images
43 int imgNr;
44 std::string expression;
45 bool flag;
46 ParseVar();
47};
48typedef std::vector<ParseVar> ParseVarVec;
49
52IMPEX bool ParseVarNumber(const std::string&s, Parser::ParseVar& var);
54IMPEX void ParseVariableString(ParseVarVec& parseVec, const std::string& input, std::ostream& errorStream, void(*func)(ParseVarVec&, const std::string&, std::ostream&));
55
57IMPEX void PanoParseExpression(HuginBase::Panorama& pano, const std::string& expression, std::ostream& statusStream = std::cout, std::ostream& errorStream = std::cerr);
58};
59
60#endif
Model for a panorama.
Definition Panorama.h:153
#define IMPEX
std::vector< ParseVar > ParseVarVec
Definition ParseExp.h:48
void PanoParseExpression(HuginBase::Panorama &pano, const std::string &expression, std::ostream &statusStream, std::ostream &errorStream)
parses the given expression and apply the changes to the Panorama
Definition ParseExp.cpp:768
void ParseVariableString(ParseVarVec &parseVec, const std::string &input, std::ostream &errorStream, void(*func)(ParseVarVec &, const std::string &, std::ostream &))
parse complete variables string
Definition ParseExp.cpp:699
bool ParseVarNumber(const std::string &s, Parser::ParseVar &var)
parse string s and store result in ParseVar var
Definition ParseExp.cpp:626
struct to save parsed variables and optional image numbers
Definition ParseExp.h:40
std::string varname
Definition ParseExp.h:41
std::string expression
Definition ParseExp.h:44
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41