44     wxXmlResource::Get()->LoadDialog(
this, parent, 
"image_variables_dialog");
 
   64     wxConfigBase::Get()->Flush();
 
   69     XRCCTRL(*
this, 
"image_variable_notebook", wxNotebook)->SetSelection(i);
 
   76                     wxXmlResource::GetXRCID(
 
   77                         wxString(
"image_variable_").append(wxString(varname, wxConvLocal)).c_str()
 
   92     for (HuginBase::UIntSet::const_iterator it = 
m_images.begin(); it != 
m_images.end() && identical; ++it)
 
   98         XRCCTRL(*
this, 
"image_variable_responseType", wxChoice)->SetSelection(responseType);
 
  101     int degDigits = wxConfigBase::Get()->Read(
"/General/DegreeFractionalDigitsEdit",3);
 
  102     int pixelDigits = wxConfigBase::Get()->Read(
"/General/PixelFractionalDigitsEdit",2);
 
  103     int distDigitsEdit = wxConfigBase::Get()->Read(
"/General/DistortionFractionalDigitsEdit",5);
 
  107     for (
const char** varname = 
m_varNames; *varname != 0; ++varname)
 
  110         int ndigits = distDigitsEdit;
 
  111         if (strcmp(*varname, 
"y") == 0 || strcmp(*varname, 
"p") == 0 ||
 
  112             strcmp(*varname, 
"r") == 0 || strcmp(*varname, 
"TrX") == 0 ||
 
  113             strcmp(*varname, 
"TrY") == 0 || strcmp(*varname, 
"TrZ") == 0 )
 
  117         if (strcmp(*varname, 
"v") == 0 || strcmp(*varname, 
"d") == 0 ||
 
  118             strcmp(*varname, 
"e") == 0 )
 
  120             ndigits = pixelDigits;
 
  124         for(HuginBase::UIntSet::const_iterator it=
m_images.begin();it!=
m_images.end() && identical;++it)
 
  126             identical=(val==
const_map_get(imgVarVector[*it],*varname).getValue());
 
  133     wxCommandEvent dummy;
 
  140     XRCCTRL(*
this, 
"image_variable_text_translation", wxStaticText)->Show(newLevel==
GUI_EXPERT);
 
  141     XRCCTRL(*
this, 
"image_variable_text_translation_x", wxStaticText)->Show(newLevel==
GUI_EXPERT);
 
  142     XRCCTRL(*
this, 
"image_variable_text_translation_y", wxStaticText)->Show(newLevel==
GUI_EXPERT);
 
  143     XRCCTRL(*
this, 
"image_variable_text_translation_z", wxStaticText)->Show(newLevel==
GUI_EXPERT);
 
  144     XRCCTRL(*
this, 
"image_variable_text_translation_Tpy", wxStaticText)->Show(newLevel==
GUI_EXPERT);
 
  145     XRCCTRL(*
this, 
"image_variable_text_translation_Tpp", wxStaticText)->Show(newLevel==
GUI_EXPERT);
 
  146     XRCCTRL(*
this, 
"image_variable_TrX", wxTextCtrl)->Show(newLevel==
GUI_EXPERT);
 
  147     XRCCTRL(*
this, 
"image_variable_TrY", wxTextCtrl)->Show(newLevel==
GUI_EXPERT);
 
  148     XRCCTRL(*
this, 
"image_variable_TrZ", wxTextCtrl)->Show(newLevel==
GUI_EXPERT);
 
  149     XRCCTRL(*
this, 
"image_variable_Tpy", wxTextCtrl)->Show(newLevel==
GUI_EXPERT);
 
  150     XRCCTRL(*
this, 
"image_variable_Tpp", wxTextCtrl)->Show(newLevel==
GUI_EXPERT);
 
  152     XRCCTRL(*
this, 
"image_variable_text_shear", wxStaticText)->Show(newLevel==
GUI_EXPERT);
 
  153     XRCCTRL(*
this, 
"image_variable_text_shear_g", wxStaticText)->Show(newLevel==
GUI_EXPERT);
 
  154     XRCCTRL(*
this, 
"image_variable_text_shear_t", wxStaticText)->Show(newLevel==
GUI_EXPERT);
 
  155     XRCCTRL(*
this, 
"image_variable_g", wxTextCtrl)->Show(newLevel==
GUI_EXPERT);
 
  156     XRCCTRL(*
this, 
"image_variable_t", wxTextCtrl)->Show(newLevel==
GUI_EXPERT);
 
  161     std::vector<PanoCommand::PanoCommand*> commands;
 
  163     for (
const char** varname = 
m_varNames; *varname != 0; ++varname)
 
  171                 if(strcmp(*varname, 
"v")==0)
 
  190                                     wxString::Format(_(
"You have given a field of view of %.2f degrees.\n But the orthographic projection is limited to a field of view of 180 degress.\nDo you want still use that high value?"), val),
 
  191                                     _(
"Hugin"), wxICON_EXCLAMATION | wxYES_NO, 
this) == wxNO)
 
  201                 varMap.insert(std::make_pair(std::string(*varname), 
HuginBase::Variable(std::string(*varname), val)));
 
  205                 wxLogError(_(
"Value must be numeric."));
 
  210     int sel=XRCCTRL(*
this, 
"image_variable_responseType", wxChoice)->GetSelection();
 
  213         std::vector<HuginBase::SrcPanoImage> SrcImgs;
 
  214         for (HuginBase::UIntSet::const_iterator it=
m_images.begin(); it!=
m_images.end(); ++it)
 
  218             SrcImgs.push_back(img);
 
  224         for(HuginBase::UIntSet::const_iterator it=
m_images.begin();it!=
m_images.end();++it)
 
  231     if(!commands.empty())
 
  253     switch(XRCCTRL(*
this, 
"image_variable_notebook", wxNotebook)->GetSelection())
 
  273     const bool showResponseParam = XRCCTRL(*
this, 
"image_variable_responseType", wxChoice)->GetSelection() == 0;
 
  274     wxTextCtrl* control = XRCCTRL(*
this, 
"image_variable_Ra", wxTextCtrl);
 
  275     control->Enable(showResponseParam);
 
  276     control->Show(showResponseParam);
 
  277     control = XRCCTRL(*
this, 
"image_variable_Rb", wxTextCtrl);
 
  278     control->Enable(showResponseParam);
 
  279     control->Show(showResponseParam);
 
  280     control = XRCCTRL(*
this, 
"image_variable_Rc", wxTextCtrl);
 
  281     control->Enable(showResponseParam);
 
  282     control->Show(showResponseParam);
 
  283     control = XRCCTRL(*
this, 
"image_variable_Rd", wxTextCtrl);
 
  284     control->Enable(showResponseParam);
 
  285     control->Show(showResponseParam);
 
  286     control = XRCCTRL(*
this, 
"image_variable_Re", wxTextCtrl);
 
  287     control->Enable(showResponseParam);
 
  288     control->Show(showResponseParam);
 
  292                                   "v", 
