[5b6b69]: src / hugin_base / algorithms / panorama_makefile / PanoramaMakefileExport.h Maximize Restore History

Download this file

PanoramaMakefileExport.h    140 lines (116 with data), 4.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// -*- c-basic-offset: 4 -*-
/** @file utils.h
*
* @author Pablo d'Angelo <pablo.dangelo@web.de>
*
* $Id: utils.h 1814 2006-12-31 14:37:05Z dangelo $
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _BASICALGORITHM_PANORAMAMAKEFILEEXPORT_H
#define _BASICALGORITHM_PANORAMAMAKEFILEEXPORT_H
#include <algorithm/PanoramaAlgorithm.h>
#include <panodata/PanoramaData.h>
#include <iostream>
namespace HuginBase {
///
std::vector<UIntSet> getHDRStacks(const PanoramaData & pano, UIntSet allImgs);
std::vector<UIntSet> getExposureLayers(const PanoramaData & pano, UIntSet allImgs);
UIntSet getImagesinROI (const PanoramaData& pano, const UIntSet activeImages);
class PanoramaMakefileExport : public PanoramaAlgorithm
{
public:
///
typedef std::string String;
///
struct PTPrograms
{
std::string nona;
std::string hdrmerge;
std::string PTStitcher;
std::string PTmender;
std::string PTblender;
std::string PTmasker;
std::string PTroller;
std::string enblend;
std::string enblend_opts;
std::string enfuse;
std::string enfuse_opts;
std::string smartblend;
std::string smartblend_opts;
std::string exiftool;
std::string exiftool_opts;
PTPrograms()
{
// default programs
nona = "nona";
PTStitcher = "PTStitcher";
PTmender = "PTmender";
PTblender = "PTblender";
PTmasker = "PTmasker";
PTroller = "PTroller";
enblend = "enblend";
enfuse = "enfuse";
smartblend = "smartblend.exe";
hdrmerge = "hugin_hdrmerge";
}
};
///
PanoramaMakefileExport(PanoramaData& pano,
std::ostream& output,
const UIntSet& images,
const String& ptofile,
const String& outputPrefix,
const PTPrograms& progs,
const String& includePath)
: PanoramaAlgorithm(pano), o_output(output),
o_images(images), o_ptofile(ptofile), o_outputPrefix(outputPrefix), o_progs(progs), o_includePath(includePath)
{};
///
virtual ~PanoramaMakefileExport() {};
public:
///
static void createMakefile(const PanoramaData & pano,
const UIntSet & images,
const std::string & ptofile,
const std::string & outputPrefix,
const PTPrograms & progs,
const std::string & includePath,
std::vector<std::string> & outputFiles,
std::ostream & o);
public:
///
virtual bool modifiesPanoramaData() const
{ return false; }
///
bool runAlgorithm()
{
createMakefile(o_panorama,
o_images, o_ptofile, o_outputPrefix, o_progs, o_includePath,
o_outputFiles, o_output);
return true; // let's hope so.
}
protected:
std::ostream& o_output;
UIntSet o_images;
String o_ptofile;
String o_outputPrefix;
PTPrograms o_progs;
std::vector<std::string> o_outputFiles;
String o_includePath;
};
}//namespace
#endif