Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PerspectivePanel.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
10 /* This is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This software is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public
21  * License along with this software. If not, see
22  * <http://www.gnu.org/licenses/>.
23  *
24  */
25 
26 #ifndef PERSPECTIVEPANEL_H
27 #define PERSPECTIVEPANEL_H
28 
29 #include "panoinc_WX.h"
30 #include "wx/clrpicker.h"
31 #include "PerspectiveImageCtrl.h"
33 
37 class PerspectivePanel : public wxPanel
38 {
39 public:
43  bool Create(wxWindow* parent, MyExecPanel* logWindow);
45  void OnProcessFinished(wxCommandEvent& e);
47  wxString GetStatusString();
49  void SetImage(const wxString& filename);
50 
51 protected:
52  // event handler
53  void OnSize(wxSizeEvent& e);
54  void OnLoadImage(wxCommandEvent& e);
55  void OnZoom(wxCommandEvent& e);
56  void OnPreview(wxCommandEvent& e);
57  void OnColourChanged(wxColourPickerEvent& e);
58  void OnCropChanged(wxCommandEvent& e);
59  void OnRotationChanged(wxCommandEvent& e);
60  void OnModeChanged(wxCommandEvent& e);
61  void OnFindLines(wxCommandEvent& e);
62  void OnSavePTO(wxCommandEvent& e);
63  void OnSaveOutput(wxCommandEvent& e);
64 
65 private:
67  bool ReadInputs();
69  bool GetPanorama(HuginBase::Panorama& pano, const bool optimized = true);
73  const double GetRoll() const;
76  wxChoice* m_previewChoice{ nullptr };
77  wxChoice* m_zoomChoice{ nullptr };
78  wxChoice* m_rotationChoice{ nullptr };
79  wxChoice* m_modeChoice{ nullptr };
80  wxTextCtrl* m_focallengthTextCtrl{ nullptr };
81  wxTextCtrl* m_cropTextCtrl{ nullptr };
82  wxButton* m_findLineButton{ nullptr };
83  wxButton* m_outputButton{ nullptr };
84  wxStaticText* m_helpTextCtrl{ nullptr };
85  MyExecPanel* m_logWindow{ nullptr };
90  int m_degDigits{ 3 };
92  wxArrayString m_tempFiles;
93  DECLARE_DYNAMIC_CLASS(PerspectivePanel)
94 };
95 
96 #endif // PERSPECTIVEPANEL_H
wxArrayString m_tempFiles
temp files, which should be deleted at end
wxTextCtrl * m_cropTextCtrl
bool Create(wxWindow *parent, MyExecPanel *logWindow)
create the panel and populate all controls
wxString GetStatusString()
return help text for current mode
void OnSize(wxSizeEvent &e)
void OnFindLines(wxCommandEvent &e)
wxButton * m_outputButton
wxStaticText * m_helpTextCtrl
void OnModeChanged(wxCommandEvent &e)
const double GetRoll() const
return the roll angle in degree
declaration of preview for lens calibration gui
bool ReadInputs()
read the values from the input boxes
PerspectiveImageCtrl::ImageRotation m_exifRotation
save rotation as written in EXIF
Model for a panorama.
Definition: Panorama.h:152
wxChoice * m_modeChoice
void OnProcessFinished(wxCommandEvent &e)
clean up temporary files at end
const PerspectiveImageCtrl::ImageRotation GetRotation() const
return the image rotation
~PerspectivePanel()
destructor, save position and size
void OnSaveOutput(wxCommandEvent &e)
void OnZoom(wxCommandEvent &e)
void OnLoadImage(wxCommandEvent &e)
PerspectiveImageCtrl * m_preview
controls
bool GetPanorama(HuginBase::Panorama &pano, const bool optimized=true)
return Pano object, it is optimized and the crop set when optimized=true
wxChoice * m_zoomChoice
image previewer for perspective correction
MyExecPanel * m_logWindow
void OnCropChanged(wxCommandEvent &e)
void OnRotationChanged(wxCommandEvent &e)
wxButton * m_findLineButton
ImageRotation
image rotation.
void OnColourChanged(wxColourPickerEvent &e)
include file for the hugin project
void OnSavePTO(wxCommandEvent &e)
HuginBase::SrcPanoImage m_srcImage
SrcPanoImage, contains information about the image.
void OnPreview(wxCommandEvent &e)
wxTextCtrl * m_focallengthTextCtrl
void SetImage(const wxString &filename)
load the given image
All variables of a source image.
Definition: SrcPanoImage.h:194
panel for enfuse GUI
wxChoice * m_previewChoice
wxChoice * m_rotationChoice