"a", 
"b", 
"c", 
"d", 
"e", 
"g", 
"t",
 
  294                                   "Vb", 
"Vc", 
"Vd", 
"Vx", 
"Vy",
 
  295                                   "Ra", 
"Rb", 
"Rc", 
"Rd", 
"Re", 0};
 
  302     if(stringa.empty() || stringb.empty() || stringc.empty())
 
  307     std::vector<double> radialDist(4 ,0);
 
  313     radialDist[3] = 1 - radialDist[0] - radialDist[1] - radialDist[2];
 
  320     srcImage.setRadialDistortion(radialDist);
 
  325     wxWindow *button = (wxWindow*) e.GetEventObject();
 
  326     wxPoint pos=button->ClientToScreen(wxPoint(0,0));
 
  327     m_popup->Position(pos, button->GetSize());
 
  336     if(stringVb.empty() || stringVc.empty() || stringVd.empty())
 
  341     std::vector<double> vigCorr(4,0);
 
  356     srcImage.setRadialVigCorrCoeff(vigCorr);
 
  363     std::vector<hugin_utils::FDiff2D> points;
 
  369     graph.
DrawLine(points, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), 2);
 
  373     wxWindow *button = (wxWindow*) e.GetEventObject();
 
  374     wxPoint pos=button->ClientToScreen(wxPoint(0,0));
 
  375     m_popup->Position(pos, button->GetSize());
 
  387     if(stringRa.empty() || stringRb.empty() || stringRc.empty() || stringRd.empty() || stringRe.empty())
 
  392     double Ra, Rb, Rc, Rd, Re;
 
  409                 std::vector<float> emor(5, 0.0);
 
  410                 std::vector<double> outLutStd;
 
  414                 std::vector<hugin_utils::FDiff2D> points;
 
  415                 for(
size_t i=0; i<outLutStd.size(); i++)
 
  419                 graph.
