39 wxXmlResource::Get()->LoadDialog(
this,
parent,
"image_variables_change_dialog");
50 if (!filename.FileExists())
61 if (
m_presets->GetFirstGroup(name, index))
64 while (
m_presets->GetNextGroup(name, index))
107 config->Write(
"/ChangeImageVariablesDialog/LastExpression",
m_textInput->GetValue());
140 s.Replace(
"/",
"_",
true);
141 s =
s.Trim(
true).Trim(
false);
190 std::ostringstream status, error;
193 if (wxXmlResource::Get()->
LoadDialog(&
dlg,
this,
"log_dialog"))
196 if (error.str().empty())
200 dlg.SetTitle(
_(
"Result of expression parsing"));
206 dlg.SetTitle(
_(
"Errors during expression parsing"));
Definition of dialog to edit image variables by parsing an expression.
function to parse expressions from strings
Panorama duplicate() const
duplicate the panorama
std::string GetExpression()
void OnSave(wxCommandEvent &e)
saves the current expression as preset
void SetExpression(const wxString &s)
ImageVariablesExpressionDialog(wxWindow *parent, HuginBase::Panorama *pano)
Constructor, read from xrc ressource; restore last uses settings and position.
wxTextAttr m_textAttrDefault
void OnTest(wxCommandEvent &e)
tests the current expression
void OnOk(wxCommandEvent &e)
Saves current expression when closing dialog with Ok.
HuginBase::Panorama * m_pano
void OnTextChange(wxCommandEvent &e)
text change event, used to format text
void OnLoad(wxCommandEvent &e)
loads the selected preset into control
void OnDelete(wxCommandEvent &e)
deletes the seletected preset
wxTextAttr m_textAttrInactive
~ImageVariablesExpressionDialog()
destructor, saves position
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
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
std::string GetDataDir()
returns the full path to the data directory
std::string GetUserAppDataDir()
returns the directory for user specific Hugin settings, e.g.
void StoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
void RestoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
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.