44 wxXmlResource::Get()->LoadDialog(
this,
parent,
"image_variables_dialog");
64 wxConfigBase::Get()->Flush();
76 wxXmlResource::GetXRCID(
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)
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 )
133 wxCommandEvent
dummy;
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),
213 std::vector<HuginBase::SrcPanoImage>
SrcImgs;
231 if(!commands.empty())
274 wxTextCtrl* control =
XRCCTRL(*
this,
"image_variable_Ra", wxTextCtrl);
277 control =
XRCCTRL(*
this,
"image_variable_Rb", wxTextCtrl);
280 control =
XRCCTRL(*
this,
"image_variable_Rc", wxTextCtrl);
283 control =
XRCCTRL(*
this,
"image_variable_Rd", wxTextCtrl);
286 control =
XRCCTRL(*
this,
"image_variable_Re", wxTextCtrl);
292 "v",
"a",
"b",
"c",
"d",
"e",
"g",
"t",
294 "Vb",
"Vc",
"Vd",
"Vx",
"Vy",
295 "Ra",
"Rb",
"Rc",
"Rd",
"Re", 0};
325 wxWindow *
button = (wxWindow*) e.GetEventObject();
341 std::vector<double>
vigCorr(4,0);
350 graph.SetChartArea(10, 10, 290, 190);
351 graph.SetChartDisplay(0, 0.8, 1, 1);
352 graph.DrawGrid(6, 6);
356 srcImage.setRadialVigCorrCoeff(
vigCorr);
363 std::vector<hugin_utils::FDiff2D>
points;
373 wxWindow *
button = (wxWindow*) e.GetEventObject();
401 graph.SetChartArea(10, 10, 290, 190);
402 graph.SetChartDisplay(0, 0, 1, 1);
403 graph.DrawGrid(6, 6);
409 std::vector<float>
emor(5, 0.0);
414 std::vector<hugin_utils::FDiff2D>
points;
428 std::vector<double>
outLut;
431 graph.SetChartDisplay(0, 0,
outLut.size()-1.0, 1.0);
442 std::vector<hugin_utils::FDiff2D>
points;
451 wxWindow *
button = (wxWindow*) e.GetEventObject();
wxTextCtrl * GetImageVariableControl(const wxWindow *parent, const char *varname)
Definition of dialog to edit image variables.
@ RESPONSE_LINEAR
linear response
@ RESPONSE_EMOR
empirical model of response
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
SrcPanoImage getSrcImage(unsigned imgNr) const
get a description of a source image
VariableMapVector getVariables() const
get variables of this panorama
All variables of a source image.
a variable has a value and a name.
void OnOk(wxCommandEvent &e)
Saves current state of all checkboxes when closing dialog with Ok.
void OnHelp(wxCommandEvent &e)
shows the help
static const char * m_varNames[]
void OnResponseSelected(wxCommandEvent &e)
response type changed
bool ApplyNewVariables()
applies the changed variables to the Panorama class, using CommandHistory
wxGraphTools::GraphPopupWindow * m_popup
void InitValues()
copy the variables from Panorama to dialog
void SelectTab(size_t i)
selects the tab with index i
void OnShowVignettingGraph(wxCommandEvent &e)
shows a popup with vignetting graph
ImageVariableDialog(wxWindow *parent, HuginBase::Panorama *pano, HuginBase::UIntSet imgs)
Constructor, read from xrc ressource; restore last uses settings and position.
HuginBase::Panorama * m_pano
~ImageVariableDialog()
destructor, saves position
void OnShowDistortionGraph(wxCommandEvent &e)
shows a popup with distortion graph
HuginBase::UIntSet m_images
void OnShowResponseGraph(wxCommandEvent &e)
shows a popup with response graph
void SetGuiLevel(GuiLevel newLevel)
sets the GuiLevel
static MainFrame * Get()
hack.. kind of a pseudo singleton...
void DisplayHelp(wxString section=wxEmptyString)
call help browser with given file
PanoCommand to combine other PanoCommands.
void addCommand(PanoCommand *command, bool execute=true)
Adds a command to the history.
static GlobalCmdHist & getInstance()
update variables of a single image
std::vector< VariableMap > VariableMapVector
std::set< unsigned int > UIntSet
std::map< std::string, Variable > VariableMap
bool str2double(const wxString &s, double &d)
void StoreFramePositionOnly(wxTopLevelWindow *frame, const wxString &basename)
wxString doubleTowxString(double d, int digits)
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
void RestoreFramePositionOnly(wxTopLevelWindow *frame, const wxString &basename)
void createEMoRLUT(const std::vector< float > ¶ms, VECTOR &lut)
void enforceMonotonicity(LUT &lut)
enforce monotonicity of an array (mostly used for lookup tables)
include file for the hugin project
const Map::mapped_type & const_map_get(const Map &m, const typename Map::key_type &key)
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.