DrawLine(points, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), 1);
 
  428                 std::vector<double> outLut;
 
  432                 for(
size_t i=0; i<outLut.size(); i++)
 
  436                 graph.
DrawLine(points, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), 2);
 
  442                 std::vector<hugin_utils::FDiff2D> points;
 
  445                 graph.
DrawLine(points, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), 2);
 
  451     wxWindow *button = (wxWindow*) e.GetEventObject();
 
  452     wxPoint pos=button->ClientToScreen(wxPoint(0,0));
 
  453     m_popup->Position(pos, button->GetSize());
 
void DisplayHelp(wxString section=wxEmptyString)
call help browser with given file 
void OnShowDistortionGraph(wxCommandEvent &e)
shows a popup with distortion graph 
bool str2double(const wxString &s, double &d)
SrcPanoImage getSrcImage(unsigned imgNr) const 
get a description of a source image 
void SetGuiLevel(GuiLevel newLevel)
sets the GuiLevel 
void OnShowVignettingGraph(wxCommandEvent &e)
shows a popup with vignetting graph 
void enforceMonotonicity(LUT &lut)
enforce monotonicity of an array (mostly used for lookup tables) 
wxString doubleTowxString(double d, int digits)
void SelectTab(size_t i)
selects the tab with index i 
a variable has a value and a name. 
include file for the hugin project 
update variables of a single image 
vigra::pair< typename ROIImage< Image, Mask >::image_const_traverser, typename ROIImage< Image, Mask >::ImageConstAccessor > srcImage(const ROIImage< Image, Mask > &img)
const Map::mapped_type & const_map_get(const Map &m, const typename Map::key_type &key)
void OnResponseSelected(wxCommandEvent &e)
response type changed 
PanoCommand to combine other PanoCommands. 
std::set< unsigned int > UIntSet
std::vector< VariableMap > VariableMapVector
empirical model of response 
wxGraphTools::GraphPopupWindow * m_popup
VariableMapVector getVariables() const 
get variables of this panorama 
Definition of dialog to edit image variables. 
void OnHelp(wxCommandEvent &e)
shows the help 
static MainFrame * Get()
hack.. kind of a pseudo singleton... 
wxTextCtrl * GetImageVariableControl(const wxWindow *parent, const char *varname)
bool ApplyNewVariables()
applies the changed variables to the Panorama class, using CommandHistory 
static GlobalCmdHist & getInstance()
void OnOk(wxCommandEvent &e)
Saves current state of all checkboxes when closing dialog with Ok. 
void addCommand(PanoCommand *command, bool execute=true)
Adds a command to the history. 
void createEMoRLUT(const std::vector< float > ¶ms, VECTOR &lut)
std::map< std::string, Variable > VariableMap
~ImageVariableDialog()
destructor, saves position 
void OnShowResponseGraph(wxCommandEvent &e)
shows a popup with response graph 
void setSize(vigra::Size2D val)
Set the image size in pixels. 
ImageVariableDialog(wxWindow *parent, HuginBase::Panorama *pano, HuginBase::UIntSet imgs)
Constructor, read from xrc ressource; restore last uses settings and position. 
const SrcPanoImage & getImage(std::size_t nr) const 
get a panorama image, counting starts with 0 
static const char * m_varNames[]
All variables of a source image. 
void StoreFramePositionOnly(wxTopLevelWindow *frame, const wxString &basename)
HuginBase::UIntSet m_images
HuginBase::Panorama * m_pano
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
void InitValues()
copy the variables from Panorama to dialog 
void RestoreFramePositionOnly(wxTopLevelWindow *frame, const wxString &basename)