[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin_base/algorithms/panorama_makefile/PanoramaMakefileExport.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00025 #ifndef _BASICALGORITHM_PANORAMAMAKEFILEEXPORT_H
00026 #define _BASICALGORITHM_PANORAMAMAKEFILEEXPORT_H
00027 
00028 #include <hugin_shared.h>
00029 #include <algorithm/PanoramaAlgorithm.h>
00030 #include <panodata/PanoramaData.h>
00031 
00032 #include <iostream>
00033 
00034 
00035 namespace HuginBase {
00036 
00038 IMPEX std::vector<UIntSet> getHDRStacks(const PanoramaData & pano, UIntSet allImgs);
00039 IMPEX std::vector<UIntSet> getExposureLayers(const PanoramaData & pano, UIntSet allImgs);
00040 IMPEX UIntSet getImagesinROI (const PanoramaData& pano, const UIntSet activeImages);
00041 
00042 class IMPEX PanoramaMakefileExport : public PanoramaAlgorithm
00043 {
00044     public:
00046         typedef std::string String;
00047     
00049         struct PTPrograms
00050         {
00051             std::string nona;
00052             std::string hdrmerge;
00053             std::string PTStitcher;
00054             std::string PTmender;
00055             std::string PTblender;
00056             std::string PTmasker;
00057             std::string PTroller;
00058             std::string enblend;
00059             std::string enblend_opts;
00060             std::string enfuse;
00061             std::string enfuse_opts;
00062             std::string smartblend;
00063             std::string smartblend_opts;
00064             std::string exiftool;
00065             std::string exiftool_opts;
00066 
00067             PTPrograms()
00068             {
00069                     // default programs
00070                     nona = "nona";
00071                     PTStitcher = "PTStitcher";
00072                     PTmender = "PTmender";
00073                     PTblender = "PTblender";
00074                     PTmasker = "PTmasker";
00075                     PTroller = "PTroller";
00076                     enblend = "enblend";
00077                     enfuse = "enfuse";
00078                     smartblend = "smartblend.exe";
00079                     hdrmerge = "hugin_hdrmerge";
00080                     exiftool = "exiftool";
00081             }
00082         };
00083         
00085         PanoramaMakefileExport(PanoramaData& pano,
00086                                std::ostream& output,
00087                                const UIntSet& images,
00088                                const String& ptofile,
00089                                const String& outputPrefix,
00090                                const PTPrograms& progs,
00091                                const String& includePath)
00092          : PanoramaAlgorithm(pano), o_output(output),
00093            o_images(images), o_ptofile(ptofile), o_outputPrefix(outputPrefix), o_progs(progs), o_includePath(includePath)
00094         {};
00095         
00097         virtual ~PanoramaMakefileExport() {};
00098         
00099         
00100     public:
00103         //                determine if an older file would be overwritten.
00104         static void createMakefile(const PanoramaData & pano,
00105                                    const UIntSet & images,
00106                                    const std::string & ptofile,
00107                                    const std::string & outputPrefix,
00108                                    const PTPrograms & progs,
00109                                    const std::string & includePath,
00110                                    std::vector<std::string> & outputFiles,
00111                                    std::ostream & o,
00112                                    const std::string& tmpDir);
00113 
00114 
00115     public:
00117         virtual bool modifiesPanoramaData() const
00118             { return false; }
00119 
00121         bool runAlgorithm()
00122         {
00123             createMakefile(o_panorama,
00124                            o_images, o_ptofile, o_outputPrefix, o_progs, o_includePath,
00125                            o_outputFiles, o_output, o_tmpDir);
00126 
00127             return true; // let's hope so.
00128         }
00129 
00130 
00131     protected:
00132             std::ostream& o_output;
00133 
00134             UIntSet o_images;
00135             String o_ptofile;
00136             String o_outputPrefix;
00137             PTPrograms o_progs;
00138             std::vector<std::string> o_outputFiles;
00139             String o_includePath;
00140             String o_tmpDir;
00141 };
00142         
00143 
00144 }//namespace
00145 #endif

Generated on Mon Sep 20 01:01:27 2010 for Hugintrunk by doxygen 1.3.9.1