27#include <hugin_config.h>
31#include <wx/wfstream.h>
32#if defined __WXMSW__ || defined UNIX_SELF_CONTAINED_BUNDLE
33#include <wx/stdpaths.h>
52#include <wx/cmdline.h>
104 this->SetBackgroundColour(m_stitchPanel->GetBackgroundColour());
116#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
128#elif defined UNIX_SELF_CONTAINED_BUNDLE
149 m_deleteOnExit=
false;
193 if (
event.GetExitCode() != 0)
195 if (
hugin_utils::HuginMessageBox(
_(
"Error during stitching\nPlease report the complete text to the bug tracker on https://bugs.launchpad.net/hugin.\n\nDo you want to save the log file?"),
200 _(
"Specify log file"),
202 _(
"Log files (*.log)|*.log|All files (*)|*"),
207 wxConfig::Get()->Write(
"/actualPath",
dlg.GetDirectory());
223 if (
event.GetInt() >= 0)
301#if defined __WXMSW__ && wxCHECK_VERSION(3,3,0)
326#elif defined UNIX_SELF_CONTAINED_BUNDLE
361 switch (
parser.Parse() ) {
368 wxLogError(
_(
"Syntax error in parameters detected, aborting."));
405 _(
"Specify project source project file"),
407 _(
"Project files (*.pto)|*.pto|All files (*)|*"),
412 wxConfig::Get()->Write(
"/actualPath",
dlg.GetDirectory());
419 std::cout <<
"********************* script file: " << (
const char *)
scriptFile.mb_str(
wxConvLocal) << std::endl;
445 while (!prefix.IsDirWritable())
447 hugin_utils::HuginMessageBox(wxString::Format(
_(
"You have no permissions to write in folder \"%s\".\nPlease select another folder for the final output."), prefix.GetPath().c_str()),
453 prefix =
dlg.GetPath();
456 wxConfig::Get()->Write(
"/actualPath",
dlg.GetDirectory());
468 if (
ext.CmpNoCase(
"jpg") == 0 ||
ext.CmpNoCase(
"jpeg") == 0||
469 ext.CmpNoCase(
"tif") == 0||
ext.CmpNoCase(
"tiff") == 0 ||
470 ext.CmpNoCase(
"png") == 0 ||
ext.CmpNoCase(
"exr") == 0 ||
471 ext.CmpNoCase(
"pnm") == 0 ||
ext.CmpNoCase(
"hdr"))
482 frame->SetTitle(wxString::Format(
_(
"%s - Stitching"), basename.GetName().c_str()));
void OnQuit(wxCommandEvent &event)
void SetOverwrite(bool doOverwrite)
sets, if existing output file should be automatic overwritten
void OnCancel(wxCommandEvent &event)
RunStitchFrame(wxWindow *parent, const wxString &title, const wxPoint &pos, const wxSize &size)
void OnProcessTerminate(wxProcessEvent &event)
RunStitchPanel * m_stitchPanel
void OnAbout(wxCommandEvent &event)
void OnProgress(wxCommandEvent &event)
bool StitchProject(wxString scriptFile, wxString outname, wxString userDefinedOutput=wxEmptyString)
Starts stitching of project file.
void SetOverwrite(bool over=true)
bool SaveLog(const wxString &filename)
save the content of the window into a given log file
bool StitchProject(const wxString &scriptFile, const wxString &outname, const wxString &userDefinedOutput=wxEmptyString)
The application class for hugin_stitch_project.
virtual bool OnInit()
pseudo constructor.
virtual int OnExit()
just for testing purposes
virtual ~stitchApp()
dtor.
functions for interaction with the hugin configuration file
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
std::string GetHuginVersion()
return a string with version numbers
include file for the hugin project
include file for the hugin project
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.